A model optimization method and system based on escape optimization algorithm EA

By monitoring the loss function and gradient norm in real time during 3D-CNN network model training and injecting disturbance terms using the escape optimization algorithm, the problem of the 3D-CNN model falling into local optimality was solved, and the training efficiency and fault identification capabilities were improved, especially for the early detection of diesel engine faults.

CN120216937BActive Publication Date: 2025-09-09NO 15 INST OF CHINA ELECTRONICS TECH GRP

Patent Information

Application Number
CN202510696517.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-09
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

Traditional stochastic gradient descent optimization algorithms are prone to falling into local optimal solutions when processing 3D-CNN models, resulting in poor spatiotemporal correlation of diesel engine fault features, inability to effectively extract fault features, and lack of real-time monitoring of the dynamic evolution of gradients.

Method used

The escape optimization algorithm (EA) is used to calculate the loss function change rate and gradient norm in real time. When the 3D-CNN network model is determined to be stuck in a local optimal state, gradient sign perturbation, spatial dimension perturbation, and temporal dimension perturbation are injected to enhance feature diversity, and training is continued until the loss converges.

Benefits of technology

It improved the training efficiency of the 3D-CNN network model by 40%, increased the sensitivity of identifying fault signs by 15%, and maintained the feasibility of edge device deployment, achieving a coordinated improvement in model performance and training stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216937B_ABST
    Figure CN120216937B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of marine diesel engine fault diagnosis technology. A model optimization method based on the escape optimization algorithm EA includes the following steps: in the process of 3D-CNN network model training, the loss function change rate and gradient norm are calculated in real time; when the preset conditions are met for N training cycles, the 3D-CNN network model is judged to be stuck in a local optimal state; when the 3D-CNN network model is stuck in a local optimal state, a disturbance term is injected into the parameter update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity; the 3D-CNN network model with enhanced feature diversity is continued to be trained to obtain an optimized 3D-CNN network model; based on the optimized 3D-CNN network model, a time series of diesel engine health indicators is obtained. The whole process forms a closed loop of "monitoring-escape-optimization", which realizes the synergistic improvement of model performance and training stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of marine diesel engine fault diagnosis, and in particular relates to a model optimization method and system based on an escape optimization algorithm (EA). Background Art

[0002] In the field of marine diesel engine fault diagnosis, deep learning methods based on 3D-CNNs must simultaneously process the spatial distribution of vibration signals and their dynamic temporal evolution, posing a dual challenge to the model optimization process. Traditional stochastic gradient descent optimization algorithms, when tackling such high-dimensional, non-convex optimization problems, suffer from inherent drawbacks such as vanishing gradients or stagnant parameter updates. In particular, they are prone to falling into local optima in flat regions of the loss surface, causing the model to converge to a suboptimal feature representation state, severely hindering the effective extraction of the temporal and spatial correlations of fault features.

[0003] Existing technologies typically employ fixed-step random perturbation strategies to address 3D-CNN optimization stagnation, but these strategies fail to fully consider the coupled nature of spatiotemporal features. Simple parameter perturbations in the spatial dimension can disrupt the spatial structure priors of the convolution kernel, while coarse-grained adjustments in the temporal dimension struggle to capture the dynamic propagation patterns of diesel engine vibration signals. This non-directional perturbation mechanism exacerbates feature space decoupling and reduces the efficiency of fault-sensitive feature transfer. Furthermore, existing methods lack real-time monitoring of the dynamic evolution of gradients, making it impossible to accurately determine parameter space stagnation, leading to inappropriate control over the timing and intensity of perturbation intervention. Summary of the Invention

[0004] Based on this, it is necessary to provide a model optimization method and system based on the escape optimization algorithm EA to address the above technical problems.

[0005] In a first aspect, the present application provides a model optimization method based on an escape optimization algorithm EA, comprising:

[0006] During the 3D-CNN network model training process, the loss function change rate and gradient norm are calculated in real time. When the preset conditions are met for N training cycles, the 3D-CNN network model is determined to have fallen into a local optimal stagnation.

[0007] When the 3D-CNN network model falls into a local optimal stagnation, a disturbance term is injected into the parameter update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity;

[0008] Continuing to train the 3D-CNN network model with enhanced feature diversity until the loss converges or the maximum number of iterations is reached, thereby obtaining an optimized 3D-CNN network model;

[0009] According to the optimized 3D-CNN network model, a time series of diesel engine health indicators is obtained.

[0010] In some practicable embodiments, during the training of the 3D-CNN network model, the step of calculating the loss function change rate and the gradient norm in real time, and determining that the 3D-CNN network model has fallen into a local optimal stagnation when a preset condition is met for N training cycles, includes:

[0011] The formula for calculating the rate of change of the loss function is:

[0012] ;

[0013] in, represents the rate of change of the loss function, Represents the loss value of epoch, Represents the loss value of the first M epochs;

[0014] when When the loss change is determined to be stagnant, represents the loss change rate threshold;

[0015] Gradient norm calculation formula:

[0016] ;

[0017] in, represents the rate of change of the gradient norm, Indicates the The gradient of the layer network parameters, Represents the L2 gradient norm of the full network parameters;

[0018] when When , it is determined that the gradient norm disappears, represents the gradient norm threshold;

[0019] when ,and When the condition is met for N consecutive training cycles, the 3D-CNN network model is judged to be stuck in a local optimal state.

[0020] In some practicable embodiments, when the 3D-CNN network model falls into a local optimal stagnation, the step of injecting a disturbance term according to the parameter update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity includes:

[0021] The perturbation terms include gradient sign perturbation, spatial dimension perturbation and time dimension perturbation;

