Random dynamics system energy prediction method and device, electronic equipment and medium

By improving the discretized incremental energy prediction algorithm, and combining multi-scale datasets and self-supervised learning, the problem of insufficient simulation accuracy of traditional dynamic modeling methods in stochastic dynamic systems is solved, and efficient and stable energy prediction is achieved, which is suitable for industrial intelligent simulation.

CN121809090APending Publication Date: 2026-04-07PERA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-09
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Traditional physical mechanism-based dynamic modeling methods suffer from insufficient simulation accuracy when dealing with stochastic dynamic systems, failing to meet the dual requirements of real-time performance and accuracy for industrial intelligent simulation. Furthermore, traditional numerical solutions exhibit poor numerical stability and severe error accumulation during real-time prediction.

Method used

An improved discretized incremental energy prediction algorithm is adopted. By constructing a multi-scale dataset and extracting dynamic features through self-supervised learning, and combining drift network and diffusion network, energy prediction is performed using a discretization scheme that conforms to physical laws.

Benefits of technology

It improves the numerical stability and prediction accuracy of energy prediction for stochastic dynamic systems, is suitable for handling stochastic differential equations of nonlinear systems, and meets the real-time and accuracy requirements of industrial intelligent simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809090A_ABST
    Figure CN121809090A_ABST
Patent Text Reader

Abstract

The invention relates to a stochastic dynamics system energy prediction method and device, electronic equipment and a medium. The method comprises the following steps: setting a displacement variable of the stochastic dynamics system about time, and establishing an energy function of the stochastic dynamics system according to the displacement variable; constructing a multi-scale data set according to the energy function; the initial model is trained through the multi-scale data set, and a feature extraction model is obtained after training is completed; the feature extraction model is used for extracting dynamic features of the stochastic dynamic system; the dynamic characteristics at least comprise an energy predicted value at the current moment; constructing a drift term according to the drift network and the dynamic characteristics, and constructing a diffusion term according to the diffusion network and the dynamic characteristics; and calculating an energy predicted value of the next moment based on the energy predicted value of the current moment, the drift term and the diffusion term. According to the method, based on the improved discretization incremental energy prediction algorithm, the discretization scheme conforming to the physical law is adopted to improve the energy prediction numerical stability and prediction precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a random dynamics system energy prediction method and device, electronic equipment and medium. BACKGROUND

[0002] With the continuous deepening of the industrial digitalization and intelligent transformation, traditional computer aided engineering (CAE) technology is evolving towards intelligent simulation and digital twinning. In this transformation process, the core driving force comes from the urgent need for high-fidelity, real-time simulation and prediction of physical systems, which is widely applied in industrial core departments such as aerospace, mechanical manufacturing, vehicle engineering and precision instruments. Traditionally, modeling and simulation of system dynamics behavior mainly rely on modeling methods based on physical mechanism, which describes system evolution by establishing ordinary differential equations or partial differential equations. However, actual industrial systems often contain significant random factors and nonlinear characteristics, making traditional dynamic modeling methods face great challenges in dealing with complex characteristics such as strong nonlinearity, multi-stability, mutation and initial value sensitivity in random dynamics systems, often resulting in insufficient simulation accuracy, which is difficult to meet the model fidelity requirements of digital twinning.

[0003] To make up for the shortcomings of physical mechanism models, data-driven methods have received extensive attention in recent years. This kind of method uses sensor collected system running data to directly learn the dynamic characteristics of the system through machine learning algorithm, and shows good adaptability in some scenarios. However, traditional numerical solution methods based on stochastic differential equations (such as Euler-Maruyama method) have problems of poor numerical stability and serious error accumulation when implementing real-time prediction, which cannot meet the dual requirements of real-time and accuracy of industrial intelligent simulation.

[0004] Therefore, the industry urgently needs an innovative technical solution that can stably and efficiently solve random dynamics problems. SUMMARY

[0005] To solve or partially solve the problems in the related art, the present application provides a random dynamics system energy prediction method, device, electronic equipment and medium, which can improve the numerical stability and prediction accuracy of energy prediction based on an improved discretization incremental energy prediction algorithm using a discretization scheme consistent with physical laws.

[0006] The first aspect of the present application provides a random dynamics system energy prediction method, comprising: setting a displacement variable of a random dynamics system with respect to time, and establishing an energy function of the random dynamics system according to the displacement variable; constructing a multi-scale data set according to the energy function; The initial model is trained using the multi-scale dataset, and a feature extraction model is obtained after training. The feature extraction model is used to extract the dynamic features of the stochastic dynamic system. The dynamic features include at least the energy prediction value at the current moment. A drift term is constructed based on the drift network and the aforementioned dynamic characteristics; a diffusion term is constructed based on the diffusion network and the aforementioned dynamic characteristics. The energy prediction value for the next time step is calculated using a discretization method based on the energy prediction value at the current time step, the drift term, and the diffusion term.

[0007] In some embodiments, establishing the energy function of the stochastic dynamic system based on the displacement variables includes: A potential energy function is constructed based on the displacement variable, and a deterministic external force is calculated based on the displacement variable and the time. The dynamic equations of the stochastic dynamic system are established based on the displacement variables, the potential energy function, the deterministic external force, and the preset stochastic excitation. The energy function is established using the aforementioned kinetic equations.

