Budget optimization method and device, electronic equipment and storage medium
By using predictive and optimization models based on financial time-series data, budget plans can be monitored and dynamically adjusted in real time, solving the problem of lag in traditional budget management and achieving faster and more accurate budget optimization.
Patent Information
- Application Number
- CN202511372168.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2026-02-17
AI Technical Summary
Traditional budget management operates on an annual or quarterly cycle, relying mainly on static financial models and human experience. This makes it difficult to respond promptly to fluctuations in market demand, changes in raw material prices, and policy adjustments, resulting in delayed responses, risk exposure, and resource waste.
Based on financial time-series data, a predictive model is used to determine financial baseline indicators, and a budget optimization model is used to generate optimization strategies. Execution deviations are monitored in real time, and budget plans are dynamically adjusted. Automatic decision-making is achieved by combining reinforcement learning and large language models.
It significantly improves the responsiveness and adaptability of budget optimization control, reduces operational risks and resource waste, enhances the accuracy and reliability of budget optimization, and reduces manual intervention.
Smart Images

Figure CN121543776A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of budget optimization technology, and in particular to a budget optimization method, apparatus, electronic device, and storage medium. Background Technology
[0002] Corporate budget management is typically conducted on an annual or quarterly basis, relying mainly on static financial models and human experience.
[0003] Faced with fluctuations in market demand, changes in raw material prices, and policy adjustments, traditional budget plans are difficult to revise in a timely manner. Finance departments often discover discrepancies by comparing them after the fact, and then make fund allocations through manual negotiation, resulting in delayed response, risk exposure, and waste of resources. Summary of the Invention
[0004] This invention provides a budget optimization method, apparatus, electronic device, and storage medium to address the shortcomings of existing business budget management, which is typically based on annual or quarterly cycles and relies mainly on static financial models and human experience. In the face of market demand fluctuations, raw material price changes, and policy adjustments, traditional budget plans are difficult to revise in a timely manner. Finance departments often discover deviations through post-event comparisons and then manually negotiate fund allocations, resulting in delayed response, risk exposure, and resource waste.
[0005] This invention provides a budget optimization method, comprising the following steps: Based on financial time-series data, determine the financial baseline indicators for the future preset period; The financial baseline indicators are input into the budget optimization model to obtain the budget optimization strategy output by the budget optimization model. Monitor the budget execution flow in real time and determine the execution deviation between the budget execution flow and the budget optimization strategy; In response to the execution deviation exceeding a preset dynamic deviation threshold, the financial baseline indicators are re-entered into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model.
[0006] According to a budget optimization method provided by the present invention, determining the financial baseline indicators for a future preset period based on financial time-series data includes: The financial time-series data is input into the prediction model to obtain the financial baseline indicator output by the prediction model; The prediction model includes a feature extraction module, a feature fusion module, an attention module, and a prediction module; the feature extraction module includes a temporal convolutional network and a long short-term memory network. The feature extraction module is used to extract local temporal features of the financial time series data based on the temporal convolutional network, and to extract long-term dependency features of the financial time series data based on the long short-term memory network. The feature fusion module is used to fuse the local temporal features and the long-term dependency features to obtain fused features; The attention module is used to weight the fused features at different time steps to obtain contextual features; The prediction module is used to predict the financial baseline indicator based on the contextual features.
[0007] According to a budget optimization method provided by the present invention, the training steps of the budget optimization model include: Obtain the initial model and determine the current state vector based on the financial baseline indicators and preset constraints; the current state vector is used to represent the company's current budget and financial status. Based on the initial model, the budget adjustment strategy corresponding to the current state vector is determined, and the budget adjustment action is executed according to the budget adjustment strategy to generate the next state vector of the current state vector; Based on the multidimensional financial goal achievement degree corresponding to the current state vector and the multidimensional financial goal achievement degree corresponding to the next state vector, the cumulative total reward corresponding to the budget adjustment action is determined, and the initial model is trained according to the cumulative total reward to obtain the budget optimization model.
[0008] According to a budget optimization method provided by the present invention, determining the cumulative total reward corresponding to the budget adjustment action based on the multidimensional financial goal achievement degree corresponding to the current state vector and the multidimensional financial goal achievement degree corresponding to the next state vector includes: Based on the achievement degree of the multidimensional financial goals corresponding to the initial budget plan, the achievement degree of the multidimensional financial goals corresponding to the current state vector, and the achievement degree of the multidimensional financial goals corresponding to the next state vector, the cumulative total reward corresponding to the budget adjustment action is determined. The degree of achievement of the multidimensional financial objectives corresponding to the initial budget plan is determined based on the initial state vector; The initial state vector is used to characterize the initial state when no budget adjustment action is applied.
[0009] According to a budget optimization method provided by the present invention, determining the cumulative total reward corresponding to the budget adjustment action based on the multidimensional financial goal achievement degree corresponding to the initial budget plan, the multidimensional financial goal achievement degree corresponding to the current state vector, and the multidimensional financial goal achievement degree corresponding to the next state vector includes: Based on the achievement degree of the multidimensional financial goals corresponding to the initial budget plan, the achievement degree of the multidimensional financial goals corresponding to the current state vector, and the achievement degree of the multidimensional financial goals corresponding to the next state vector, the immediate action reward corresponding to the budget adjustment action at each time step is determined. Based on the immediate action reward corresponding to the budget adjustment action at each time step, the cumulative total reward corresponding to the budget adjustment action is determined.
[0010] According to a budget optimization method provided by the present invention, in response to the execution deviation exceeding a preset dynamic deviation threshold, the method re-executes the input of the financial baseline indicators into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model, and further includes: The updated budget optimization strategy is input into the retrieval big language model so that the retrieval big language model translates the updated budget optimization strategy into a natural language explanation report. The natural language interpretation report includes the reasons for the decision and risk warnings.
[0011] According to a budget optimization method provided by the present invention, the step of acquiring the financial time-series data includes: Through the data access gateway, incremental data can be obtained from multiple sources, including internal and external data sources. Add a timestamp and source identifier to the data increment to obtain candidate data increments; The candidate data increments are preprocessed to obtain the financial time-series data; The preprocessing operation includes at least one of the following: When the candidate data increment includes financial items, the financial items are reorganized and normalized according to the accounting item mapping table; When the candidate data increment includes currency or tax rate, the candidate data increment is uniformly converted into a preset accounting standard; When there are missing values in the candidate data increment, forward interpolation or industry average is used to fill in the missing values; When the candidate data increment includes unstructured text data, the text data is used to extract features through a natural language processing model to obtain text features, and the financial time series data is determined based on the text features and the candidate data increment. The feature extraction includes at least one of the following: extracting text sentiment scores, extracting keywords to generate sparse feature vectors, or generating dense feature vectors through a text embedding model.
[0012] The present invention also provides a budget optimization device, comprising the following units: The determination unit is used to determine the financial baseline indicators for a future preset period based on financial time-series data. The input unit is used to input the financial baseline indicators into the budget optimization model to obtain the budget optimization strategy output by the budget optimization model. The monitoring unit is used to monitor the budget execution flow in real time and determine the execution deviation between the budget execution flow and the budget optimization strategy; The re-execution unit is used to re-execute the input of the financial baseline indicators into the budget optimization model in response to the execution deviation exceeding a preset dynamic deviation threshold, so as to obtain the updated budget optimization strategy output by the budget optimization model.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the budget optimization method as described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the budget optimization method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the budget optimization method as described above.
[0016] The budget optimization method, apparatus, electronic device, and storage medium provided by this invention input financial baseline indicators into a budget optimization model to obtain a budget optimization strategy output by the budget optimization model. The method monitors the budget execution flow in real time and determines the execution deviation between the budget execution flow and the budget optimization strategy. By monitoring the execution deviation in real time and comparing it with a preset dynamic deviation threshold, the method automatically triggers the regeneration of the budget optimization strategy, effectively utilizing deviation information for closed-loop adjustment. This significantly improves the response speed and adaptability of budget optimization control, reduces operational risks and resource waste caused by response lag, improves the accuracy and reliability of budget optimization, and reduces the reliance on manual intervention in traditional methods through model-based automatic decision-making. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1This is one of the flowcharts illustrating the budget optimization method provided by this invention.
[0019] Figure 2 This is the second flowchart of the budget optimization method provided by the present invention.
[0020] Figure 3 This is a schematic diagram of the budget optimization device provided by the present invention.
[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0023] This invention provides a budget optimization method. Figure 1 This is one of the flowcharts illustrating the budget optimization method provided by the present invention, such as... Figure 1 As shown, this method can be applied to a company's financial planning department to automatically generate, monitor, and adjust budget plans to cope with changing market environments and internal business needs. The method includes steps 110, 120, 130, and 140.
[0024] Step 110: Based on financial time-series data, determine the financial baseline indicators for the future preset period; Step 120: Input the financial baseline indicators into the budget optimization model to obtain the budget optimization strategy output by the budget optimization model; Step 130: Monitor the budget execution flow in real time and determine the execution deviation between the budget execution flow and the budget optimization strategy; Step 140: In response to the execution deviation exceeding a preset dynamic deviation threshold, re-execute the input of the financial baseline indicators into the budget optimization model to obtain the updated budget optimization strategy output by the budget optimization model.
[0025] Specifically, firstly, baseline financial indicators for a future predetermined period can be determined based on financial time-series data. Here, financial time-series data refers to a set of data arranged in chronological order that reflects the financial and operational status of a company over a period of time. The sources of financial time-series data are very diverse, including both structured numerical data and unstructured text data.
[0026] In a specific example, financial time-series data may include various financial statement data (such as profit and loss statements, balance sheets, and cash flow statements) and business transaction data (such as sales orders, purchase orders, and production work orders) from the enterprise's internal ERP (Enterprise Resource Planning) system, expense reimbursement system, procurement contract system, and financial shared service platform; as well as data from external data sources, such as macroeconomic indicators, such as GDP (Gross Domestic Product) growth rate, inflation rate, industry cost index, raw material market conditions, exchange rate fluctuation data, and relevant policy and regulatory news. This embodiment of the invention does not specifically limit the data in this regard. To ensure the timeliness and traceability of the data, each piece of data can be appended with a precise timestamp (e.g., accurate to nanoseconds) and a data source identifier upon acquisition.
[0027] Financial baseline indicators refer to the expected values or expected ranges of future core financial indicators predicted based on historical data and current trends, without additional proactive budget intervention. These indicators form the basis and starting point for subsequent budget optimization. For example, financial baseline indicators may include expected sales revenue, procurement costs, various expenses, cash inflows and outflows for the next month, quarter, or year, etc., and this embodiment of the invention does not impose specific limitations on these. The preset period can be flexibly set according to the company's management needs; for example, the short-term period may be the next 7 days or 30 days, and the medium- to long-term period may be the next 90 days or a fiscal year, and this embodiment of the invention does not impose specific limitations on these.
[0028] Determining baseline financial indicators for a predetermined future period based on financial time-series data can be achieved through a predictive model. This predictive model receives historical financial time-series data as input and predicts future financial conditions by analyzing trends, periodicity, seasonality, and random disturbances inherent in the data. For example, the predictive model can be a statistical model, such as an ARIMA (Autoregressive Integrated Moving Average) model, or a machine learning model (such as gradient boosting trees, neural networks, etc.). This embodiment of the invention does not specifically limit the specific model used.
[0029] After obtaining the financial baseline indicators, they can be input into the budget optimization model to obtain the budget optimization strategy output by the model. The core objective of the budget optimization model is to find the optimal resource allocation scheme under a series of constraints. This budget optimization model uses the financial baseline indicators determined in step one as a basic judgment of the future environment, and combines this with various pre-set constraints of the enterprise (e.g., profit maximization target, cash flow safety baseline, priority of different projects, risk exposure limits, debt contract terms, etc.) for calculation and solution. This budget optimization model can be implemented using various optimization algorithms, such as linear programming, integer programming, or more complex intelligent optimization algorithms such as genetic algorithms and reinforcement learning models. This embodiment of the invention does not specifically limit the specific algorithms used.
[0030] Here, the budget optimization strategy is a specific, actionable solution output by the budget optimization model. A budget optimization strategy can be a detailed budget allocation matrix or a fund allocation plan. For example, a budget optimization strategy might explicitly state that in the next quarter, the marketing department's budget is X million yuan, and the R&D department's budget is Y million yuan; or it might suggest freezing funds for a low-priority project and allocating those funds to high-return core projects.
[0031] Furthermore, real-time monitoring of budget execution flow is conducted to identify deviations between the budget execution flow and the budget optimization strategy. Real-time monitoring of budget execution flow refers to the system continuously and frequently (e.g., on a minute-by-minute or hourly basis) retrieving actual financial data from various business systems (such as the financial system and bank payment system) after the budget optimization strategy is issued and begins execution. The budget execution flow consists of these actual income and expenditure records.
[0032] Execution deviation refers to the difference between the actual budget execution flow and the pre-defined budget optimization strategy at a given point in time. It is understood that execution deviation can manifest in multiple dimensions; for example, the actual expenditure of a certain expense may exceed the budgeted amount, or the receipt of a sales payment may be later than expected. The calculation of execution deviation can be a simple subtraction of values or a more complex deviation rate calculation; this embodiment of the invention does not specifically limit the method.
[0033] Finally, in response to the execution deviation exceeding a preset dynamic deviation threshold, the financial baseline indicators are re-inputted into the budget optimization model to obtain an updated budget optimization strategy output by the model. This step establishes a closed-loop feedback and adaptive adjustment mechanism.
[0034] It should be noted that the dynamic deviation threshold is not a fixed value, but is dynamically adjusted based on factors such as the materiality of different accounting items, historical volatility, and market stability. For example, the deviation threshold for core cost items is usually set lower (e.g., 2%), while non-core administrative expenses may be subject to a higher threshold (e.g., 10%).
[0035] Understandably, when the detected execution deviation exceeds a preset dynamic threshold, it indicates that the actual execution has significantly deviated from the initial budget plan, and the original budget optimization strategy may no longer be applicable. At this point, the system will automatically trigger a "rebalancing event," re-invoking the budget optimization model and generating an updated budget optimization strategy based on established financial baseline indicators (or a version fine-tuned with the latest data) and the current actual execution status. This process is not a complete budget re-compilation, but rather a rapid correction and iterative optimization of the original strategy.
[0036] The method provided in this invention inputs financial baseline indicators into a budget optimization model to obtain a budget optimization strategy output by the model. It monitors the budget execution flow in real time and determines the execution deviation between the flow and the optimization strategy. By monitoring the deviation in real time and comparing it with a preset dynamic deviation threshold, the method automatically triggers the regeneration of the optimization strategy. It effectively utilizes deviation information for closed-loop adjustment, thereby significantly improving the response speed and adaptability of budget optimization control, reducing operational risks and resource waste caused by response delays, improving the accuracy and reliability of budget optimization, and reducing reliance on manual intervention in traditional methods through model-based automatic decision-making.
[0037] Based on the above embodiments, step 110 includes: Step 111: Input the financial time-series data into the prediction model to obtain the financial baseline index output by the prediction model; The prediction model includes a feature extraction module, a feature fusion module, an attention module, and a prediction module; the feature extraction module includes a temporal convolutional network and a long short-term memory network. The feature extraction module is used to extract local temporal features of the financial time series data based on the temporal convolutional network, and to extract long-term dependency features of the financial time series data based on the long short-term memory network. The feature fusion module is used to fuse the local temporal features and the long-term dependency features to obtain fused features; The attention module is used to weight the fused features at different time steps to obtain contextual features; The prediction module is used to predict the financial baseline indicator based on the contextual features.
[0038] Specifically, financial time-series data can be input into the prediction model to obtain the financial baseline indicators output by the prediction model.
[0039] The prediction model may include a feature extraction module, a feature fusion module, an attention module, and a prediction module. The feature extraction module includes a temporal convolutional network and a long short-term memory network.
[0040] Specifically, financial time-series data can be input into a Temporal Convolutional Network (TCN) and a Long Short-Term Memory (LSTM) network, respectively, to obtain local temporal features output by the TCN and long-term dependency features output by the LSTM network. The local temporal features reflect the temporal information of short-term local segments in the financial time-series data, while the long-term dependency features reflect the long-term inter-period dependencies within the financial time-series data.
[0041] The predictive model employs a hybrid network architecture. Temporal Convolutional Networks (TCNs) excel at capturing local patterns and abrupt changes in data within short time windows through convolutional operations, such as a sudden increase in sales within a week. Long Short-Term Memory Networks (LSTMs), as a variant of Recurrent Neural Networks (RNNs), are capable of effectively learning and memorizing long-term dependencies in time-series data, such as identifying seasonal variations in sales. Inputting the same financial time-series data into both networks simultaneously allows for the parallel and complementary extraction of temporal features at different scales.
[0042] Then, the feature fusion module is used to fuse local temporal features and long-term dependency features to obtain fused features. Feature fusion can effectively integrate the feature vectors extracted by TCN and LSTM. The fusion method can be simple concatenation, that is, concatenating two feature vectors into a longer vector; it can also be weighted summation; or it can be learned through a small fully connected network to better fuse local temporal features and long-term dependency features. This embodiment of the invention does not specifically limit the method.
[0043] It is understandable that by fusing local time-series features and long-term dependency features, the resulting fused features contain both short-term fluctuation information and long-term trend information of the data.
[0044] Here, the attention module is used to weight the fused features from different time steps to obtain contextual features. The role of the attention module is to enable the predictive model to "focus" on historical time points that are more important to the current prediction task when making predictions. For example, when predicting sales next month, sales data from the same period last month and the same period last year may be more important than data from three months ago. The attention module assigns a weight to the fused features at each time step, then performs a weighted summation, ultimately generating a fixed-length contextual feature. This contextual feature is a dynamic, weighted summary of the entire historical sequence information.
[0045] Finally, the prediction module is used to predict financial baseline indicators based on contextual features. The prediction module typically consists of one or more fully connected layers. It receives contextual features that represent the essence of historical information as input and maps them to future predicted values, i.e., outputs the final financial baseline indicators, such as revenue and cost forecasts for the next 7 days, 30 days, and 90 days.
[0046] The method provided in this invention extracts local temporal features from financial time-series data through a temporal convolutional network and extracts its long-term dependency features using a long short-term memory network to combine detailed fluctuations with macroeconomic trend information. Then, the obtained features are fused and dynamically weighted through a feature fusion module and an attention module, which enhances the ability to capture key temporal contexts, thereby significantly improving the accuracy and robustness of financial baseline indicator prediction. This effectively overcomes the dependence of traditional prediction methods on single features or static models, reduces prediction bias caused by market fluctuations and complex temporal characteristics, and provides a more reliable data foundation for subsequent budget optimization.
[0047] Based on the above embodiments, the training steps of the budget optimization model include: Step 210: Obtain the initial model and determine the current state vector based on the financial baseline indicators and preset constraints; the current state vector is used to represent the company's current budget and financial status. Step 220: Based on the initial model, determine the budget adjustment strategy corresponding to the current state vector, and execute the budget adjustment action according to the budget adjustment strategy to generate the next state vector of the current state vector; Step 230: Based on the multidimensional financial goal achievement degree corresponding to the current state vector and the multidimensional financial goal achievement degree corresponding to the next state vector, determine the cumulative total reward corresponding to the budget adjustment action, and train the initial model according to the cumulative total reward to obtain the budget optimization model.
[0048] Specifically, the budget optimization model can be trained using reinforcement learning (RL) algorithms, such as proximal policy optimization (PPO). The training steps are as follows: First, an initial model is obtained, and based on financial baseline indicators and preset constraints, a current state vector is determined. This current state vector represents the company's current budget and financial status. The initial model can be a neural network with randomly initialized parameters, which generates random budget adjustment strategies during the initial training phase. The current state vector is a digital representation of the "state" in reinforcement learning, providing all the information needed for the budget optimization model to make decisions. The current state vector can be composed of multiple parts, such as future financial baseline indicators, the company's current budget allocation, and various financial constraints, such as cash safety levels, profit margin targets, and debt-to-equity ratio limits. This embodiment of the invention does not specifically limit this.
[0049] Secondly, based on the initial model, the budget adjustment strategy corresponding to the current state vector is determined, and the budget adjustment action is executed according to the budget adjustment strategy to generate the next state vector of the current state vector. In this step, the initial model (i.e., the policy network of the "agent") outputs a budget adjustment strategy based on the input current state vector. This strategy is the "action" in reinforcement learning. For example, the action could be "increase the budget of department A by 5%" or "reduce the funding for project B by 10%". In a simulated environment, after executing this budget adjustment action, the company's financial state will change, thus forming a new state, i.e., the next state vector.
[0050] Next, based on the multidimensional financial goal achievement degree corresponding to the current state vector and the multidimensional financial goal achievement degree corresponding to the next state vector, the cumulative total reward corresponding to the budget adjustment action is determined. Then, based on the cumulative total reward, the initial model is trained to obtain the budget optimization model. The core of reinforcement learning is to guide the learning of the initial model through reward signals. The multidimensional financial goal achievement degree is a function used to evaluate the quality of a financial state. It assigns one or a set of scores based on whether multiple dimensions of indicators such as profit, cash flow, and risk in that state have achieved preset goals.
[0051] The cumulative total reward is calculated based on the change in state after executing a budget adjustment action. If a budget adjustment action changes the financial state from a lower goal achievement level to a higher goal achievement level, then the budget adjustment action will receive a positive reward; conversely, it will receive a negative reward (penalty). The goal of the initial model is to learn a policy that maximizes the cumulative total reward obtained throughout the decision-making process. Through repeated iterations (i.e., continuously observing states, selecting actions, calculating rewards, and updating model parameters), the initial model will gradually learn which budget adjustment actions should be taken in different financial states to best achieve multiple financial goals, eventually evolving into a well-trained budget optimization model.
[0052] By training the budget optimization model using reinforcement learning, this invention enables the initial model to autonomously learn and explore optimal budget allocation and fund scheduling strategies under complex, multi-objective constraints. This method is particularly adept at handling nonlinear, high-dimensional decision-making problems, finding better solutions than traditional rules or linear programming, thereby fundamentally improving the quality of budget plans and enterprise value.
[0053] Based on the above embodiments, step 230, which involves determining the cumulative total reward corresponding to the budget adjustment action based on the multidimensional financial goal achievement degree corresponding to the current state vector and the multidimensional financial goal achievement degree corresponding to the next state vector, includes: Step 231: Based on the multi-dimensional financial goal achievement degree corresponding to the initial budget plan, the multi-dimensional financial goal achievement degree corresponding to the current state vector, and the multi-dimensional financial goal achievement degree corresponding to the next state vector, determine the cumulative total reward corresponding to the budget adjustment action. The degree of achievement of the multidimensional financial objectives corresponding to the initial budget plan is determined based on the initial state vector; The initial state vector is used to characterize the initial state when no budget adjustment action is applied.
[0054] Specifically, the cumulative total reward corresponding to the budget adjustment action can be determined based on the achievement degree of the multidimensional financial goals corresponding to the initial budget plan, the achievement degree of the multidimensional financial goals corresponding to the current state vector, and the achievement degree of the multidimensional financial goals corresponding to the next state vector. Among them, the achievement degree of the multidimensional financial goals corresponding to the initial budget plan is determined based on the initial state vector, which is used to represent the initial state when no budget adjustment action is applied.
[0055] Based on the above embodiments, step 231 includes: Step 2311: Based on the multi-dimensional financial goal achievement degree corresponding to the initial budget plan, the multi-dimensional financial goal achievement degree corresponding to the current state vector, and the multi-dimensional financial goal achievement degree corresponding to the next state vector, determine the immediate action reward corresponding to the budget adjustment action at each time step. Step 2312: Determine the cumulative total reward corresponding to the budget adjustment action based on the immediate action reward corresponding to the budget adjustment action at each time step.
[0056] Specifically, the immediate action reward corresponding to the budget adjustment action at each time step can be determined based on the achievement degree of the multidimensional financial goals corresponding to the initial budget plan, the achievement degree of the multidimensional financial goals corresponding to the current state vector, and the achievement degree of the multidimensional financial goals corresponding to the next state vector.
[0057] Here, the achievement level of the multidimensional financial goals corresponding to the initial budget plan is determined based on the initial state vector. This initial state vector represents the baseline "natural" state at the start of the entire budget optimization cycle, without any active budget control strategies being applied. By introducing this baseline, the reward mechanism no longer relies solely on the absolute level of the state, but focuses on evaluating the "incremental value" brought about by the action. Specifically, the immediate action reward at a single time step can be defined as: (the difference between the goal achievement level of the next state and the achievement level of the initial state) minus (the difference between the goal achievement level of the current state and the achievement level of the initial state). This design aims to quantify the improvement of a certain action on the degree of goal achievement; the system will only receive a significant positive reward when the action drives the state improvement beyond the existing level.
[0058] Then, based on the immediate reward corresponding to the budget adjustment action at each time step, the cumulative total reward corresponding to the budget adjustment action is determined. The cumulative total reward is usually the discounted sum of all future immediate rewards. This approach encourages the model to not only focus on short-term gains but also to make decisions with long-term value.
[0059] Here, in this embodiment of the invention, the definition is in the first... t Total cumulative reward obtained at each time step as follows: in, Indicates the first t Instant rewards earned at each time step Indicates the discount factor. It is the set maximum number of time steps, i.e. This indicates a preset number of time steps. express The state vector at each time step State value, Represents the step from the current time t The total cumulative reward actually obtained from the start to the maximum set time step.
[0060] The method provided in this invention determines the immediate reward for budget adjustment actions at each time step based on the multi-dimensional financial goal achievement degree corresponding to the initial budget plan, the multi-dimensional financial goal achievement degree corresponding to the current state vector, and the multi-dimensional financial goal achievement degree corresponding to the next state vector. Based on the immediate reward for each time step, the cumulative total reward for the budget adjustment action is determined. This method fully considers the relative improvement compared to the baseline state before and after the action execution, and then determines the total reward by accumulating the immediate rewards at each time step, effectively measuring the long-term comprehensive value of the serialized budget adjustment strategy. This mechanism allocates rewards based on incremental value, thereby more accurately assessing the contribution of individual actions, guiding the optimization process towards improving the overall financial goal achievement degree, and enhancing the adaptability and decision-making accuracy of the budget optimization strategy.
[0061] Based on the above embodiments, step 140 further includes: Step 141: Input the updated budget optimization strategy into the retrieval big language model so that the retrieval big language model translates the updated budget optimization strategy into a natural language explanation report; The natural language interpretation report includes the reasons for the decision and risk warnings.
[0062] To address the "black box" problem of AI decision-making and improve the transparency and credibility of decisions, this invention introduces a large language model for strategy interpretation.
[0063] Specifically, after re-executing the input of financial baseline indicators into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model in response to the execution deviation exceeding a preset dynamic deviation threshold, the method may further include: The updated budget optimization strategy is input into the retrieval big language model, which then translates the updated budget optimization strategy into a natural language explanation report, which includes the reasons for the decision and risk warnings.
[0064] Here, Retrieval-Augmented Generation (RAG) is an advanced paradigm for applying large language models. Before generating a response, it retrieves relevant and up-to-date information from a knowledge base as context. In this embodiment, when a structured updated budget optimization strategy is received (e.g., a table containing budget items and adjustment amounts), the Retrieval-Augmented Generation model first retrieves relevant background information. This information may include specific execution deviation data that triggered the budget adjustment, the latest financial policies, relevant terms, market analysis reports, etc.
[0065] Then, the retrieval big language model, based on this rich context containing "strategy" and "background," uses its powerful logical reasoning capabilities to generate a natural language explanation report that is easy for humans to understand.
[0066] Here, the natural language interpretation report can include the reasons for the decision and risk warnings. The reasons for the decision will explain "why" this budget adjustment is necessary, for example: "Due to a 15% increase in raw material prices this month, exceeding the warning threshold, production cost forecasts have been revised upwards. To ensure the company's annual profit target, this updated budget strategy recommends reducing the travel budget for the non-core project 'Project XX' by 10% to offset the pressure of rising costs." The risk warnings will point out the potential risks of this decision and corresponding suggestions, for example: "Please note that reducing the travel budget for 'Project XX' may affect project progress; it is recommended that the project team prioritize using remote conferencing to advance the work." In addition, natural language interpretation reports can be generated in various formats as needed, such as Markdown format for quick dashboard rendering, or JSON format for integration with approval workflow robots.
[0067] The method provided in this invention greatly enhances the transparency and interpretability of budget decisions by introducing a large retrieval language model to explain the budget strategies generated by AI.
[0068] Based on the above embodiments, the steps for obtaining the financial time-series data include: Step 310: Obtain incremental data from multiple sources, including internal and external data sources, through the data access gateway; Step 320: Add a timestamp and source identifier to the data increment to obtain candidate data increments; Step 330: Perform preprocessing operations on the candidate data increments to obtain the financial time-series data; The preprocessing operation includes at least one of the following: When the candidate data increment includes financial items, the financial items are reorganized and normalized according to the accounting item mapping table; When the candidate data increment includes currency or tax rate, the candidate data increment is uniformly converted into a preset accounting standard; When there are missing values in the candidate data increment, forward interpolation or industry average is used to fill in the missing values; When the candidate data increment includes unstructured text data, the text data is used to extract features through a natural language processing model to obtain text features, and the financial time series data is determined based on the text features and the candidate data increment. The feature extraction includes at least one of the following: extracting text sentiment scores, extracting keywords to generate sparse feature vectors, or generating dense feature vectors through a text embedding model.
[0069] Specifically, the steps for obtaining financial time-series data may include: First, incremental data is acquired from multiple sources, including internal and external data sources, through a data access gateway. The data access gateway serves as a unified data entry point, supporting various data access methods, such as real-time retrieval via API (Application Programming Interface), listening to streaming data in message queues, or batch importing files via SFTP (SSH File Transfer Protocol). The multiple source interfaces demonstrate the breadth of data sources, including internal data sources such as ERP and expense management systems, and external data sources such as market data databases and macroeconomic data providers.
[0070] Secondly, timestamps and source identifiers are added to the data increments to obtain candidate data increments. This step is crucial for ensuring data traceability and the accuracy of subsequent processing, and is an important part of data governance.
[0071] Then, the candidate data increments are preprocessed to obtain financial time-series data. Preprocessing is a series of data cleaning, transformation, and standardization operations aimed at transforming raw, heterogeneous data into clean, well-organized features usable by the model. The preprocessing operations include at least one of the following: When the incremental candidate data includes financial items, the financial items are reorganized and normalized according to the accounting item mapping table. For example, different subsidiaries or departments may have different names for "travel expenses," which are unified into a standard accounting item through the mapping table.
[0072] When candidate data increments include currency or tax rates, the candidate data increments are uniformly converted to the preset accounting standard. For example, all foreign currency transactions are uniformly converted to the parent company's functional currency according to the exchange rate of the day.
[0073] When missing values exist in the candidate data increment, forward interpolation or industry mean is used to fill in the missing values. Forward interpolation uses the previous valid observation to fill in the missing values, which is suitable for data that changes slowly; industry mean uses the publicly available industry average value to fill in the missing values, which is suitable for scenarios where historical data is lacking.
[0074] When the candidate data increment includes unstructured text data, a Natural Language Processing (NLP) model is used to extract features from the text data to obtain text features. Based on these text features and the candidate data increment, financial time-series data is determined. This is crucial for quantifying textual information. There are various specific methods for feature extraction, such as: Extracting text sentiment scores: Using a sentiment analysis model, determine whether a financial news article or policy announcement is positive, negative, or neutral, and assign a score.
[0075] Extract keywords to generate sparse feature vectors: Identify keywords in the text using algorithms such as TF-IDF (Term Frequency–Inverse Document Frequency) and represent them using the bag-of-words model or one-hot encoding.
[0076] Generate dense feature vectors through text embedding models: Using pre-trained language models such as BERT (Bidirectional Encoder Representations from Transformers), the entire text is converted into a low-dimensional, dense vector that can capture the deep semantic information of the text.
[0077] After the above preprocessing steps, the raw data from multiple sources and in different formats are integrated into unified, high-quality financial time series data, which can be stored in the time series feature warehouse for subsequent prediction models to call.
[0078] Based on any of the above embodiments Figure 2 This is the second flowchart illustrating the budget optimization method provided by this invention, as shown below. Figure 2As shown, the overall operation of this invention revolves around a closed loop of "data flow—intelligent flow—execution flow—feedback flow," proceeding through six key steps: data access and preprocessing, time-series prediction generation, budget optimization decision-making, strategy interpretation and output, execution monitoring and implementation, and closed-loop learning and governance. Each step generates a unique transaction number, supporting vertical end-to-end traceability and horizontal cross-stage linkage, ensuring that financial data and decision-making logic are transparent and controllable throughout the entire process.
[0079] During the data access and preprocessing phase, the data access gateway continuously monitors the enterprise resource planning expense module, the procurement contract management system, bank transaction interfaces, and macroeconomic data sources. All incremental data from internal and external sources is automatically tagged with its source, business domain, and nanosecond-level timestamp, and written to a Kafka streaming message queue. This ensures the reproducibility of data arrival order and provides a unified time benchmark for downstream models. The preprocessing pipeline performs cleaning and standardization operations according to data type: financial accounts are reorganized and normalized based on the accounting subject mapping table; currencies and tax rates are uniformly converted to the parent company's accounting standards; missing values are filled through forward interpolation or industry averages; unstructured text such as news and policy entries are processed using a sentiment analysis model to extract sentiment scores, and then sparse feature vectors are generated through keyword extraction or transformed into dense vectors through a text embedding model. All processed feature vectors and metadata snapshots are written to a columnar time-series feature repository for subsequent models to call by batch and version.
[0080] When the data sliding window in the time series prediction generation stage reaches the latest time cutoff point, the task scheduler triggers the time series prediction engine. This engine reads multi-dimensional feature tensors such as revenue, cost, and cash flow from the past two years, and combines them with external macroeconomic indicators and text sentiment scores. Based on a hybrid network of Long Short-Term Memory (LSTM) network, Temporal Convolutional Network (TSCN), and Attention (AQI), it performs inference in parallel on a Graphics Processing Unit (GPU), outputting baseline predictions for the next 1, 4, and 12 weeks. To cope with sudden fluctuations, the prediction engine also deploys a residual self-detection branch: if the deviation between the real-time flow data and the model baseline exceeds the dynamic confidence interval, the system immediately initiates local parameter retraining for highly volatile subjects, completing hot updates and re-inference within 30 seconds, and pushes the revised prediction package to the budget optimizer.
[0081] During the budget optimization decision-making phase, the optimizer encodes the forecast data package and the constraints provided by the risk management system—including profit targets, cash safety limits, debt contract thresholds, and project priorities—into state vectors. A reinforcement learning agent then performs a multi-objective Pareto optimal search using a proximal policy optimization algorithm, outputting annual and quarterly budget matrices and detailed fund allocation tables down to projects and accounts. Furthermore, the optimizer performs sensitivity analysis, calculating the marginal impact of unit adjustments to each budget item on profit, cash, and risk indicators. It automatically identifies lists of highly flexible and rigid items and provides a sandbox interface for finance personnel, allowing them to drag sliders in real-time to view indicator correlation curves, significantly reducing the workload of traditional trial calculations.
[0082] After the optimization plan is determined, the strategy explanation and output stage embeds the budget matrix, sensitivity list, and the latest regulatory provisions into the context of the large language model. The model uses chain-of-thought to sort out the logical relationship between "adjustment motivation - indicator impact - compliance basis," and calls built-in financial tools to calculate indicators such as cash turnover days and debt service coverage ratio. Finally, it outputs a dual-version report: a Markdown version for portal visualization rendering, and a JSON version for the robot workflow automation program to call back to the approval process. This step significantly improves report readability and approval efficiency, avoiding repeated revisions by multiple parties.
[0083] During the implementation and monitoring phase, the system initiates payment or freeze instructions to the bank system via the budget control interface based on the transaction number, and synchronizes the budget ceiling in the expense management system. Real-time monitoring probes continuously collect data on project expenditures, procurement receipts, bank balances, and sales revenue, calculating the budget execution rate, remaining available funds, and cash gap predictions. If the deviation rate exceeds the limit or significant market fluctuations occur, the system generates a "rebalancing event" to initiate a rapid recalculation process. In extreme cases, it can automatically trigger downgrade protection, freezing low-priority expenditures and requesting risk control intervention for review.
[0084] During the closed-loop learning and governance phase, execution deviations, market testing data, and approval feedback are written into the reinforcement learning experience playback buffer. The model tuner automatically fine-tunes the prediction and strategy network parameters during off-peak business hours, rewarding reduced deviations and cash security with positive rewards and increased risk with negative rewards. If data distribution drift is detected, indicated by consecutively exceeding the KL (Kullback-Leibler Divergence) threshold, the system automatically locks the high-risk model and notifies the operations and audit teams, requiring offline retraining before going live again.
[0085] Through the above six closed-loop steps, the system achieves minute-level budget rebalancing and strategy adaptation, providing enterprises with real-time, explainable, and iterative financial decision support, fundamentally improving capital efficiency and risk control capabilities.
[0086] This invention introduces a six-layer architecture encompassing preprocessing, prediction, optimization, interpretation, execution, and learning into budget optimization and financial planning, constructing the first minute-level closed-loop decision-making chain. The system integrates internal enterprise ledgers and external market data into a unified data lake, achieving high-dimensional feature enhancement through seasonal trend decomposition and text sentiment quantification. Relying on a deep learning model that integrates Long Short-Term Memory (LSTM) networks, temporal convolutional networks, and attention mechanisms, it performs multi-scale predictions of revenue, costs, and cash flow, and initiates local retraining to improve prediction robustness when residual anomalies occur. A reinforcement learning multi-objective optimizer autonomously generates budget matrices and fund allocation tables under constraints of profit, cash security, and risk, and supports real-time scenario simulations combined with sensitivity analysis. The system innovatively uses a large language model to generate interpretable reports with chain-like reasoning logic, transforming decision-making basis, impact assessments, and compliance clauses into easily understandable natural language. The entire chain is driven by reinforcement learning feedback to adaptively optimize the model, and distribution drift detection ensures the safety of model iteration.
[0087] The method provided in this invention is expected to reduce the average budget deviation rate by more than 15% and shorten the cash turnover cycle by approximately 20% in manufacturing, retail, and service industry scenarios, significantly optimizing inventory and capital occupation. The system, with its minute-level monitoring and rebalancing mechanism, helps enterprises respond quickly to fluctuations in raw material prices and exchange rates, mitigating cash flow risks. The interpretable reports generated by the large language model significantly improve the collaborative efficiency of finance, business, and audit departments, shortening the decision-making and approval cycle from several days to several hours. The automated model optimization and canary release mechanism reduces maintenance frequency from quarterly to weekly, ensuring accuracy while reducing operational costs and compliance risks, comprehensively improving the real-time performance, accuracy, and transparency of enterprise budget management.
[0088] The budget optimization apparatus provided by the present invention will be described below. The budget optimization apparatus described below can be referred to in correspondence with the budget optimization method described above.
[0089] Based on any of the above embodiments, the present invention provides a budget optimization device. Figure 3 This is a schematic diagram of the budget optimization device provided by the present invention, as shown below. Figure 3 As shown, the device includes: Unit 310 is used to determine the financial baseline indicators for a future preset period based on financial time-series data. Input unit 320 is used to input the financial baseline indicators into the budget optimization model to obtain the budget optimization strategy output by the budget optimization model; The monitoring unit 330 is used to monitor the budget execution flow in real time and determine the execution deviation between the budget execution flow and the budget optimization strategy; The re-execution unit 340 is used to re-execute the input of the financial baseline indicators into the budget optimization model in response to the execution deviation exceeding a preset dynamic deviation threshold, so as to obtain the updated budget optimization strategy output by the budget optimization model.
[0090] The apparatus provided in this invention inputs financial baseline indicators into a budget optimization model to obtain a budget optimization strategy output by the model. It monitors the budget execution flow in real time and determines the execution deviation between the flow and the optimization strategy. By monitoring the deviation in real time and comparing it with a preset dynamic deviation threshold, the method automatically triggers the regeneration of the optimization strategy. It effectively utilizes deviation information for closed-loop adjustment, thereby significantly improving the response speed and adaptability of budget optimization control, reducing operational risks and resource waste caused by response lag, improving the accuracy and reliability of budget optimization, and reducing the reliance on manual intervention in traditional methods through model-based automatic decision-making.
[0091] Based on any of the above embodiments, the determining unit 310 is specifically used for: The financial time-series data is input into the prediction model to obtain the financial baseline indicator output by the prediction model; The prediction model includes a feature extraction module, a feature fusion module, an attention module, and a prediction module; the feature extraction module includes a temporal convolutional network and a long short-term memory network. The feature extraction module is used to extract local temporal features of the financial time series data based on the temporal convolutional network, and to extract long-term dependency features of the financial time series data based on the long short-term memory network. The feature fusion module is used to fuse the local temporal features and the long-term dependency features to obtain fused features; The attention module is used to weight the fused features at different time steps to obtain contextual features; The prediction module is used to predict the financial baseline indicator based on the contextual features.
[0092] Based on any of the above embodiments, a training unit is further included, wherein the training unit specifically includes: An initial model unit is obtained to acquire an initial model and, based on the financial baseline indicators and preset constraints, to determine the current state vector; the current state vector is used to represent the company's current budget and financial status. The next state vector unit is used to determine the budget adjustment strategy corresponding to the current state vector based on the initial model, and to execute the budget adjustment action according to the budget adjustment strategy to generate the next state vector of the current state vector; The training subunit is used to determine the cumulative total reward corresponding to the budget adjustment action based on the multidimensional financial goal achievement degree corresponding to the current state vector and the multidimensional financial goal achievement degree corresponding to the next state vector, and to train the initial model according to the cumulative total reward to obtain the budget optimization model.
[0093] Based on any of the above embodiments, the training subunit specifically includes: The cumulative total reward unit is used to determine the cumulative total reward corresponding to the budget adjustment action based on the multi-dimensional financial target achievement degree corresponding to the initial budget plan, the multi-dimensional financial target achievement degree corresponding to the current state vector, and the multi-dimensional financial target achievement degree corresponding to the next state vector. The degree of achievement of the multidimensional financial objectives corresponding to the initial budget plan is determined based on the initial state vector; The initial state vector is used to characterize the initial state when no budget adjustment action is applied.
[0094] Based on any of the above embodiments, the step of determining the cumulative total reward unit is specifically used for: Based on the achievement degree of the multidimensional financial goals corresponding to the initial budget plan, the achievement degree of the multidimensional financial goals corresponding to the current state vector, and the achievement degree of the multidimensional financial goals corresponding to the next state vector, the immediate action reward corresponding to the budget adjustment action at each time step is determined. Based on the immediate action reward corresponding to the budget adjustment action at each time step, the cumulative total reward corresponding to the budget adjustment action is determined.
[0095] Based on any of the above embodiments, a translation unit is further included, wherein the translation unit is specifically used for: The updated budget optimization strategy is input into the retrieval big language model so that the retrieval big language model translates the updated budget optimization strategy into a natural language explanation report. The natural language interpretation report includes the reasons for the decision and risk warnings.
[0096] Based on any of the above embodiments, a data acquisition unit is further included, wherein the data acquisition unit is specifically used for: Through the data access gateway, incremental data can be obtained from multiple sources, including internal and external data sources. Add a timestamp and source identifier to the data increment to obtain candidate data increments; The candidate data increments are preprocessed to obtain the financial time-series data; The preprocessing operation includes at least one of the following: When the candidate data increment includes financial items, the financial items are reorganized and normalized according to the accounting item mapping table; When the candidate data increment includes currency or tax rate, the candidate data increment is uniformly converted into a preset accounting standard; When there are missing values in the candidate data increment, forward interpolation or industry average is used to fill in the missing values; When the candidate data increment includes unstructured text data, the text data is used to extract features through a natural language processing model to obtain text features, and the financial time series data is determined based on the text features and the candidate data increment. The feature extraction includes at least one of the following: extracting text sentiment scores, extracting keywords to generate sparse feature vectors, or generating dense feature vectors through a text embedding model.
[0097] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a budget optimization method. This method includes: determining a financial baseline indicator for a future preset period based on financial time-series data; inputting the financial baseline indicator into a budget optimization model to obtain a budget optimization strategy output by the budget optimization model; monitoring the budget execution flow in real time and determining the execution deviation between the budget execution flow and the budget optimization strategy; and, in response to the execution deviation exceeding a preset dynamic deviation threshold, re-executing the input of the financial baseline indicator into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model.
[0098] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0099] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the budget optimization method provided by the above methods. The method includes: determining a financial baseline indicator within a future preset period based on financial time-series data; inputting the financial baseline indicator into a budget optimization model to obtain a budget optimization strategy output by the budget optimization model; monitoring the budget execution flow in real time and determining the execution deviation between the budget execution flow and the budget optimization strategy; and, in response to the execution deviation exceeding a preset dynamic deviation threshold, re-executing the input of the financial baseline indicator into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model.
[0100] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the budget optimization method provided by the above methods. The method includes: determining a financial baseline indicator for a future preset period based on financial time-series data; inputting the financial baseline indicator into a budget optimization model to obtain a budget optimization strategy output by the budget optimization model; monitoring the budget execution flow in real time and determining the execution deviation between the budget execution flow and the budget optimization strategy; and, in response to the execution deviation exceeding a preset dynamic deviation threshold, re-executing the input of the financial baseline indicator into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model.
[0101] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of budget optimization, characterized by, The method comprises the following steps: determining a financial baseline indicator in a future preset period based on financial time series data; inputting the financial baseline indicator into a budget optimization model to obtain a budget optimization strategy output by the budget optimization model; monitoring a budget execution flow in real time and determining an execution deviation between the budget execution flow and the budget optimization strategy; in response to the execution deviation exceeding a preset dynamic deviation threshold, re-executing the inputting of the financial baseline indicator into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model.
2. The budget optimization method of claim 1, wherein, The method of determining a financial baseline indicator in a future preset period based on financial time series data comprises the following steps: inputting the financial time series data into a prediction model to obtain the financial baseline indicator output by the prediction model; The prediction model comprises a feature extraction module, a feature fusion module, an attention module, and a prediction module; the feature extraction module comprises a time convolution network and a long short-term memory network; The feature extraction module is configured to extract local time series features of the financial time series data based on the time convolution network and extract long-term dependency features of the financial time series data based on the long short-term memory network; The feature fusion module is configured to perform feature fusion on the local time series features and the long-term dependency features to obtain fused features; The attention module is configured to weight the fused features at different time steps to obtain context features; The prediction module is configured to predict the financial baseline indicator based on the context features.
3. The budget optimization method of claim 1, wherein, The training steps of the budget optimization model comprise the following steps: obtaining an initial model and determining a current state vector based on the financial baseline indicator and a preset constraint condition; the current state vector is used to represent the current budget and financial state of an enterprise; determining a budget adjustment strategy corresponding to the current state vector based on the initial model, and performing a budget adjustment action according to the budget adjustment strategy to generate a next state vector of the current state vector; determining a cumulative total reward corresponding to the budget adjustment action based on a multi-dimensional financial target achievement degree corresponding to the current state vector and a multi-dimensional financial target achievement degree corresponding to the next state vector, and training the initial model according to the cumulative total reward to obtain the budget optimization model.
4. The budget optimization method of claim 3, wherein, The method of determining a cumulative total reward corresponding to the budget adjustment action based on a multi-dimensional financial target achievement degree corresponding to the current state vector and a multi-dimensional financial target achievement degree corresponding to the next state vector comprises the following steps: determining a cumulative total reward corresponding to the budget adjustment action based on a multi-dimensional financial target achievement degree corresponding to an initial budget scheme, a multi-dimensional financial target achievement degree corresponding to the current state vector, and a multi-dimensional financial target achievement degree corresponding to the next state vector; The multi-dimensional financial target achievement degree corresponding to the initial budget scheme is determined based on an initial state vector; The initial state vector is used to represent an initial state when no budget adjustment action is applied.
5. The budget optimization method of claim 4, wherein, The determination of the cumulative total reward corresponding to the budget adjustment action, based on the multi-dimensional financial goal achievement degree corresponding to the initial budget plan, the multi-dimensional financial goal achievement degree corresponding to the current state vector, and the multi-dimensional financial goal achievement degree corresponding to the next state vector, includes: Based on the achievement degree of the multidimensional financial goals corresponding to the initial budget plan, the achievement degree of the multidimensional financial goals corresponding to the current state vector, and the achievement degree of the multidimensional financial goals corresponding to the next state vector, the immediate action reward corresponding to the budget adjustment action at each time step is determined. Based on the immediate action reward corresponding to the budget adjustment action at each time step, the cumulative total reward corresponding to the budget adjustment action is determined.
6. The budget optimization method of any one of claims 1 to 5, wherein, In response to the execution deviation exceeding a preset dynamic deviation threshold, the process of re-inputting the financial baseline indicators into the budget optimization model to obtain an updated budget optimization strategy output by the budget optimization model further includes: The updated budget optimization strategy is input into the retrieval big language model so that the retrieval big language model translates the updated budget optimization strategy into a natural language explanation report. The natural language interpretation report includes the reasons for the decision and risk warnings.
7. The budget optimization method of any one of claims 1 to 5, wherein, The steps for obtaining the financial time-series data include: Through the data access gateway, incremental data can be obtained from multiple sources, including internal and external data sources. Add a timestamp and source identifier to the data increment to obtain candidate data increments; The candidate data increments are preprocessed to obtain the financial time-series data; The preprocessing operation includes at least one of the following: When the candidate data increment includes financial items, the financial items are reorganized and normalized according to the accounting item mapping table; When the candidate data increment includes currency or tax rate, the candidate data increment is uniformly converted into a preset accounting standard; When there are missing values in the candidate data increment, forward interpolation or industry average is used to fill in the missing values; When the candidate data increment includes unstructured text data, the text data is used to extract features through a natural language processing model to obtain text features, and the financial time series data is determined based on the text features and the candidate data increment. The feature extraction includes at least one of the following: extracting text sentiment scores, extracting keywords to generate sparse feature vectors, or generating dense feature vectors through a text embedding model.
8. A budget optimization apparatus characterized by comprising: include: The determination unit is used to determine the financial baseline indicators for a future preset period based on financial time-series data. The input unit is used to input the financial baseline indicators into the budget optimization model to obtain the budget optimization strategy output by the budget optimization model. The monitoring unit is used to monitor the budget execution flow in real time and determine the execution deviation between the budget execution flow and the budget optimization strategy; The re-execution unit is used to re-execute the input of the financial baseline indicators into the budget optimization model in response to the execution deviation exceeding a preset dynamic deviation threshold, so as to obtain the updated budget optimization strategy output by the budget optimization model.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the budget optimization method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the budget optimization method as described in any one of claims 1 to 7.