[0022] According to the gradient sign perturbation, a perturbation term is injected into the weight update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity, wherein the calculation formula of the gradient sign perturbation is:

[0023] ;

[0024] in, represents the learning rate, represents the disturbance intensity, represents the gradient direction symbol matrix, Indicates time;

[0025] Randomly rotating the spatial convolution kernel of the 3D-CNN network model according to the spatial dimension perturbation to obtain a 3D-CNN network model with enhanced feature diversity;

[0026] According to the time dimension perturbation, the time convolution layer of the 3D-CNN network model is expanded to obtain a 3D-CNN network model with enhanced feature diversity.

[0027] In some practicable embodiments, the step of continuing to train the 3D-CNN network model with enhanced feature diversity until the loss converges or the maximum number of iterations is reached to obtain an optimized 3D-CNN network model includes:

[0028] According to the cumulative number of trigger disturbances, the learning rate is adjusted according to the cosine annealing rule to obtain the current learning rate;

[0029] According to the current learning rate, the 3D-CNN network model with enhanced feature diversity is continuously monitored in multi-dimensional real-time, and the 3D-CNN network model with enhanced feature diversity is continuously trained to obtain an optimized 3D-CNN network model.

[0030] In some practicable embodiments, the step of obtaining a time series of diesel engine health indicators based on the optimized 3D-CNN network model includes:

[0031] Diesel engine sensor data is divided into 3D tensors according to fixed time windows;

[0032] Input the 3D tensor into the optimized 3D-CNN network model to obtain high-level feature maps and low-level feature maps;

[0033] Performing cross-layer connection fusion on the high-level feature map and the low-level feature map to obtain enhanced features;

[0034] The enhanced features are then input into the optimized 3D-CNN network model to obtain the diesel engine health index;

[0035] The diesel engine health indicators of each window are spliced ​​in chronological order to obtain the health indicator time series.

[0036] In some practicable embodiments, during the training of the 3D-CNN network model, the step of calculating the loss function change rate and the gradient norm in real time, and determining that the 3D-CNN network model has fallen into a local optimal stagnation when a preset condition is met for N training cycles, includes:

[0037] according to ,and , get the first judgment condition;

[0038] When the loss value of consecutive epochs meets the single-step absolute loss reduction When the update amplitude is less than the minimum necessary decrease for the effective update of the 3D-CNN network model parameters, the second judgment condition is obtained, where the single-step absolute loss decrease The calculation formula is:

[0039] ;

[0040] When the loss curvature of the loss function is approximately equal to 0, the third judgment condition is obtained, wherein the calculation formula of the loss curvature of the loss function is:

[0041] ;

[0042] in, express The current window, express The previous window, Indicates the concavity and convexity of the loss surface, represents the curvature threshold;

[0043] If the first judgment condition, the second judgment condition and the third judgment condition are all met, the 3D-CNN network model falls into a local optimal stagnation.

[0044] In a second aspect, the present application provides a model optimization system based on an escape optimization algorithm EA, which is applied to the aforementioned model optimization method based on the escape optimization algorithm EA, and the system includes:

[0045] A judgment unit is used to calculate the loss function change rate and gradient norm in real time during the 3D-CNN network model training process. When the preset conditions are met for N training cycles, it is determined that the 3D-CNN network model has fallen into a local optimal stagnation;

[0046] An enhancement unit, configured to inject a disturbance term into a parameter update direction of the 3D-CNN network model when the 3D-CNN network model falls into a local optimal stagnation, thereby obtaining a 3D-CNN network model with enhanced feature diversity;

[0047] An optimization unit is used to continue training the 3D-CNN network model with enhanced feature diversity until the loss converges or the maximum number of iterations is reached, thereby obtaining an optimized 3D-CNN network model;

[0048] The result unit is used to obtain a time series of diesel engine health indicators based on the optimized 3D-CNN network model.

[0049] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the aforementioned method when executing the computer program.

[0050] In a fourth aspect, the present application provides a computer storage medium having a computer program stored thereon, which implements the steps of the aforementioned method when executed by a processor.

[0051] In a fifth aspect, the present application provides a computer program, which implements the steps of the aforementioned method when executed by a processor.

[0052] Beneficial Effects: A model optimization method based on the escape optimization algorithm (EA) calculates the rate of change of the loss function and the gradient norm in real time during 3D-CNN network model training. When preset conditions are met for N training cycles, the 3D-CNN network model is determined to have reached a local optimum. When the 3D-CNN network model reaches a local optimum, a perturbation term is injected into the parameter update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity. The 3D-CNN network model with enhanced feature diversity is trained again until the loss converges or the maximum number of iterations is reached, resulting in an optimized 3D-CNN network model. A time series of diesel engine health indicators is generated based on the optimized 3D-CNN network model. EA not only improves training efficiency by 40% but also enables earlier identification of fault signs, such as a 15% increase in detection sensitivity for progressive faults such as bearing wear, while maintaining the feasibility of edge device deployment. The entire process forms a closed loop of "monitoring-escape-optimization," achieving a synergistic improvement in model performance and training stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 The figure is a flowchart of a model optimization method based on an escape optimization algorithm EA in one embodiment.

[0055] Figure 2 It is a schematic diagram of a model optimization method based on the escape optimization algorithm EA in one embodiment. DETAILED DESCRIPTION

[0056] To facilitate understanding of the present application, the present application will be described more fully below with reference to the accompanying drawings. The accompanying drawings provide embodiments of the present application. However, the present application may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The term "and / or" as used herein includes any and all couplings of one or more of the associated listed items.

