Method, device and equipment for training non-stationary simulation data generation model

By combining the timing probability model and the automatic encoder, initializing and updating the parameters of the simulation data generation model, the problem of insufficient adaptability of non-stationary data generation in the existing technology is solved, and the generation of high-accurate simulation data suitable for different test requirements is achieved. .

CN119272831APending Publication Date: 2025-01-07GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411381358.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

When generating non-stationary simulation data, existing automatic encoders are not adaptable and it is difficult to effectively capture the timing changes and abnormal characteristics of the input data, resulting in the generated data not matching the actual data, limiting the accuracy of software testing.

Method used

By combining the timing probability model and the automatic encoder, the state parameters and automatic encoder parameters of the simulation data generation model are initialized, the data frames are divided and the hidden state is determined, random sampling is performed based on the Gaussian distribution function, and the encoder and decoder parameters and the timing probability are updated. The state transfer matrix of the model gradually learns the timing changes and distribution characteristics of non-stationary data.

Benefits of technology

It realizes the generation of simulated data suitable for different non-stationary data testing needs, improves the accuracy and adaptability of the test, makes the generated data close to the true distribution, covering a wider range of test scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272831A_ABST
    Figure CN119272831A_ABST
Patent Text Reader

Abstract

The invention relates to a non-stationary simulation data generation model training method and device, computer equipment, a computer readable storage medium and a computer program product. According to the method, a time sequence probability model and an automatic encoder are combined to construct a simulation data generation model, time sequence change information of non-stationary training data is captured based on state parameters of the time sequence probability model, modeling is carried out on an encoding space of the automatic encoder based on the state parameters, random vectors corresponding to all hidden states are obtained, and the hidden states of the automatic encoder are simulated. Therefore, output data corresponding to the non-stationary training data is obtained based on random vector decoding, and parameters of the automatic encoder and a state transition matrix of the time sequence probability model are updated, so that time sequence change information and data distribution conditions of the non-stationary training data are learned step by step; the non-stationary simulation data generation model suitable for different non-stationary data test requirements can be obtained, and the applicability of the generated non-stationary simulation data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automated testing technology, and in particular to a training method, apparatus, device, computer-readable storage medium and computer program product for a non-stationary simulation data generation model, and a non-stationary simulation data generation method, apparatus, device, computer-readable storage medium and computer program product. Background Art

[0002] In the testing of some business-related functions of the software, there are often problems such as small amount of actual measured data, high acquisition cost, and incomplete coverage. In particular, the measured abnormal data is often difficult to obtain in large quantities. It is very limited to using only actual measured data to evaluate the software's business-related functions. Using simulation methods to generate a large amount of normal and abnormal data is an effective way to solve the insufficient amount of actual measured data in software automatic testing.

[0003] Existing methods for generating simulation data include Gaussian Mixture Model (GMM), Autoencoders (AE), Generative adversarial networks (GAN), Diffusion models, etc. Among them, automatic encoder is one of the most commonly used methods to generate simulation data. However, hidden variables such as Variational Auto-Encoders (VAE) and Conditional Variational Auto-Encoders (CVAE) are modeled using Gaussian or hybrid Gaussian models, and cannot generate random non-stationary data well. In many applications, the input data is non-stationary data, and the abnormal data in it is often bursty. Therefore, the current solution to generate non-stationary test data is not highly adaptable to different test needs. Summary of the invention

[0004] Based on this, it is necessary to provide a training method, device, computer equipment, computer-readable storage medium and computer program product for a non-stationary simulation data generation model that can be suitable for different testing needs, as well as a non-stationary simulation data generation method, device, equipment, computer-readable storage medium and computer program product in response to the above-mentioned technical problems.

[0005] In a first aspect, the present application provides a training method for a non-stationary simulation data generation model, comprising:

[0006] Initialize the state parameters of the temporal probability model in the pre-built simulation data generation model and the parameters of the autoencoder in the simulation data generation model;

[0007] Dividing the non-stationary training data into a plurality of data frames, determining a hidden state of each data frame and a state encoding of the hidden state;

[0008] For each data frame, the data frame and the state code corresponding to the data frame are concatenated and input into the encoder of the preset automatic encoder to obtain the hidden variable corresponding to the data frame;

[0009] Based on the hidden variables of each data frame, determine the Gaussian distribution function corresponding to each hidden state, randomly sample the Gaussian distribution function corresponding to each hidden state, and obtain a random vector corresponding to each data frame, where the random vector is used to characterize the data features of the data frame;

[0010] Inputting the random vectors corresponding to each data frame into the decoder of the automatic encoder to obtain the non-stationary simulation data frames corresponding to each random vector, and updating the parameters of the encoder and the decoder based on the non-stationary simulation data frames;

[0011] Based on the hidden variables corresponding to the data frame, the state transfer matrix of the time series probability model is updated to obtain the trained simulation data generation model.

[0012] In one embodiment, based on the hidden variables of each data frame, a Gaussian distribution function corresponding to each hidden state is determined, and the Gaussian distribution function corresponding to each hidden state is randomly sampled to obtain a random vector corresponding to each data frame, including:

[0013] According to the hidden state of each hidden variable, the hidden variables are divided into multiple hidden variable sets, and the hidden variable sets correspond to the hidden states one by one;

[0014] For each hidden state, based on a set of hidden variables corresponding to the hidden state, a distribution parameter corresponding to the hidden state is determined, and based on the distribution parameter, a Gaussian distribution function corresponding to the hidden state is determined;

[0015] For each data frame, based on the Gaussian distribution function corresponding to the hidden state corresponding to the data frame, the vector components of the latent variables corresponding to each data frame are randomly sampled to obtain a random vector corresponding to each data frame.

[0016] In one embodiment, for each hidden state, based on a set of hidden variables corresponding to the hidden state, determining a distribution parameter corresponding to the hidden state includes:

[0017] Based on each latent variable in the latent variable set corresponding to the hidden state, determine the mean and variance of the vector components of the latent variable;

[0018] Based on the mean and variance of the vector components of the latent variables, the mean and variance corresponding to the hidden state are determined.

[0019] In one embodiment, updating parameters of an encoder and a decoder based on a non-stationary simulation data frame includes:

[0020] Determine the error of the simulation data generation model based on the non-stationary simulation data frame, the data frame and the preset loss function;

[0021] Based on the error, the parameters of the encoder and decoder are updated.

