Training method and device of hierarchical dynamic system model
By generating a training dataset through global normalization and probability slice sampling, and combining a multi-objective loss function and staged training, the instability and practicality gap in the training of hierarchical dynamic system models are resolved, achieving efficient and stable model training and accuracy improvement.
Patent Information
- Application Number
- CN202511712597.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-17
AI Technical Summary
Existing technologies suffer from problems such as unstable training process, difficulty in convergence, low learning efficiency, and gap in model practicality when training hierarchical dynamic system models. This is especially true in power systems, where data features are not fully utilized, scale differences are serious, and there is a lack of recovery steps from the normalized model to the physical model.
A global normalization and probability slicing sampling strategy is used to generate the training dataset. A multi-objective fusion loss function is defined, and the weights of the loss function are adjusted in stages. Combined with multi-stage course learning, the model is ensured to learn local and global tasks at different stages, and finally recovers to a model with actual physical units.
It improves the stability and efficiency of model training, ensures complete learning of the dynamics of complex systems, enhances the accuracy of the model and its practicality in engineering applications, and solves the problems of instability in the training process and the gap in practicality.
Smart Images

Figure CN121543633A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system modeling technology, and in particular to a training method and apparatus for a hierarchical dynamic system model. Background Technology
[0002] While data-driven approaches (especially deep learning) have solved the problems of scalability and interpretability in the model architecture, a series of serious challenges remain in the actual training and deployment of the models when building hierarchical or modular models for complex physical systems such as power systems.
[0003] In related technologies, when training such complex models, standard end-to-end training methods are usually adopted. In the training of hierarchical or modular models of complex physical systems (such as power systems), end-to-end training is a training paradigm that directly maps the original input to the final output. Its core feature is to skip the explicit modeling of the intermediate process and automatically optimize the complete link from input to output through the model's own learning ability.
[0004] However, in related technologies, the standard end-to-end training method leads to the following drawbacks: 1. Unstable training process and difficulty in convergence: Hierarchical models contain multiple interconnected sub-modules (such as component models, network models, etc.), which together determine the final global system dynamics. If all modules are trained as a single entity with a single objective starting from a randomly initialized state, the entire optimization problem will become highly non-convex. Problems such as inconsistent learning rates among different modules and excessively long gradient paths can easily lead to vanishing or exploding gradients, making the training process extremely unstable and difficult to converge to the ideal solution.
[0005] 2. Low learning efficiency and insufficient utilization of data features: Small-signal disturbance data in power systems have unique characteristics, typically exhibiting oscillating waveforms with gradually decaying amplitudes. Standard training data construction methods (such as using fixed-length sliding windows) may cause the model to overemphasize the transient large signals at the initial stage of the disturbance, while neglecting the low-amplitude, slowly decaying oscillation patterns that are crucial for determining the system's damping characteristics in the later stages. This neglect of the spatiotemporal characteristics of the data leads to low learning efficiency, making it difficult for the model to capture the complete system dynamics.
[0006] 3. Scale differences in multi-source heterogeneous data: Physical systems exhibit vastly different dimensions and numerical ranges for various variables (e.g., angles are measured in radians, while power is measured in megawatts). If this raw data is fed directly into a neural network without processing, the larger variables will dominate loss function calculations and gradient updates, making the model insensitive to smaller variables and ultimately severely impacting the overall accuracy of the model.
[0007] 4. The Model Practicality Gap: Deep learning models are typically trained and predicted in normalized data spaces. However, engineering applications (such as stability analysis and control parameter tuning) require models with explicit physical units and practical physical meaning. Existing training methods often neglect the systematic recovery step from the "normalized model" to the "physical model," creating a gap between theoretical models and engineering applications.
[0008] Therefore, there is an urgent need in this field for a systematic and advanced training method specifically designed for hierarchical dynamic system models. Summary of the Invention
[0009] This application provides a training method and apparatus for a hierarchical dynamic system model to solve the problems of low model training accuracy and efficiency caused by the inability to fully exploit the value of data, unstable training process, and difficulty in convergence in related technologies.
[0010] The first aspect of this application provides a training method for a hierarchical dynamic system model, comprising the following steps: normalizing the original time-series data in the target dataset to generate a normalized long time-series data trajectory; based on the long time-series data trajectory, performing probability slicing sampling at different time positions of the trajectory with different time lengths to obtain training batch segments containing multiple dynamic features, and generating a training dataset based on the training batch segments containing multiple dynamic features; defining a local loss for evaluating the prediction accuracy of the sub-model of the evaluation element, a network loss for evaluating the degree of network constraint satisfaction of the network sub-model, and a global loss for evaluating the global model's accuracy in reproducing the overall dynamics of the system, and constructing a multi-objective fusion loss function for the hierarchical dynamic system model based on the local loss, the network loss, and the global loss; adjusting the weights of the sub-losses in the multi-objective fusion loss function in stages based on different training stages, and training the model based on the weights with the goal of minimizing the total loss until a preset model convergence condition is reached, thereby constructing a hierarchical dynamic system model.
[0011] Through the above-mentioned technical means, the embodiments of this application can first ensure that all state variables are learned in a balanced manner through global normalization processing, avoiding model bias caused by scale differences. Then, the probability slicing sampling strategy is used to ensure that the model fully learns multiple modes throughout the entire dynamic process. Furthermore, a multi-objective loss function is designed to clearly decouple the learning tasks of local dynamics, network constraints and global behavior during training, making gradient allocation more effective. Combined with multi-stage course guidance for model training, the overall efficiency and effect of training can be improved together.
[0012] Optionally, in one embodiment of this application, the step-by-step adjustment of the weights of the sub-losses in the multi-objective fusion loss function includes: setting the weights of the sub-losses in the multi-objective fusion loss function to different values based on different training stages; and guiding the hierarchical dynamic system model to transition from learning local basic tasks to learning global collaborative tasks according to the values.
[0013] Through the above-mentioned technical means, the embodiments of this application can decompose the complex global optimization problem into two stages of "easy first, difficult later" in the multi-stage training course. The model can first learn basic knowledge on a relatively smooth loss surface, and then fine-tune it under high-dimensional global constraints. This can effectively avoid instability in the early stage of training and significantly accelerate the overall convergence speed.
[0014] Optionally, in one embodiment of this application, the normalization process for the original time-series data in the target dataset includes: calculating the global statistical features of the type variables in the original training dataset; and performing point-by-point normalization on all the original time-series data based on the global statistical features.
[0015] Through the above-mentioned technical means, the embodiments of this application can process all the data input into the neural network into a similar numerical range, eliminate the huge differences in the dimensions and numerical ranges of different variables, thereby improving the model's sensitivity to variables with smaller values, which is beneficial to the stability and efficiency of the optimization algorithm.
[0016] Optionally, in one embodiment of this application, the method further includes: after the model training converges, according to the global statistical features, inversely transforming the model parameters learned in the normalized space to restore the state space matrix with actual physical units and meaning.
[0017] Through the above-mentioned technical means, the embodiments of this application can recover the state space matrix with actual physical units and meaning by performing an inverse transformation on the model parameters learned in the normalized space based on the statistical characteristics at the time of normalization after the model training converges, thereby providing effective data support that conforms to the real physical scenario for subsequent engineering analysis.
[0018] Optionally, in one embodiment of this application, the formula for calculating the fusion loss function is: , in These are adjustable weight hyperparameters. For localized losses, For network loss, This results in a global loss.
[0019] Through the above-mentioned technical means, the embodiments of this application take minimizing the loss as the optimization objective in model training. The model parameters can be adjusted iteratively through backpropagation to directly reduce the error between the predicted output and the true label, so that the model can gradually learn the mapping law between input and output. At the same time, by monitoring the dynamic balance between training and validation loss, the problems of overfitting or underfitting can be alleviated, and the model complexity and generalization ability can be balanced.
[0020] A second aspect of this application provides a training apparatus for a hierarchical dynamic system model, comprising: a processing module for normalizing raw time-series data in a target dataset to generate a normalized long-time-series data trajectory; a generation module for sampling probability slices of different time lengths at different time positions on the long-time-series data trajectory to obtain training batch segments containing multiple dynamic features, and generating a training dataset based on the training batch segments containing multiple dynamic features; a construction module for defining a local loss for evaluating the prediction accuracy of sub-models of evaluation elements, a network loss for evaluating the degree to which network sub-models satisfy network constraints, and a global loss for evaluating the global model's accuracy in reproducing the overall dynamics of the system, and constructing a multi-objective fusion loss function for the hierarchical dynamic system model based on the local loss, the network loss, and the global loss; and a training module for adjusting the weights of the sub-losses in the multi-objective fusion loss function in stages based on different training stages, and training the model based on the weights with the goal of minimizing the total loss, until a preset model convergence condition is reached, thereby constructing a hierarchical dynamic system model.
[0021] Through the above-mentioned technical means, the embodiments of this application can first ensure that all state variables are learned in a balanced manner through global normalization processing, avoiding model bias caused by scale differences. Then, the probability slicing sampling strategy is used to ensure that the model fully learns multiple modes throughout the entire dynamic process. Furthermore, a multi-objective loss function is designed to clearly decouple the learning tasks of local dynamics, network constraints and global behavior during training, making gradient allocation more effective. Combined with multi-stage course guidance for model training, the overall efficiency and effect of training can be improved together.
[0022] Optionally, in one embodiment of this application, the training module includes: a setting unit, configured to set the weights of the sub-losses in the multi-objective fusion loss function to different values based on different training stages; and a guiding unit, configured to guide the hierarchical dynamic system model from learning local basic tasks to learning global collaborative tasks according to the values.
[0023] Through the above-mentioned technical means, the embodiments of this application can decompose the complex global optimization problem into two stages of "easy first, difficult later" in the multi-stage training course. The model can first learn basic knowledge on a relatively smooth loss surface, and then fine-tune it under high-dimensional global constraints. This can effectively avoid instability in the early stage of training and significantly accelerate the overall convergence speed.
[0024] Optionally, in one embodiment of this application, the processing module includes: a calculation unit for calculating global statistical features of type variables in the original training dataset; and a processing unit for performing point-by-point normalization on all the original time-series data based on the global statistical features.
[0025] Through the above-mentioned technical means, the embodiments of this application can process all the data input into the neural network into a similar numerical range, eliminate the huge differences in the dimensions and numerical ranges of different variables, thereby improving the model's sensitivity to variables with smaller values, which is beneficial to the stability and efficiency of the optimization algorithm.
[0026] Optionally, in one embodiment of this application, it further includes: a transformation module, used to inversely transform the model parameters learned in the normalized space according to the global statistical features after the model training converges, so as to restore the state space matrix with actual physical units and meaning.
[0027] Through the above-mentioned technical means, the embodiments of this application can recover the state space matrix with actual physical units and meaning by performing an inverse transformation on the model parameters learned in the normalized space based on the statistical characteristics at the time of normalization after the model training converges, thereby providing effective data support that conforms to the real physical scenario for subsequent engineering analysis.
[0028] Optionally, in one embodiment of this application, the formula for calculating the fusion loss function is: , in These are adjustable weight hyperparameters. For localized losses, For network loss, This results in a global loss.
[0029] Through the above-mentioned technical means, the embodiments of this application take minimizing the loss as the optimization objective in model training. The model parameters can be adjusted iteratively through backpropagation to directly reduce the error between the predicted output and the true label, so that the model can gradually learn the mapping law between input and output. At the same time, by monitoring the dynamic balance between training and validation loss, the problems of overfitting or underfitting can be alleviated, and the model complexity and generalization ability can be balanced.
[0030] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the training method for a hierarchical dynamic system model as described in the above embodiments.
[0031] A fourth aspect of this application provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the training method for the hierarchical dynamic system model described above.
[0032] A fifth aspect of this application provides a computer program product that stores a computer program that, when executed by a processor, implements the training method for the hierarchical dynamic system model described above.
[0033] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0034] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a training method for a hierarchical dynamic system model according to an embodiment of this application; Figure 2 This is a schematic diagram of a probability slice sampling strategy for generating training data according to a specific embodiment of this application; Figure 3 This is a schematic diagram of the structure of a training device for a hierarchical dynamic system model according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0035] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0036] The main objective of this application is to overcome the shortcomings of existing training methods and provide a training method, data processing method, and system that can significantly improve the training stability, efficiency, and final accuracy of hierarchical dynamic system models; aiming to solve one or more of the following core technical problems: 1. How to design a stable optimization path to avoid convergence problems encountered when training complex hierarchical models end-to-end.
[0037] 2. How to design an effective data preprocessing and batch generation strategy to adapt to the spatiotemporal characteristics of small signal oscillation data and ensure that the model can learn dynamic patterns across the entire frequency band.
[0038] 3. How to provide a complete closed-loop workflow from raw physical data to the final usable physical model.
[0039] The training method and apparatus for a hierarchical dynamic system model according to embodiments of this application are described below with reference to the accompanying drawings. Addressing the problems of low training accuracy and efficiency in related technologies mentioned in the background section, where training methods fail to fully exploit data value and suffer from instability and convergence difficulties, this application provides a training method for a hierarchical dynamic system model. In this method, a training set for the model is generated by probability slicing samples of different time positions and durations in a long-term time-series data trajectory. A multi-objective loss function containing different sub-losses is defined, and the model is then trained in stages based on the training set and the multi-objective loss function. The weights of the multi-objective loss function are adjusted at different stages until the model training converges. This method can guide the model training optimization process in stages through course learning, fully exploiting data value through refined data processing, thereby ensuring that complex models can achieve fast, stable, and efficient training. Thus, it solves the problems of low training accuracy and efficiency caused by the inability to fully exploit data value, instability, and convergence difficulties in related technologies.
[0040] Specifically, Figure 1 This is a flowchart illustrating a training method for a hierarchical dynamic system model provided in an embodiment of this application.
[0041] like Figure 1 As shown, the training method for this hierarchical dynamic system model includes the following steps: In step S101, the original time-series data in the target dataset is normalized to generate a normalized long-time-series data trajectory.
[0042] Raw time-series data can be understood as a series of observations collected in chronological order, such as voltage monitoring data for a power line (e.g., a sequence recorded every 5 minutes for one year) or load data for a region (e.g., a sequence recorded hourly for several months). This type of data typically has differences in dimensions (e.g., voltage is in kV, power is in MW), differences in numerical scale (e.g., voltage fluctuations may range from 10-20 kV, while temperature fluctuations range from -10 to 40°C), and may contain noise or outliers.
[0043] Long-term data trajectories emphasize the long duration and continuity of the data—"long duration" refers to a large time span (such as several months or years) and a large number of data points (possibly tens of thousands or even millions); "trajectory" vividly describes the dynamic change trend of the data over time (such as the daily cycle of the load curve and the seasonal fluctuation trajectory).
[0044] In actual implementation, the embodiments of this application may first preprocess the original time series data used for training. For example, global normalization may be used to eliminate the differences in physical dimensions and numerical scales between different variables in the original time series data.
[0045] Optionally, in one embodiment of this application, the normalization process for the original time-series data in the target dataset includes: calculating the global statistical features of the type variables in the original training dataset; and performing point-by-point normalization on all the original time-series data based on the global statistical features.
[0046] Specifically, embodiments of this application can eliminate differences in physical dimensions and numerical scales between different variables by calculating the global statistical characteristics (such as mean and mean absolute deviation) of each type of variable in the training dataset and using these characteristics to normalize all time series data point by point.
[0047] For example, before training begins, the entire original dataset can be traversed first. For the first in the dataset For each physical quantity (such as rotor angle, active power, etc.), calculate its global mean across all samples and all time steps. and global mean absolute deviation Then, for each data point (No. The sample, the first The moment, the first The variables are normalized using the following formula:
[0048] Through the above technical solutions, the embodiments of this application can process all the data input into the neural network into a similar numerical range, eliminate the huge differences in the dimensions and numerical ranges of different variables, thereby improving the model's sensitivity to variables with smaller values, which is beneficial to the stability and efficiency of the optimization algorithm.
[0049] In step S102, based on the long-time-series data trajectory, probability slices are sampled at different time positions of the trajectory with different time lengths to obtain training batch segments containing multiple dynamic features, and a training dataset is generated based on the training batch segments containing multiple dynamic features.
[0050] This probabilistic slicing sampling step can be understood as randomly selecting the starting point and length of a slice in a long time-series trajectory based on a preset probability distribution, in order to generate training data fragments containing multiple dynamic features.
[0051] In actual implementation, after obtaining the long-time trajectory through normalization in step S101, this embodiment of the application establishes a probabilistic sampling strategy to generate training batches from the normalized long-time trajectory. This strategy non-uniformly and probabilistically slices the trajectory at different time positions and with different time lengths to ensure that the training batches simultaneously contain segments with multiple dynamic features such as high-amplitude transients and low-amplitude oscillations.
[0052] For example, such as Figure 2 As shown in the figure, this diagram illustrates a typical decaying oscillation waveform. If a traditional fixed sliding window is used, the sampling points will be densely distributed at the front end where the energy is concentrated. The probability slicing strategy adopted in this embodiment is different. This strategy can predefine a probability table or probability distribution function, which determines which time point in a long time series trajectory is selected as the starting point of the slice, and the length of the slice. For example, a probability distribution can be designed so that although the probability of selecting the rear end (low amplitude region) of the waveform as the starting point is lower than that of the front end, it still maintains a considerable value. At the same time, the slice length can also be random, thereby generating training sequences of varying lengths.
[0053] The probabilistic slicing sampling strategy ensures that the model fully learns multiple modes throughout the dynamic process, especially the low-amplitude oscillation modes that are crucial to system stability, thereby improving the final accuracy of the model. Global normalization ensures that all state variables are learned in a balanced manner, avoiding model bias caused by scale differences.
[0054] The training batches generated by the probability slicing strategy can cover the entire process from the initial transient state to the weak final oscillation, ensuring that the model does not "unbalance its strengths".
[0055] In summary, as an example, the data processing method for dynamic modeling of power systems may include the following steps: Receive multiple small-signal perturbation time-series trajectories containing various physical quantities as raw data; calculate the global statistical characteristics of each physical quantity on all trajectories, and normalize the raw data using the global statistical characteristics; Based on the probability sampling strategy, multiple data segments with variable lengths and starting positions are extracted from the normalized time-series trajectory, and the data segments are combined into training batches.
[0056] Probabilistic sampling strategies can be designed to ensure that there are opportunities to sample from both transient high-amplitude regions and steady-state low-amplitude regions of time-series trajectories.
[0057] In step S103, the local loss for evaluating the prediction accuracy of the component sub-model, the network loss for evaluating the degree to which the network sub-model satisfies the network constraints, and the global loss for evaluating the global model's accuracy in reproducing the overall dynamics of the system are defined, so as to construct a multi-objective fusion loss function for the hierarchical dynamic system model based on the local loss, network loss, and global loss.
[0058] The multi-objective fusion loss function consists of at least two weighted sub-losses; the multi-objective fusion loss function may include at least: a local loss term to measure the accuracy of a single sub-model and a global loss term to measure the accuracy of the global model after integrating all sub-models.
[0059] In practical implementation, the training method for hierarchical dynamic system models proposed in this application can be applied to a system containing multiple component sub-models and a network sub-model, which are parsedly fused to form a global model. Regarding the training of the hierarchical dynamic system model, a fusion loss function composed of weighted sums of multiple sub-objectives can be designed. The training model is optimized based on this fusion loss function.
[0060] The fusion loss function is composed of weighted sums of multiple sub-objectives. At least including: A local loss used to evaluate the prediction accuracy of each component sub-model ; A network loss used to evaluate how well a network sub-model satisfies network constraints. ; A global loss of the final fusion model to the overall dynamic reproduction accuracy of the system. .
[0061] Optionally, in one embodiment of this application, the formula for calculating the fusion loss function is: , in, These are adjustable weight hyperparameters. The local loss is the sum of the errors between the predicted input / output / state trajectories of all component models and their true values. Network loss is the error between the port variable relationships predicted by the network model and the actual values. The global loss is the global matrix obtained by fusing all component models. The error between the predicted global state trajectory and the actual value.
[0062] In the embodiments of this application, the total loss can be minimized. The model is trained for the target.
[0063] In the model training of this application, minimizing the loss is taken as the optimization objective. The model parameters can be adjusted iteratively through backpropagation to directly reduce the error between the predicted output and the true label, so that the model can gradually learn the mapping law between input and output. At the same time, by monitoring the dynamic balance between training and validation losses, overfitting or underfitting problems can be alleviated, balancing model complexity and generalization ability. Especially in complex physical systems such as power systems, the loss function designed in combination with domain knowledge (such as physical constraint terms) can also ensure that the model output conforms to physical laws while minimizing errors, ultimately promoting the transformation of the model from theoretical architecture to practical tool.
[0064] In step S104, the weights of the sub-losses in the multi-objective fusion loss function are adjusted in stages based on different training stages, and the model is trained based on the weights with the goal of minimizing the total loss, until the preset model convergence condition is reached, so as to construct a hierarchical dynamic system model.
[0065] In actual implementation, this application embodiment may adopt a curriculum learning strategy to adjust the weights in the loss function in stages to guide the model's learning process. The multi-stage training curriculum includes a pre-training stage and a fine-tuning stage. In the pre-training stage, the weights of the local loss terms are higher than the weights of the global loss terms. In the fine-tuning stage, the weights of the global loss terms are increased to be higher than or equal to the weights of the local loss terms.
[0066] Specifically, the first stage: component and network pre-training. In this stage, higher weights can be set. and and lower weight The goal is to allow the model to first focus on learning relatively simple, low-dimensional basic tasks such as individual component sub-models and network sub-models, and to converge to a better initial state.
[0067] Phase Two: Global Cooperative Fine-Tuning. After the model converges in Phase One, the weights are adjusted, significantly increasing the weights of the global loss. The aim is to force all component sub-models to adjust collaboratively while maintaining local accuracy, so that they can accurately reproduce the complex emergent dynamics of the system level after being fused through analytical formulas.
[0068] Optionally, in one embodiment of this application, adjusting the weights of sub-losses in the multi-objective fusion loss function in stages includes: setting the weights of sub-losses in the multi-objective fusion loss function to different values based on different training stages; and guiding the hierarchical dynamic system model to transition from learning local basic tasks to learning global collaborative tasks based on these values.
[0069] The specific details regarding the implementation of the course are as follows: Phase 1 (Pre-training): Setting weights, for example At this point, the main driving force for training comes from enabling each component model to learn its own dynamics. And enabling the network model to learn algebraic constraints ( Global loss The weights are relatively small, playing only a minor guiding role. The purpose of this stage is to find a reasonable initial value range for the model parameters.
[0070] Phase Two (Fine-tuning): Once the loss from Phase One no longer decreases significantly, adjust the weights, for example... At this point, the global loss As the dominant force, the optimizer will heavily adjust the parameters of all component models to ensure they "work together" and guarantee the final fused global model. It can accurately reproduce the dynamics of the entire system. The local knowledge learned in the first stage is now used to better achieve the global goal.
[0071] Through the above technical solution, the embodiments of this application can decompose the complex global optimization problem into two stages of "easy first, difficult later" in the multi-stage training course. The model can first learn basic knowledge on a relatively smooth loss surface, and then fine-tune under high-dimensional global constraints, thereby effectively avoiding instability in the early stage of training and significantly accelerating the overall convergence speed.
[0072] Optionally, in one embodiment of this application, the method further includes: after the model training converges, performing an inverse transformation on the model parameters learned in the normalized space based on global statistical characteristics to restore the state space matrix with actual physical units and meaning.
[0073] After model training converges, this embodiment of the application can perform an inverse transformation on the model parameters learned in the normalized space using the statistical features used in the normalization in step S101 to recover the state space matrix with actual physical units and meaning, for use in subsequent engineering analysis. In other words, after model training is completed, the inverse normalization transformation step is performed on the trained parameters of the data-driven sub-model to recover a model with physical meaning.
[0074] Specifically, after training, the model (e.g., the parameter generation network in NSSE) outputs a state space matrix in the normalized space, denoted as... In order to obtain the physical model An inverse transformation is required; let These are diagonal scaling matrices for the state, input, and output variables, respectively, with their diagonal elements being the scaling factors calculated in step S101. The physical matrix can then be recovered through the following similarity transformation:
[0075] The same applies to other matrices; the restored global matrix It can be directly used for eigenvalue analysis in the engineering field. Tasks such as...
[0076] Through the above technical solution, the embodiments of this application can recover the state space matrix with actual physical units and meaning by inversely transforming the model parameters learned in the normalized space based on the statistical characteristics at the time of normalization after the model training converges, thereby providing effective data support that conforms to the real physical scenario for subsequent engineering analysis.
[0077] The design of the multi-objective loss function clearly decouples the learning tasks of local dynamics, network constraints and global behavior during training, making gradient allocation more effective. Combined with multi-stage courses, it can improve the overall efficiency and effectiveness of training.
[0078] In summary, the embodiments of this application provide a complete, closed-loop methodology from raw data processing and model training strategies to final physical model recovery. Specifically, it is a training strategy that combines multi-stage course learning, multi-objective loss functions, and dedicated spatiotemporal data transformation, making it particularly suitable for modeling large-scale physical systems such as power systems. This systematic solution ensures that the results of data-driven modeling can be easily and reliably transformed into tools usable in engineering practice, solving the "last mile" problem between theory and application.
[0079] The training method for a hierarchical dynamic system model proposed in this application can generate a training set for the model by sampling probability slices of different time positions and durations at different time positions in a long-term data trajectory. A multi-objective loss function containing different sub-losses is defined, and the model is then trained in stages based on the training set and the multi-objective loss function. The weights of the multi-objective loss function are adjusted at different stages until the model training converges. This solves the problems of low model training accuracy and efficiency caused by the inability to fully exploit data value, unstable training processes, and difficulty in convergence in related technologies.
[0080] Next, refer to the appendix. Figure 3 This application describes a training apparatus for a hierarchical dynamic system model proposed according to embodiments of the present application.
[0081] Figure 3 This is a block diagram of a training device for a hierarchical dynamic system model according to an embodiment of this application.
[0082] like Figure 3As shown, the training device 10 for the hierarchical dynamic system model includes: a processing module 100, a generation module 200, a construction module 300, and a training module 400.
[0083] The processing module 100 is used to normalize the original time-series data in the target dataset to generate normalized long-time-series data trajectories.
[0084] The generation module 200 is used to perform probability slicing sampling at different time positions and with different time lengths based on long time series data trajectories to obtain training batch segments containing multiple dynamic features, and to generate a training dataset based on the training batch segments containing multiple dynamic features.
[0085] The construction module 300 is used to define the local loss for evaluating the prediction accuracy of the component sub-model, the network loss for evaluating the degree to which the network sub-model satisfies the network constraints, and the global loss for evaluating the accuracy of the global model in reproducing the overall dynamics of the system. This allows for the construction of a multi-objective fusion loss function for a hierarchical dynamic system model based on the local loss, network loss, and global loss.
[0086] The training module 400 is used to adjust the weights of the sub-losses in the multi-objective fusion loss function in stages based on different training phases, and to train the model based on the weights with the goal of minimizing the total loss until the preset model convergence condition is reached, so as to build a hierarchical dynamic system model.
[0087] Optionally, in one embodiment of this application, the training module includes: a setting unit, configured to set the weights of the sub-losses in the multi-objective fusion loss function to different values based on different training stages; and a guiding unit, configured to guide the hierarchical dynamic system model from learning local basic tasks to learning global collaborative tasks according to the values.
[0088] Optionally, in one embodiment of this application, the processing module includes: a calculation unit for calculating the global statistical features of the type variables in the original training dataset; and a processing unit for performing point-by-point normalization on all the original time-series data based on the global statistical features.
[0089] Optionally, in one embodiment of this application, it further includes: a transformation module, used to inversely transform the model parameters learned in the normalized space according to global statistical characteristics after the model training converges, so as to restore the state space matrix with actual physical units and meaning.
[0090] Optionally, in one embodiment of this application, the formula for calculating the fusion loss function is: , in These are adjustable weight hyperparameters. For localized losses, For network loss, This results in a global loss.
[0091] It should be noted that the foregoing explanation of the training method embodiment for the hierarchical dynamic system model also applies to the training device for the hierarchical dynamic system model in this embodiment, and will not be repeated here.
[0092] The training apparatus for the hierarchical dynamic system model proposed in this application can generate a training set for the model by sampling probability slices of different time positions and durations at different time positions of long-term data trajectories. It defines a multi-objective loss function containing different sub-losses, and then performs phased training on the model based on the training set and the multi-objective loss function, adjusting the weights of the multi-objective loss function at different stages until the model training converges. This solves the problems of low model training accuracy and efficiency caused by the inability to fully exploit data value, unstable training process, and difficulty in convergence in related technologies.
[0093] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.
[0094] When the processor 402 executes the program, it implements the training method for the hierarchical dynamic system model provided in the above embodiments.
[0095] Furthermore, electronic devices also include: Communication interface 403 is used for communication between memory 401 and processor 402.
[0096] The memory 401 is used to store computer programs that can run on the processor 402.
[0097] Memory 401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0098] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0099] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.
[0100] Processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0101] This application also provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the training method for the hierarchical dynamic system model described above.
[0102] This application also provides a computer program product storing a computer program that, when executed by a processor, implements the training method for the hierarchical dynamic system model described above.
[0103] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0104] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0105] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0106] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0107] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0108] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0109] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0110] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A training method for a hierarchical dynamic system model, characterized in that, Includes the following steps: The original time-series data in the target dataset is normalized to generate normalized long-time-series data trajectories; Based on the long-time data trajectory, probability slices are sampled at different time positions of the trajectory with different time lengths to obtain training batch segments containing multiple dynamic features, and a training dataset is generated based on the training batch segments containing multiple dynamic features. Define the local loss for evaluating the prediction accuracy of the sub-model of the evaluation element, the network loss for evaluating the degree to which the network sub-model satisfies the network constraints, and the global loss for evaluating the global model for the overall dynamic reproduction accuracy of the system. Construct a multi-objective fusion loss function for the hierarchical dynamic system model based on the local loss, the network loss, and the global loss. Based on different training stages, the weights of the sub-losses in the multi-objective fusion loss function are adjusted in stages, and the model is trained based on the weights with the goal of minimizing the total loss, until the preset model convergence condition is reached, so as to construct a hierarchical dynamic system model.
2. The method according to claim 1, characterized in that, The phased adjustment of the weights of the sub-losses in the multi-objective fusion loss function includes: Based on different training stages, the weights of the sub-losses in the multi-objective fusion loss function are set to different values; Based on the stated value, the hierarchical dynamic system model is guided to transition from learning local basic tasks to learning global collaborative tasks.
3. The method according to claim 1, characterized in that, The normalization process for the original time-series data in the target dataset includes: Calculate the global statistical features of the categorical variables in the original training dataset; The original time-series data are normalized point by point based on the global statistical characteristics.
4. The method according to claim 3, characterized in that, Also includes: After the model training converges, the model parameters learned in the normalized space are inversely transformed according to the global statistical features to restore the state space matrix with actual physical units and meaning.
5. The method according to claim 1, characterized in that, The formula for calculating the fusion loss function is as follows: , in These are adjustable weight hyperparameters. For localized losses, For network loss, This results in a global loss.
6. A training device for a hierarchical dynamic system model, characterized in that, include: The processing module is used to normalize the raw time-series data in the target dataset to generate normalized long-time-series data trajectories. The generation module is used to perform probability slicing sampling at different time positions and with different time lengths based on the long time series data trajectory to obtain training batch segments containing multiple dynamic features, and to generate a training dataset based on the training batch segments containing multiple dynamic features. A construction module is used to define the local loss for evaluating the prediction accuracy of the component sub-model, the network loss for evaluating the degree to which the network sub-model satisfies the network constraints, and the global loss for evaluating the global model's accuracy in reproducing the overall dynamics of the system. Based on the local loss, the network loss, and the global loss, a multi-objective fusion loss function for constructing a hierarchical dynamic system model is built. The training module is used to adjust the weights of the sub-losses in the multi-objective fusion loss function in stages based on different training phases, and to train the model based on the weights with the goal of minimizing the total loss until the preset model convergence condition is reached, so as to construct a hierarchical dynamic system model.
7. The apparatus according to claim 6, characterized in that, The training module includes: The setting unit is used to set the weights of the sub-losses in the multi-objective fusion loss function to different values based on different training stages; The guiding unit is used to guide the hierarchical dynamic system model to transition from learning local basic tasks to learning global collaborative tasks based on the value.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the training method for a hierarchical dynamic system model as described in any one of claims 1-5.
9. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the training method for the hierarchical dynamic system model as described in any one of claims 1-5.
10. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the training method for the hierarchical dynamic system model as described in any one of claims 1-5.