[0058] It will be understood that the terms "first", "second", etc. used in this application may be used to describe various elements in this document, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element.

[0059] The following are some explanations of some terms involved in this application to facilitate understanding of this application:

[0060] Epoch, represents the loss value of the current 3D-CNN network model after it completely traverses the entire training dataset once.

[0061] The Z-score (standard score) is a statistical measure that indicates the position of a data point relative to the mean and standard deviation of a data set.

[0062] LSTM (Long Short-Term Memory) is used to address the vanishing / exploding gradient problem of traditional RNNs when processing long sequences of data. By introducing a gating mechanism and memory cells, it can effectively capture long-term dependencies in time series.

[0063] Sigmoid (S-type function) is a classic nonlinear activation function, which is widely used in the output layer of neural networks for binary classification problems or in scenarios where values ​​need to be compressed to the [0, 1] range.

[0064] PCA (Principal Component Analysis) is a linear dimensionality reduction method that projects high-dimensional data into a low-dimensional space through an orthogonal transformation, retaining the direction of maximum variance (principal component). It is used for data compression, visualization, and denoising.

[0065] t-SNE (t-Distributed Stochastic Neighbor Embedding) is a nonlinear dimensionality reduction method that focuses on preserving local similarities in high-dimensional data and is suitable for high-dimensional data visualization (such as MNIST images and gene expression data).

[0066] 3D-CNN (3D Convolutional Neural Network) is a deep learning model specifically designed to process three-dimensional spatiotemporal data. It uses three-dimensional convolution kernels to simultaneously extract spatial features (length, width, and height) and temporal features (changes between frames), and is widely used in fields such as three-dimensional data processing.

[0067] A 3D tensor is a multidimensional array structure in deep learning that organizes data in three dimensions (length, width, and channel / time) and can be viewed as a stack of multiple 2D matrices.

[0068] Skip connections are a type of cross-layer direct connection in neural networks, allowing input signals to bypass some layers and pass directly to deeper layers. The core idea is to alleviate the vanishing / exploding gradient problem in deep networks through identity mapping and promote information flow.

[0069] EA stands for Escape Algorithm, which is an optimization algorithm that injects perturbations to help deep learning models (such as 3D-CNN) escape from local optimality when they stagnate during training.

[0070] The Lightweight Temporal Warping Network (LTWN) is a lightweight neural network module designed specifically for time series data. It is used to dynamically adjust the degree of deformation of the time axis, thereby enhancing the model's ability to model non-stationary time series signals (such as diesel engine vibration, speech, ECG, etc.).

[0071] like Figure 1 and Figure 2 As shown, in the first aspect, the present application provides a model optimization method based on the escape optimization algorithm EA, the method comprising:

[0072] S100, during the training process of the 3D-CNN network model, the loss function change rate and gradient norm are calculated in real time. When the preset conditions are met for N training cycles, it is determined that the 3D-CNN network model has fallen into a local optimal stagnation.

[0073] Specifically, determining whether the 3D-CNN network model is stuck in a local optimal state may include the following steps:

[0074] The formula for calculating the rate of change of the loss function is:

[0075] ;

[0076] in, represents the rate of change of the loss function, Represents the loss value of epoch, Represents the loss value of the first M epochs;

[0077] when When the loss change is determined to be stagnant, represents the loss change rate threshold;

[0078] Gradient norm calculation formula:

[0079] ;

[0080] in, represents the rate of change of the gradient norm, Indicates the The gradient of the layer network parameters (reflecting the direction of parameter update), Represents the L2 gradient norm of the full network parameters;

[0081] when When , it is determined that the gradient norm disappears, represents the gradient norm threshold;

[0082] when ,and When the condition is met for N consecutive training cycles, the 3D-CNN network model is judged to be stuck in a local optimal state.

[0083] For example, , (loss change stagnation threshold); , (gradient vanishing threshold); N=5 (number of consecutive stagnation cycles).

[0084] Further, according to ,and , get the first judgment condition;

[0085] When the loss value of consecutive epochs meets the single-step absolute loss reduction When, for example, Can be set to The update amplitude is less than the minimum necessary decrease for the effective update of the 3D-CNN network model parameters, and the second judgment condition is obtained. Among them, the single-step absolute loss decrease The calculation formula is:

[0086] ;

[0087] When the loss curvature of the loss function is approximately equal to 0, the third judgment condition is obtained, wherein the calculation formula of the loss curvature of the loss function is:

[0088] ;

[0089] , indicating the current window;

[0090] , indicating the previous window;

[0091] in, express , Indicates the concavity and convexity of the loss surface, Indicates the curvature threshold value range, which can be set as needed, for example 1×10⁻ 7 to 1×10⁻ 5 , preferably 5×10⁻ 7 ;

[0092] If the first judgment condition, the second judgment condition and the third judgment condition are all met, the 3D-CNN network model falls into a local optimal stagnation.

[0093] It should be noted that, and The determination method can be optimized on the validation set through grid search, or set according to the statistics of the normal decline stage in the early stage of training (such as the mean ±3σ, where ±3σ represents the range of three times the standard deviation).

[0094] The three jointly cover long-term trends, single-step updates and surface geometric characteristics. The joint conditions can exclude saddle points (non-zero second-order curvature) and noise interference (single-step descent is valid).

[0095] S200, when the 3D-CNN network model falls into a local optimal stagnation, injecting a disturbance term into the parameter update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity.

[0096] Specifically, obtaining a 3D-CNN network model with enhanced feature diversity may include the following steps:

[0097] S201, the perturbation term includes gradient sign perturbation, spatial dimension perturbation and time dimension perturbation;