[0022] In one embodiment, updating a state transition matrix of a time series probability model based on hidden variables corresponding to a data frame includes:

[0023] Based on the latent variables corresponding to each data frame and the time series information of each data frame, a latent variable sequence is obtained;

[0024] Based on the hidden variable sequence and the Gaussian function corresponding to each hidden state, update the hidden state corresponding to each data frame;

[0025] Determine the transition probability between hidden states based on the non-stationary training data after updating the hidden states;

[0026] Based on the transition probabilities between the hidden states, the state transition matrix of the temporal probability model is updated.

[0027] In a second aspect, the present application also provides a method for generating non-stationary simulation data, comprising:

[0028] Initializing the current hidden state of the output data of the trained simulation data generation model, where the simulation data generation model is trained based on the training method of the non-stationary simulation data generation model;

[0029] Randomly sample the Gaussian distribution function corresponding to the current hidden state to obtain the target random vector corresponding to the current hidden state;

[0030] Inputting the target random vector into a decoder in the trained simulation data generation model to obtain non-stationary simulation data corresponding to the target random vector;

[0031] Based on the state transfer matrix of the temporal probability model in the simulation data generation model, the next hidden state of the output data of the simulation data generation model is determined, and the step of randomly sampling the Gaussian distribution function corresponding to the current hidden state is returned until the preset end condition is reached.

[0032] In one embodiment, determining the next hidden state of output data of the simulation data generation model based on the state transition matrix of the temporal probability model in the simulation data generation model includes:

[0033] Generate random probabilities based on probability intervals;

[0034] Based on the state transfer matrix, determine the row vector corresponding to the current hidden state of the output data, where the row vector includes the probability of the current hidden state transferring to each hidden state of the state transfer matrix;

[0035] Based on the value of each element in the row vector, the probability interval is divided into multiple sub-probability intervals, where the sub-probability intervals correspond to the elements one by one, and the length of the sub-probability interval is the value of the corresponding element;

[0036] Determine the target sub-probability interval to which the random probability belongs, and determine the next hidden state of the output data of the simulation data generation model based on the elements corresponding to the target sub-probability interval.

[0037] In a third aspect, the present application also provides a training device for a non-stationary simulation data generation model, comprising:

[0038] A model initialization module, used to initialize the state parameters of the time series probability model in the pre-built simulation data generation model and the parameters of the autoencoder in the simulation data generation model;

[0039] A data processing module, used for dividing the non-stationary training data into a plurality of data frames, and determining a hidden state of each data frame and a state encoding of the hidden state;

[0040] The model training module is used to divide the non-stationary training data into multiple data frames, determine the hidden state of each data frame and the state code of the hidden state; for each data frame, splice the data frame and the state code corresponding to the data frame and input them into the encoder of the automatic encoder to obtain the hidden variable corresponding to the data frame; based on the hidden state of each data frame, randomly sample the vector components of the hidden variable corresponding to each data frame to obtain the random vector corresponding to each data frame, and the random vector is used to characterize the data characteristics of the data frame; input the random vector corresponding to each data frame into the decoder of the automatic encoder to obtain the output data frame corresponding to each data frame;

[0041] The model parameter updating module is used to update the parameters of the encoder and decoder based on the output data frame; based on the hidden variables corresponding to the data frame, the state transfer matrix of the time series probability model is updated to obtain the trained simulation data generation model.

[0042] In a fourth aspect, the present application also provides a non-stationary simulation data generating device, comprising:

[0043] A generation model initialization module is used to initialize the current hidden state of the output data of the trained simulation data generation model, where the simulation data generation model is trained based on the training method of the non-stationary simulation data generation model;

[0044] The simulation data generation module is used to randomly sample the Gaussian distribution function corresponding to the current hidden state to obtain a target random vector corresponding to the current hidden state; the target random vector is input into a decoder in the trained simulation data generation model to obtain non-stationary simulation data corresponding to the target random vector;

[0045] The hidden state confirmation module is used to determine the next hidden state of the output data of the simulation data generation model based on the state transfer matrix of the time series probability model in the simulation data generation model, and return to the step of randomly sampling the Gaussian distribution function corresponding to the current hidden state until the preset end condition is reached.

[0046] In a fifth aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any one of the above-mentioned training method embodiments of a non-stationary simulation data generation model, or the steps in the non-stationary simulation data generation method embodiment.

[0047] In a sixth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned training method embodiments for a non-stationary simulation data generation model, or the steps in the non-stationary simulation data generation method embodiments.

[0048] In the seventh aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned training method embodiments for a non-stationary simulation data generation model or the non-stationary simulation data generation method embodiments.

[0049] The training method, apparatus, computer device, computer-readable storage medium and computer program product of the above-mentioned non-stationary simulation data generation model combine a time series probability model and an autoencoder to construct a simulation data generation model, capture the time series change information of the non-stationary training data based on the state parameters of the time series probability model, and model the encoding space of the autoencoder based on the state parameters to obtain a random vector corresponding to each hidden state, thereby obtaining output data corresponding to the non-stationary training data based on random vector decoding, and updating the parameters of the autoencoder and the state transfer matrix of the time series probability model. In this way, the model gradually learns the time series change information and data distribution of the non-stationary training data, thereby being able to obtain a non-stationary simulation data generation model suitable for different non-stationary data testing requirements.

[0050] The above-mentioned non-stationary test data generation method, device, computer equipment, computer-readable storage medium and computer program product, through the distribution parameters corresponding to each hidden state in the trained simulation data generation model, randomly sample the random vectors corresponding to each hidden state, and can capture the timing change information and data distribution of the non-stationary simulation data to be generated, so that the non-stationary simulation data obtained based on random vector decoding can be close to the real distribution, suitable for different non-stationary data testing requirements, and further improve the accuracy of the test. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0052] Figure 1 An application environment diagram of a training method for generating a model for non-stationary simulation data in one embodiment;

[0053] Figure 2 A schematic flow chart of a training method for a non-stationary simulation data generation model in one embodiment;

[0054] Figure 3 A schematic flow chart of a training method for generating a model for non-stationary simulation data in another embodiment;

[0055] Figure 4 A flowchart of a training method for generating a model for non-stationary simulation data in another embodiment;

[0056] Figure 5 A schematic flow chart of a method for generating non-stationary simulation data in yet another embodiment;

[0057] Figure 6 A schematic diagram of a flow chart of a method for generating non-stationary simulation data in a detailed embodiment;

