Enterprise budget dynamic analysis and optimization method based on multi-modal generative adversarial network and variational Bayesian optimization
By using a smart decision-making framework based on multimodal generative adversarial networks and variational Bayesian optimization, the shortcomings of traditional enterprise budget management systems in nonlinear correlation modeling, dynamic constraint adaptability, and few-sample learning performance are addressed, enabling deep correlation analysis, scenario-adaptive strategy generation, and global resource optimization.
Patent Information
- Application Number
- CN202510766942.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-11-11
AI Technical Summary
Traditional enterprise budget management systems have significant shortcomings in nonlinear correlation modeling, dynamic constraint adaptability, and small sample learning performance, resulting in deficiencies in budget analysis and strategy generation. They are unable to effectively capture complex nonlinear coupling relationships, respond to business changes in real time, and have reduced generalization ability when data is insufficient.
An intelligent decision-making framework based on multimodal generative adversarial networks and variational Bayesian optimization is adopted. The nonlinear modeling capability is constructed through variational autoencoders (VAE) and bidirectional LSTM, and constraint-aware strategies are generated by combining generative adversarial networks (GAN). Multi-objective optimization is achieved through the variational Bayesian optimization module, and a feedback closed-loop mechanism is constructed for model updating.
It enables in-depth correlation analysis of enterprise budget data, generates intelligent adjustment strategies adapted to different scenarios, enhances the model's generalization ability in small sample scenarios, and can achieve globally optimal resource allocation under complex conditions.
Smart Images