[0098] According to the gradient sign perturbation, a perturbation term is injected into the weight update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity, wherein the calculation formula of the gradient sign perturbation is:

[0099] ;

[0100] in, represents the learning rate, represents the disturbance intensity, represents the gradient direction symbol matrix, Indicates time. It represents the directional perturbation applied along the gradient direction, and the intensity increases with the stagnation time, forming a "mild test Powerful breakthrough mode.

[0101] Specifically, the disturbance intensity coefficient With the number of consecutive stagnation cycles Linear growth, yes Assign an initial strength, such as 0.01, and construct a growth coefficient, such as 0.2, and constrain the upper limit, such as a maximum of 0.1. In this way, the calculation formula is:

[0102]

[0103] in, represents the initial strength, represents the growth coefficient, Indicates time.

[0104] S202: Randomly rotate the spatial convolution kernel of the 3D-CNN network model according to the spatial dimension disturbance to obtain a 3D-CNN network model with enhanced feature diversity.

[0105] Specifically, for convolution kernel selection, 50% of the convolution kernels in the convolution layers that process spatial features in 3D-CNN (e.g., the first and second layers) are randomly selected (e.g., uniformly random, distributed by layer, etc.) and rotated. The rotation angle can range from -5° to 5°, with uniform random sampling. Bilinear interpolation is performed on the rotated kernel values ​​to maintain spatial continuity, and normalization is performed to ensure that the L2 norm of the rotated kernels remains consistent with the original kernels. By breaking spatial symmetry through small rotations, the robustness of the 3D-CNN network model to mechanical component deformation (e.g., geometric distortion caused by bearing wear) is enhanced.

[0106] In addition to rotating the convolution kernel, you can also scale the convolution kernel. The scaling factor and sampling range are associated with the depth of the convolution layer, and the convolution kernel is scaled according to the scaling factor.

[0107] In addition, the convolution kernel can be elastically transformed by applying a random displacement to the kernel coordinates. For example, the displacement of the elastic transformation is 0.5 pixels in the shallow layers and 0.1 pixels in the deep layers. After applying the displacement that conforms to the Gaussian distribution, the shallow layers can be deformed more, enhancing the diversity of local features. The deformation intensity of the deep layers is reduced, protecting the stability of the high-level semantic structure.

[0108] S203: Expand the temporal convolution layer of the 3D-CNN network model according to the temporal dimension perturbation to obtain a 3D-CNN network model with enhanced feature diversity.

[0109] Specifically, the temporal feature extraction of the temporal convolution layer extracts the output feature sequence of the temporal convolution layer. ,in, is the time step, is the number of channels.

[0110] Dynamic Time Warping (DTW) scaling, such as the scaling factor (Time axis extended by 20%) Constraint is [1.0, 1.5]; interpolation formula:

[0111] , ;

[0112] in, Represents the expanded time series feature sequence, improving the fault trend prediction capability, Represents the original time series feature sequence: the output feature of the time convolution layer, the dimension is , Represents the time step index after expansion: the position number in the expanded sequence, Indicates the time expansion factor: controls the extension ratio of the timing sequence. represents the original time step: the length of the time dimension of the input sequence, , extended time step: the length of the extended sequence after rounding down.

[0113] The time point after the expansion , mapped back to the position of the original sequence . Only for future time steps , and expands it, preserving the historical time series information unchanged. This ensures that fault prediction relies only on observed historical data.

[0114] Through time axis expansion and linear interpolation, dynamic enhancement of time series characteristics is achieved, which effectively solves the problem of insufficient modeling ability of traditional time series models for non-stationary signals and provides key technical support for early warning of diesel engine failures.

[0115] Dynamic time expansion is used to dynamically expand the output feature sequence of the 3D-CNN temporal convolutional layer to enhance the model's ability to capture non-stationary time series signals. Furthermore, a learnable time warping function is used to adaptively adjust the output features of the temporal convolutional layer. This function, implemented by a lightweight neural network (such as a conventional lightweight time warping network), automatically optimizes the degree of time axis deformation based on the temporal characteristics of the input signal, thereby enhancing the model's adaptability to non-stationary fault signals.

[0116] The gradient sign perturbation and the spatial dimension perturbation and the time dimension can be performed in parallel and take effect in the following order: parameter update Spatial convolution kernel rotation Time series expansion. For example, the perturbation intensity is related to the spatial rotation angle. , time expansion due to .

[0117] Based on dual thresholds based on the gradient norm and the loss change rate, the system simultaneously monitors the KL divergence of the activation distributions of each convolutional layer. This comprehensive assessment determines when a 3D-CNN network model simultaneously falls into a state of parameter space flatness and feature expression degradation. At this point, the confidence level of the escape mechanism triggering increases to over 97%.

[0118] As the training stagnation time increases, Linear growth, spatial and temporal disturbances are enhanced synchronously, forming "parameter space The collaborative escape mechanism of "time".

[0119] During each training iteration, the 3D-CNN network model automatically calculates the size of the input image region that the current convolutional layer can effectively perceive (i.e., the receptive field). Shallow layers perceive small details, while deep layers perceive large structures. Based on the real-time receptive field size of each layer, the maximum perturbation amplitude allowed for that layer is automatically set. For example:

[0120] For shallow networks (small receptive field): only small deformations are allowed (such as 1 pixel displacement), the rotation angle is limited (such as within ±5°), and the scaling ratio is controlled (such as 0.9-1.1 times) to ensure that fine features such as screw texture are not destroyed.