[0058] Figure 7 A structural block diagram of a training device for generating a model for non-stationary simulation data in one embodiment;

[0059] Figure 8 A structural block diagram of a non-stationary simulation data generating device in one embodiment;

[0060] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] In the process of testing the relevant functions of the software based on non-stationary data, there may be problems such as small amount of measured non-stationary data, high acquisition cost, incomplete coverage, etc., and some measured abnormal data are often difficult to obtain in large quantities, such as cable partial discharge signals, motor vibration signals, transient signals of transmission lines, battery charging and discharging data, etc. Cable partial discharge refers to the discharge phenomenon occurring in a local area of ​​the cable insulation layer, which will generate a large electric pulse at the moment of discharge; the motor vibration signal is the signal generated by the motor during operation due to load changes, mechanical wear, mechanical failure or electrical failure; the transient signal of the transmission line is the instantaneous voltage and current waveform generated when the transmission line suffers from lightning strikes, short circuits and other faults. All of these data have non-stationary characteristics, and it is not easy to collect the measured data, which makes automatic testing based on measured data have great limitations. Therefore, a large amount of normal and abnormal data can be generated by generating simulation data for automatic software testing.

[0063] The training method of the non-stationary simulation data generation model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0064] Specifically, the operator may upload the historically collected non-stationary training data to the server 104 through the terminal 102, and then send the training message of the non-stationary simulation data generation model to the server 104 through the terminal 102. The server 104 obtains the non-stationary training data, and then initializes the state parameters of the time series probability model in the pre-built simulation data generation model and the parameters of the automatic encoder in the simulation data generation model. Then, the non-stationary training data is divided into multiple data frames, and the hidden state and the state encoding of the hidden state of each data frame are determined. For each data frame, the data frame and the state encoding corresponding to the data frame are spliced ​​and input into the automatic encoder. In the encoder of the encoder, the hidden variables corresponding to the data frame are obtained. Again, based on the hidden variables of each data frame, the Gaussian distribution function corresponding to each hidden state is determined, and the Gaussian distribution function corresponding to each hidden state is randomly sampled to obtain a random vector corresponding to each data frame. The random vector is used to characterize the data features of the data frame. Finally, the random vector corresponding to each data frame is input into the decoder of the automatic encoder to obtain a non-stationary simulation data frame corresponding to each random vector. Based on the non-stationary simulation data frame, the parameters of the encoder and decoder are updated. Based on the hidden variables corresponding to the data frame, the state transfer matrix of the time series probability model is updated to obtain the trained simulation data generation model.

[0065] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0066] In an exemplary embodiment, Figure 2 As shown in FIG. 1 , a training method for a non-stationary simulation data generation model is provided, and the method is applied to Figure 1 The server 104 in the example is used for explanation, and includes the following S100 to S600. Among them:

[0067] S100, initializing state parameters of a temporal probability model in a pre-built simulation data generation model and parameters of an autoencoder in the simulation data generation model.

[0068] The state parameters of the temporal probability model include but are not limited to the number of hidden states and the state transition matrix.

[0069] The simulation data generation model is a combined model including a time series probability model and an autoencoder, wherein the time series probability model may include but is not limited to a hidden Markov model (HMM), a maximum entropy Markov model, a Bayesian linear regression model, etc. The autoencoder is used to learn the compressed representation of the data and try to reconstruct the original input data. It is mainly composed of an encoder, a decoding space and a decoder. The encoder maps the input data to the decoding space, and the decoder tries to restore the original data from the decoding space.

[0070] The simulation data generation model can be used to generate non-stationary simulation data and provide non-stationary test data for software automatic testing. Among them, non-stationary data refers to data whose statistical characteristics of time series change over time.

[0071] In this embodiment, the time series probability model is a hidden Markov model, and the non-stationary training data is a cable partial discharge signal. The state parameters of the hidden Markov model include the number of hidden states and the state transfer matrix, wherein the hidden state is a series of states that cannot be directly observed, which describes the inherent changes in the cable partial discharge signal data. The number of hidden states can be determined by technicians based on the changes in the historically collected cable partial discharge signal data. The state transfer matrix contains the transfer rules and transfer probabilities between different hidden states.

[0072] For example, in practical applications, the parameters of the autoencoder in the simulation data generation model, such as the weight matrix and the initial values ​​of the bias term, can be randomly initialized, the number of hidden states of the initialized hidden Markov model is 5, and the transfer rule stipulates that the current hidden state can only be transferred to the current hidden state or the next hidden state, then the corresponding initialized state transfer matrix can be:

[0073]

[0074] In the formula, A ij represents the probability of transitioning from hidden state i to hidden state j.

[0075] S200, dividing the non-stationary training data into a plurality of data frames, and determining a hidden state and a state code of the hidden state for each data frame.

[0076] In practical applications, each piece of non-stationary training data is subjected to data frame processing to obtain multiple data frames, where the data frame is the smallest data unit of the non-stationary training data. The hidden state of each data frame can be determined by evenly segmenting the non-stationary training data according to the number of hidden states in the state parameters of the hidden Markov model, wherein each data segment after the segmentation corresponds to a hidden state, and accordingly, the hidden state of the data frame in the data segment is the hidden state of the data segment to which it belongs.

[0077] For example, the number of hidden states may be set to 5, and each non-stationary training data may be evenly divided into 5 segments, the number of data frames in each divided data segment is the same, and the divided data segments correspond to 5 hidden states respectively, the hidden state of the data frames in the first data segment is all the first hidden state, the hidden state of the data frames in the second data segment is all the second hidden state, etc. It can be understood that, in addition to 5, the number of hidden states may also be other numbers such as 7, 10 or 15 in other embodiments, and is not limited to a single number here.

[0078] The state encoding of the hidden state can be determined by sequentially encoding different hidden states according to the hidden states corresponding to the divided data segments and the timing information of the data segments. For example, Arabic numerals are used for state encoding, and the state encoding of the hidden state corresponding to the first data segment is 1, and the state encoding of the hidden state corresponding to the second data segment is 2, and so on. One-hot encoding can also be used to encode the hidden state in the form of a binary vector. For example, the state encoding of the hidden state corresponding to the first data segment is 00001, and the state encoding of the hidden state corresponding to the second data segment is 00010, and so on.

[0079] S300, for each data frame, concatenate the data frame and the state code corresponding to the data frame and input them into the encoder of the automatic encoder to obtain the hidden variable corresponding to the data frame.