[0008] In some embodiments, establishing the energy function through the kinetic equation includes: Extract the potential energy function and velocity variable from the dynamic equation; The kinetic energy term is calculated based on the velocity variable, and the energy function is constructed based on the kinetic energy term and the potential energy function.

[0009] In some implementations, constructing a multi-scale dataset based on an energy function includes: Under different operating conditions, the displacement and velocity of the stochastic dynamic system are collected in chronological order, and the energy value is calculated based on the displacement and velocity using the energy function. The multi-scale dataset is constructed based on the displacement, the velocity, and the energy value.

[0010] In some implementations, the process of constructing the multi-scale dataset based on the displacement variable, the velocity, and the energy value further includes: The displacement is enhanced based on the potential energy function; The velocity is feature-enhanced based on the deterministic external force and the random excitation.

[0011] In some implementations, training the initial model using the multi-scale dataset includes: The multi-scale dataset is subjected to random masking, and the masked multi-scale dataset is input into the initial model. Based on the initial model, generate prediction results for the multi-scale dataset after masking. The training loss is calculated based on the prediction results and the multi-scale dataset after masking. The initial model is then adjusted and optimized based on the training loss. The step of generating the prediction results of the mask position based on the initial model is returned until the preset conditions are met, and the feature extraction model is obtained.

[0012] In some implementations, the initial model includes an encoder and a decoder; generating prediction results for the masked multi-scale dataset based on the initial model includes: The multi-scale dataset after masking is compressed by an encoder to obtain dynamic features; The dynamic features are reconstructed by the decoder to obtain the prediction result; the encoder and the decoder are symmetrical network structures.

[0013] A second aspect of this application provides an energy prediction device for a stochastic dynamic system, comprising: The setting module is used to set the displacement variable of the stochastic dynamic system with respect to time, and to establish the energy function of the stochastic dynamic system based on the displacement variable; The dataset module is used to construct a multi-scale dataset based on the energy function; The training module is used to train the initial model using the multi-scale dataset, and after training, a feature extraction model is obtained; the feature extraction model is used to extract the dynamic features of the stochastic dynamic system; the dynamic features include at least the energy prediction value at the current moment; A construction module is used to construct drift terms based on the drift network and the dynamic characteristics, and to construct diffusion terms based on the diffusion network and the dynamic characteristics; The prediction module is used to calculate the energy prediction value for the next time moment based on the energy prediction value at the current moment, the drift term, and the diffusion term using a discretization method.

[0014] A third aspect of this application provides an electronic device, comprising: Processor; and A memory that stores executable code, which, when executed by the processor, causes the processor to perform the method described above.

[0015] A fourth aspect of this application provides a computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method described above.

[0016] The technical solution provided in this application may include the following beneficial results: The energy prediction method for stochastic dynamic systems provided in this application can improve the numerical stability and prediction accuracy of energy prediction by adopting a discretization scheme that conforms to physical laws, based on an improved discretization incremental energy prediction algorithm.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0018] The above and other objects, features and advantages of this application will become more apparent from the description of exemplary embodiments of this application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of this application.

[0019] Figure 1 This is a schematic flowchart illustrating the energy prediction method for a stochastic dynamic system according to an embodiment of this application; Figure 2 This is another schematic flowchart illustrating the energy prediction method for stochastic dynamic systems shown in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the energy prediction device for a stochastic dynamic system shown in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application. Detailed Implementation

[0020] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.

[0021] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0022] It should be understood that although the terms "first," "second," "third," etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0023] To compensate for the shortcomings of mechanistic models, data-driven methods have received widespread attention in recent years. These methods utilize system operation data collected by sensors and directly learn the dynamic characteristics of the system through machine learning algorithms, demonstrating good adaptability in some scenarios. However, traditional numerical solutions based on stochastic differential equations (such as the Euler-Mariawan method) suffer from poor numerical stability and severe error accumulation when implementing real-time prediction, failing to simultaneously meet the dual requirements of real-time performance and accuracy in industrial intelligent simulation.

[0024] Therefore, the industry urgently needs an innovative technical solution that can stably and efficiently solve stochastic dynamics problems.

[0025] To address the aforementioned issues, this application provides an energy prediction method for stochastic dynamic systems. Based on an improved discretized incremental energy prediction algorithm, this method employs a discretization scheme that conforms to physical laws to enhance the numerical stability and accuracy of energy prediction.

[0026] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.

[0027] Figure 1 This is a schematic flowchart illustrating the energy prediction method for a stochastic dynamic system according to an embodiment of this application.

[0028] See Figure 1 The method includes: Step 110: Set the displacement variable of the stochastic dynamic system with respect to time, and establish the energy function of the stochastic dynamic system based on the displacement variable.

[0029] Stochastic dynamic systems are widely present in many important aspects of modern engineering, including mechanical vibration control, energy harvesting systems, aerospace structures, and precision instrument design. They encompass some of the most complex and core characteristics of modern engineering systems, such as strong nonlinearity, multistability, abrupt changes, and initial value sensitivity. Taking a bistable mechanical oscillator, a representative example of a stochastic dynamic system, as an example, a bistable mechanical oscillator is a bistable system that can switch back and forth between two different stable equilibrium positions. When the oscillator is at rest in these two stable equilibrium positions, it can maintain a stable state without external disturbance.