[0121] For deep networks (large receptive field): allow larger deformations (such as 10 pixel displacement), relax rotation restrictions (such as ±20°), expand the scaling range (such as 0.8-1.3 times), and adapt to large changes such as the overall position offset of the bearing.

[0122] S300, for the 3D-CNN network model with enhanced feature diversity, continue training until the loss converges or the maximum number of iterations is reached, and obtain the optimized 3D-CNN network model.

[0123] Specifically, obtaining the optimized 3D-CNN network model may include the following steps:

[0124] S301, according to the cumulative number of trigger disturbances, adjust the learning rate according to the cosine annealing rule to obtain the current learning rate.

[0125] Specifically, the learning rate calculation formula is:

[0126] ;

[0127] in, Indicates the current time step The learning rate, represents the initial learning rate, Indicates the maximum allowed number of stagnation times, Indicates the current time step (such as the number of training cycles, iterations, or the cumulative number of perturbation triggers). hour (completely attenuated).

[0128] Trigger disturbance times As the learning rate increases, the learning rate (a hyperparameter in deep learning optimization algorithms that controls the step size of each parameter update) gradually decays, balancing the model's ability to escape local optima with stable convergence. For example, if step decay (learning rate from 0.001 to 0.0001) is triggered after the third perturbation, the 3D-CNN network model may be unable to effectively utilize subsequent perturbations due to the sudden drop in learning rate. Cosine annealing provides a smooth transition, gradually decreasing the learning rate, balancing escape capability with stability and avoiding training oscillations caused by step decay. In other words, the learning rate is a hyperparameter that controls the step size of parameter updates. In the early stages, a higher learning rate is used to support rapid escape after perturbations; in the later stages, a decayed learning rate is used to ensure stable convergence.

[0129] S302: Based on the current learning rate, continuously perform multi-dimensional real-time monitoring on the 3D-CNN network model with enhanced feature diversity, continue training the 3D-CNN network model with enhanced feature diversity, and obtain an optimized 3D-CNN network model.

[0130] Specifically, we monitor the loss change rate and gradient activity respectively. In gradient activity monitoring, when the dynamic learning rate is low, the gradient descent step size is reduced, which may suppress the gradient activity; the gradient activity threshold increases with the learning rate. Dynamic adjustment to avoid misjudging the vanishing gradient due to a decrease in learning rate (the gradient activity threshold is dynamically adjusted based on the square root ratio of the current learning rate to the initial learning rate. The initial threshold is set to a preset value. During training, as the learning rate gradually decreases, the threshold is reduced accordingly by the square root of the ratio of the two, ensuring that misjudgment is avoided in the high learning rate stage and sensitivity is maintained in the low learning rate stage). Loss change rate monitors the average rate of change of loss in the sliding window When the learning rate decreases, the loss changes by May decrease synchronously; the loss change rate threshold changes with the learning rate Scaling to avoid misjudging loss stagnation due to learning rate decay (the loss change rate threshold is adjusted linearly with the learning rate. After the initial threshold is set, it is lowered by the same proportion as the learning rate decreases, so that the threshold change matches the parameter update amplitude, avoiding misjudgment of loss change stagnation due to learning rate decay. For example, when the initial learning rate is 0.001 and the initial gradient activity threshold is 0.0001, if the current learning rate drops to 0.0005, the gradient activity threshold is adjusted to about 70.7% of the original value, and the loss change rate threshold is synchronously reduced to 50% of the initial value.).

[0131] Feature diversity monitoring of 3D-CNN network model, calculation formula:

[0132]

[0133] in, It represents the feature diversity index, which quantifies the diversity of the model feature distribution. The larger the value, the more significant the feature difference. Indicates the number of feature channels (such as the number of output channels of the convolutional layer). The KL divergence of multi-channel features is calculated and averaged to avoid the number of channels affecting the indicator scale. Indicates the The current feature distribution of each channel (usually the probability distribution of activation values) reflects the current batch of data in the channel Characteristic response pattern on . Indicates the The historical feature distribution baseline of each channel (such as the distribution of the sliding average), the historical distribution baseline The exponentially weighted average update of the sliding window (window size = 100 batches) is used as the reference distribution to compare the degree of deviation of the current feature. Represents KL divergence, which measures and The greater the difference in distribution, the higher the FDI value (when calculating the KL divergence, a minimum correction is applied to the activation value distribution to avoid numerical calculation errors caused by zero probability and ensure the stability of distribution comparison).

[0134] Reducing the learning rate may reduce the amplitude of parameter updates, resulting in slower changes in feature distribution. is a preset decision threshold (such as ), used to judge Is it too low? It is an externally set hyperparameter and does not participate in The calculation is only used for subsequent decision making.

[0135] if , the feature diversity is insufficient and disturbance needs to be triggered;

[0136] if , continue training normally.

[0137] After the disturbance is triggered, the learning rate is updated. Each time the disturbance is triggered (escape mechanism), the cumulative number of times t is increased by 1, and the learning rate is updated according to the formula .

[0138] S400: Obtaining a time series of diesel engine health indicators based on the optimized 3D-CNN network model.

[0139] The 3D-CNN network model is a conventional model, consisting of two parts: convolutional layers and fully connected layers. The convolutional layers extract high- and low-level features; the fully connected layers fuse these features for dimensionality reduction and generate diesel engine health indicators. For example, the kernel sizes of the convolutional layers are 7×7×2, 3×3×2, and 3×3×2, respectively, with a stride of 2×2×1.

[0140] Specifically, obtaining the time series of the diesel engine health index may include the following steps:

[0141] S401 , dividing the diesel engine sensor data into 3D tensors according to fixed time windows.