[0080] The latent variable is the input data of the encoder of the autoencoder, and its corresponding low-dimensional representation in the encoding space of the autoencoder.

[0081] In practical applications, for each data frame, the data frame is concatenated with its corresponding state code and input into the encoder of the autoencoder as an input vector. The encoder of the autoencoder performs a low-dimensional representation of the input vector to obtain the latent variable corresponding to the data frame, and the latent variable is a vector.

[0082] S400, based on the hidden variables of each data frame, determine the Gaussian distribution function corresponding to each hidden state, randomly sample the Gaussian distribution function corresponding to each hidden state, and obtain a random vector corresponding to each data frame, where the random vector is used to characterize the data features of the data frame.

[0083] In practical applications, to determine the Gaussian distribution function corresponding to each hidden state, we can first determine the Gaussian distribution function of the hidden variable under the same hidden state based on the hidden state corresponding to the hidden variable, thereby determining the Gaussian distribution function corresponding to each hidden state, and perform random sampling according to the Gaussian distribution function corresponding to each hidden state to obtain a random vector that satisfies the corresponding Gaussian distribution, so that the random vector obtained by sampling can capture the potential characteristics of the data frame and the data distribution of the data frame under the corresponding hidden state.

[0084] S500, inputting the random vectors corresponding to each data frame into the decoder of the automatic encoder to obtain the non-stationary simulation data frames corresponding to each random vector, and updating the parameters of the encoder and the decoder based on the non-stationary simulation data frames.

[0085] The non-stationary simulation data frame is simulation data output by the decoder based on data features of the input data frame.

[0086] In practical applications, the random vectors corresponding to each data frame are input into the decoder of the autoencoder, and the encoder restores the data according to the random vectors to obtain the non-stationary simulation data frames corresponding to each random vector. After obtaining the non-stationary simulation data frame, the error between the data frame of the non-stationary training data input to the autoencoder and the non-stationary simulation data frame output by the autoencoder can be measured by a loss function, so as to update the parameters of the encoder and decoder based on the error, wherein the loss function can be a mean square error loss function or a cross entropy loss function, etc.

[0087] S600, based on the hidden variables corresponding to the data frame, updating the state transfer matrix of the time series probability model to obtain a trained simulation data generation model.

[0088] The state transition matrix is ​​used to describe the transition rules and transition probabilities between different hidden states.

[0089] After updating the parameters of the encoder and decoder of the autoencoder, the state transition matrix of the time series probability model can be updated. Taking the time series probability model as a hidden Markov model as an example, the hidden state corresponding to the data frame can be decoded based on the hidden variables of the data frame according to the maximum likelihood estimation method, the forward-backward algorithm or the Viterbi algorithm to obtain the most likely hidden state corresponding to the data frame, and the transition probability between each state is calculated based on the most likely hidden state of the decoded data frame, thereby updating the state transition matrix.

[0090] In this way, the iterative training is performed in a loop, and after the preset end condition is met, the training is stopped to obtain the trained simulation data generation model, wherein the preset end condition may be that the number of iterative training reaches a preset iteration threshold, or the error change of the automatic encoder is continuously less than a preset value, and the training of the simulation data generation model is terminated. The trained simulation data generation model can generate a large amount of non-stationary data similar to the non-stationary training data.

[0091] In the training method of the above-mentioned non-stationary simulation data generation model, a time series probability model and an autoencoder are combined to construct a simulation data generation model. Based on the state parameters of the time series probability model, the time series change information of the non-stationary training data is captured, and the encoding space of the autoencoder is modeled based on the state parameters to obtain a random vector corresponding to each hidden state, thereby obtaining output data corresponding to the non-stationary training data based on random vector decoding, and updating the parameters of the autoencoder and the state transfer matrix of the time series probability model. In this way, the time series change information and data distribution of the non-stationary training data are gradually learned, so that a non-stationary simulation data generation model suitable for different non-stationary data testing requirements can be obtained.

[0092] In order to enable the simulation data generated by the simulation data generation model to capture the temporal variation information of the training data, in an exemplary embodiment, Figure 3 As shown, S400 includes S420 to S460. Among them:

[0093] S420, dividing the latent variables into a plurality of latent variable sets according to the hidden state of each latent variable, wherein the latent variable sets correspond to the hidden states one by one.

[0094] S440, for each hidden state, determine a distribution parameter corresponding to the hidden state based on a set of hidden variables corresponding to the hidden state, and determine a Gaussian distribution function corresponding to the hidden state based on the distribution parameter.

[0095] S460, for each data frame, based on the Gaussian distribution function corresponding to the hidden state corresponding to the data frame, randomly sample the vector components of the latent variables corresponding to each data frame to obtain a random vector corresponding to each data frame.

[0096] According to the hidden state of each hidden variable, the hidden variables are classified, that is, the hidden variables are divided into multiple hidden variable sets according to the corresponding hidden states. Exemplarily, the number of hidden states can be set to 5, and the hidden variables are divided into 5 hidden variable sets according to the 5 hidden states. For a hidden variable set, the hidden states of the hidden variables in the set are the same, and the hidden state corresponding to the hidden variable set is the hidden state of the hidden variable in the set.

[0097] After dividing the hidden variable sets corresponding to different hidden states, for each hidden variable set corresponding to the hidden state, determine the distribution parameters corresponding to the hidden state, and determine the Gaussian distribution function corresponding to the hidden state based on the distribution parameters, wherein the distribution parameters are numerical values ​​that describe the distribution characteristics of the hidden variables in the hidden variable set corresponding to the hidden state, and the corresponding distribution parameters of the hidden state may include but are not limited to the mean and variance of the hidden variable set.

[0098] Exemplarily, the distribution parameter corresponding to each hidden state, that is, the mean of the hidden variable set, is determined and variance , where i is the index of the hidden state, and the mean of the hidden variable set is and variance As the mean and variance of the Gaussian distribution function corresponding to the hidden state, the Gaussian distribution function corresponding to the i-th hidden state is , where I is the identity matrix, , , M is the dimension of latent variables.

[0099] After determining the Gaussian distribution function corresponding to each hidden state, for each data frame, according to the Gaussian distribution function corresponding to the data frame, the vector components of the hidden variables corresponding to the data frame are randomly sampled to obtain the random vector corresponding to the data frame. The distribution of the random vector conforms to the distribution parameters of the hidden state corresponding to the data frame, namely the mean and variance.