[0030] First, we can set the displacement variable of the stochastic dynamics system with respect to time t. Then, the energy function of the total energy value of the stochastic dynamic system is defined. The energy function can be expressed by the displacement variables. express.

[0031] Step 120: Construct a multi-scale dataset based on the energy function.

[0032] Multiscale datasets can be constructed based on energy functions. Multiscale datasets It contains N sets of samples, each set recording the state evolution trajectory of a stochastic dynamical system under specific parameter configurations, a multi-scale dataset. It can cover all working conditions that may be encountered in the target application scenario.

[0033] Step 130: Train the initial model using a multi-scale dataset to obtain a feature extraction model. The feature extraction model is used to extract the dynamic features of the stochastic dynamic system. The dynamic features include at least the energy prediction value at the current moment.

[0034] Through multi-scale datasets Self-supervised learning can be performed to train the initial model. During training, multi-scale datasets... In a state evolution trajectory, certain time steps of the state sequence are obscured by random masks, requiring the model to reconstruct the complete system state from the unmasked portions. This design enables the encoder to learn deep correlations between system states, thereby extracting more representative features. After training, a feature extraction model is obtained, capable of extracting dynamical features from stochastic dynamical systems. ; Dynamic characteristics Includes at least the energy forecast value at the current moment. .

[0035] Step 140: Construct drift terms based on drift network and dynamic characteristics, and construct diffusion terms based on diffusion network and dynamic characteristics.

[0036] Dynamic characteristics The drift term can be obtained by inputting the pre-trained drift network and diffusion network respectively. and diffusion terms .

[0037] Step 150: Calculate the energy prediction value for the next time step based on the current energy prediction value, drift term, and diffusion term using a discretization method.

[0038] This application provides a discretization-based incremental energy prediction algorithm for real-time energy evolution calculation of stochastic dynamical systems. A discretization method is used to approximate the continuous-time stochastic differential equations. The algorithm divides the continuous-time interval [t, t+Δt] into small step sizes to progressively predict the energy evolution of the stochastic dynamical system. In each prediction step, the energy prediction value at the current time is used... The energy prediction value for the next time step is calculated using the drift term and the diffusion term. The discretized incremental energy prediction algorithm comprehensively considers the influence of the deterministic drift term and the random diffusion term, ensuring that the prediction result reflects both the inherent dynamic characteristics of the system and includes necessary random factors. The predicted energy value has better numerical stability and is suitable for handling stochastic differential equations of nonlinear systems.

[0039] This application provides an energy prediction method for a stochastic dynamic system, comprising: setting a displacement variable of the stochastic dynamic system with respect to time; establishing an energy function of the stochastic dynamic system based on the displacement variable; constructing a multi-scale dataset based on the energy function; training an initial model using the multi-scale dataset to obtain a feature extraction model; the feature extraction model is used to extract the dynamic features of the stochastic dynamic system; the dynamic features include at least the energy prediction value at the current time; constructing a drift term based on a drift network and the dynamic features, and constructing a diffusion term based on a diffusion network and the dynamic features; and calculating the energy prediction value at the next time step based on the energy prediction value at the current time step, the drift term, and the diffusion term using a discretization method. This method, based on an improved discretized incremental energy prediction algorithm, employs a discretization scheme that conforms to physical laws to improve the numerical stability and prediction accuracy of energy prediction.

[0040] Figure 2 This is another schematic flowchart illustrating the energy prediction method for stochastic dynamic systems in an embodiment of this application.

[0041] See Figure 2 The method includes: Step 210: Set the displacement variables of the stochastic dynamic system with respect to time, construct the potential energy function based on the displacement variables, and calculate the deterministic external force based on the displacement variables and time.

[0042] First, we can construct the dynamic equations and potential energy functions of the stochastic dynamic system to describe its nonlinear behavior. Taking a bistable mechanical oscillator as an example, before constructing the dynamic equations and potential energy functions, we first set the displacement variable of the bistable mechanical oscillator with respect to time t. Then set the potential energy function of the bistable mechanical oscillator. In practical applications, it is necessary to clearly define the physical background and simulation objectives of the modeling object, such as a piezoelectric oscillator in an energy harvesting system or a mechanical structure in vibration control. The core objective is to construct a numerically solvable dynamic model based on the equations of motion, and to provide a foundation for subsequent analysis and control.

[0043] Based on displacement variables The potential energy function of a stochastic dynamical system can be constructed. It is understandable that if the stochastic dynamic system is a bistable system (such as a bistable mechanical oscillator), the potential energy function... It can be expressed by formula (1): (1) The coefficient 'a' controls the strength of the quadratic term, directly affecting the depth of the potential well; the coefficient 'b' determines the weight of the quartic term, adjusting the height of the potential barrier. The ratio of these two parameters determines the symmetry characteristics of the bistable system. By adjusting the ratio of these two coefficients, the symmetry characteristics of the bistable system can be controlled, thereby affecting the dynamic behavior of the system. The values ​​of coefficients a and b directly determine the shape of the potential energy function, thus affecting the steady-state position and the height of the potential barrier. In practical applications, a and b need to be set according to the material properties, geometry, and operating conditions of the specific physical system. For example, in a symmetric bistable system, a=b=1 is usually chosen to obtain a symmetric potential well; if an asymmetric system needs to be simulated, the ratio of a to b can be adjusted, such as a=1, b=2.