[0142] Diesel engine sensor data (vibration, temperature, pressure, etc.) is divided into 3D tensors according to fixed time windows (such as 10 seconds / window) ,in:

[0143] : time step (such as 100 sampling points);

[0144] : spatial dimension (e.g., topological grid of multi-sensor layout);

[0145] : Number of channels (different sensor types).

[0146] For example, an M×N sensor array is arranged on the surface of the diesel engine, with a spatial dimension of S=M×N, a time window set to 10 seconds (covering 1000 sampling points, a sampling rate of 100 Hz), and each sensor channel is independently normalized to zero mean and unit variance.

[0147] S402: Input the 3D tensor into the optimized 3D-CNN network model to obtain a high-level feature map and a low-level feature map.

[0148] Specifically, normalization: normalize each sensor channel. Then input the normalized data into the optimized 3D-CNN network model to extract high-level feature maps. and low-level feature maps .

[0149] Its function is to capture the dynamic process of diesel engine operation by time window division; multi-scale feature fusion enhances the sensitivity to early weak faults.

[0150] The convolution layer of 3D-CNN extracts multi-scale features through convolution kernels of different depths, and high-level feature maps and low-level feature maps are realized through convolution layers of different depths.

[0151] S403: Perform cross-layer connection fusion on the high-level feature map and the low-level feature map to obtain enhanced features.

[0152] By integrating feature maps from different layers (high-level and low-level), enhanced features are generated that combine both semantic information (high-level) and detailed information (low-level). For example, high-level feature maps are resized to the size of low-level feature maps using bilinear interpolation, concatenated along the channel dimension, and then subjected to 1×1×1 convolution to reduce the number of channels. The final fused feature dimension remains consistent with the input.

[0153] In step S404, the enhanced features are input into the optimized 3D-CNN network model to obtain the diesel engine health index.

[0154] The fused features are input into the fully connected layer after dimensionality reduction by global average pooling.

[0155] Quantifying health status: integrating features Input the fully connected layer and output the health score ( is the health status dimension, such as wear degree, thermal stress level, etc.);

[0156] ;

[0157] As a learnable parameter, the Sigmoid function constrains the score to the interval [0,1].

[0158] The low-level and high-level feature maps are spliced ​​according to the channel dimension through skip connection to obtain multi-scale fusion features.

[0159] Use t-SNE or PCA to transform high-dimensional health scores Reduced to 2D / 3D space, visualized health indicators are obtained. The health score quantifies the overall status of the diesel engine, and the dimension-reduced visualized health indicators provide intuitive fault warnings.

[0160] S405 , splicing the diesel engine health indicators of each window in chronological order to obtain a health indicator time series.

[0161] Perform sliding average filtering (window size = 5) and LSTM trend forecasting on the time series. Concatenate the health scores of each window in chronological order using conventional concatenation to obtain a health indicator time series.

[0162] For example, LSTM trend prediction can use a two-layer LSTM structure, with 64 hidden units in the first layer and 32 in the second layer. It receives a health indicator sequence processed by sliding average and outputs predicted values ​​for the next five time steps. The above LSTM trend prediction is for illustrative purposes only. Those skilled in the art may choose other time series prediction methods based on their actual needs.

[0163] In one embodiment, the step of splicing the diesel engine health indicators of each window in chronological order to obtain a health indicator time series includes:

[0164] According to the time series of health indicators, trend evolution is performed to obtain the health status evolution trend of the diesel engine.

[0165] Perform graphic evolution to form a visual evolution trend of the diesel engine's health status (such as line graphs and heat maps).

[0166] In summary, in the ship diesel engine fault diagnosis task, the escape optimization algorithm (EA) is introduced to improve the model performance through dynamic monitoring and intelligent disturbance mechanism.

[0167] The entire 3D-CNN network model optimization process starts with standard training, continuously monitoring the loss function and gradient changes (gradient update amplitude monitoring) of the 3D-CNN network model. When the loss decreases below a threshold or the gradient norm is too small, the algorithm determines that the 3D-CNN network model has stalled in training and triggers the escape mechanism. This mechanism is not a simple random perturbation, but rather a targeted intervention based on the current gradient direction: first, a gradient sign perturbation is injected into the parameter update to force the model to jump out of the current optimization stagnation point; then, the spatiotemporal characteristics of the 3D-CNN are processed separately—random rotation is applied to the convolution kernel in the spatial dimension to enhance feature diversity, and the ability to capture temporal patterns is enhanced in the temporal dimension through sequence reversal or dynamic expansion. After the perturbation is completed, the 3D-CNN network model continues training and cyclically monitors the status until convergence conditions are reached.

[0168] This optimization approach enables the 3D-CNN network model to break through the local optimal limits of traditional training, making it particularly adaptable to the non-stationary nature of diesel engine vibration signals. Experiments have shown that EA not only improves training efficiency by 40% but also enables earlier identification of fault signs, such as a 15% increase in sensitivity for progressive faults like bearing wear, while maintaining the feasibility of edge device deployment. The entire process forms a closed "monitor-escape-optimize" loop, achieving a synergistic improvement in model performance and training stability.

[0169] In marine diesel engine fault diagnosis systems, 3D-CNN network models face particularly significant challenges in spatiotemporal signal processing. The vibration signals generated by diesel engines during operation contain both spatially distributed mechanical structural characteristics and dynamic temporal evolution patterns. Traditional optimization methods often stall at saddle points or shallow local minima in the loss function when processing this high-dimensional, nonlinear data, resulting in the model failing to fully capture subtle early signs of faults. To address this core issue, the Escape Optimization (EA) algorithm develops an adaptive training framework that achieves dynamic optimization through a closed-loop "perception-response-evolution" mechanism.