[0100] In this embodiment, by introducing the hidden state of the time series probability model, the Gaussian distribution function corresponding to each hidden state is determined according to the hidden variables and the hidden states of the hidden variables, so as to sample the Gaussian distribution function corresponding to the hidden state of the data frame to obtain a random vector corresponding to the data frame, so that the sampled random vector can capture the data characteristics of the data frame, as well as the data distribution and time series change information under different hidden states, which is beneficial to improving the adaptability and accuracy of data generated by the non-stationary simulation data generation model.

[0101] For each hidden state, a distribution parameter corresponding to the hidden state is determined. In an exemplary embodiment, S440 further includes S4442 to S444. Among them:

[0102] S442, based on each latent variable in the latent variable set corresponding to the hidden state, determine the mean and variance of the vector components of the latent variable.

[0103] S444, based on the mean and variance of the vector components of the latent variable, determine the mean and variance corresponding to the hidden state.

[0104] For each hidden state corresponding to the hidden variable set, calculate the corresponding mean of the hidden variable vector components in the hidden variable set and variance , where i is the index of the hidden state, j is the index of the vector component of the hidden variable, and the corresponding mean of the hidden variable vector component in the hidden variable set is and variance Determine the mean and variance of the Gaussian distribution function corresponding to the corresponding hidden state.

[0105] In this embodiment, by determining the mean variance of the vector components of the hidden variables in the hidden variable set corresponding to the hidden state, the mean and variance corresponding to the hidden state are determined, which is beneficial to obtaining a random vector that conforms to the timing changes and data characteristics of the training data based on the mean and variance corresponding to the hidden state of the data frame, and further improves the adaptability and accuracy of data generated by the non-stationary simulation data generation model.

[0106] In order to measure the error between the non-stationary data generated by the simulation data generation model and the non-stationary training data and minimize the error, in an exemplary embodiment, S500 also includes S520 to S540. Among them:

[0107] S520, determining an error of a simulation data generation model based on a non-stationary simulation data frame, a data frame and a preset loss function.

[0108] S540, updating parameters of the encoder and decoder based on the error.

[0109] In practical applications, based on non-stationary simulation data frames, data frames and preset loss functions, the error of the simulation data generation model is determined by the following loss function:

[0110]

[0111] Where k is the index of the data frame, j is the index of the vector component of the latent variable, and i is the index of the hidden state. and Represents the jth component in the input data frame and the output non-stationary data frame corresponding to the kth data frame, and They represent the mean and variance of the jth vector component in the Gaussian function corresponding to the i-th hidden state, respectively.

[0112] Based on the obtained simulation data, the error of the model can be generated by using the gradient descent method, Adam ( , Adaptive Moment Estimation) optimization method or RMSprop (Root Mean Square Propagation) method to update the parameters of the encoder and decoder of the autoencoder so as to minimize the error.

[0113] In this embodiment, the error between the non-stationary data generated by the simulation data generation model and the non-stationary training data is measured by a preset loss function, and the parameters of the encoder and decoder of the automatic encoder are updated based on the error to minimize the error, thereby improving the accuracy of the simulation data generation model.

[0114] In order to improve the accuracy of the simulation data generation model, in an exemplary embodiment, Figure 4 As shown, S600 also includes S620 to S680. Among them:

[0115] S620, obtaining a latent variable sequence based on the latent variables corresponding to each data frame and the time series information of each data frame.

[0116] S640, based on the latent variable sequence and the Gaussian function corresponding to each hidden state, update the hidden state corresponding to each data frame.

[0117] S660, determining the transition probability between the hidden states based on the non-stationary training data after the hidden state is updated.

[0118] S680, based on the transition probabilities between the hidden states, update the state transition matrix of the time series probability model.

[0119] In this embodiment, taking the time series probability model as a hidden Markov model as an example, the Viterbi algorithm can be used to update the state transfer matrix. Specifically, for each non-stationary training data, the data frame is arranged according to the time series information. Correspondingly, based on the time series information of the data frame, the hidden variable sequence corresponding to the non-stationary training data is obtained.

[0120] After obtaining the hidden variable sequence, the Viterbi algorithm is used to solve the hidden state corresponding to each data frame according to the hidden variable sequence, the current state transfer matrix and the Gaussian distribution function corresponding to each hidden state, and the most likely hidden state sequence is obtained, so as to update the hidden state corresponding to each data frame according to the hidden state sequence.

[0121] After updating the hidden state of each data frame, the transition probability between hidden states is calculated based on the non-stationary training data after the hidden state is updated by the following formula:

[0122]

[0123] In the formula, is the number of all data frames currently in the i-th hidden state of the hidden Markov model, is the number of data frames that are currently in the i-th state of the hidden Markov model and will be in the l-th state of the hidden Markov model at the next moment.

[0124] According to the calculated transition probabilities between the hidden states, the state transition matrix of the hidden Markov model is updated.

[0125] In this embodiment, the state transfer matrix of the time series probability model is updated according to the latent variable sequence and the state transfer matrix corresponding to the non-stationary training data, thereby improving the accuracy of the simulation data generation model.

[0126] After the trained simulation data generation model is obtained through training by any one of the above-mentioned training method embodiments for a non-stationary simulation data generation model, non-stationary simulation data can be generated through the simulation data generation model.

[0127] The non-stationary simulation data generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0128] Specifically, the operator may send a non-stationary simulation data generation message to the server 104 through the terminal 102, and the server receives the non-stationary simulation data generation message. Secondly, the current hidden state of the output data of the trained simulation data generation model is initialized, and the Gaussian distribution function corresponding to the current hidden state is randomly sampled to obtain the target random vector corresponding to the current hidden state. Then, the target random vector is input into the decoder in the trained simulation data generation model to obtain the non-stationary simulation data corresponding to the target random vector. Finally, based on the state transition matrix of the time series probability model in the simulation data generation model, the next hidden state of the output data of the simulation data generation model is determined, and the step of randomly sampling the Gaussian distribution function corresponding to the hidden state is returned until the preset end condition is reached, and the data generation is stopped to obtain the non-stationary simulation data.

[0129] In an exemplary embodiment, the present application also provides a method for generating non-stationary simulation data, such as Figure 5 As shown, it includes the following S720 to S780. Among them:

[0130] S720, initializing the current hidden state of the output data of the trained simulation data generation model, where the simulation data generation model is trained based on the training method of the non-stationary simulation data generation model.

