A hierarchical cost intelligence accounting method
By constructing a weighted time series additive decomposition model and a deep learning model, the inefficiency of traditional cost accounting methods in hierarchical management is solved, and more accurate cost prediction and management are achieved.
Patent Information
- Application Number
- CN202411858898.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Traditional cost accounting methods suffer from inefficiency and information asymmetry in terms of refined and hierarchical management, making it difficult to meet the refined cost management needs of enterprises.
A weighted time series additive decomposition model is adopted, combined with a CNN residual module and a bidirectional LSTM module. By performing hierarchical trend decomposition and prediction of cost data, a cost prediction model is constructed, and a deep learning intelligent model is used to analyze the cost occurrence pattern.
It improves the accuracy and reliability of cost breakdown, enhances the accuracy and generalization of forecasts, and can more accurately capture various cost change trends, supporting enterprises' future cost forecasting and management.
Smart Images

Figure CN119671626B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of cost intelligent accounting, and particularly relates to a hierarchical cost intelligent accounting method. BACKGROUND
[0002] With the increasingly perfect market, increasingly fierce competition, and the continuous change of enterprise production environment, the traditional cost accounting method often faces problems such as heavy workload, low efficiency, and uneven cost information at each level, and has been difficult to adapt to the fine needs of enterprises for cost management. The rapid development of technologies such as Internet of Things, cloud computing, and cloud storage provides the possibility for the intelligentization of cost accounting, enabling enterprises to achieve comprehensive, accurate, and efficient accounting of costs. And help enterprises to timely find cost abnormalities and predict cost decisions. However, the existing cost intelligent accounting method still has challenges in fine and hierarchical management. Therefore, researching an intelligent accounting method for multi-level cost to realize fine and intelligent management of cost accounting has become the key to improving the competitiveness of enterprises. SUMMARY
[0003] The application provides a hierarchical cost intelligent accounting method to solve the above problems.
[0004] To achieve the above purpose, the application realizes the following technical scheme:
[0005] A hierarchical cost intelligent accounting method, comprising the following steps:
[0006] S1. Obtain cost data, pre-process the cost data, and divide the cost data into a training set and a test set.
[0007] S2. Construct a weighted time series additive decomposition model, and the cost data in the training set is subjected to data extraction by the model to obtain a trend item, a seasonal item, and a residual item;
[0008] S3. Process the trend item, the seasonal item, and the residual item to obtain a new training sample set;
[0009] S4. Construct a cost prediction model, the cost prediction model comprising a CNN residual module and a bidirectional LSTM module, and the new training sample set is input into the cost prediction model to obtain a predicted total cost;
[0010] S5. Error evaluation is performed on the total cost in the test set and the predicted total cost to evaluate the prediction performance of the model.
[0011] Further, step S1 comprises:
[0012] S11. Data collection: obtain daily cost data from the financial system of the e-commerce management enterprise, the cost data including production material cost, fixed labor cost, fixed asset depreciation expense, office rental cost, management fee, server maintenance fee, product insurance fee, water and electricity cost, other production cost, advertising cost, temporary labor cost; divide the cost data into four levels, including direct cost, indirect cost, fixed cost and other cost; the direct cost is the sum of production material cost and fixed labor cost, the indirect cost is the sum of fixed asset depreciation expense, server maintenance fee and product insurance fee, the fixed cost is the sum of office rental cost, management fee, advertising fee and water and electricity cost, and the other cost is the sum of other production cost and temporary labor cost; the total cost is the total of the four levels of direct cost, indirect cost, fixed cost and other cost;
[0013] S12. Data standardization: standardize each level of cost data, including: unify data format, unit and data naming, fill in missing values in each level of data according to median value, and normalize each level of cost data;
[0014] S13. Data storage and division: divide all data into daily data characteristics including date, total cost, direct cost, indirect cost, fixed cost and other cost, store all data in excel format to obtain data set , and divide the data set into training set and test set .
[0015] Further, step S2 includes:
[0016] S21. Set the cost data of the trend term per day, cycle dr=7; set a window of consecutive dr days, and calculate the trend term of each day cost data in the training set using sliding window average method, the formula is as follows:
[0017] ,
[0018] wherein, represents the estimated value of the cost when the time node is t, i.e. the trend term, represents the original cost data value when the time node is t+i days;
[0019] S22. Set the cost data of the seasonal term per month, calculate the average value of the cost data of each month in the training set , the formula is as follows:
[0020] ,
[0021] in, The training set has a total of Year, This represents the cost data on day d of month m in year y, where Day represents the day of month m in year y. This represents the average cost data for month m across all years. Based on the trend term of the daily cost data in step S21, the trend term of the monthly cost data is obtained using cubic spline interpolation. ; Calculate the detrended monthly average Based on the number of holidays each month Divide by the total number of days in the month After obtaining the weights, the detrended monthly average is weighted to obtain the weighted monthly average, as shown in the formula below:
[0022] ,
[0023] ,
[0024] ,
[0025] in, This represents the detrended monthly average. This represents the weighted monthly average; expanding the weighted monthly average to each day yields... This constitutes time-series data on a daily basis;
[0026] S23. Through formula Get the time point residuals The final constructed weighted time series additive decomposition model Represented as:
[0027] ,
[0028] in, Indicates training set Mid-time point Data, These represent the trend term, seasonal term, and residual term, respectively. Further, the operation of cubic spline interpolation is as follows:
[0029] S221. Construct a cubic polynomial segment To represent two adjacent time cost trend values, the formula is as follows:
[0030] ,
[0031] When given two adjacent time cost trend items and , are designed to pass through these points and provide smooth transitions between these points; wherein, respectively represent the first coefficient to be solved, the second coefficient, the third coefficient, the fourth coefficient; t represents a variable of any time point, and the value range is , is a specific time point, representing the time corresponding to the i-th time cost trend value;
[0032] S222. Constructing equation set for solving , the equation set is constructed by using interpolation conditions and continuity conditions, and the formula is expressed as follows:
[0033] ,
[0034] ,
[0035] ,
[0036] ,
[0037] wherein, and respectively represent the first-order derivative of the i-th and i+1-th cubic polynomial on the time period, and respectively represent the second-order derivative of the i-th and i+1-th cubic polynomial on the time period;
[0038] S223. After obtaining all , the spline interpolation function is obtained, the 15th day of each month is selected as the node, and after inputting into , the trend item of the cost data of each month is obtained.
[0039] Further, step S3 comprises:
[0040] S31. Convert obtained in step S2 into a vector in units of months, and accumulate the cost data of each month at each level to obtain a new trend item , a new seasonal item , and a new residual item ;
[0041] S32. In the new trend item a new season term a new residual term randomly select a month as the starting point, and extract 12 consecutive months of data from the selected starting point as a training sample, wherein the data of the first 11 months is used as the input feature, and the data of the last month is used as the prediction label; repeat the above operation N times to generate N independent training sample sets, and obtain a final training sample set, wherein the final training sample set includes a trend term training sample set a season term training sample set and a residual term training sample set .
[0042] Further, step S4 includes:
[0043] input the trend term training sample set , the season term training sample set , and the residual term training sample set into the constructed cost prediction model respectively for training, and obtain three independent models, which are a trend term prediction model , a season term prediction model , and a residual term prediction model .
[0044] extract the trend term data of the last 11 months from the new trend term as the input of , and predict the trend term g(1) of the first month of the next year, and form a new set of 11-month data from the trend term data of the last 10 months in the new trend term and g(1) , input as the input of , and predict the trend term g(2) of the second month of the next year, and iterate the above operation, each time combine the newly predicted trend term with the trend term data of the previous 10 months to form a new set of 11-month trend term data, until the trend term of the 12 months of the next year is predicted, and finally obtain the 12-month trend term ; similarly, obtain the 12-month season term of the next year , the 12-month residual term of the next year ; superimpose to obtain the predicted total cost , which is expressed by the following formula:
[0045] ,
[0046] Further, the specific operation in the cost prediction model is as follows:
[0047] The CNN residual module comprises a convolution layer and a residual layer; the residual layer comprises a first residual block, a second residual block, a third residual block and a fourth residual block; each residual block in the residual layer comprises two convolution layers, a batch normalization layer and an activation layer;
[0048] The data in the final training sample set is input into the convolution layer to obtain local features in the time series data ; the local features The first output feature is obtained through the first residual block , the local features and the first output feature are connected in residual to obtain the first residual feature , the first residual feature is input into the ReLU activation function to obtain the first deep feature ; the first deep feature The second output feature is obtained through the second residual block , the first deep feature and the second output feature are connected in residual to obtain the second residual feature , the second residual feature is input into the ReLU activation function to obtain the second deep feature ; the second deep feature The third output feature is obtained through the third residual block , the second deep feature and the third output feature are connected in residual to obtain the third residual feature , the third residual feature is input into the ReLU activation function to obtain the third deep feature ; the third deep feature The fourth output feature is obtained through the fourth residual block , the third deep feature and the fourth output feature are connected in residual to obtain the fourth residual feature , the fourth residual feature is input into the ReLU activation function to obtain the fourth deep feature ;
[0049] The bidirectional LSTM module comprises two cascaded bidirectional LSTM layers;
[0050] The fourth deep feature is input into the first bidirectional LSTM layer for time sequence feature extraction to obtain the preliminary time sequence feature , the preliminary time sequence feature high-level time sequence feature is obtained through a second bidirectional LSTM layer ;
[0051] the high-level time sequence feature a prediction result is obtained through a full connection layer.
[0052] Further, the step S5 comprises:
[0053] through a correlation coefficient The prediction performance of the cost prediction model is evaluated, and the formula is as follows:
[0054] ,
[0055] wherein, the total cost predicted by the model the average value in the kth month, the total real cost the average value in the kth month.
[0056] The advantages of the present application are:
[0057] The present application uses an improved time sequence decomposition model to hierarchically decompose the historical cost data, which can more accurately capture the change trend of various costs, and even if the prediction of a certain type of cost is wrong, it will not have a great impact on the overall cost prediction. By constructing a weighted time sequence additive decomposition model, the trend term, seasonal term and residual term in the cost data are more effectively extracted, and the weighting mechanism more accurately reflects the contribution of different components in the cost change, improving the accuracy and reliability of cost decomposition. The combination of CNN and LSTM layers enables the model to more comprehensively understand the complexity and non-linear characteristics of complex long-term cost data, thereby improving the accuracy and generalization ability of the prediction. The present application uses a deep learning intelligent model to analyze the future cost trend, studies the cost occurrence law of the enterprise, constructs an intelligent accounting model, and verifies and evaluates its effectiveness, which can provide a reference basis for future allocation of cost budget and fine management. BRIEF DESCRIPTION OF DRAWINGS
[0058] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, which together with the embodiments of the present application, serve to explain the present application, and do not constitute a limitation of the present application.
[0059] Figure 1 is a flowchart of the method of the present application;
[0060] Figure 2 is a flowchart of the cost data acquisition and preprocessing process of the method of the present application;
[0061] Figure 3 Case flow chart for the method of the present application;
[0062] Figure 4 Direct cost sample graph for the method of the present application;
[0063] Figure 5 Trend term for the method of the present application;
[0064] Figure 6 Seasonal term for the method of the present application;
[0065] Figure 7 Residual term for the method of the present application. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0067] Embodiment 1
[0068] In this embodiment, as shown in Figure 1 The present application provides a hierarchical cost intelligent accounting method, and the specific steps include:
[0069] S1. Obtain cost data, pre-process the cost data, and divide the cost data into a training set and a test set.
[0070] Specifically, as shown in Figure 2S11. Data collection: obtain daily cost data from the financial system of the e-commerce management enterprise, the cost data including production material cost, fixed labor cost, fixed asset depreciation expense, office rental cost, management fee, server maintenance fee, product insurance fee, water and electricity fee, other production cost, advertising cost, temporary labor cost; divide the cost data into four levels, including direct cost, indirect cost, fixed cost and other cost; the direct cost is the sum of production material cost and fixed labor cost, the indirect cost is the sum of fixed asset depreciation expense, server maintenance fee and product insurance fee, the fixed cost is the sum of office rental cost, management fee, advertising fee and water and electricity fee, and the other cost is the sum of other production cost and temporary labor cost; the total cost is the total of the four levels of direct cost, indirect cost, fixed cost and other cost; S12. Data standardization: standardize each level of cost data, the specific operation including: unifying data format, unit and data naming, filling the missing values in each level of data according to the median value, and normalizing each level of cost data; S13. Data storage and division: divide all data according to the data characteristics of each day, including date, total cost of the day, total direct cost, total indirect cost, total fixed cost and total other cost, store all data in excel format, and obtain data set .
[0071] S2. Construct a weighted time series additive decomposition model, and the cost data in the training set is extracted by the model to obtain trend item, seasonal item and residual item;
[0072] Specifically,
[0073] S21. Set the cost data of the trend item in days, and the period dr=7; set a window of consecutive dr days, and calculate the trend item of the cost data of each day in the training set by using sliding window average method, and the formula is as follows:
[0074] ,
[0075] wherein, represents the estimated value of the cost when the time node is t, i.e. the trend item, represents the original cost data value when the time node is t+i days;
[0076] S22. Set the cost data of the seasonal item in months, and calculate the trend item of the cost data of each month in the training set The average cost data for each month is expressed by the following formula:
[0077] ,
[0078] in, The training set has a total of Year, This represents the cost data on day d of month m in year y, where Day represents the day of month m in year y. This represents the average cost data for month m across all years. Based on the trend term of the daily cost data in step S21, the trend term of the monthly cost data is obtained using cubic spline interpolation. ; Calculate the detrended monthly average Based on the number of holidays each month Divide by the total number of days in the month After obtaining the weights, the detrended monthly average is weighted to obtain the weighted monthly average, as shown in the formula below:
[0079] ,
[0080] ,
[0081] ,
[0082] in, This represents the detrended monthly average. This represents the weighted monthly average; expanding the weighted monthly average to each day yields... This constitutes time-series data on a daily basis;
[0083] S23. Through formula Get the time point residuals The final constructed weighted time series additive decomposition model Represented as:
[0084] ,
[0085] in, Indicates training set Mid-time point Data, These represent the trend term, seasonal term, and residual term, respectively.
[0086] Specifically, step S22 includes:
[0087] S221. Construct a cubic polynomial segment to represent two adjacent time cost trend values, the formula is as follows:
[0088] ,
[0089] When two adjacent time cost trend items and , are designed to pass through these points and provide smooth transitions between these points; wherein, respectively represent the first coefficient to be solved, the second coefficient, the third coefficient, the fourth coefficient; t represents a variable of any time point, and the value range is ], is a specific time point, indicating the time corresponding to the ith time cost trend value;
[0090] S222. Constructing equation set for solving , the equation set is constructed by using interpolation conditions and continuity conditions, and the formula is as follows:
[0091] ,
[0092] ,
[0093] ,
[0094] ,
[0095] wherein, and respectively represent the first derivative of the ith and (i+1)th cubic polynomial on the time period, and respectively represent the second derivative of the ith and (i+1)th cubic polynomial on the time period;
[0096] S223. After all are obtained, the spline interpolation function is obtained, the 15th of each month is selected as the node, and after inputting into , the trend item of the cost data of each month is obtained.
[0097] S3. Process the trend item, the seasonal item and the residual item to obtain a new training sample set;
[0098] Specifically, S31. convert the obtained in step S2 into a vector in units of months, and accumulate each level of cost data of each month to obtain a new trend item New seasonal items New residuals ;
[0099] S32. In the new trend item New seasonal items New residuals A random month is selected as the starting point. Starting from this selected starting point, data from 12 consecutive months is extracted as a training sample. The data from the first 11 months is used as input features, and the data from the last month is used as the prediction label. This process is repeated N times to generate N independent training sample sets, resulting in the final training sample set. The final training sample set includes a trend term training sample set. Seasonal training sample set and the training sample set of residual terms .
[0100] S4. Construct a cost prediction model, which includes a CNN residual module and a bidirectional LSTM module. The new training sample set is input into the cost prediction model to obtain the predicted total cost.
[0101] Set of training samples for trend terms Seasonal training sample set and the training sample set of residual terms The inputs were fed into the constructed cost prediction model for training, resulting in three independent models: trend term prediction model, trend term prediction model, and trend term prediction model. Seasonal prediction model Residual term prediction model ;
[0102] From new trend items Extract trend data for the last 11 months. As The input is used to predict the trend term g(1) for the first month of the following year, and the new trend term is then used. The trend data for the last 10 months is combined with g(1) to form a new set of data for the last 11 months. ,Will As The input is used to predict the trend term g(2) for the second month of the following year. The above operation is iterated, and each time the newly predicted trend term is combined with the trend term data of the previous 10 months to form the trend term data for the new 11 months, until the trend term for the 12 months of the following year is predicted, and finally the trend term for the 12 months is obtained. Similarly, we obtain the seasonal terms for the next year's 12 months. The residuals for the next 12 months ;Will By superimposing the results, the total predicted cost can be obtained. The formula is expressed as follows:
[0103] .
[0104] Specifically, the operations in the cost prediction model are as follows:
[0105] The CNN residual module includes convolutional layers and residual layers; the residual layer includes a first residual block, a second residual block, a third residual block, and a fourth residual block; each residual block in the residual layer includes two convolutional layers, a batch normalization layer, and an activation layer;
[0106] The data from the final training sample set is input into a convolutional layer to obtain local features in the time series data. The local features The first output feature is obtained after passing through the first residual block. , local features and the first output feature The first residual feature is obtained by performing residual connection. First residual characteristic After applying the ReLU activation function, the first deep-level features are obtained. The first deep-level feature The second output feature is obtained after passing through the second residual block. The first deep-level feature Second output features Perform residual connection and second residual feature Second residual characteristic After applying the ReLU activation function, the second deep-level features are obtained. The second deep-level feature The third output feature is obtained after passing through the third residual block. The second deep-level features and third output features The third residual feature is obtained by performing residual connection. Third residual characteristic The third deep-level feature is obtained after applying the ReLU activation function. The third deep-level feature The fourth output feature is obtained after passing through the fourth residual block. The third deep-level feature and the fourth output feature The fourth residual feature is obtained by performing residual connection. Fourth residual characteristic After applying the ReLU activation function, the fourth deep-level feature is obtained. ;
[0107] The bidirectional LSTM module includes two cascaded bidirectional LSTM layers;
[0108] The fourth deep-level feature Temporal features are extracted through the first bidirectional LSTM layer, yielding preliminary temporal features. Preliminary temporal characteristics High-level temporal features are obtained by performing high-level temporal feature extraction through a second bidirectional LSTM layer. ;
[0109] The high-level temporal features The prediction result is obtained after passing through a fully connected layer.
[0110] S5. The model's predictive performance is evaluated by comparing the total cost of the test set with the total predicted cost.
[0111] Specifically, through the correlation coefficient The predictive performance of the cost prediction model is evaluated using the following formula:
[0112] ,
[0113] in, This represents the total cost predicted by the model. The average value in the kth month, This refers to the total actual cost. The average value in the kth month.
[0114] Example 2
[0115] To demonstrate the effectiveness of our proposed model, we conducted comparative experiments using data collected by our method to compare it with traditional STL and LSTNet models. STL is a method for time series decomposition, while LSTNet is a deep learning framework combining convolutional neural networks and recurrent neural networks for processing long-term and short-term time series patterns. The results show that the correlation coefficient (CC) between the predicted and actual values of our proposed model reaches 0.8536, which is higher than that of the STL and LSTNet models, demonstrating the advantages of our proposed hierarchical intelligent cost accounting method.
[0116] Table 1. Comparison of experimental data between the method of this invention and traditional STL and LSTNet models.
[0117]
[0118] Secondly, we use the first 11 months of 2023 as historical data and the data for the following month as labels to illustrate the cost prediction process with a specific example. Here, we use the direct costs of 2023 (see...) Figure 4 For example, the case process is as follows: Figure 3 As shown, it is first decomposed into a trend term using an improved time series additive model (see...). Figure 5 ), Seasonal items (see Figure 6 ) and residual terms (see Figure 7 Then, the three decomposed components are input into the cost forecasting model to obtain three predicted trend, seasonal, and residual items. These three are then superimposed to obtain the predicted value for December. Next, the original direct cost labels are compared with the predicted cost labels to calculate the correlation coefficient. This invention's method can accurately perform cost accounting.
[0119] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hierarchical intelligent cost accounting method, characterized in that, Includes the following steps: S1. Obtain cost data, preprocess the cost data, divide the cost data into 4 levels including direct costs, indirect costs, fixed costs and other costs, and divide the cost data into training set and test set; S2. Construct a weighted time series additive decomposition model. The cost data in the training set is processed by the model to extract the trend term, seasonal term, and residual term. S21. Set the cost data for the trend item to be in daily units, with a period dr=7; set a continuous dr days as a window, and use the sliding window averaging method to calculate the training set. The trend term for daily cost data is expressed by the following formula: , in, This represents the estimated cost at time point t, i.e., the trend term. This represents the original cost data value at time point t+i. S22. Set the cost data for seasonal items to be in monthly units, and calculate the training set. The average cost data for each month is expressed by the following formula: , in, This indicates that the training set has a total of Year, This represents the cost data on day d of month m in year y, where Day represents the day of month m in year y. This represents the average cost data for month m across all years. Based on the trend term of the daily cost data in step S21, the trend term of the monthly cost data is obtained using cubic spline interpolation. ; Calculate the detrended monthly average Based on the number of holidays each month Divide by the total number of days in the month After obtaining the weights, the detrended monthly average is weighted to obtain the weighted monthly average, as shown in the formula below: , , , in, This represents the detrended monthly average. This represents the weighted monthly average; expanding the weighted monthly average to each day yields... This constitutes time-series data on a daily basis; Specifically, the trend term of the monthly cost data is obtained using cubic spline interpolation. The process is as follows: S221. Construct a cubic polynomial segment To represent two adjacent time cost trend values, the formula is as follows: , Given two adjacent time cost trend terms and , It is designed to pass through these points and provide a smooth transition between them; wherein, These represent the first, second, third, and fourth coefficients to be solved, respectively; t represents the variable at any time point, and its range is [...]. ], It is a specific point in time, representing the time corresponding to the i-th time cost trend value; S222. Constructing a system of equations and solving it. The system of equations is constructed using interpolation and continuity conditions, and is expressed as follows: , , , , in, and Let i and i+1 represent the cubic polynomials in... The first derivative of a polynomial over a time interval and Let i and i+1 represent the cubic polynomials in... The second derivative of a polynomial over a time interval; S223. Find all Then, the spline interpolation function is obtained. Choose the 15th of each month as the node and enter it. Then, the trend item of the monthly cost data is obtained. ; S23. Through formula Get the time point residuals The final constructed weighted time series additive decomposition model Represented as: , in, Indicates training set Mid-time point Data, These represent the trend term, seasonal term, and residual term, respectively. S3. Process the trend term, seasonal term, and residual term to obtain a new training sample set; S4. Construct a cost prediction model, which includes a CNN residual module and a bidirectional LSTM module. The new training sample set is input into the cost prediction model to obtain the predicted total cost. S5. The model's predictive performance is evaluated by comparing the total cost of the test set with the total predicted cost.
2. The hierarchical intelligent cost accounting method according to claim 1, characterized in that, Step S1 includes: S11. Data Acquisition: Obtain daily cost data from the e-commerce management company's internal financial system. This cost data includes raw material costs, fixed labor costs, fixed asset depreciation, office rental costs, administrative expenses, server maintenance costs, product insurance costs, utilities costs, other production costs, advertising costs, and temporary labor costs. Direct costs are the sum of raw material costs and fixed labor costs. Indirect costs are the sum of fixed asset depreciation, server maintenance costs, and product insurance costs. Fixed costs are the sum of office rental costs, administrative expenses, advertising costs, and utilities costs. Other costs are the sum of other production costs and temporary labor costs. Total costs are the sum of these four levels: direct costs, indirect costs, fixed costs, and other costs. S12. Data Standardization: Standardize the cost data at each level. Specific operations include: unifying the data format, units and data naming, filling missing values in the data at each level according to the median value, and normalizing the cost data at each level. S13. Data Storage and Partitioning: Organize all data by day, based on the data characteristics of each day. This includes: date, total cost for the day, total direct costs, total indirect costs, total fixed costs, and total other costs. All data is stored in Excel format to obtain the dataset. and the dataset Divided into training set and test set .
3. The hierarchical intelligent cost accounting method according to claim 2, characterized in that, Step S3 includes: S31. Obtain the result from step S2 The data is converted into a vector with monthly units, and the cost data for each level in each month is accumulated to obtain a new trend term. New seasonal items New residuals ; S32. In the new trend item New seasonal items New residuals A random month is selected as the starting point. Starting from this selected starting point, data from 12 consecutive months is extracted as a training sample. The data from the first 11 months is used as input features, and the data from the last month is used as the prediction label. This process is repeated N times to generate N independent training sample sets, resulting in the final training sample set. The final training sample set includes a trend term training sample set. Seasonal training sample set and the training sample set of residual terms .
4. The hierarchical intelligent cost accounting method according to claim 3, characterized in that, Step S4 includes: Set of training samples for trend terms Seasonal training sample set and the training sample set of residual terms The inputs were fed into the constructed cost prediction model for training, resulting in three independent models: trend term prediction model, trend term prediction model, and trend term prediction model. Seasonal prediction model Residual term prediction model ; From new trend items Extract trend data for the last 11 months As The input is used to predict the trend term g(1) for the first month of the following year, and the new trend term is then used. The trend data for the last 10 months is combined with g(1) to form a new set of data for the last 11 months. ,Will As The input is used to predict the trend term g(2) for the second month of the following year. The above operation is iterated, and each time the newly predicted trend term is combined with the trend term data of the previous 10 months to form the trend term data for the new 11 months, until the trend term for the 12 months of the following year is predicted, and finally the trend term for the 12 months is obtained. Similarly, we obtain the seasonal terms for the next year's 12 months. The residuals for the next 12 months ;Will By superimposing the results, the total predicted cost can be obtained. The formula is expressed as follows: 。 5. The hierarchical intelligent cost accounting method according to claim 4, characterized in that, The specific operation in the cost prediction model is as follows: The CNN residual module includes convolutional layers and residual layers; the residual layer includes a first residual block, a second residual block, a third residual block, and a fourth residual block; each residual block in the residual layer includes two convolutional layers, a batch normalization layer, and an activation layer; The data from the final training sample set is input into a convolutional layer to obtain local features in the time series data. The local features The first output feature is obtained after passing through the first residual block. , local features and the first output feature The first residual feature is obtained by performing residual connection. First residual characteristic After applying the ReLU activation function, the first deep-level features are obtained. The first deep-level feature The second output feature is obtained after passing through the second residual block. The first deep-level feature Second output features Perform residual connection and second residual feature Second residual characteristic After applying the ReLU activation function, the second deep-level features are obtained. The second deep-level feature The third output feature is obtained after passing through the third residual block. The second deep-level features and third output features The third residual feature is obtained by performing residual connection. Third residual characteristic The third deep-level feature is obtained after applying the ReLU activation function. The third deep-level feature The fourth output feature is obtained after passing through the fourth residual block. The third deep-level feature and the fourth output feature The fourth residual feature is obtained by performing residual connection. Fourth residual characteristic After applying the ReLU activation function, the fourth deep-level feature is obtained. ; The bidirectional LSTM module includes two cascaded bidirectional LSTM layers; The fourth deep-level feature Temporal features are extracted through the first bidirectional LSTM layer, yielding preliminary temporal features. Preliminary temporal characteristics High-level temporal features are obtained by performing high-level temporal feature extraction through a second bidirectional LSTM layer. ; The high-level temporal features The prediction result is obtained after passing through a fully connected layer.
6. The hierarchical intelligent cost accounting method according to claim 5, characterized in that, Step S5 includes: Through correlation coefficient The predictive performance of the cost prediction model is evaluated using the following formula: , in, This represents the total cost predicted by the model. The average value in the kth month, This refers to the total actual cost. The average value in the kth month.
Citation Information
Patent Citations
Power supply station operation and maintenance cost prediction method fusing time sequence and neural network
CN113298288A