[0044] The deterministic external force F depends on the velocity signal. In practice, the velocity value of the stochastic dynamic system can be obtained in real time based on displacement variables and time using sensors or numerical difference methods. and apply the sign function sign( The direction of the deterministic external force is determined by the velocity direction, taking a value of ±1 or 0. The linear adjustment factor η controls the magnitude of the deterministic external force, and its value depends on the strength of the controlled target; for example, η can be set to 0.05. Taking a bistable mechanical oscillator as an example, the following settings are used: For a deterministic external force applied to a bistable mechanical oscillator, If it is a linear adjustment factor, then This can be expressed by formula (2): (2) The sign function ensures that the direction of the external force is always related to the direction of the velocity. This external force model can simulate control inputs in various real-world engineering scenarios.

[0045] Step 220: Establish the dynamic equations of the stochastic dynamic system based on displacement variables, potential energy functions, deterministic external forces, and preset stochastic excitations.

[0046] The stochastic dynamic system is characterized by two external influences: stochastic excitation and deterministic external forces. The stochastic excitation can be represented by a Gaussian noise function. To describe the Gaussian noise function Discrete-time Gaussian white noise with a mean of zero and a variance of one can be generated by computer simulation. The intensity is adjusted by the coefficient ρ. The random excitation reflects the influence of environmental noise on the stochastic dynamic system. The value of ρ needs to be set according to the intensity of noise in the actual environment. For example, ρ can be 0.5 in a strong vibration environment, while it can be 0.1 in a relatively stable environment.

[0047] Taking a bistable system in a stochastic dynamic system as an example, the dynamic equations of the bistable system are established based on the displacement variables, potential energy function, deterministic external force, and preset stochastic excitation, so as to establish a motion model describing the dynamic characteristics of the bistable system. The dynamic equations can be expressed by formula (3): (3) in, The inertial term is obtained by taking the second derivative with respect to the displacement variable and describes the acceleration characteristics of the bistable system. The damping term reflects the energy dissipation of the system, and γ is the damping coefficient. For speed ; It represents the restoring force, which is determined by the derivative of the potential energy function and reflects the nonlinear stiffness characteristics of the bistable system; The excitation term includes both random excitation and deterministic external force. The above modeling approach using a motion model describes the dynamic behavior of a bistable system under random excitation and external force, providing a foundation for bistable system analysis, parameter identification, and control design. By adjusting the parameters in the equations, the system response under different operating conditions can be simulated, providing a reliable simulation model for engineering applications. The special construction of the potential energy function ensures that the bistable system has two stable equilibrium points, accurately reflecting bistable characteristics; it also considers both deterministic and random factors, better reflecting the behavioral characteristics of actual engineering systems; this equation can be widely applied in energy harvesting, vibration control, signal processing, and other fields. The damping coefficient γ is selected based on the energy dissipation characteristics of the actual system, usually obtained through experimental measurement or empirical estimation. The random excitation intensity ρ and the external force adjustment factor η need to be determined based on the external environmental noise level and control requirements.

[0048] Step 230: Establish the energy function through the kinetic equation.

[0049] An energy function can be established using the dynamic equations, and this energy function can satisfy the basic principles of mechanics.

[0050] Step 230 includes: Extract the potential energy function and velocity variable from the dynamic equations; The kinetic energy term is calculated based on the velocity variable, and the energy function is constructed based on the kinetic energy term and the potential energy function.

[0051] Extracting the potential energy function from the kinetic equation With velocity variable This makes the potential energy function that constructs the energy function possible. With velocity variable Satisfying the dynamic equations, through velocity variables The kinetic energy term and the velocity variable can be calculated. It is proportional to the square of the kinetic energy term and the potential energy function. An energy function can be constructed, which can be expressed by formula (4): (4) Among them, the kinetic energy term This reflects the motion state of the stochastic dynamical system; the potential energy term is... This describes the potential energy distribution characteristics of a stochastic dynamical system.

[0052] Step 240: Under different operating conditions, collect the displacement and velocity of the stochastic dynamic system in chronological order, and calculate the energy value based on the displacement and velocity using an energy function.

[0053] Specifically, taking a bistable system in a stochastic dynamic system as an example, it is necessary to define the value ranges of parameters a, b, γ, ρ, and η in the dynamic equations. These ranges should cover all operating conditions that may be encountered in the target application scenario. For example, parameters a and b can be uniformly sampled between 0.5 and 2.0 to generate various bistable system configurations from symmetric to asymmetric; the damping coefficient γ can vary between 0.05 and 0.5 to simulate different energy dissipation levels; the stochastic excitation intensity ρ can be sampled from 0.1 to 1.0, representing environmental conditions from weak noise to strong noise; and the external force adjustment factor η is selected from 0 to 0.1 according to specific control requirements. For each set of randomly sampled parameter configurations, the motion equations are solved using numerical integration to obtain displacement and velocity. Then, the potential energy function is solved using displacement, and the energy value is solved using the energy function based on the potential energy function and velocity. Displacement, velocity, and energy value constitute the state vector. This allows for the generation of sufficiently long-term state evolution sequences for bistable systems. The sampling frequency should be at least 10 times the system's natural frequency to ensure sampling quality. Each sample contains a complete time series of three physical quantities: displacement, velocity, and energy. The sequence length is typically 1000 to 5000 time steps to ensure that both the transient behavior and steady-state characteristics of the stochastic dynamic system can be captured. (State vector) It can reflect the displacement, velocity, and energy information of a stochastic dynamic system with respect to time, and fully capture the core physical state of the stochastic dynamic system at that moment.

[0054] Step 250: Construct a multi-scale dataset based on displacement, velocity, and energy values.

[0055] Multi-scale datasets can be constructed based on the state vectors (i.e., displacement, velocity, and energy values) at different working conditions and times. Multiscale datasets This dataset contains N sets of samples, each recording the system's state evolution trajectory under specific parameter configurations under different operating conditions. Each sample includes time series data of three key physical quantities: displacement, velocity, and energy. (Multi-scale dataset) This can be expressed by formula (5): (5) This multi-scale dataset construction method ensures that the training samples can cover the dynamic behavioral characteristics of the system under different operating conditions.

[0056] In an optional embodiment of this application, the method further includes the following step before step 250: Feature enhancement of displacement is performed based on the potential energy function; Velocity features are enhanced based on deterministic external forces and stochastic excitations.

[0057] To enhance the robustness and generalization ability of motion models for stochastic dynamical systems, feature enhancement is achieved by introducing a physically consistent random perturbation mechanism. This improves the adaptability of the dynamical model to noise and uncertainties. The feature enhancement method improves the robustness of the dynamical model through physically guided perturbations. By applying random perturbations consistent with dynamic laws to the state vector of the stochastic dynamical system, physically plausible enhanced data is generated. The design of the perturbation amount follows the physical relationships described by the system's equations of motion, ensuring that the enhanced data still conforms to fundamental physical laws.

[0058] Set disturbance amount It follows a zero-mean Gaussian distribution, i.e. Its variance Controlling the perturbation intensity requires setting it based on the noise level of the original data and the required robustness of the motion model. It is typically determined through grid search or empirical experiments, with an initial value set at 0.1 times the data standard deviation and adjusted within the range of 0.05 to 0.2 times. For bistable systems in stochastic dynamic systems, it should be noted that the perturbation intensity may need to be differentiated in different potential well regions. Smaller perturbation intensities can be used in regions with larger potential energy gradients, while larger perturbations can be used in regions with flat potential energy. The perturbation for displacement x is along the potential energy gradient direction, while the perturbation for velocity v considers the combined effects of the stochastic excitation ρN(t) and the deterministic external force F. The noise intensity coefficient, It is Gaussian white noise.

[0059] Displacement and velocity can be feature-enhanced using equation (6): (6) For the displacement feature enhancement strategy, displacement x is perturbed along the potential energy gradient direction, reflecting the natural influence of the system's potential energy field on displacement changes and ensuring the physical rationality of the perturbed displacement data. The perturbation intensity is controlled by the variance parameter of a Gaussian distribution and can be flexibly adjusted according to actual needs.

[0060] For velocity characteristic enhancement strategies, both stochastic excitations and deterministic external forces acting on the stochastic dynamic system are comprehensively considered. The calculation of the perturbation quantity includes a Gaussian white noise term representing environmental noise and external deterministic forces. This perturbation method simulates various random disturbances that velocity may be subjected to in real-world systems, and can better adapt to uncertainties in real-world environments.

[0061] In practical implementation, attention must be paid to the timing and strategy of data augmentation. Data augmentation can be preprocessed and augmented on the complete dataset before initial model training, generating a fixed number of augmented samples; alternatively, it can be dynamically augmented in real-time during initial model training, generating different augmented versions of the same original data in each training cycle. The latter typically provides better regularization. The augmented data needs to undergo validity testing. Visual analysis should be used to ensure that the perturbed state trajectory still conforms to the dynamic characteristics of a stochastic dynamic system, particularly verifying whether the augmented data retains the typical characteristics of transitions between two potential wells. Ultimately, through physically guided feature augmentation methods, the predictive stability of the feature extraction model in noisy environments can be significantly improved, and its generalization ability to unseen conditions can be enhanced.

[0062] Step 260: Train the initial model using a multi-scale dataset to obtain a feature extraction model. The feature extraction model is used to extract the dynamic features of the stochastic dynamic system. The dynamic features include at least the energy prediction value at the current moment.

[0063] The initial model can be trained using a multi-scale dataset. After training, a feature extraction model is obtained. The feature extraction model can extract the dynamic features of a stochastic dynamic system. The dynamic features contain the characteristic representation of the dynamic essence of the stochastic dynamic system, including the energy prediction value at the current moment. The dynamic features can be used for downstream tasks such as system identification, state prediction, or control design.

[0064] In an optional embodiment of this application, step 260 includes: The multi-scale dataset is randomly masked, and the masked multi-scale dataset is then input into the initial model. Based on the initial model, generate prediction results for the multi-scale dataset after masking. The training loss is calculated based on the prediction results and the multi-scale dataset after masking. The initial model is then adjusted and optimized based on the training loss. The process of generating prediction results for mask positions based on the initial model is repeated until the preset conditions are met, resulting in the feature extraction model.

[0065] The initial model employs a mask reconstruction strategy for self-supervised learning. During training, multi-scale datasets are used. In a system's state vector sequence, certain time steps are occluded by random masks. The initial model needs to reconstruct the complete system state from the unmasked portions. This design allows the encoder to learn deep correlations between system states, thereby extracting more representative features. First, the multi-scale dataset is randomly masked, typically with a masking ratio between 15% and 25%. The state vectors at the masked locations are replaced with learnable mask tokens. The masked multi-scale dataset is then input into the initial model. The initial model's task is to reconstruct the masked state vectors from the unmasked portions to generate predictions corresponding to the masked multi-scale dataset.

[0066] The training loss is calculated based on the prediction results and the masked multi-scale dataset. Training loss The calculation formula is shown in equation (7): (7) in, It is the masked state vector. It is a prediction result. It is to seek the expected operation. This represents the square of the L2 norm (Euclidean norm) of the vector. The initial model is tuned and optimized based on the training loss. The training objective is to minimize the L2 loss between the predicted and true values ​​at mask locations, i.e., calculating the square of the Euclidean distance. The optimization process uses the Adam optimizer (Adaptive Moment Estimation) with a learning rate of 1e-4 and a cosine annealing scheduling strategy. The batch size is set to 32 or 64 byte counts depending on available GPU memory, and the number of training epochs typically requires 200 to 500 epochs to achieve convergence. During training, a validation set is used to monitor the generalization performance of the feature extraction model, and training is terminated early when the validation loss no longer decreases for several consecutive epochs.

[0067] To improve training performance, a series of engineering processes can be implemented. Gradient pruning is used to prevent training instability, with the pruning threshold typically set to 1.0. Mixed-precision training is used to accelerate computation and reduce memory usage. During data loading, the multi-scale dataset is standardized so that the mean of each feature is 0 and the variance is 1. A dynamic masking strategy is also implemented, where the mask position is randomly reselected in each training epoch to increase the diversity of the training data. After training, the feature extraction model can extract dynamic features that reveal the essence of the system's dynamics. These dynamic features can be used for downstream tasks such as system identification, state prediction, or control design without requiring additional labeled data.

[0068] The initial model includes an encoder and a decoder; prediction results for the masked multi-scale dataset are generated based on the initial model, including: The dynamic features are obtained by compressing the masked multi-scale dataset using an encoder. The dynamic features are reconstructed by the decoder to obtain the prediction result; the encoder and decoder are symmetrical network structures.

[0069] The initial model consists of an encoder and a decoder, which employ a symmetric Transformer architecture to implement the encoding and decoding process. Both the encoder and decoder use Transformer modules with the same number of layers, typically 4 to 6, with each layer having a hidden dimension of 128 or 256 and 4 or 8 attention heads. The encoder has a 3-dimensional input, corresponding to the three physical quantities of the state vector; the output is a low-dimensional feature representation of the dynamic features. , ∈R d The value of d typically ranges from 32 to 64. The decoder receives the features from the encoder's output, representing the dynamic characteristics. And through a symmetrical network structure, the dynamic characteristics are... The original 3D state space is reconstructed to obtain the prediction result. The first three layers of the encoder and decoder share parameters, which significantly reduces the number of model parameters while ensuring the consistency between the feature space and the state space. The feature extraction model uses learnable positional encoding to handle the sequential information of the time series and uses layer normalization and residual connections to stabilize the training process.

[0070] The training method in this embodiment eliminates the dependence on labeled data, achieves feature extraction through self-supervised learning, ensures the model's generalization ability through multi-scale data construction, enhances the model's ability to handle incomplete data through a mask reconstruction mechanism, and improves training efficiency and feature quality through symmetric encoding and decoding design.

[0071] Step 270: Construct drift terms based on drift network and dynamic characteristics, and construct diffusion terms based on diffusion network and dynamic characteristics.

[0072] Dynamic characteristics The drift term can be obtained by inputting the pre-trained drift network and diffusion network respectively. and diffusion terms .

[0073] Step 280: Calculate the energy prediction value for the next time step based on the current energy prediction value, drift term, and diffusion term using a discretization method.

[0074] This application provides an incremental energy prediction algorithm based on discretization for real-time energy evolution calculation of stochastic dynamic systems. The discretization method is used to approximate the continuous-time stochastic differential equations. This algorithm divides the continuous-time interval [t, t+Δt] into small step sizes to progressively predict the energy evolution of the stochastic dynamic system. The choice of the time step Δt needs to strike a balance between numerical accuracy and computational efficiency, and is usually determined through convergence analysis. For example, for a bistable system, the step size should be much smaller than the system's minimum characteristic time scale, generally taken as 1 / 50 to 1 / 100 of the system's natural period. The incremental energy prediction to be implemented can be calculated using equation (8): (8) By discretizing equation (8), it can be expressed by equation (9): (9) in, This is the predicted energy value for the next moment. This is the predicted energy value at the current moment. It is a standard Gaussian random variable. For deterministic drift, through the drift term Multiplying this by the time step Δt yields the energy evolution trend of the stochastic dynamical system under the condition of no random perturbation. For the random diffusion term, the standard Gaussian random variable is... With diffusion term and step square root Multiplying them together yields the result, which represents the effect of random excitation on energy evolution.

[0075] In practical applications, energy prediction employs an iterative prediction method. After each prediction, the prediction time is updated to t+Δt, and the predicted energy value is used as the initial condition for the next time step. This process is repeated for multiple prediction steps. To ensure the stability of the predicted energy value, the kinetic energy H needs to be recalculated at each step. t And the coefficients of the corresponding drift network and diffusion network. For long-term predictions, it is necessary to periodically introduce real observations for correction to reduce error accumulation. At the same time, an outlier detection mechanism should be implemented, and when the predicted energy value exceeds the physically reasonable range, interpolation or filtering methods should be used for correction.

[0076] The implementation of the energy prediction algorithm also requires consideration of computational resource optimization. Since each step requires running neural network inference, techniques such as model quantization and graph optimization can be used to improve computational efficiency. For real-time applications, it is necessary to ensure that the prediction time per step is much smaller than the actual time step Δt. Furthermore, a complete evaluation system should be established, quantifying prediction accuracy through indicators such as mean squared error and mean absolute error, and verifying the algorithm's superiority through comparison with traditional numerical methods. Ultimately, this incremental prediction algorithm can provide accurate energy evolution predictions for the real-time monitoring and control of stochastic dynamic systems.

[0077] The discretized energy value prediction method used in this embodiment has better numerical stability and is suitable for handling stochastic differential equations of nonlinear systems; it maintains the chain rule during integral transformation, which conforms to the actual behavior of physical systems; and it discretizes the noise term more accurately, reducing error accumulation in numerical simulation.

[0078] This application provides an energy prediction method for stochastic dynamic systems. It proposes a modeling framework that deeply integrates physical mechanisms and data-driven approaches. By constructing dynamic equations that incorporate stochastic excitations and external forces, and employing a specially designed potential energy function to ensure the system's potential energy characteristics, it considers both deterministic and stochastic factors, thus better reflecting the behavioral characteristics of real-world engineering systems. Self-supervised learning is introduced into the field of industrial intelligent simulation, and a multi-scale data construction and mask reconstruction mechanism is designed. This allows for the extraction of system dynamic features without labeled data, solving the problem of dependency on labeled data. A physics-guided data feature enhancement method and an improved discretized incremental energy prediction algorithm are proposed. The robustness of the model is enhanced through displacement perturbations along the potential energy gradient direction and velocity perturbations considering noise and external forces. A discretization scheme conforming to physical laws improves numerical stability and prediction accuracy, achieving efficient solutions for noisy stochastic differential equations. This provides an effective solution for the transformation of traditional CAE to digital twins.

[0079] Corresponding to the aforementioned application function implementation method embodiments, this application also provides a stochastic dynamic system energy prediction device, electronic device, and corresponding embodiments.

[0080] Figure 3 This is a schematic diagram of the structure of the energy prediction device for a stochastic dynamic system shown in the embodiments of this application.

[0081] See Figure 3 The device includes: The setting module 310 is used to set the displacement variables of the stochastic dynamic system with respect to time, and to establish the energy function of the stochastic dynamic system based on the displacement variables; Dataset module 320 is used to construct multi-scale datasets based on energy functions; Training module 330 is used to train the initial model using a multi-scale dataset, and after training, a feature extraction model is obtained; the feature extraction model is used to extract the dynamic features of the stochastic dynamic system; the dynamic features include at least the energy prediction value at the current time. Module 340 is used to construct drift terms based on drift networks and dynamic characteristics, and to construct diffusion terms based on diffusion networks and dynamic characteristics; The prediction module 350 is used to calculate the energy prediction value at the next moment based on the energy prediction value at the current moment and the drift term and diffusion term using a discretization method.

[0082] In an optional embodiment of this application, the setting module 310 includes: The calculation submodule is used to construct the potential energy function based on the displacement variables and to calculate the deterministic external force based on the displacement variables and time. The dynamic equations submodule is used to establish the dynamic equations of a stochastic dynamic system based on displacement variables, potential energy functions, deterministic external forces, and preset stochastic excitations. The energy function submodule is used to establish the energy function through the kinetic equations.

[0083] The energy function submodule is also used for: Extract the potential energy function and velocity variable from the dynamic equations; The kinetic energy term is calculated based on the velocity variable, and the energy function is constructed based on the kinetic energy term and the potential energy function.

[0084] The dataset module 320 includes: The energy value submodule is used to collect the displacement and velocity of the stochastic dynamic system in time sequence under different working conditions, and calculate the energy value based on the displacement and velocity using an energy function. The dataset submodule is used to construct multi-scale datasets based on displacement, velocity, and energy values.

[0085] The device also includes: The enhancement module is used to enhance the characteristics of displacement based on the potential energy function; and to enhance the characteristics of velocity based on deterministic external forces and random excitations.

[0086] The training module 330 includes: The masking submodule is used to perform random masking on the multi-scale dataset and input the masked multi-scale dataset into the initial model. The prediction submodule is used to generate prediction results for the multi-scale dataset after masking based on the initial model. The optimization submodule is used to calculate the training loss based on the prediction results and the multi-scale dataset after masking, adjust and optimize the initial model based on the training loss, and return the step of generating the prediction results of the mask position based on the initial model until the preset conditions are met, and the feature extraction model is obtained.

[0087] The prediction submodule is also used for: The dynamic features are obtained by compressing the masked multi-scale dataset using an encoder. The dynamic features are reconstructed by the decoder to obtain the prediction result; the encoder and decoder are symmetrical network structures.

[0088] This application provides an energy prediction device for stochastic dynamic systems, which can improve the numerical stability and prediction accuracy of energy prediction by adopting a discretization scheme that conforms to physical laws, based on an improved discretization incremental energy prediction algorithm.

[0089] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated further here.

[0090] Figure 4 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application.

[0091] See Figure 4 The electronic device 400 includes a memory 410 and a processor 420.

[0092] The processor 420 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. Memory 410 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. ROM may store static data or instructions required by processor 420 or other modules of the computer. Permanent storage devices may be read-write storage devices. Permanent storage devices may be non-volatile storage devices that retain stored instructions and data even when the computer is powered off. In some embodiments, permanent storage devices use mass storage devices (e.g., hard disks or optical disks, flash memory) as permanent storage devices. In other embodiments, permanent storage devices may be removable storage devices (e.g., floppy disks, optical drives). System memory may be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory may store some or all of the instructions and data required by the processor during operation. Furthermore, memory 410 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and hard disks and / or optical disks may also be used. In some embodiments, memory 410 may include a removable storage device that is readable and / or writable, such as a laser disc (CD), a read-only digital multifunction optical disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, an ultra-high density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not contain carrier waves or transient electronic signals transmitted wirelessly or via wired connections.

[0093] The memory 410 stores executable code, which, when processed by the processor 420, can cause the processor 420 to execute part or all of the methods described above.

[0094] Furthermore, the method according to this application can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the method described above.

[0095] Alternatively, this application may be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) storing executable code (or computer program or computer instruction code) that, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the methods described above according to this application.