[0131] S740, randomly sampling the Gaussian distribution function corresponding to the current hidden state to obtain a target random vector corresponding to the current hidden state.

[0132] S760, input the target random vector into a decoder in the trained simulation data generation model to obtain non-stationary simulation data corresponding to the target random vector.

[0133] The current hidden state of the output data of the trained simulation data generation model is initialized to be the first hidden state. It can be understood that in the training stage of the simulation data generation model, the non-stationary training data is divided according to the number of hidden states, and the order of multiple hidden states is determined according to the time series of the data segments of the non-stationary training data after the division. Correspondingly, when the output data is generated based on the trained simulation data generation model, the output is also performed in the order of the hidden states. Therefore, the current hidden state of the output data of the trained simulation data generation model is initialized to be the first hidden state in the hidden state sequence.

[0134] After the current hidden state is determined, the Gaussian distribution function corresponding to the current hidden state is randomly sampled to obtain a target random vector corresponding to the current hidden state.

[0135] The target random vector corresponding to the current hidden state is input into the decoder of the automatic encoder in the trained simulation data generation model. The decoder decodes the target random vector to obtain the corresponding non-stationary simulation data.

[0136] S780, based on the state transfer matrix of the time series probability model in the simulation data generation model, determines the next hidden state of the output data of the simulation data generation model, returns to the step of randomly sampling the Gaussian distribution function corresponding to the hidden state, until the preset end condition is reached, stops data generation, and obtains non-stationary simulation data.

[0137] The preset end condition includes that data generation ends when the current hidden state is the last hidden state and the length of the output non-stationary simulation data reaches a preset value. Taking probability factors into consideration, there may be a possibility of continuously outputting non-stationary simulation data in a certain hidden state, that is, the next state of the current state is still the current state. The preset end condition also includes that data generation ends when the length of the output non-stationary simulation data reaches a preset value.

[0138] The above-mentioned non-stationary simulation data generation method obtains random vectors corresponding to each hidden state by randomly sampling the distribution parameters corresponding to each hidden state in the trained simulation data generation model, which can capture the timing change information and data distribution of the non-stationary simulation data to be generated, so that the non-stationary simulation data obtained based on random vector decoding can be close to the real distribution, which is suitable for different non-stationary data testing requirements, and further improves the accuracy of the test.

[0139] In order to make the non-stationary data generated by the simulation data generation model conform to the time series variation information of the real data, in an exemplary embodiment, S780 also includes S782 to S788. Among them:

[0140] S782, generating random probabilities based on the probability interval.

[0141] The probability interval is [0,1], within which a random probability is generated.

[0142] S784, based on the state transfer matrix, determine the row vector corresponding to the current hidden state of the output data, where the row vector includes the probability of the current hidden state transferring to each hidden state of the state transfer matrix.

[0143] S786, based on each element value in the row vector, divide the probability interval into multiple sub-probability intervals, wherein the sub-probability intervals correspond to the elements one by one, and the length of the sub-probability interval is the value of the corresponding element.

[0144] S788, determine the target sub-probability interval to which the random probability belongs, and determine the next hidden state of the output data of the simulation data generation model based on the elements corresponding to the target sub-probability interval.

[0145] The i-th row vector in the state transfer matrix includes the probability of the i-th hidden state transferring to each hidden state, which is illustrated by taking the state transfer matrix A as:

[0146]

[0147] Assuming that the current hidden state is the second state, the row vector corresponding to the current hidden state of the output data is {0.0, 0.9, 0.1, 0.0, 0.0}, then the probability of transferring from the current hidden state to itself is 0.9, and the probability of transferring from the current hidden state to the third hidden state is 0.1.

[0148] After determining the row vector of the current hidden state in the state transfer matrix, the probability interval is divided into multiple sub-probability intervals based on the value of each element in the row vector. The probability interval can be divided into a corresponding number of sub-probability intervals according to the number of elements in the row vector, that is, the number of hidden states. The length of each sub-probability interval is the value of the corresponding element. For example, the row vector corresponding to the current hidden state is {0.0, 0.9, 0.1, 0.0, 0.0}, which is divided into 5 sub-probability intervals corresponding to the hidden states in the row vector, respectively. The 5 sub-probability intervals are .

[0149] By judging the target sub-probability interval to which the generated random probability belongs, the next hidden state of the current hidden state is determined, that is, the sub-probability interval into which the random probability falls is taken as the target sub-probability interval, and the next hidden state of the current hidden state is determined according to the hidden state corresponding to the target sub-probability interval. Continuing with the above example, if the generated random probability a<0.9, it falls into the second sub-probability interval, and the next hidden state of the corresponding current hidden state is still the second hidden state; if the generated random probability a≥0.9, it falls into the third sub-probability interval, and the next hidden state of the corresponding current hidden state is the third hidden state.

[0150] In this embodiment, the next hidden state of the current hidden state is determined by generating random probabilities and state transition matrices. In this way, the non-stationary data generated by the simulation data generation model can be consistent with the time series change information of the real data, which is beneficial to improving the adaptability and accuracy of the simulation data generation model.

[0151] In order to make a clearer description of the non-stationary simulation data generation method provided by the present application, the following is a specific embodiment and the attached Figure 6 To illustrate, this specific embodiment includes the following steps:

[0152] S1, initializes the state parameters of the temporal probability model in the pre-built simulation data generation model and the parameters of the autoencoder in the simulation data generation model.

[0153] S2, divide the non-stationary training data into multiple data frames, determine the hidden state of each data frame and the state encoding of the hidden state, and for each data frame, concatenate the data frame and the state encoding corresponding to the data frame and input them into the encoder of the automatic encoder to obtain the hidden variable corresponding to the data frame.

[0154] S3. According to the hidden state of each latent variable, the latent variables are divided into multiple latent variable sets, and the latent variable sets correspond to the hidden states one by one. For each hidden state, the mean and variance of the vector components of the latent variables are determined based on each latent variable in the latent variable set corresponding to the hidden state. Based on the mean and variance of the vector components of the latent variables, the mean and variance corresponding to the hidden state are determined. Based on the mean and variance corresponding to the hidden state, the Gaussian distribution function corresponding to the hidden state is determined.

[0155] S4, for each data frame, based on the Gaussian distribution function corresponding to the hidden state corresponding to the data frame, randomly sample the vector components of the latent variables corresponding to each data frame to obtain a random vector corresponding to each data frame.