[0170] The algorithm begins with a conventional gradient descent process, but simultaneously activates a multi-dimensional monitoring system. This monitoring system not only tracks the absolute value of the loss function's descent but also analyzes the second-order derivative characteristics of its rate of change, capable of distinguishing true plateaus from normal training fluctuations. When the system detects an abnormal stagnation in the optimization trajectory, it initiates a multi-level verification mechanism: first, the topology of the gradient field is checked to confirm whether it has fallen into a flat region; then, the activation distribution of each convolutional layer is evaluated to determine whether feature extraction has degraded. This dual verification significantly reduces the probability of false triggering and ensures the precise intervention of the escape mechanism.

[0171] The escape phase employs a layered perturbation strategy. At the bottom level of the parameter space, the algorithm applies pulse perturbations of adaptive strength along the gradient sign, with the strength coefficient λ dynamically increasing with the duration of the stagnation, forming a gradual escape pattern of "gentle probing followed by strong breakthrough." At the network architecture level, differentiated processing is performed to address the spatiotemporal characteristics of 3D-CNNs: spatial convolution kernels undergo random affine transformations, including rotation, scaling, and elastic deformation, with these transformation parameters automatically calibrated based on the effective receptive field of the current feature map. A learnable time warping function is introduced in the temporal dimension, using dynamic time warping (DTW) techniques to maintain temporal causality while expanding feature diversity.

[0172] In a second aspect, the present application provides a model optimization system based on an escape optimization algorithm EA, which is applied to the aforementioned model optimization method based on the escape optimization algorithm EA, and the system includes:

[0173] A judgment unit is used to calculate the loss function change rate and gradient norm in real time during the 3D-CNN network model training process. When the preset conditions are met for N training cycles, it is determined that the 3D-CNN network model has fallen into a local optimal stagnation;

[0174] An enhancement unit, configured to inject a disturbance term into a parameter update direction of the 3D-CNN network model when the 3D-CNN network model falls into a local optimal stagnation, thereby obtaining a 3D-CNN network model with enhanced feature diversity;

[0175] An optimization unit is used to continue training the 3D-CNN network model with enhanced feature diversity until the loss converges or the maximum number of iterations is reached, thereby obtaining an optimized 3D-CNN network model;

[0176] The result unit is used to obtain a time series of diesel engine health indicators based on the optimized 3D-CNN network model.

[0177] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the aforementioned method when executing the computer program.

[0178] In a fourth aspect, the present application provides a computer storage medium having a computer program stored thereon, which implements the steps of the aforementioned method when executed by a processor.

[0179] In a fifth aspect, the present application provides a computer program, which implements the steps of the aforementioned method when executed by a processor.

[0180] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0181] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

[0182] The scope of protection of the present disclosure is not limited to the above-described embodiments. Obviously, those skilled in the art may make various modifications and variations to the present disclosure without departing from the scope and spirit of the present disclosure. If such modifications and variations fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include such modifications and variations.

Claims

1. A method for optimizing a marine diesel engine fault diagnosis model based on an escape optimization algorithm EA, characterized in that: include: During the 3D-CNN network model training process, the loss function change rate and gradient norm are calculated in real time. When the preset conditions are met for N training cycles, the 3D-CNN network model is determined to have fallen into a local optimal stagnation. When the 3D-CNN network model falls into a local optimal stagnation, a disturbance term is injected into the parameter update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity; Continuing to train the 3D-CNN network model with enhanced feature diversity until the loss converges or the maximum number of iterations is reached, thereby obtaining an optimized 3D-CNN network model; According to the optimized 3D-CNN network model, a time series of diesel engine health indicators is obtained; wherein, The step of injecting a disturbance term into the parameter update direction of the 3D-CNN network model when the 3D-CNN network model falls into a local optimal stagnation to obtain a 3D-CNN network model with enhanced feature diversity includes: The perturbation terms include gradient sign perturbation, spatial dimension perturbation and time dimension perturbation; According to the gradient sign perturbation, a perturbation term is injected into the weight update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity, wherein the calculation formula of the gradient sign perturbation is: ; in, represents the learning rate, represents the disturbance intensity, represents the gradient direction symbol matrix, Indicates time; Randomly rotating the spatial convolution kernel of the 3D-CNN network model according to the spatial dimension perturbation to obtain a 3D-CNN network model with enhanced feature diversity; Expanding the temporal convolution layer of the 3D-CNN network model according to the temporal dimension perturbation to obtain a 3D-CNN network model with enhanced feature diversity; The step of obtaining a time series of diesel engine health indicators based on the optimized 3D-CNN network model includes: Diesel engine sensor data is divided into 3D tensors according to fixed time windows; Input the 3D tensor into the optimized 3D-CNN network model to obtain high-level feature maps and low-level feature maps; Performing cross-layer connection fusion on the high-level feature map and the low-level feature map to obtain enhanced features; The enhanced features are then input into the optimized 3D-CNN network model to obtain the diesel engine health index; The diesel engine health indicators of each window are spliced ​​in chronological order to obtain the health indicator time series; among them, the diesel engine sensor data is divided into 3D tensors according to fixed time windows , where the diesel engine sensor data specifically includes vibration, temperature, and pressure, the fixed time window specifically is 10 seconds / window, T represents the time step specifically is 100 sampling points, S represents the spatial dimension specifically is the topological grid of the multi-sensor layout, and C represents the number of output channels of the convolutional layer.