[0096] This application also provides a computer program product, which includes computer instructions that, when executed by a processor, implement the method described above.

[0097] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for predicting the energy of a stochastic dynamical system, characterized in that, The method includes: Define the displacement variable of the stochastic dynamic system with respect to time, and establish the energy function of the stochastic dynamic system based on the displacement variable; Construct a multi-scale dataset based on the energy function; The initial model is trained using the multi-scale dataset, and a feature extraction model is obtained after training. The feature extraction model is used to extract the dynamic features of the stochastic dynamic system. The dynamic features include at least the energy prediction value at the current moment. A drift term is constructed based on the drift network and the aforementioned dynamic characteristics; a diffusion term is constructed based on the diffusion network and the aforementioned dynamic characteristics. The energy prediction value for the next time step is calculated using a discretization method based on the energy prediction value at the current time step, the drift term, and the diffusion term.

2. The method according to claim 1, characterized in that, The step of establishing the energy function of the stochastic dynamic system based on the displacement variable includes: A potential energy function is constructed based on the displacement variable, and a deterministic external force is calculated based on the displacement variable and the time. The dynamic equations of the stochastic dynamic system are established based on the displacement variables, the potential energy function, the deterministic external force, and the preset stochastic excitation. The energy function is established using the aforementioned kinetic equations.