[0156] S5, based on the non-stationary simulation data frame, the data frame and the preset loss function, determine the error of the simulation data generation model, and based on the error, update the parameters of the encoder and the decoder.

[0157] S6, based on the hidden variables corresponding to each data frame and the time series information of each data frame, obtain the hidden variable sequence, based on the hidden variable sequence and the Gaussian function corresponding to each hidden state, update the hidden state corresponding to each data frame, based on the non-stationary training data after the hidden state is updated, determine the transition probability between each hidden state, based on the transition probability between each hidden state, update the state transfer matrix of the time series probability model.

[0158] S7, initializing the current hidden state of the output data of the trained simulation data generation model, the simulation data generation model is trained based on the training method of the non-stationary simulation data generation model.

[0159] S8, randomly sampling the Gaussian distribution function corresponding to the hidden state to obtain the target random vector corresponding to the current hidden state, inputting the target random vector into the decoder in the trained simulation data generation model to obtain non-stationary simulation data corresponding to the target random vector.

[0160] S9, based on the probability interval, generates a random probability, and based on the state transfer matrix, determines the row vector corresponding to the current hidden state of the output data, where the row vector includes the probability of the current hidden state transferring to each hidden state of the state transfer matrix.

[0161] S10, based on the value of each element in the row vector, divide the probability interval into multiple sub-probability intervals, wherein the sub-probability intervals correspond to the elements one-to-one, and the length of the sub-probability interval is the value of the corresponding element, determine the target sub-probability interval to which the random probability belongs, and based on the elements corresponding to the target sub-probability interval, determine the next hidden state of the output data of the simulation data generation model.

[0162] S11, return to S8, until the preset end condition is reached, and the non-stationary simulation data is obtained.

[0163] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0164] In an exemplary embodiment, Figure 7 As shown, a training device 920 for generating a non-stationary simulation data model is provided, comprising: a model initialization module 922, a data processing module 924, a model training module 926 and a model parameter updating module 928, wherein:

[0165] The model initialization module 922 is used to initialize the state parameters of the time series probability model in the pre-built simulation data generation model and the parameters of the autoencoder in the simulation data generation model.

[0166] The data processing module 924 is used to divide the non-stationary training data into multiple data frames, and determine the hidden state of each data frame and the state code of the hidden state.

[0167] The model training module 926 is used to divide the non-stationary training data into multiple data frames, determine the hidden state of each data frame and the state code of the hidden state; for each data frame, splice the data frame and the state code corresponding to the data frame and input them into the encoder of the automatic encoder to obtain the hidden variable corresponding to the data frame; based on the hidden state of each data frame, randomly sample the vector components of the hidden variable corresponding to each data frame to obtain the random vector corresponding to each data frame, and the random vector is used to characterize the data characteristics of the data frame; input the random vector corresponding to each data frame into the decoder of the automatic encoder to obtain the output data frame corresponding to each data frame.

[0168] The model parameter updating module 928 is used to update the parameters of the encoder and decoder based on the output data frame; based on the hidden variables corresponding to the data frame, update the state transition matrix of the time series probability model to obtain the trained simulation data generation model.

[0169] In an exemplary embodiment, the model training module 926 is also used to divide the latent variables into multiple latent variable sets according to the hidden states of each latent variable, and the latent variable sets correspond to the hidden states one by one; for each hidden state, based on the latent variable set corresponding to the hidden state, determine the distribution parameters corresponding to the hidden state, and determine the Gaussian distribution function corresponding to the hidden state based on the distribution parameters; for each data frame, based on the Gaussian distribution function corresponding to the hidden state corresponding to the data frame, randomly sample the vector components of the latent variables corresponding to each data frame to obtain a random vector corresponding to each data frame.

[0170] In an exemplary embodiment, the model training module 926 is also used to determine the mean and variance of the vector components of the latent variables based on each latent variable in the latent variable set corresponding to the hidden state; and determine the mean and variance corresponding to the hidden state based on the mean and variance of the vector components of the latent variables.

[0171] In an exemplary embodiment, the model parameter updating module 928 is also used to determine the error of the simulation data generation model based on the non-stationary simulation data frame, the data frame and the preset loss function; and update the parameters of the encoder and the decoder based on the error.

[0172] In an exemplary embodiment, the model parameter updating module 928 is also used to obtain a latent variable sequence based on the latent variables corresponding to each data frame and the time series information of each data frame; update the hidden state corresponding to each data frame based on the latent variable sequence and the Gaussian function corresponding to each hidden state; determine the transition probability between each hidden state based on the non-stationary training data after the hidden state is updated; and update the state transition matrix of the time series probability model based on the transition probability between each hidden state.

[0173] Each module in the training device 920 for generating a model for non-stationary simulation data can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0174] In an exemplary embodiment, Figure 8 As shown, a non-stationary simulation data generating device 940 is provided, comprising: a generation model initialization module 942, a simulation data generating module 944 and a hidden state confirmation module 946, wherein:

[0175] The model initialization module 942 is used to initialize the current hidden state of the output data of the trained simulation data generation model, and the simulation data generation model is trained based on the training method of the non-stationary simulation data generation model.

[0176] The simulation data generation module 944 is used to randomly sample the Gaussian distribution function corresponding to the hidden state to obtain the target random vector corresponding to the current hidden state; input the target random vector into the decoder in the trained simulation data generation model to obtain non-stationary simulation data corresponding to the target random vector.

[0177] The hidden state confirmation module 946 is used to determine the next hidden state of the output data of the simulation data generation model based on the state transition matrix of the timing probability model in the simulation data generation model, and return to the step of randomly sampling the Gaussian distribution function corresponding to the hidden state until the preset end condition is reached.

[0178] In an exemplary embodiment, the hidden state confirmation module 946 is also used to generate random probabilities based on probability intervals; based on the state transition matrix, determine the row vector corresponding to the current hidden state of the output data, the row vector including the probability of the current hidden state transferring to each hidden state of the state transition matrix; based on the value of each element in the row vector, divide the probability interval into multiple sub-probability intervals, wherein the sub-probability intervals correspond one-to-one to the elements, and the length of the sub-probability interval is the value of the corresponding element; determine the target sub-probability interval to which the random probability belongs, and based on the elements corresponding to the target sub-probability interval, determine the next hidden state of the output data of the simulation data generation model.

[0179] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store non-stationary training data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a training method for a non-stationary simulation data generation model and a non-stationary simulation data generation method are implemented.