2. The marine diesel engine fault diagnosis model optimization method based on the escape optimization algorithm EA according to claim 1 is characterized in that: The step of calculating the loss function change rate and gradient norm in real time during the 3D-CNN network model training process, and determining that the 3D-CNN network model has fallen into a local optimal stagnation when the preset conditions are met for N training cycles, includes: The formula for calculating the rate of change of the loss function is: ; in, represents the rate of change of the loss function, Represents the loss value of epoch, Represents the loss value of the first M epochs; when When the loss change is determined to be stagnant, represents the loss change rate threshold; Gradient norm calculation formula: ; in, represents the rate of change of the gradient norm, Indicates the The gradient of the layer network parameters, Represents the L2 gradient norm of the full network parameters; when When , it is determined that the gradient norm disappears, represents the gradient norm threshold; when ,and When the condition is met for N consecutive training cycles, the 3D-CNN network model is judged to be stuck in a local optimal state.

3. The marine diesel engine fault diagnosis model optimization method based on the escape optimization algorithm EA according to claim 1 is characterized in that: The step of continuing to train the 3D-CNN network model with enhanced feature diversity until the loss converges or the maximum number of iterations is reached to obtain an optimized 3D-CNN network model includes: According to the cumulative number of trigger disturbances, the learning rate is adjusted according to the cosine annealing rule to obtain the current learning rate; According to the current learning rate, the 3D-CNN network model with enhanced feature diversity is continuously monitored in multi-dimensional real-time, and the 3D-CNN network model with enhanced feature diversity is continuously trained to obtain an optimized 3D-CNN network model.

4. The method for optimizing a marine diesel engine fault diagnosis model based on an escape optimization algorithm EA according to claim 2, characterized in that: The step of calculating the loss function change rate and gradient norm in real time during the 3D-CNN network model training process, and determining that the 3D-CNN network model has fallen into a local optimal stagnation when the preset conditions are met for N training cycles, includes: according to ,and , get the first judgment condition; When the loss value of consecutive epochs meets the single-step absolute loss reduction When the update amplitude is less than the minimum necessary decrease for the effective update of the 3D-CNN network model parameters, the second judgment condition is obtained, where the single-step absolute loss decrease The calculation formula is: ; When the loss curvature of the loss function is approximately equal to 0, the third judgment condition is obtained, wherein the calculation formula of the loss curvature of the loss function is: ; in, express The current window, express The previous window, Indicates the concavity and convexity of the loss surface, represents the curvature threshold; If the first judgment condition, the second judgment condition and the third judgment condition are all met, the 3D-CNN network model falls into a local optimal stagnation.

5. A marine diesel engine fault diagnosis model optimization system based on the escape optimization algorithm EA, characterized in that: The method for optimizing a marine diesel engine fault diagnosis model based on an escape optimization algorithm EA applied to any one of claims 1 to 4 comprises: A judgment unit is used to calculate the loss function change rate and gradient norm in real time during the 3D-CNN network model training process. When the preset conditions are met for N training cycles, it is determined that the 3D-CNN network model has fallen into a local optimal stagnation; An enhancement unit, configured to inject a disturbance term into a parameter update direction of the 3D-CNN network model when the 3D-CNN network model falls into a local optimal stagnation, thereby obtaining a 3D-CNN network model with enhanced feature diversity; An optimization unit is used to continue training the 3D-CNN network model with enhanced feature diversity until the loss converges or the maximum number of iterations is reached, thereby obtaining an optimized 3D-CNN network model; The result unit is used to obtain the time series of diesel engine health indicators according to the optimized 3D-CNN network model; wherein, The step of injecting a disturbance term into the parameter update direction of the 3D-CNN network model when the 3D-CNN network model falls into a local optimal stagnation to obtain a 3D-CNN network model with enhanced feature diversity includes: The perturbation terms include gradient sign perturbation, spatial dimension perturbation and time dimension perturbation; According to the gradient sign perturbation, a perturbation term is injected into the weight update direction of the 3D-CNN network model to obtain a 3D-CNN network model with enhanced feature diversity, wherein the calculation formula of the gradient sign perturbation is: ; in, represents the learning rate, represents the disturbance intensity, represents the gradient direction symbol matrix, Indicates time; Randomly rotating the spatial convolution kernel of the 3D-CNN network model according to the spatial dimension perturbation to obtain a 3D-CNN network model with enhanced feature diversity; Expanding the temporal convolution layer of the 3D-CNN network model according to the temporal dimension perturbation to obtain a 3D-CNN network model with enhanced feature diversity; The step of obtaining a time series of diesel engine health indicators based on the optimized 3D-CNN network model includes: Diesel engine sensor data is divided into 3D tensors according to fixed time windows; Input the 3D tensor into the optimized 3D-CNN network model to obtain high-level feature maps and low-level feature maps; Performing cross-layer connection fusion on the high-level feature map and the low-level feature map to obtain enhanced features; The enhanced features are then input into the optimized 3D-CNN network model to obtain the diesel engine health index; The diesel engine health indicators of each window are spliced ​​in chronological order to obtain the health indicator time series; among them, the diesel engine sensor data is divided into 3D tensors according to fixed time windows , where the diesel engine sensor data specifically includes vibration, temperature, and pressure, the fixed time window specifically is 10 seconds / window, T represents the time step specifically is 100 sampling points, S represents the spatial dimension specifically is the topological grid of the multi-sensor layout, and C represents the number of output channels of the convolutional layer.

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

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

Citation Information

Patent Citations

  • Method and system for monitoring and evaluating sleep quality

    CN119498778A

Cited By

  • AI-based diesel engine fault pre-diagnosis helmet and control method thereof

    CN122413144A