3. The method according to claim 2, characterized in that, The process of establishing the energy function through the kinetic equation includes: Extract the potential energy function and velocity variable from the dynamic equation; The kinetic energy term is calculated based on the velocity variable, and the energy function is constructed based on the kinetic energy term and the potential energy function.

4. The method according to claim 1, characterized in that, The construction of a multi-scale dataset based on the energy function includes: Under different operating conditions, the displacement and velocity of the stochastic dynamic system are collected in chronological order, and the energy value is calculated based on the displacement and velocity using the energy function. The multi-scale dataset is constructed based on the displacement, the velocity, and the energy value.

5. The method according to claim 4, characterized in that, Before constructing the multi-scale dataset based on the displacement variable, the velocity, and the energy value, the method further includes: The displacement is enhanced based on the potential energy function; The velocity is feature-enhanced based on the deterministic external force and the random excitation.

6. The method according to claim 1, characterized in that, The step of training the initial model using the multi-scale dataset includes: The multi-scale dataset is subjected to random masking, and the masked multi-scale dataset is input into the initial model. Based on the initial model, generate prediction results for the multi-scale dataset after masking. The training loss is calculated based on the prediction results and the multi-scale dataset after masking. The initial model is then adjusted and optimized based on the training loss. The step of generating the prediction results of the mask position based on the initial model is returned until the preset conditions are met, and the feature extraction model is obtained.