[0180] Those skilled in the art will understand that Fig. 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0181] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in any one of the above-mentioned training method embodiments for generating a non-stationary simulation data model or the steps in the non-stationary simulation data generating method embodiments are implemented.

[0182] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the above-mentioned training method embodiments for a non-stationary simulation data generation model or the steps in the non-stationary simulation data generation method embodiments are implemented.

[0183] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned training method embodiments for a non-stationary simulation data generation model, or the steps in any one of the above-mentioned non-stationary simulation data generation method embodiments.

[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0185] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A training method for a non-stationary simulation data generation model, characterized in that: The method comprises: Initializing state parameters of a temporal probability model in a pre-built simulation data generation model and parameters of an autoencoder in the simulation data generation model; Dividing the non-stationary training data into a plurality of data frames, determining a hidden state of each data frame and a state encoding of the hidden state; For each of the data frames, concatenate the data frame and the state code corresponding to the data frame and input them into the encoder of the automatic encoder to obtain the latent variable corresponding to the data frame; Based on the hidden variables of each of the data frames, determine the Gaussian distribution function corresponding to each hidden state, and randomly sample the Gaussian distribution function corresponding to each of the hidden states to obtain a random vector corresponding to each of the data frames, wherein the random vector is used to characterize the data features of the data frame; Inputting the random vectors corresponding to the data frames into the decoder of the automatic encoder to obtain the non-stationary simulation data frames corresponding to the random vectors, and updating the parameters of the encoder and the decoder based on the non-stationary simulation data frames; Based on the hidden variables corresponding to the data frame, the state transfer matrix of the time series probability model is updated to obtain a trained simulation data generation model.

2. The method according to claim 1, characterized in that The step of determining the Gaussian distribution function corresponding to each hidden state based on the hidden variables of each data frame, and randomly sampling the Gaussian distribution function corresponding to each hidden state to obtain a random vector corresponding to each data frame includes: According to the hidden state of each hidden variable, the hidden variable is divided into a plurality of hidden variable sets, and the hidden variable sets correspond to the hidden states one by one; For each of the hidden states, based on a set of hidden variables corresponding to the hidden state, determining a distribution parameter corresponding to the hidden state, and determining a Gaussian distribution function corresponding to the hidden state based on the distribution parameter; For each data frame, based on the Gaussian distribution function corresponding to the hidden state corresponding to the data frame, the vector components of the latent variables corresponding to each of the data frames are randomly sampled to obtain the random vectors corresponding to each of the data frames.

3. The method according to claim 2, characterized in that The determining, for each of the hidden states, based on a set of hidden variables corresponding to the hidden state, of a distribution parameter corresponding to the hidden state comprises: Determine the mean and variance of the vector components of the latent variables based on the latent variables in the latent variable set corresponding to the hidden state; Based on the mean and variance of the vector components of the latent variable, the mean and variance corresponding to the hidden state are determined.

4. The method according to claim 1, characterized in that The updating of the parameters of the encoder and the decoder based on the non-stationary simulation data frame comprises: Determining an error of the simulation data generation model based on the non-stationary simulation data frame, the data frame and a preset loss function; Based on the error, parameters of the encoder and the decoder are updated.

5. The method according to claim 1, characterized in that The updating of the state transition matrix of the time series probability model based on the hidden variables corresponding to the data frame includes: Based on the latent variables corresponding to each data frame and the time series information of each data frame, a latent variable sequence is obtained; Based on the hidden variable sequence and the Gaussian function corresponding to each hidden state, updating the hidden state corresponding to each data frame; Determine the transition probability between hidden states based on the non-stationary training data after updating the hidden states; Based on the transition probabilities between the hidden states, the state transition matrix of the temporal probability model is updated.

6. A method for generating non-stationary simulation data, characterized in that: The method comprises: Initializing a current hidden state of output data of a trained simulation data generation model, wherein the simulation data generation model is trained by the training method for a non-stationary simulation data generation model according to any one of claims 1 to 5; Randomly sampling the Gaussian distribution function corresponding to the current hidden state to obtain a target random vector corresponding to the current hidden state; Inputting the target random vector into a decoder in a trained simulation data generation model to obtain non-stationary simulation data corresponding to the target random vector; Based on the state transfer matrix of the timing probability model in the simulation data generation model, the next hidden state of the output data of the simulation data generation model is determined, and the step of randomly sampling the Gaussian distribution function corresponding to the current hidden state is returned until a preset end condition is reached.

7. The method according to claim 6, characterized in that The determining the next hidden state of the output data of the simulation data generation model based on the state transition matrix of the temporal probability model in the simulation data generation model comprises: Generate random probabilities based on probability intervals; Based on the state transfer matrix, determining a row vector corresponding to a current hidden state of the output data, wherein the row vector includes a probability of the current hidden state being transferred to each hidden state of the state transfer matrix; Based on the value of each element in the row vector, the probability interval is divided into a plurality of sub-probability intervals, wherein the sub-probability intervals correspond to the elements one by one, and the length of the sub-probability interval is the value of the corresponding element; Determine a target sub-probability interval to which the random probability belongs, and determine a next hidden state of output data of the simulation data generation model based on an element corresponding to the target sub-probability interval.

8. A training device for a non-stationary simulation data generation model, characterized in that: The device comprises: A model initialization module, used to initialize the state parameters of the temporal probability model in the pre-built simulation data generation model and the parameters of the autoencoder in the simulation data generation model; A data processing module, used for dividing the non-stationary training data into a plurality of data frames, determining a hidden state of each data frame and a state code of the hidden state; A model training module is used to divide the non-stationary training data into multiple data frames, determine the hidden state of each data frame and the state code of the hidden state; for each of the data frames, splice the data frame with the state code corresponding to the data frame and input it into the encoder of the automatic encoder to obtain the hidden variable corresponding to the data frame; based on the hidden state of each of the data frames, randomly sample the vector components of the hidden variable corresponding to each of the data frames to obtain the random vector corresponding to each of the data frames, and the random vector is used to characterize the data features of the data frame; input the random vector corresponding to each of the data frames into the decoder of the automatic encoder to obtain the output data frame corresponding to each of the data frames; The model parameter updating module updates the parameters of the encoder and the decoder based on the output data frame; updates the state transition matrix of the time series probability model based on the hidden variables corresponding to the data frame to obtain a trained simulation data generation model.

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

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