Figure CN120931111A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent enterprise financial management technology, specifically involving an enterprise budget dynamic analysis and optimization system that integrates multimodal generative adversarial network (GAN) and variational Bayesian optimization. Background Technology
[0002] In the field of enterprise budget management, traditional systems generally use linear regression models or rule engines for budget analysis and strategy generation. These methods have significant technical bottlenecks: Lack of nonlinear correlation modeling capability: There are complex nonlinear coupling relationships between budget sub-items such as sales, production, and R&D (such as the indirect impact of production budget adjustments on R&D investment). Traditional linear models cannot capture such relationships, resulting in the failure of collaborative analysis of cross-departmental budget deviations. Insufficient adaptability of dynamic constraints: Manually preset rule bases are difficult to respond in real time to changes in business constraints (such as sudden cash flow fluctuations and policy compliance requirements), and the generated budget adjustment strategies lack scenario specificity; Few-sample learning performance defects: When historical budget-execution data is insufficient (such as the initial budget for a new business line), the generalization ability of traditional statistical learning-based models drops sharply, and the reliability of strategy generation cannot be guaranteed. Summary of the Invention
[0003] This invention proposes a dynamic analysis and optimization method for enterprise budgets based on multimodal generative adversarial networks and variational Bayesian optimization. It automates the entire budget management process through a data-driven intelligent decision-making framework. The system architecture consists of six core modules, and the technical characteristics and interaction relationships of each module are as follows: The technical solution of this invention is: a method for dynamic analysis and optimization of enterprise budgets based on multimodal generative adversarial networks and variational Bayesian optimization, comprising the following steps: Step 1: Obtain the budget data set for each sub-item of the enterprise. With actual expense data set ,in This represents the budget amount for the i-th sub-item. Let represent the actual expenditure amount of the i-th sub-item, and n be the total number of budget items. The data is then cleaned and normalized. Time stamp alignment technology is used to resample budget and expenditure data at different frequencies, generating a structured tensor with a time dimension of t. ; Step 2: For each time point t and sub-item i, calculate the sub-item difference. , Where i: budget sub-item index (i = 1, 2,..., n); t: time point index (t = 1, 2,..., t); : The budget amount of the i-th sub-item at time t; : The actual expense amount of the i-th sub-item at time t; The difference between the i-th sub-item and the t-th time point; and construct the difference matrix. Calculate the total difference ; Step 3, construct the variational autoencoder (VAE), whose encoder network... It contains two bidirectional Long Short-Term Memory (LSTM) neural network layers. The input data is processed through a bidirectional LSTM layer to extract temporal features, which are then fed into two fully connected layers. The first fully connected layer outputs the mean of the latent variable z. The second fully connected layer outputs log-variance. ;in, For the dimensions of latent variables, The central tendency representing the latent space features. Indicates the degree of discreteness of the feature distribution; decoder network It consists of two fully connected layers, which take the latent variable z as input and output the reconstructed data from the decoder. The network parameters are updated by minimizing the loss function using the Adam optimizer. ; Step 4: Construct a Generative Adversarial Network (GAN), with the generator G(z,c) having an input dimension of... The latent variable z and the dimension are The business constraint vector c is processed through three fully connected layers to output the adjustment strategy. Discriminator D(a,X) input adjustment strategy The concatenated vector with the structured tensor X is used to output a discriminant score through three fully connected layers; Step 5: Construct a variational Bayesian optimizer, using a Gaussian process surrogate model p(f|D) to model the objective function, with the covariance function being a squared exponential kernel, and select the optimal strategy based on the expected improvement (EI) criterion. ; Step 6, select the optimal strategy Map the budget adjustments to each sub-item, and record the actual execution data after performing the budget adjustment operation. , This indicates that the actual expenditure amount of the i-th sub-item after the update is updated using the sliding window method to update the budget data set. ,Will( , This is fed back as new input to step 1 for iterative optimization.
[0004] Furthermore, the specific process of step 1 is as follows: Budget data for each sub-item of the enterprise Compared with actual expenditure data For missing budget or actual expenditure data, fill in the gaps using 50% of the historical average of the corresponding sub-item for the same period; for actual expenditure data that meets the requirements... Data points that are identified as outliers are removed. The cleaned data is normalized using the Min-Max normalization formula, which is as follows: Where x represents the original data. The minimum value of the data set. The maximum value in the dataset is the normalized data, which is mapped to the interval [0, 1]. For budget data and actual expenditure data with inconsistent time frequencies, a linear interpolation method is used to convert them into a uniform time granularity, generating a structured tensor X with dimension n × t, where n is the number of budget sub-items and t is the length of the time series.
[0005] Furthermore, the specific process of step 2 is as follows: Step 2: For each time point t and sub-item i, calculate the sub-item difference. , Where i: budget sub-item index (i = 1, 2,..., n); t: time point index (t = 1, 2,..., t); : The budget amount of the i-th sub-item at time t; : The actual expense amount of the i-th sub-item at time t; : The difference of the i-th sub-item at time t; Construct the difference matrix , : This indicates that matrix D is an n x t real matrix. Located in the i-th row and t-th column of the matrix, it represents the difference of the i-th sub-item at the t-th time point; Calculate the total difference ; in, The total difference at time point t reflects the company's overall budget execution at that time point; : Sum the differences among n budget items.
[0006] Furthermore, the variational autoencoder (VAE) network structure and training process in step 3 are as follows: Encoder structure The input is the structured tensor processed in step 1. The input is then fed into a bidirectional LSTM layer. The bidirectional LSTM layer contains 64 hidden units. The forward LSTM units process the input sequence in chronological order t = 1, 2, ..., t, while the backward LSTM units process the input sequence in reverse chronological order t = t, t-1, ..., 1, resulting in the forward hidden state sequences. and backward hidden state sequence The output of the bidirectional LSTM layer The result of concatenating the two is t = 1,2,...,t; The hidden states of all time steps output by the bidirectional LSTM layer are concatenated or the hidden state of the last time step is taken as the feature representation and input into the fully connected layer. The output dimension of the fully connected layer is 32. The feature vector is obtained by linear transformation y = Wx + b, where W is the weight matrix, b is the bias vector, and x is the input feature. The feature vector is passed through two independent fully connected layers, one of which outputs the mean of the latent variable z. The log-variance of the hidden variable z output by another fully connected layer ,here is the dimension of the latent variables; where The central tendency representing the characteristics of the latent space. Indicates the degree of dispersion of the characteristic distribution; Decoder structure After obtaining the latent variable z from the encoder, it is input into the fully connected layer; the input dimension of this fully connected layer is 32, and z is also mapped to an intermediate feature representation through a linear transformation y = Wz + b. The intermediate feature representation is input into the deconvolution layer; the deconvolution layer gradually increases the size of the feature map through a series of deconvolution operations. Its kernel size, stride, and other parameters are set according to the actual input and output sizes, and the final output is a reconstructed version of the input. ; Training process The Adam optimizer was used to train the VAE, with a batch size of 16, meaning that 16 samples were randomly selected from the training dataset each time for training; the learning rate was set to 0.0001, and the number of iterations was set to 100. In each iteration, the ELBO loss function, representing the lower bound of evidence, is calculated. : Among them, the first item The reconstruction error measures the accuracy of the decoder in reconstructing the input data X based on the latent variable z. The encoder network is a variational distribution, representing the posterior distribution of the latent variable z given input data X, with parameters as follows: ; The decoder network is a generation distribution, representing the likelihood probability of the input data X given the latent variable z. : On variational distribution Calculate the expectation of the sampled latent variable z; Second item KL divergence, constraining the distribution of latent variables Approximating the standard normal distribution To avoid overfitting and enhance the generalization ability of the latent space; hyperparameters = 0.5 is used to balance the weights of reconstruction error and distribution constraints. Prior distribution: The user explicitly states that it follows a standard normal distribution. ; KL divergence measures the difference between two distributions; here it is used to constrain variational distributions. Approximating the prior distribution ; Derivation of the Evidence Lower Bound (ELBO) loss function: The goal of a variational autoencoder is to maximize the log-likelihood of data X. However, direct calculation is difficult, so variational distribution is introduced. ; Where X: observed data (such as budget adjustment strategy tensor), z: latent variables (low-dimensional representations learned by VAE); : Joint probability distribution, with parameters as (Decoder parameters) Variational distribution (encoder output), parameters are: (Encoder parameters) : Decoder generation probability (likelihood of generating X given z); Latent prior variables (usually standard normal distribution). KL divergence measures the difference between distributions q and p. : Expectations The entropy (negative value). : Reconstruction term, measures the decoder's ability to reconstruct X based on z; Regularization term, which constrains the complexity of the distribution of latent variables.
[0007] Introducing hyperparameters By balancing the reconstruction error and the KL divergence, the final result is obtained. Based on the calculation The parameters of the encoder and decoder are updated using the backpropagation algorithm. and .
[0008] Furthermore, the specific structure and operation process of the generator G(z, c) in step 4 are as follows: Input layer operations: receiving dimension Hidden variable of 32 With a constraint vector of dimension 2 The two are combined into a 34-dimensional input vector through tensor concatenation. , which serves as the initial input for subsequent operations of the generator; Hidden layer operations: converting the input vector The input is fed into a fully connected hidden layer, which contains 64 nodes. The fully connected layer performs calculations using matrix multiplication and addition, combined with the ReLU activation function. The calculation formula is as follows: in, Here is the weight matrix of the fully connected layer. For bias vectors, The linear rectified activation function outputs a feature vector h with a dimension of 64 after computation. Output layer generation: The feature vector h output from the hidden layer is input into the fully connected output layer, which has an output dimension of 12; the output layer performs the following operations: The output is not activated, where Weight matrix The bias vector is then processed by the Tanh activation function, and the calculation formula is as follows: Finally, the adjustment strategies for each sub-item are generated. ; for Independent variable; The specific structure and operation process of the discriminator D(a,X) are as follows: Input layer operations: Adjustment strategy with a receiving dimension of 12 (The adjustment ratios corresponding to the 12 sub-items) and a structured tensor X of dimension 36 (the flattened budget data tensor, assuming the original dimension is (12×3), are combined into an input vector of dimension 4 through tensor concatenation operations.) [X] serves as the initial input for subsequent operations of the discriminator; Hidden layer computation: The input vector is fed into a fully connected hidden layer, which contains 64 nodes. The fully connected layer performs computations using matrix multiplication and addition operations, combined with the LeakyReLU activation function. The calculation formula is as follows: in: Here is the weight matrix of the fully connected layer (dimension: (64×48)). The bias vector (dimension: 64); (x) = max(αx, x) is a linear rectified variant activation function (default α = 0.2), which outputs a feature vector h with dimension 64 after the operation; Output layer generation: The feature vector h output from the hidden layer is input into the fully connected output layer. This fully connected layer outputs a dimension of 1 (discriminant score). The output layer performs the following operations: Get inactive output , in: The output layer weight matrix (dimension: 1×64). The output layer bias vector (dimension: 1) is used. The output layer does not use an activation function and directly outputs the discrimination score D(a,X) = The fraction is a real number; the larger the value, the stronger the strategy. The closer the strategy is to real-world business scenarios, the more effective it becomes. We adopt the Wasserstein distance loss function and introduce a gradient penalty term: in: The discriminant's expected score for real samples. : From real data distribution X: A sample (e.g., historically effective budget adjustment strategies) : Budget data tensor, containing time-series data of each sub-item budget and actual expenditure. The discriminator network outputs a real-valued fraction representing the strategy. The authenticity (without probability constraints) Take the expectation of the true sample distribution. The discriminant's expected score (negative) for the generated samples. The generator G(z, c) generates samples (budget adjustment strategies). z: Random latent variables, typically sampled from a standard normal distribution. c: Business constraint vectors (e.g., total budget, adjustment ratio limits, etc.). G(z, c): The generator network maps the latent variables z and constraints c to adjustment strategies. Take the expectation of the generated sample distribution. Gradient penalty term, Penalty coefficient, a user-given parameter (usually 10), controls the strength of the gradient penalty. Linear interpolation distribution , Discriminator on interpolated samples gradient vector, The L2 norm of the gradient vector; Optimizer and Parameter Update RMSprop Optimizer: Update Rules: in: Model parameters (weights and biases of the generator or discriminator); g: gradient; : Exponential moving average of the squared gradient, used to adaptively adjust the learning rate; Learning rate; : Smooth terms to avoid division by zero; alternately update generator and discriminator parameters using the RMSprop optimizer.
[0009] Furthermore, the variational Bayesian optimization process in step 5 is as follows: Input: A historical dataset containing feature vectors related to the adjustment strategy (used to train a linear regression model to predict ROI), and the adjustment strategy. Business constraints (maximum cash flow threshold) , used for calculation The covariance function described above has a squared exponential kernel: in, Signal variance measures the overall fluctuation of the objective function. : Length scale, controls the smoothness of the function; Input point and The Euclidean distance; The utility function is defined as in, Adjusting the policy vector The rate of return on investment; Adjusting the policy vector Risk score; Linear regression prediction of ROI: Suppose there are m samples in the historical dataset, and each sample contains a feature vector related to the adjustment strategy. and the corresponding true ROI value Constructing a linear regression model Where x is the policy-related feature vector. b are parameters obtained through training by minimizing the mean square error. It is a weight vector. It is a bias term; The parameters w and b are estimated by minimizing the mean squared error loss function; m: The number of samples in the historical dataset; : The feature vector of the i-th sample; : The true ROI value of the i-th sample; right Take the partial derivatives with respect to w and b respectively: Setting the partial derivatives to zero, we use gradient descent or the normal equation method to obtain the optimal estimates of w and b, and then apply these estimates to the input strategy. The corresponding feature vector x predicts the ROI ( ); The formula for calculating RiskScore is as follows: in It is the preset maximum cash flow threshold; "cash flow occupation" refers to the cash flow occupied during the execution of the strategy. The actual amount of cash flow used in the process; "material overrun rate" refers to the ratio of actual material costs to budgeted material costs. Constructing a Gaussian process surrogate model Constructing a Gaussian process surrogate model To approximate the utility function ,in It is existing observation data. It is the input policy feature vector. It is the corresponding utility value; Using the Matérn 5 / 2 kernel function, its expression is: in, It is an input point and The Euclidean distance between them It is the signal variance. It is a length scale parameter. , : Two policy feature vectors in the input space; The model considers observation noise, and the noise parameter is set to = 0.05; Given a new input point Gaussian process predicts its mean and variance The calculation formula is as follows: Let K be an n×n covariance matrix, where ; It is an n-dimensional vector. ; y is an n-dimensional vector of observations; in, = : The covariance vector between the new point and the observed point; =k( , ): Covariance matrix between observation points; Observation noise variance; = : Observation vector of objective function The new input policy feature vector; The optimal strategy is selected iteratively using the Expected Improvement (EI) criterion. The expected improvement (EI) function is defined as follows: in, Given the currently known optimal objective function value, the solution is obtained by maximizing the acquired function. ; Only if the objective function value of the new strategy is When the improvement is better than the current best value, the improvement amount is Otherwise, it is 0; in, Mean predicted by Gaussian process (z) is the cumulative distribution function of the standard normal distribution. (z) is the probability density function of the standard normal distribution; Iterative process: Set the maximum number of iterations to 5; in each iteration, use the L-BFGS optimization algorithm to maximize EI ( To select the next assessment point ; For EI ( )about Calculate the gradient and use the gradient information to guide the search process to find the value that makes EI( The largest Value; the utility value u of this point ( Add the observed data D, update the parameters of the Gaussian process surrogate model, and repeat the above steps until the maximum number of iterations is reached, finally obtaining the optimal strategy. .
[0010] Furthermore, step 6 includes: Executing the optimal strategy Then, obtain new actual expense data. and the corresponding budget data Recalculate the differences for each sub-item. = - and total difference Meanwhile, the total difference before the strategy was implemented is retained. ; Calculate the difference improvement rate according to the formula. like If the percentage is greater than 20%, then the current optimal strategy will be implemented. The structured tensor X before the strategy is executed, along with the related business constraints c, are treated as a set of data and marked as a successful strategy; if If the percentage is less than 20%, no marking will be performed. Establish a storage structure for the training set of successful strategies, using a two-dimensional array to store the successful strategy data. Each row stores a set of successful strategy data, including the strategy... Structured tensor X and business constraint c information; append the labeled successful strategy data to the successful strategy training set; The encoder network for the variational autoencoder (VAE) in step 3. Fine-tune the parameters; use the Adam optimizer with a learning rate of 0.00001 and 50 iterations; in each iteration, randomly sample data of size 8 from the successful policy training set, and apply the evidence lower bound (ELBO) loss function. Calculate the loss; update the encoder network using the backpropagation algorithm. parameters And decoder network parameters It remains unchanged.
[0011] Compared with the prior art, the beneficial effects of the present invention are: I. Overcoming the limitations of linear modeling to achieve in-depth correlation analysis of budget data Existing technologies rely on linear regression or rule engines, which struggle to capture the nonlinear coupling relationships between budget sub-items such as sales, production, and R&D, leading to isolated analysis of budget deviations for each item. This invention, through the deep fusion of Variational Autoencoder (VAE) and Bidirectional LSTM, constructs a nonlinear modeling capability for temporal dependencies and cross-dimensional features: the bidirectional LSTM layer effectively extracts the time-dimensional dependency features of budget data through forward and backward propagation; the VAE maps high-dimensional budget data to a latent space, encoding complex relationships between different items (such as the indirect impact of sales fluctuations on the production budget). This modeling approach enables the system to identify cross-departmental deviation relationships that traditional methods cannot detect, thereby generating collaborative optimization strategies based on a global perspective—for example, when sales budget execution is insufficient, the system can combine the surplus of the production budget to generate targeted resource reallocation plans, rather than adjusting only a single item, fundamentally solving the shortcomings of static analysis and isolated decision-making in traditional systems.
[0012] II. Dynamically integrate business constraints to generate intelligent adjustment strategies adapted to specific scenarios. Traditional budget management systems rely on manually pre-set rule bases, making it difficult to respond in real-time to dynamic business constraints such as cash flow fluctuations and risk tolerance, resulting in adjustment strategies lacking scenario specificity. This invention achieves constraint-aware strategy generation through a collaborative mechanism of Generative Adversarial Networks (GANs) and Variational Bayesian optimization: the generator takes business constraints (such as cash flow caps and risk thresholds) and latent variable features as input, and outputs budget adjustment ratios that meet the constraints through nonlinear transformation, ensuring that the strategy does not exceed the company's resource limitations; the Variational Bayesian optimization module models a utility function containing benefits and risks using a Gaussian process surrogate model, and efficiently searches for the optimal strategy using the expected improvement criterion, enabling the generated adjustment scheme to balance short-term budget execution and long-term business goals. This technical architecture endows the system with the ability to respond to dynamic constraints in real time, avoiding the rigidity of traditional rule bases and significantly improving the feasibility and business adaptability of the strategies.
[0013] III. Construct a closed-loop learning mechanism to enhance the model's generalization ability in scenarios with few samples. To address the issue of declining generalization ability of traditional models when historical budget data is insufficient, this invention designs a feedback closed-loop mechanism based on policy effectiveness: after the system executes a budget adjustment policy, it evaluates the effectiveness of the policy based on the actual execution results, adds effective policies and their associated data to the training set, and performs targeted fine-tuning of core model components. This mechanism, by continuously accumulating successful historical experience, enables the model to quickly generate effective policies in new business scenarios with sparse data through transfer learning, rather than relying on retraining with large amounts of labeled data. This self-evolutionary capability breaks through the dependence of traditional systems on large-scale historical data, making it particularly suitable for scenarios with limited data, such as budget management for new business lines and sudden changes in the market environment, significantly improving the model's robustness under complex real-world conditions.
[0014] IV. Quantifying multi-objective optimization objectives to achieve a globally optimal solution search for resource allocation. Existing technologies typically use a single budget difference as the optimization objective, lacking a comprehensive consideration of multiple dimensions such as returns and risks, which can easily lead to imbalances in resource allocation (e.g., excessive compression of R&D budgets affects long-term competitiveness). This invention constructs a utility function incorporating return on investment (ROI) and risk scores through a variational Bayesian optimization module, transforming the budget adjustment problem into a multi-objective optimization problem: the utility function explicitly quantifies the economic returns and risk levels of the strategy, captures the complex functional relationships in the strategy space through a Gaussian process surrogate model, and combines an efficient search algorithm to find the optimal solution that balances short-term performance with long-term business objectives. This method enables the system to avoid the limitations of traditional single-indicator optimization, comprehensively balancing the allocation of resources across various categories during budget adjustments, such as ensuring investment in core businesses while controlling cash flow risks, thus achieving globally optimal allocation of enterprise resources. Attached Figure Description
[0015] Figure 1: Overall System Flowchart Figure 2: Flowchart of Variational Autoencoder (VAE) Algorithm Figure 3 Flowchart of Variational Bayesian Optimization Algorithm Figure 4 Feedback closed-loop mechanism flowchart Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Taking the budget management of a medium-sized manufacturing enterprise in Q1 2025 as an example, the system implementation process is explained in detail: Data preprocessing (Step 1) Input data: Budget items (n=12): including sales revenue (15 million yuan), direct materials (3 million yuan), manufacturing overhead (2 million yuan), R&D investment (1.5 million yuan), sales expenses (800,000 yuan), administrative expenses (600,000 yuan), financial expenses (200,000 yuan), auxiliary materials (500,000 yuan), equipment maintenance (300,000 yuan), labor costs (1.2 million yuan), transportation costs (400,000 yuan), and warehousing costs (300,000 yuan). Actual data: Sales revenue (12 million yuan), direct materials (3.5 million yuan), manufacturing overhead (1.8 million yuan), R&D investment (1.2 million yuan), sales expenses (600,000 yuan), administrative expenses (500,000 yuan), financial expenses (150,000 yuan), auxiliary materials (300,000 yuan), equipment maintenance (250,000 yuan), labor costs (1 million yuan), transportation costs (300,000 yuan), warehousing costs (200,000 yuan); Business constraints: The cash flow limit is set at 4 million yuan, the material overrun threshold is 120%, and the reduction ratio of R&D investment is limited to no more than 20%, while the increase in sales expenses is limited to no more than 15%.
[0018] Processing procedure: Data cleaning: missing value handling: Upon inspection, the January data in the transportation cost item was missing. The system retrieved the average transportation cost for January over the past three years, which was 350,000 yuan. The missing value was filled by 50%, i.e., the filled value was 175,000 yuan. Outlier handling: The actual expenditure on direct materials was 3.5 million yuan, with an overspending rate of 16.7%, which did not exceed the budget by 200%, so the original data was retained; at the same time, the data of other items were checked and no outlier removal conditions were triggered.
[0019] Normalized calculation: Taking sales revenue as an example, assuming the historical minimum budget is 10 million yuan (based on the company's historical data over the past five years), the normalized value is... All budget items and actual expenditure data are normalized using this formula to map the data uniformly to the [0,1] interval.
[0020] Time alignment: The original budget data is an annual plan, while actual expenditure data is a monthly record. The system uses linear interpolation to allocate the annual budget data to each month. For example, if the annual sales revenue budget is 15 million yuan, it will be allocated to 1.25 million yuan per month; the final generated structured tensor will have a dimension of 12×3. , where 12 represents the number of budget items and 3 represents the data for the three months of Q1.
[0021] Difference matrix construction (step 2) calculation process: Sub-item difference calculation: Sales revenue difference = 1200 - 1500 = -3 million yuan; Direct material difference = 350 - 300 = +500,000 yuan; and so on, calculate the difference for all 12 items.
[0022] Total difference calculation: Add up the differences of each item by month to get the total difference Q1. = -300 + 50 - 20- 30 - 20 - 10 + 5 - 20 - 5 - 20 - 10 - 10 = -1.8 million yuan; Matrix generation: Arrange the differences of each item and the total difference in chronological order to form a 12×3 dimension difference matrix D, which is used to visually display the budget execution deviation of each item.
[0023] VAE Feature Extraction (Step 3) Network Parameters and Training Configuration: Network structure: The bidirectional LSTM layer contains 64 hidden units. The forward and backward LSTMs process the input data separately, and the output hidden states are concatenated at each time step, with a dimension of 64 × 2 = 128. After dimensionality reduction by the fully connected layer, the output is a 32-dimensional mean vector of the hidden variable z. = [-0.82, 0.45,...] and variance vector = [0.31, 0.27, ...].
[0024] Training process: Optimizer: The Adam optimizer is used, which combines an adaptive learning rate adjustment method to effectively accelerate model convergence; Parameter settings: Batch size is set to 16, that is, 16 sets of data are selected for each training session; Learning rate is set to 0.0001 to control the step size of parameter updates; Number of iterations is 100. Loss function: Evidence-Based Lower Bound (ELBO) loss function Optimize the data to balance the accuracy of data reconstruction with the regularization of latent variable distribution.
[0025] GAN policy generation (step 4) Generator and Discriminator Processing: Generator (G(z,c): Input layer: The 32-dimensional latent variable z output by VAE is concatenated with the 2-dimensional business constraint vector c = [400, 1.2] (representing the upper limit of cash flow and the material overrun threshold, respectively) to form a 34-dimensional input vector; Hidden layer: A fully connected layer with 64 nodes is used, and the ReLU activation function ReLU(x) = max(0, x) is used for non-linear transformation to enhance the model's expressive power; Output layer: After passing through the Tanh activation function, the output adjustment strategy is applied. = [-0.15, +0.10, -0.08,...], where each element corresponds to the adjustment ratio of the budget item. For example, the sales revenue budget increases by 15% (corresponding to -0.15, the negative sign indicates an increase), and the direct materials budget decreases by 10% (corresponding to +0.10).
[0026] Discriminator D(a, X): The Wasserstein distance loss function is adopted, and a gradient penalty term (gradient penalty coefficient = 10) is introduced, as shown in the formula below. The RMSprop optimizer is used to alternately update the generator and discriminator parameters, and adversarial training is used to make the generation strategy more closely resemble the actual business scenario.
[0027] Variational Bayesian Policy Optimization (Step 5): Utility Function Calculation and Optimal Policy Search: Definition and Calculation of Utility Function ROI Calculation: ROI( ROI = 0.6 × Sales Growth Forecast - 0.3 × Material Cost Change Rate. Assuming that based on historical data and market trends, sales revenue is projected to grow by 10% and material costs to decrease by 5%, then ROI ( = 0.6×0.1 -0.3×(-0.05) = 0.075; Risk score calculation: Given that cash flow is tied up at 3.8 million yuan and material overrun is 8%, then... =0.98 Proxy Model and Optimal Policy Search: A Gaussian process proxy model is constructed, and the utility function is modeled using the Matérn 5 / 2 kernel function (noise parameter 0.05); the expected improvement (EI) criterion is applied. Perform an iterative search, with a maximum of 5 iterations; finally, the optimal strategy is obtained. = [-0.12, +0.08, -0.05,...], corresponding utility values = 0.062, which is the most efficient strategy in the iteration process.
[0028] Feedback loop (step 6): Strategy execution and model update. Performance evaluation: Implementing the optimal strategy Afterwards, the actual total difference in Q2 = -1.2 million yuan; Calculate the difference improvement rate ,Depend on If the success rate is >20%, the strategy is marked as a successful strategy.
[0029] Model update: Successful strategy The corresponding input data X and business constraints c are added to the training set; The VAE encoder is fine-tuned by randomly sampling samples of size 8 from the training set, using a learning rate of 0.00001, and performing 50 iterations based on the ELBO loss function. During the update process, the decoder parameters are kept unchanged to enhance the model's ability to learn successful policy features and achieve continuous optimization and evolution of the model.
[0030] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for dynamic analysis and optimization of enterprise budgets based on multimodal generative adversarial networks and variational Bayesian optimization, characterized in that, Includes the following steps: Step 1: Obtain the budget data set for each sub-item of the enterprise. With actual expense data set ,in This represents the budget amount for the i-th sub-item. Let represent the actual expenditure amount of the i-th sub-item, and n be the total number of budget items. The data is then cleaned and normalized. Time stamp alignment technology is used to resample budget and expenditure data at different frequencies, generating a structured tensor with a time dimension of t. ; Step 2: For each time point t and sub-item i, calculate the sub-item difference. , in, : The budget amount of the i-th sub-item at time t; : The actual expense amount of the i-th sub-item at time t; The difference between the i-th sub-item and the t-th time point; and construct the difference matrix. Calculate the total difference ; Step 3, construct the variational autoencoder (VAE), whose encoder network... It contains two bidirectional Long Short-Term Memory (LSTM) neural network layers. The input data is processed through a bidirectional LSTM layer to extract temporal features, which are then fed into two fully connected layers. The first fully connected layer outputs the mean of the latent variable z. The second fully connected layer outputs log-variance. ;in, For the dimensions of latent variables, The central tendency representing the characteristics of the latent space. Indicates the degree of discreteness of the feature distribution; decoder network It consists of two fully connected layers, which take the latent variable z as input and output the reconstructed data from the decoder. The network parameters are updated by minimizing the loss function using the Adam optimizer. ; Step 4: Construct a Generative Adversarial Network (GAN), with the generator G(z,c) having an input dimension of... The mean of the latent variable z With dimension The business constraint vector c is processed through three fully connected layers to output the adjustment strategy. Discriminator D(a,X) input adjustment strategy The concatenated vector with the structured tensor X is used to output a discriminant score through three fully connected layers; Step 5: Construct a variational Bayesian optimizer, using a Gaussian process surrogate model p(f|D) to model the objective function, with the covariance function being a squared exponential kernel, and select the optimal strategy based on the expected improvement (EI) criterion. ; Step 6, select the optimal strategy Map the budget adjustments to each sub-item, and record the actual execution data after performing the budget adjustment operation. , This indicates that the actual expenditure amount of the i-th sub-item after the update is updated using the sliding window method to update the budget data set. ,Will( , This is fed back as new input to step 1 for iterative optimization.
2. The method according to claim 1, characterized in that: The specific process of step 1 is as follows: Budget data for each sub-item of the enterprise Compared with actual expenditure data For missing budget or actual expenditure data, fill in the gaps using 50% of the historical average of the corresponding sub-item for the same period; for actual expenditure data that meets the requirements... Data points that are identified as outliers are removed. The cleaned data is normalized using the Min-Max normalization formula, which is as follows: Where x represents the original data. The minimum value of the data set. The maximum value in the dataset is the normalized data, which is mapped to the interval [0, 1]. For budget data and actual expenditure data with inconsistent time frequencies, a linear interpolation method is used to convert them into a uniform time granularity, generating a structured tensor X with dimension n × t, where n is the number of budget sub-items and t is the length of the time series.
3. The method according to claim 1, characterized in that: The specific process of step 2 is as follows: For each time point t and sub-item i, calculate the sub-item difference. , Where i: budget sub-item index (i = 1, 2,..., n); t: time point index (t = 1, 2,..., t); : The budget amount of the i-th sub-item at time t; : The actual expense amount of the i-th sub-item at time t; : The difference of the i-th sub-item at time t; Construct the difference matrix , : This indicates that matrix D is an n x t real matrix. Located in the i-th row and t-th column of the matrix, it represents the difference of the i-th sub-item at the t-th time point; Calculate the total difference ; in, : The total difference at time point t reflects the overall budget execution status of the enterprise at that time point.
4. The method according to claim 1, characterized in that: The variational autoencoder (VAE) network structure and training process in step 3 are as follows: Encoder network structure The input is the structured tensor processed in step 1. The input is then fed into a bidirectional LSTM layer. The bidirectional LSTM layer contains 64 hidden units. The forward LSTM units process the input sequence in chronological order t = 1, 2, ..., t, while the backward LSTM units process the input sequence in reverse chronological order t = t, t-1, ..., 1, resulting in the forward hidden state sequences. and backward hidden state sequence The output of the bidirectional LSTM layer The result of concatenating the two is t = 1,2,...,t; The hidden states of all time steps output by the bidirectional LSTM layer are concatenated or the hidden state of the last time step is taken as the feature representation and input into the fully connected layer. The output dimension of the fully connected layer is 32. It is transformed by linear transformation y = Wx + b, where W is the weight matrix, b is the bias vector, and x is the input feature. get eigenvectors; The feature vector is passed through two independent fully connected layers, one of which outputs the mean of the latent variable z. The log-variance of the hidden variable z output by another fully connected layer ,here is the dimension of the latent variables; where The central tendency representing the characteristics of the latent space. Indicates the degree of dispersion of the characteristic distribution; Decoder network structure After obtaining the latent variable z from the encoder, it is input into the fully connected layer; the input dimension of this fully connected layer is 32, and z is also mapped to an intermediate feature representation through a linear transformation y = Wz + b. The intermediate feature representation is input into the deconvolution layer; the deconvolution layer gradually increases the size of the feature map through a series of deconvolution operations. Its kernel size, stride, and other parameters are set according to the actual input and output sizes, and the final output is a reconstructed version of the input. ; Training process The Adam optimizer was used to train the VAE, with a batch size of 16, meaning that 16 samples were randomly selected from the training dataset each time for training; the learning rate was set to 0.0001, and the number of iterations was set to 100. In each iteration, the ELBO loss function, representing the lower bound of evidence, is calculated. : Among them, the first item The reconstruction error measures the accuracy of the decoder in reconstructing the input data X based on the latent variable z. The encoder network is a variational distribution, representing the posterior distribution of the latent variable z given input data X, with parameters as follows: ; The decoder network is a generation distribution, representing the likelihood probability of the input data X given the latent variable z. : On variational distribution Calculate the expectation of the sampled latent variable z; Second item KL divergence, constraining the distribution of latent variables Approximating the standard normal distribution To avoid overfitting and enhance the generalization ability of the latent space; hyperparameters = 0.5 is used to balance the weights of reconstruction error and distribution constraints. Prior distribution: The user explicitly states that it follows a standard normal distribution. ; KL divergence measures the difference between two distributions; here it is used to constrain variational distributions. Approximating the prior distribution Introducing hyperparameters By balancing the reconstruction error and the KL divergence, the final result is obtained. Based on the calculation The parameters of the encoder and decoder are updated using the backpropagation algorithm. and .
5. The method according to claim 1, characterized in that: The specific structure and operation process of the generator G(z, c) in step 4 are as follows: Input layer operations: receiving dimension Hidden variable of 32 With a constraint vector of dimension 2 The two are combined into a 34-dimensional input vector through tensor concatenation. , which serves as the initial input for subsequent operations of the generator; Hidden layer operations: converting the input vector The input is fed into a fully connected hidden layer, which contains 64 nodes. The fully connected layer performs calculations using matrix multiplication and addition, combined with the ReLU activation function. The calculation formula is as follows: in, Here is the weight matrix of the fully connected layer. For bias vectors, The linear rectified activation function outputs a feature vector h with a dimension of 64 after computation. Output layer generation: The feature vector h output from the hidden layer is input into the fully connected output layer, which has an output dimension of 12; the output layer performs the following operations: The output is not activated, where Weight matrix The bias vector is then processed by the Tanh activation function, and the calculation formula is as follows: Finally, the adjustment strategies for each sub-item are generated. ; for Independent variable; The specific structure and operation process of the discriminator D(a,X) are as follows: Input layer operations: Adjustment strategy with a receiving dimension of 12 A structured tensor X of dimension 36 is combined with the structured tensor X using a tensor concatenation operation to form an input vector of dimension 4. [X] serves as the initial input for subsequent operations of the discriminator; Hidden layer computation: The input vector is fed into a fully connected hidden layer, which contains 64 nodes. The fully connected layer performs computations using matrix multiplication and addition operations, combined with the LeakyReLU activation function. The calculation formula is as follows: in: This is the weight matrix of the fully connected layer; It is the bias vector; (x) = max( x) is a linear rectified variant activation function, which outputs a feature vector h with a dimension of 64 after computation; Output layer generation: The feature vector h output from the hidden layer is input into the fully connected output layer. This fully connected layer has an output dimension of 1. The output layer performs the following operations: Get inactive output , in: This is the output layer weight matrix; The output layer bias vector is used; the output layer does not use an activation function and directly outputs the discrimination score D(a,X) = The fraction is a real number; the larger the value, the stronger the strategy. The closer the strategy is to real-world business scenarios, the more effective it becomes. We adopt the Wasserstein distance loss function and introduce a gradient penalty term: in: The discriminant's expected score for real samples. : From real data distribution The sample; X: budget data tensor, containing time series data of budgets and actual expenditures for each sub-item. The discriminator network outputs a real-valued fraction representing the strategy. The authenticity; Take the expected value of the true sample distribution; The discriminant's expected score (negative) for the generated sample; : Samples generated by generator G(z, c); z: Random latent variable, usually sampled from a standard normal distribution; c: Business constraint vector; G(z, c): Generator network, which maps latent variables z and constraints c to adjustment policies. Take the expected value of the generated sample distribution; Gradient penalty term, Penalty coefficient: A user-defined parameter that controls the strength of the gradient penalty. Linear interpolation distribution , Discriminator on interpolated samples gradient vector, The L2 norm of the gradient vector; Optimizer and Parameter Update RMSprop Optimizer: Update Rules: in: Model parameters; g: gradient; : Exponential moving average of the squared gradient, used to adaptively adjust the learning rate; Learning rate; : Smooth terms to avoid division by zero; alternately update generator and discriminator parameters using the RMSprop optimizer.
6. The method according to claim 1, characterized in that: The variational Bayesian optimization process in step 5 is as follows: Input: Historical dataset containing feature vectors related to the adjustment strategy, and adjustment strategy. Business constraints; the covariance function is a squared exponential kernel: in, Signal variance measures the overall fluctuation of the objective function. : Length scale, controls the smoothness of the function; Input point and The Euclidean distance; The utility function is defined as in, Adjusting the policy vector The rate of return on investment; Adjusting the policy vector Risk score; Linear regression prediction of ROI: Suppose there are m samples in the historical dataset, and each sample contains a feature vector related to the adjustment strategy. and the corresponding true ROI value Constructing a linear regression model Where x is the policy-related feature vector. b are parameters obtained through training by minimizing the mean square error. It is a weight vector. It is a bias term; The parameters w and b are estimated by minimizing the mean squared error loss function; m: The number of samples in the historical dataset; : The feature vector of the i-th sample; The true ROI value of the i-th sample; right Take the partial derivatives with respect to w and b respectively: Setting the partial derivatives to zero, we use gradient descent or the normal equation method to obtain the optimal estimates of w and b, and then apply these estimates to the input strategy. The corresponding feature vector x predicts the ROI ( ); The formula for calculating RiskScore is as follows: in It is the preset maximum cash flow threshold; "cash flow occupation" refers to the cash flow occupied during the execution of the strategy. The actual cash flow used in the process; "material overrun rate" refers to the ratio of actual material cost to budgeted material cost. Constructing a Gaussian process surrogate model Constructing a Gaussian process surrogate model To approximate the utility function ,in It is existing observation data. It is the input policy feature vector. It is the corresponding utility value; Using the Matérn 5 / 2 kernel function, its expression is: in, It is an input point and The Euclidean distance between them It is the signal variance. It is a length scale parameter. , : Two policy feature vectors in the input space; The model considers observation noise, and the noise parameter is set to = 0.05; Given a new input point Gaussian process predicts its mean and variance The calculation formula is as follows: Let K be an n×n covariance matrix, where ; It is an n-dimensional vector. ; y is an n-dimensional vector of observations; in, = : The covariance vector between the new point and the observed point; = k( , ): Covariance matrix between observation points; Observation noise variance; = : Observation vector of objective function The new input policy feature vector; The optimal strategy is selected iteratively using the Expected Improvement (EI) criterion: The expected improvement (EI) function is defined as follows: in, Given the currently known optimal objective function value, the solution is obtained by maximizing the acquired function. ; Only if the objective function value of the new strategy is When the improvement is better than the current best value, the improvement amount is Otherwise, it is 0; in, Mean predicted by Gaussian process (z) is the cumulative distribution function of the standard normal distribution. (z) is the probability density function of the standard normal distribution; Iterative process: Set the maximum number of iterations to 5; in each iteration, use the L-BFGS optimization algorithm to maximize EI ( To select the next assessment point ; For EI ( )about Calculate the gradient and use the gradient information to guide the search process to find the value that makes EI( The largest Value; the utility value u of this point ( Add the observed data D, update the parameters of the Gaussian process surrogate model, and repeat the above steps until the maximum number of iterations is reached, finally obtaining the optimal strategy. .
7. The method according to claim 1, characterized in that: Step 6 includes: Executing the optimal strategy Then, obtain new actual expense data. and the corresponding budget data Recalculate the differences for each sub-item. = - and total difference Meanwhile, the total difference before the strategy was implemented is retained. ; Calculate the difference improvement rate according to the formula. like If the percentage is greater than 20%, then the current optimal strategy will be implemented. The structured tensor X before the strategy is executed, along with the related business constraints c, are treated as a set of data and marked as a successful strategy; if If the percentage is less than 20%, no marking will be performed. Establish a storage structure for the training set of successful strategies, using a two-dimensional array to store the successful strategy data. Each row stores a set of successful strategy data, including the strategy... Structured tensor X and business constraint c information; append the labeled successful strategy data to the successful strategy training set; The encoder network for the variational autoencoder (VAE) in step 3. Perform parameter fine-tuning; use the Adam optimizer and the ELBO loss function based on the evidence lower bound. Calculate the loss; update the encoder network using the backpropagation algorithm. parameters And decoder network parameters It remains unchanged.
Citation Information
Cited By
Topological structure optimization method, device and equipment for data center network
CN121750491A