7. The method according to claim 6, characterized in that, The initial model includes an encoder and a decoder; the generation of prediction results corresponding to the masked multi-scale dataset based on the initial model includes: The multi-scale dataset after masking is compressed by an encoder to obtain dynamic features; The dynamic features are reconstructed by the decoder to obtain the prediction result; the encoder and the decoder are symmetrical network structures.

8. An energy prediction device for a stochastic dynamic system, characterized in that, The device includes: The setting module is used to set the displacement variable of the stochastic dynamic system with respect to time, and to establish the energy function of the stochastic dynamic system based on the displacement variable; The dataset module is used to construct a multi-scale dataset based on the energy function; The training module is used to train the initial model using the multi-scale dataset, and after training, a feature extraction model is obtained; the feature extraction model is used to extract the dynamic features of the stochastic dynamic system; the dynamic features include at least the energy prediction value at the current moment; A construction module is used to construct drift terms based on the drift network and the dynamic characteristics, and to construct diffusion terms based on the diffusion network and the dynamic characteristics; The prediction module is used to calculate the energy prediction value for the next time moment based on the energy prediction value at the current moment, the drift term, and the diffusion term using a discretization method.

9. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores executable code that, when executed by a processor of an electronic device, causes the processor to perform the method as described in any one of claims 1-7.