Water conservancy industry analog simulation data generation method, tool and equipment based on rule configuration and AI learning and medium thereof
Based on the method of configuration and AI learning, the simulation data that conforms to the standards of the water conservancy industry can be generated, and the data problems that are difficult to generate business rules are solved in existing technology, and high -quality data generation and extensive project application have been achieved.
Patent Information
- Application Number
- CN202411440037.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for the prior art to effectively generate simulation data that complies with the business rules of the water conservancy industry, and manual simulation data is difficult to apply to actual projects.
Based on rules -based configuration and AI learning methods, systematically collect historical data, customize data generation rules, build LSTM models and distinguisher self -encoders, prepare data pre -processing and residual processing, generate simulation data that conforms to the water conservancy industry specifications, Essence
It has achieved high -quality simulation data that conforms to the business rules of the water conservancy industry. It can develop and test systematic development and test without contacting production data, improve data quality and test accuracy, and apply to wide water conservancy project application scenarios.
Smart Images

Figure CN119378377A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water conservancy model, and specifically relates to a method, tool, equipment and medium for generating simulation data for the water conservancy industry based on rule configuration and AI learning. Background Art
[0002] As water conservancy projects expand in scale and become more complex, the demand for water conservancy data is growing. The safe operation of water conservancy projects is related to the safety of people's lives and property and social stability. Through real-time monitoring and data analysis of water conservancy projects, potential safety hazards of the projects can be discovered in a timely manner, and effective measures can be taken to prevent and control them.
[0003] Water conservancy data is used in engineering design, construction, management, policy making, disaster warning, water resource scheduling and many other aspects. However, the current data production in the water conservancy industry mainly relies on actual monitoring and artificial simulation. Actual monitoring is limited by equipment costs and geographical environment, and it is often difficult to cover all required data points; while artificial simulation data is mainly for general fields, and how to realize the generation of simulation data in the water conservancy industry remains to be studied. At the same time, simulated data is difficult to apply in actual project application sites. Summary of the invention
[0004] To solve the above problems, the purpose of the present invention is to provide a method for generating simulation data for the water conservancy industry based on rule configuration and AI learning, and also disclose its tools, equipment and medium. Through rule configuration and AI learning of historical data, the present invention can produce simulation data that conforms to the current business rules of the water conservancy industry, provide a development and testing environment that is separated from the production environment for system development, ensure the security of production data, and improve system development efficiency and test accuracy. At the same time, the simulated data can be applied to actual project application scenarios.
[0005] A method for generating simulation data for water conservancy industry based on rule configuration and AI learning, comprising the following steps: S1. Systematically collect and upload data, including necessary historical data and related auxiliary data; S2, custom data generation rules, including data type, range, time step, etc.; S3, data preprocessing; S4. Build LSTM (Long Short-Term Memory) model; S5, residual processing; S6. Construct a variational autoencoder (VAE).
[0006] The method of the present invention realizes simulation data of the water conservancy industry through rule-based configuration and AI learning, and further optimizes and improves the method.
[0007] Furthermore, the S3 data preprocessing method includes: S31. Use polynomial interpolation technology to process missing values in historical data, and use box plot statistics to identify outliers, and then adjust the outliers through polynomial interpolation; Polynomial interpolation formula:
[0008] in, are the coefficients of the interpolation polynomial; S32, converting the date and time data in the historical data into seconds, and using sine and cosine transformation to capture the date and time data "time of day" and "time of year" signals; Date and time sine and cosine transformation formula:
[0009]
[0010] Among them, timestamp s is the Unix timestamp corresponding to the original date and time data; period is the period, which can be "one day" or "one year"; S33, loading the processed historical data, and dividing it into a training set, a validation set, and a test set in a ratio of 7:2:1; S34, standardizing the training set, validation set, and test set data; S35, define a data window by defining the width of the input window (the time step used for prediction), the width of the label window (the number of future time steps to be predicted), the time step offset of the input and label, the training set data, the validation set data, the test set data, and the target label name; S36. Convert the training, validation, and test sets into sequence datasets, and split the input and label for each window in the dataset.
[0011] Furthermore, the specific method of S4 to construct the LSTM (Long Short-Term Memory) model is: S41. Define the number of LSTM layers, the number of neural units in each LSTM layer, the dimension of the output data, and other information.
[0012] The formula of LSTM unit is:
[0013] in, They are forget gate, input gate, new candidate cell state, cell state, output gate and hidden state; S42, define the number of fully connected layers and the number of neurons in each fully connected layer, the activation function, and initialize the weight of the fully connected layer to zero; Fully connected layer formula:
[0014] Where y is the output, W is the weight matrix, b is the bias vector, and σ is the activation function; S43. Define the Reshape layer to reshape the output into the shape of [output step size, number of features]; S44. After defining the model's loss function (mean square error, cross entropy loss), optimizer, cycle and other information, use the constructed data set window to perform model training; Mean square error formula:
[0015] Cross entropy loss formula:
[0016] Among them, y i is the true value (label), is the predicted value (label), N is the number of data points; S45. Use the trained LSTM model to predict the training set, validation set, and test set of the model, obtain the predicted value and calculate the residual.
[0017] Furthermore, the specific method of S5 residual processing is: S51. Use unit root test (ADF test), Box-Ljung test and other methods to verify that the residual is a white noise sequence.
[0018] Unit root test formula:
[0019] Among them, y t is a sequence; Δ represents the first-order difference; α is a constant term; β is the time trend coefficient; t is the time variable; p is the lag order; γ i is the coefficient of the corresponding lag term; ϵ t is the error term; The formula for the Box-Ljung test is:
[0020] Where p is the lag order of the test; n is the length of the series; is the k-th order lagged autocorrelation coefficient; S52. For non-white noise sequences, a Gaussian regression model is used for processing until the residual meets the white noise standard;
[0021]
[0022] Among them, y is the dependent variable; x 1 ,x 2 ,…,x k is the independent variable; K(x,y) is the radial basis kernel function; γ is the parameter of the radial basis kernel; is the Euclidean distance between points x and y; S53. Combining the model prediction value and the Gaussian regression model residual prediction value, a new set of prediction values is generated. The prediction value that meets the predetermined accuracy requirement is recognized as the true value, otherwise it is regarded as interference data.
[0023] Furthermore, the specific method of S6 to construct a variational autoencoder (VAE) is as follows: S61. Define the VAE encoder: clarify the dimension of the input data, set the appropriate hidden layer dimension, define the representation dimension of the latent space, and choose an appropriate activation function to enhance the nonlinear learning ability of the model.
[0024] VAE encoder formula:
[0025] where z is a representation of the latent space, μ and σ are the mean and standard deviation of the encoder output, and ϵ is a random variable sampled from a standard normal distribution.
[0026] S62. Define the VAE decoder: determine the dimension of the output data, configure the corresponding hidden layer structure, and select the appropriate activation function to restore the data to the original space.
[0027] VAE encoder formula:
[0028] in, is the reconstructed input data and g is the decoder function.
[0029] S63. Set the number of VAE model training rounds, the number of samples used in each training, the level of detail of the output information, and the choice of model optimizer.
[0030] S64. Reconstruct the loss function (reconstruction loss, KL divergence) according to the user-set rules (data range).
[0031]
[0032]
[0033]
[0034]
[0035] in, is the reconstruction loss; is the KL divergence; It is to reconstruct the data; is the reconstruction probability; μ i and σ i are the mean and standard deviation of the latent space, respectively; is the original reconstruction loss function; , is a hyperparameter; is a penalty function used to calculate the out-of-range metric.
[0036] S65. Input the original data set and the verified true value data set into VAE for joint training.
[0037] S66. Use the trained VAE model to randomly sample latent variables from the latent space and generate new sample data through the decoder.
[0038] At the same time, the present invention provides a water conservancy industry simulation data generation tool, including: Data collection module, used to systematically collect and upload necessary historical data and related auxiliary data; Custom module, based on current business rules and requirements, customize data generation rules, including data type, range, time step, etc.; The data preprocessing module is used to preprocess the data, including processing missing values in historical data, identifying and adjusting abnormal values, and converting the date and time data in the historical data into second capture date and time data signals.
[0039] The LSTM (Long Short-Term Memory) model module is used to build an LSTM (Long Short-Term Memory) model, define the LSTM layer, fully connected layer, Reshape layer, define the model information, use the trained LSTM model to predict the model's training set, validation set, and test set, obtain the predicted value, and calculate the residual.
[0040] The residual processing module is used to process the residuals and verify whether the residuals are white noise sequences. For non-white noise sequences, the Gaussian regression model (GPR) is used for processing until the residuals meet the white noise standard. The model prediction values and the Gaussian regression model residual prediction values are combined to generate a new set of prediction values. The prediction values that meet the predetermined accuracy requirements are considered to be true values, otherwise they are considered to be interference data.
[0041] The variational autoencoder module is used to build a variational autoencoder, define the VAE encoder and VAE decoder, set the VAE model training information, reconstruct the loss function according to the user-set rules, input the original data set and the verified real value data set into the VAE for joint training, use the trained VAE model to randomly sample latent variables from the latent space, and generate new sample data through the decoder.
[0042] At the same time, the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor is configured to execute to implement the above-mentioned method for generating simulation data for the water conservancy industry based on rule configuration and AI learning. When the processor executes the computer program, each step in the above-mentioned method is implemented.
[0043] At the same time, the present application provides a non-temporary computer-readable storage medium. When the computer program in the storage medium is executed by the processor of an electronic device, the electronic device can execute the above-mentioned method for generating simulation data for the water conservancy industry based on rule configuration and AI learning. Beneficial Effects
[0044] (1) In the process of generating simulation data, the basic framework and constraints of the simulation data are first determined according to the rules set by the rule configuration module. Then, the AI learning module fills and improves the simulation data according to the learned historical data rules, so that it not only conforms to industry standards but also has similar characteristics and distribution to real data. In this way, the generated simulation data is both realistic and can meet specific business needs.
[0045] (2) By using this simulation data generation method, system development and testing can be carried out without touching production data. This can not only avoid the risk of production data leakage, but also reduce the impact of test operations on the production system. At the same time, since the simulation data has a high degree of authenticity, the test results can also more accurately reflect the performance and stability of the system.
[0046] (3) Improve data quality. The combination of rule configuration and AI learning enables the generated simulation data to more accurately reflect the actual situation of the water conservancy industry. Through the method of the present invention, the rules are continuously optimized and the AI model is trained to improve the authenticity, integrity and consistency of the data, and high-quality simulation data can be generated, providing a reliable basis for the precise analysis and decision-making of the system.
[0047] (4) A wide range of project application scenarios. The present invention has a wider range of applicability. With the continuous development of the water conservancy industry and the changes in business rules, this method can quickly adapt to new business needs by continuously updating rule configurations and AI learning models, and provide simulation data support for different types of water conservancy projects. It is not only suitable for system development and testing of large-scale water conservancy projects, but also can play a role in the digital construction of small-scale water conservancy facilities to meet the needs of projects of different sizes. At the same time, the application scenarios of the present invention can also be expanded to the fields of university education and teaching, scientific research simulation, emergency management, etc., and the application places are very wide. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flow chart of Example 1 of the present invention.
[0049] Figure 2 This is a schematic diagram of the structure of Example 2 of the present invention.
[0050] Figure 3 This is a schematic diagram of the structure of Example 3 of the present invention. DETAILED DESCRIPTION
[0051] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. Example 1
[0052] like Figure 1 As shown, a method for generating simulation data for the water conservancy industry based on rule configuration and AI learning comprises the following steps: S1. Collect and upload data. In this embodiment, weather data sets are collected, including historical data such as time, temperature, rainfall, wind speed, humidity, etc.
[0053] S2. Customize data generation rules, including data type, range, time step, etc. In this embodiment, weather data is simulated and generated according to current needs, with a data type of numeric type, a data range of (-20, 40), and a time step of 1h.
[0054] S3. Data preprocessing S31. Use polynomial interpolation technology to process missing values in historical data, and use box plot statistics to identify outliers, and then adjust the outliers through polynomial interpolation.
[0055] Polynomial interpolation formula:
[0056] in, are the coefficients of the interpolation polynomial.
[0057] S32. Convert the date and time data in the historical data into seconds, and use sine and cosine transformation to capture the date and time data "time of day" and "time of year" signals.
[0058] Date and time sine and cosine transformation formula:
[0059]
[0060] Among them, timestamp s is the Unix timestamp corresponding to the original date and time data; period is the period, which can be "one day" or "one year".
[0061] S33, load the processed historical data and divide it into a training set, a validation set, and a test set in a ratio of 7:2:1.
[0062] S34. Standardize the training set, validation set, and test set data.
[0063] S35. Define a data window by defining the width of the input window (24) (the time steps used for prediction), the width of the label window (24) (the number of future time steps that need to be predicted), the time step offset of the input and label (1), the training set data, the validation set data, the test set data, and the target label name.
[0064] S35. Convert the training, validation, and test sets into sequence datasets, and split the input and label for each window in the dataset.
[0065] S4. Build an LSTM (Long Short-Term Memory) model.
[0066] S41. Define the number of LSTM layers (1), the number of neural units in each LSTM layer (32), the dimension of the output data (32), and other information.
[0067] The formula of LSTM unit is:
[0068] in, They are the forget gate, input gate, new candidate cell state, cell state, output gate, and hidden state.
[0069] S42. Define the number of fully connected layers (1), the number of neurons in each fully connected layer (24*19), the activation function (linear activation function), and initialize the weights of the fully connected layers to zero.
[0070] Fully connected layer formula:
[0071] Where y is the output, W is the weight matrix, b is the bias vector, and σ is the activation function.
[0072] S43. Define the Reshape layer to reshape the output into the shape of [24,19].
[0073] S44. After defining the model's loss function (mean square error, cross entropy loss), optimizer (Adam), cycle (50) and other information, use the constructed data set window to train the model.
[0074] Mean square error formula:
[0075] Cross entropy loss formula:
[0076] Among them, y i is the true value (label), is the predicted value (label) and N is the number of data points.
[0077] S45. Use the trained LSTM model to predict the training set, validation set, and test set of the model, obtain the predicted value and calculate the residual.
[0078] S5. Residual processing S51. Use unit root test, Box-Ljung test and other methods to verify that the residual is a white noise sequence.
[0079] Unit root test formula:
[0080] Among them, y t is a sequence; Δ represents the first-order difference; α is a constant term; β is the time trend coefficient; t is the time variable; p is the lag order; γ i is the coefficient of the corresponding lag term; ϵ t is the error term; The formula for the Box-Ljung test is:
[0081] Where p is the lag order of the test; n is the length of the series; is the k-th order lagged autocorrelation coefficient; S52. For non-white noise sequences, a Gaussian regression model is used for processing until the residual meets the white noise standard.
[0082]
[0083]
[0084] Among them, y is the dependent variable; x 1 ,x 2 ,…,x k is the independent variable; K(x,y) is the radial basis kernel function; γ is the parameter of the radial basis kernel; is the Euclidean distance between points x and y.
[0085] S53. Combining the model prediction value and the Gaussian regression model residual prediction value, a new set of prediction values is generated. The prediction value that meets the predetermined accuracy requirement is recognized as the true value, otherwise it is regarded as interference data.
[0086] S6. Constructing a Variational AutoEncoder (VAE) S61. Define the VAE encoder: specify the dimension of the input data (19), set the number of hidden layers to 3, the corresponding number of neurons to 32, 12, 12, define the representation dimension of the latent space (12), and select an appropriate activation function (ReLU) to enhance the nonlinear learning ability of the model.
[0087] VAE encoder formula:
[0088] where z is a representation of the latent space, μ and σ are the mean and standard deviation of the encoder output, and ϵ is a random variable sampled from a standard normal distribution.
[0089] S62. Define the VAE decoder: determine the dimension of the output data (19), configure the corresponding hidden layer structure (two fully connected layers, with activation functions of ReLU and Linear respectively, the number of fully connected neurons in the first one is 32, and the number of neurons in the second one is 19).
[0090] VAE encoder formula:
[0091] in, is the reconstructed input data and g is the decoder function.
[0092] S63. Set the number of VAE model training rounds (50), the number of samples used in each training (32), the level of detail of the output information (1), and the choice of model optimizer (Adam).
[0093] S64. Reconstruct the loss function (reconstruction loss, KL divergence) according to the user-set rules (data range).
[0094]
[0095]
[0096]
[0097]
[0098] in, is the reconstruction loss; is the KL divergence; It is to reconstruct the data; is the reconstruction probability; μ i and σ i are the mean and standard deviation of the latent space, respectively; is the original reconstruction loss function; , is a hyperparameter; is a penalty function used to calculate the out-of-range metric.
[0099] S65. Input the original data set and the verified true value data set into VAE for joint training.
[0100] S66. Use the trained VAE model to randomly sample latent variables from the latent space to satisfy the normal distribution and generate new sample data through the decoder. Example 2
[0101] like Figure 2 A water conservancy industry simulation data generation tool is shown, including a data collection module 201, a customization module 202, a data preprocessing module 203, an LSTM (long short-term memory) model module 204, a residual processing module 205, and a variational autoencoder module 206.
[0102] Data collection module, used to systematically collect and upload necessary historical data and related auxiliary data; Custom module, based on current business rules and requirements, customize data generation rules, including data type, range, time step, etc.; The data preprocessing module is used to preprocess the data, including processing missing values in historical data, identifying and adjusting abnormal values, and converting the date and time data in the historical data into second capture date and time data signals.
[0103] The LSTM (Long Short-Term Memory) model module is used to build an LSTM (Long Short-Term Memory) model, define the LSTM layer, fully connected layer, Reshape layer, define the model information, use the trained LSTM model to predict the model's training set, validation set, and test set, obtain the predicted value, and calculate the residual.
[0104] The residual processing module is used to process the residuals and verify whether the residuals are white noise sequences. For non-white noise sequences, the Gaussian regression model (GPR) is used for processing until the residuals meet the white noise standard. The model prediction values and the Gaussian regression model residual prediction values are combined to generate a new set of prediction values. The prediction values that meet the predetermined accuracy requirements are considered to be true values, otherwise they are considered to be interference data.
[0105] The variational autoencoder module is used to build a variational autoencoder, define the VAE encoder and VAE decoder, set the VAE model training information, reconstruct the loss function according to the user-set rules, input the original data set and the verified real value data set into the VAE for joint training, use the trained VAE model to randomly sample latent variables from the latent space, and generate new sample data through the decoder. Example 3
[0106] like Figure 3 An electronic device is shown, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor is configured to execute to implement the method for generating simulation data for the water conservancy industry based on rule configuration and AI learning in the above-mentioned embodiment 1. When the processor executes the computer program, each step in the above-mentioned method is implemented.
[0107] It should be noted that the electronic device may be a computing device such as a computer, a notebook, a PDA, a cloud server, etc. The electronic device may be any electronic device that can be thought of by a person skilled in the art.
[0108] It should be noted that the processor may be any processor that can be conceived by those skilled in the art.
[0109] It should be noted that the memory may be any memory that can be conceived by those skilled in the art. Example 4
[0110] A non-temporary computer-readable storage medium, when the computer program in the storage medium is executed by the processor of an electronic device, enables the electronic device to execute the method for generating simulation data for the water conservancy industry based on rule configuration and AI learning according to the above-mentioned embodiment 1.
[0111] It should be noted that the computer-readable storage medium of the present invention implements all or part of the process in the method of the above-mentioned embodiment 1, and can also be completed by instructing related hardware through a computer program.
[0112] It should be noted that the computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer program may be in any form that can be imagined by those skilled in the art.
[0113] The above are only preferred technical solutions of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements without departing from the principles of the present invention. These improvements should also be regarded as the protection scope of the present invention.
Claims
1. A method for generating simulation data for water conservancy industry based on rule configuration and AI learning, characterized by: The steps include: S1. Collect and upload data, including necessary historical data and its auxiliary data; S2, custom data generation rules, including data type, range, and time step; S3, data preprocessing; S4. Build LSTM model; S5, residual processing; S6. Construct a variational autoencoder.
2. The method according to claim 1, characterized in that: S3 data preprocessing includes the following steps: S31. Use polynomial interpolation technology to process missing values in historical data, and use box plot statistics to identify outliers, and then adjust the outliers through polynomial interpolation; Polynomial interpolation formula: ; in, are the coefficients of the interpolation polynomial; S32, converting the date and time data in the historical data into seconds, and using sine and cosine transformation to capture the date and time data "time of day" and "time of year" signals; Date and time sine and cosine transformation formula: ; ; Among them, timestamp s is the Unix timestamp corresponding to the original date and time data; period is the period, which can be "one day" or "one year"; S33, loading the processed historical data, and dividing it into a training set, a validation set, and a test set in a ratio of 7:2:1; S34, standardizing the training set, validation set, and test set data; S35, defining a data window by defining the width of the input window, the width of the label window, the time step offset of the input and label, the training set data, the validation set data, the test set data, and the target label name; S36. Convert the training, validation, and test sets into sequence datasets, and split each window in the dataset into input and label.
3. The method according to claim 1, characterized in that: The specific method of S4 to build the LSTM model is: S41, define the number of LSTM layers and the number of neural units in each LSTM layer, and the dimension information of the output data; The formula of LSTM unit is: ; in, They are forget gate, input gate, new candidate cell state, cell state, output gate and hidden state; S42, define the number of fully connected layers and the number of neurons in each fully connected layer, the activation function, and initialize the weight of the fully connected layer to zero; Fully connected layer formula: ; Where y is the output, W is the weight matrix, b is the bias vector, and σ is the activation function; S43. Define the Reshape layer to reshape the output into the shape of [output step size, number of features]; S44, after defining the loss function, optimizer, and cycle information of the model, the loss function includes mean square error and cross entropy loss, and the model is trained using the constructed data set window; Mean square error formula: ; Cross entropy loss formula: , Among them, y i is the true value (label), is the predicted value (label), N is the number of data points; S45. Use the trained LSTM model to predict the training set, validation set, and test set of the model, obtain the predicted value and calculate the residual.
4. The method according to claim 1, characterized in that: The specific method of S5 residual processing is: S51. Use the unit root test (ADF test) and Box-Ljung test method to verify that the residual is a white noise sequence. Unit root test formula: , Among them, y t is a sequence; Δ represents the first-order difference; α is a constant term; β is the time trend coefficient; t is the time variable; p is the lag order; γ i is the coefficient of the corresponding lag term; ϵ t is the error term; The formula for the Box-Ljung test is: , Where p is the lag order of the test; n is the length of the series; is the k-th order lagged autocorrelation coefficient; S52. For non-white noise sequences, a Gaussian regression model is used for processing until the residual meets the white noise standard; , , Among them, y is the dependent variable; x1, x2, …, x k is the independent variable; K(x,y) is the radial basis kernel function; γ is the parameter of the radial basis kernel; is the Euclidean distance between points x and y; S53. Combining the model prediction value and the Gaussian regression model residual prediction value, a new set of prediction values is generated. The prediction value that meets the predetermined accuracy requirement is recognized as the true value, otherwise it is regarded as interference data.
5. The method according to claim 1, characterized in that: The specific method of constructing the variational autoencoder in S6 is: S61. Define the VAE encoder: clarify the dimension of the input data, set the appropriate hidden layer dimension, define the representation dimension of the latent space, and choose an appropriate activation function to enhance the nonlinear learning ability of the model; VAE encoder formula: , Where z is a representation of the latent space, μ and σ are the mean and standard deviation of the encoder output, and ϵ is a random variable sampled from a standard normal distribution; S62. Define the VAE decoder: determine the dimension of the output data, configure the corresponding hidden layer structure, and select an activation function to restore the data to the original space; VAE encoder formula: , in, is the reconstructed input data, g is the decoder function; S63, setting the number of rounds of VAE model training, the number of samples used in each training, the level of detail of output information, and the choice of model optimizer; S64, according to the user-set rule, the rule is set as the data range; reconstruct the loss function, the reconstructed loss function includes reconstruction loss and KL divergence; , , , , in, is the reconstruction loss; is the KL divergence; It is to reconstruct the data; is the reconstruction probability; μ i and σ i are the mean and standard deviation of the latent space, respectively; is the original reconstruction loss function; , is a hyperparameter; is a penalty function used to calculate the out-of-range metric; S65, input the original data set and the verified real value data set into VAE for joint training, S66. Use the trained VAE model to randomly sample latent variables from the latent space and generate new sample data through the VAE decoder.
6. A water conservancy industry simulation data generation tool, characterized by: include: Data collection module, used to systematically collect and upload necessary historical data and its auxiliary data; Custom module, based on current business rules and requirements, customize data generation rules, including data type, range, and time step; A data preprocessing module is used to preprocess the data, including processing missing values in historical data, identifying and adjusting abnormal values, and converting date and time data in historical data into second capture date and time data signals; LSTM model module, used to build LSTM model, define LSTM layer, fully connected layer, Reshape layer, define model information, use the trained LSTM model to predict the training set, validation set, and test set of the model, obtain the predicted value and calculate the residual; The residual processing module is used to process the residuals and verify that the residuals are white noise sequences. For non-white noise sequences, the Gaussian regression model is used to process them until the residuals meet the white noise standard. The model prediction values and the Gaussian regression model residual prediction values are combined to generate a new set of prediction values. The prediction values that meet the predetermined accuracy requirements are considered as true values, otherwise they are considered as interference data. The variational autoencoder module is used to build a variational autoencoder, define the VAE encoder and VAE decoder, set the VAE model training information, reconstruct the loss function according to the user-set rules, input the original data set and the verified real value data set into the VAE for joint training, use the trained VAE model to randomly sample latent variables from the latent space, and generate new sample data through the VAE decoder.
7. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor is configured to execute to implement the method for generating simulation data for the water conservancy industry based on rule configuration and AI learning as described in claims 1-5 above.
8. A non-transitory computer-readable storage medium, characterized in that: When the computer program in the storage medium is executed by the processor of the electronic device, the electronic device is enabled to implement the method for generating simulation data for the water conservancy industry based on rule configuration and AI learning as described in claims 1-5 above.