Project cost intelligent prediction method and device based on long short-term memory neural network
Through the method based on long and short-term memory neural network, variational modal decomposition and time serialization process engineering cost data, the problem of inaccurate prediction in the existing technology is solved, and detailed and accurate prediction of power grid engineering cost is achieved, which enhances the Cost control capability.
Patent Information
- Application Number
- CN202411458014.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2024-12-27
AI Technical Summary
The existing power grid engineering cost prediction methods cannot effectively consider the market environment and new technological changes, and the calculation results lack detailed analysis of project sub-item investment, resulting in inaccurate prediction and difficulty in cost control.
Using a method based on long and short-term memory neural network, the engineering cost data is processed through variational modal decomposition and time serialization, an LSTM model is constructed for multi-frequency prediction, and a detailed engineering cost time curve is generated.
It improves the accuracy and reliability of engineering cost prediction, can better reflect the impact of the market environment and new technologies, provides detailed analysis methods for cost, and enhances the targeted cost control.
Smart Images

Figure CN119204340A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an intelligent prediction method and device for engineering cost based on long short-term memory neural network, belonging to the technical field of power grid engineering cost data processing. Background Art
[0002] With the development of the power market and the advancement of power grid construction, the investment amount of power grid projects has continued to increase, making the cost management of power grid projects more complex and critical. In addition, the new characteristics of power grid projects, such as large-scale and technical complexity, have also increased the uncertainty of project costs, making risk management an important topic. In power grid projects, various risk factors are closely related to the overall cost of the project. Identifying these risk factors and analyzing their relationship with the cost is crucial for accurate costing.
[0003] The current method of cost forecasting is mainly to input historical cost data and directly calculate the total investment of the project through algorithms. This method is called historical data algorithm, which is a traditional forecasting method based on historical data and statistical algorithms. The historical data algorithm uses the cost data of historical projects as input, and obtains the total investment of the project through statistical analysis and algorithm calculation. This method is simple and direct, and is suitable for some relatively simple and small-scale projects.
[0004] However, the existing cost forecasting methods have the following shortcomings: 1. Unable to reflect changes in the market environment and new technologies: The historical data algorithm mainly relies on historical cost data and cannot fully consider changes in the market environment and the application of new technologies. As time goes by, market prices, material costs, labor costs, etc. may change, and these factors cannot be effectively reflected in the historical data algorithm. 2. The calculation results only include the total investment: The cost forecast calculation results under the existing technology usually only include the total investment of the project, and lack a detailed analysis of the project's sub-item investment. In this case, it is difficult for managers to understand the specific composition of the cost and cannot carry out targeted cost control and optimization. 3. Based on budget data: Most of the current cost forecasts are based on budget data, which are often preliminary estimates and are difficult to represent the final actual investment of the project. Therefore, there may be a large deviation between the calculation results and the actual situation, affecting the accuracy and reliability of the budget. Summary of the invention
[0005] In order to solve the above problems, the present invention proposes an intelligent prediction method and device for engineering cost based on long short-term memory neural network, which can solve the inaccuracy problem of current cost prediction methods and enrich the means of pre-controlling costs.
[0006] The technical solution adopted by the present invention to solve the technical problem is:
[0007] In a first aspect, an embodiment of the present invention provides an intelligent prediction method for construction cost based on a long short-term memory neural network, comprising the following steps:
[0008] Step S1, obtaining the engineering cost data of the power grid project, and dividing the engineering cost data into a training set and a validation set after standardization, wherein the engineering cost data includes engineering settlement data, material price inquiry data, and the cycle and frequency of engineering cost forecasting demand;
[0009] Step S2, performing variational modal decomposition on the training set to obtain cost modal components of several orders;
[0010] Step S3, constructing a time window based on the periodicity and frequency of the project cost to be predicted, and performing time serialization on cost modal components of several orders based on the time window to obtain an input vector;
[0011] Step S4, constructing a long short-term memory neural network model, passing the input vector through the preset LSTM layer from the forward and reverse directions respectively, obtaining a forward hidden state sequence and a reverse hidden state sequence, and concatenating the forward and reverse hidden state sequences to obtain an output sequence;
[0012] Step S5, initialize the long short-term memory neural network model, and use the training set to train the model, continuously adjust the model parameters to perform optimization iterations, and terminate the iteration when the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or reaches the maximum number of iterations, and obtain the final project cost prediction model;
[0013] S6, inputting the engineering cost data to be predicted into the engineering cost prediction model, obtaining a plurality of prediction sequences with different frequencies, visualizing the plurality of prediction sequences with different frequencies as a time curve, and obtaining the engineering cost prediction result.
[0014] As a possible implementation of this embodiment, in step S1, the engineering settlement data and material price inquiry data related to the engineering cost are standardized by adopting mean standardization, and the process of the standardization is as follows:
[0015] First, calculate the mean of the data, then calculate the features of the data, and finally combine the mean and features for mean normalization:
[0016]
[0017] In the formula, y i is the standardized construction cost data of the ith project, x i is the i-th engineering cost data, and n is the total amount of engineering cost data.
[0018] As a possible implementation of this embodiment, step S2, performing variational modal decomposition on the training set to obtain cost modal components of several orders, includes the following steps:
[0019] The engineering cost data of the training set is represented as a one-dimensional time series y(t) = [y1, y2, y3…y N ], where N is the length of the time series;
[0020] The number of modal components is set according to the period and frequency required for project cost forecasting, and is mapped into the regularization parameter;
[0021] Initialize the frequency kernel function and center frequency of each modal component;
[0022] Perform alternating optimization steps to iteratively optimize the frequency core function and center frequency until convergence or the preset number of iterations is reached to obtain the final modal components.
[0023] As a possible implementation of this embodiment, the number of modal components is set according to the period and frequency required for the project cost forecast, and the regularization parameters are mapped, including the following steps:
[0024] Analyze the periodicity and frequency characteristics of engineering cost data;
[0025] Estimate the main frequency resolutions that need to be captured based on forecast requirements and data characteristics;
[0026] Select an appropriate K based on the forecast requirements and estimated frequency resolution;
[0027] Set a regularization parameter and map the modal components into the regularization parameter.
[0028] As a possible implementation of this embodiment, during the execution of the alternating optimization step, the objective function is:
[0029]
[0030] In the formula, st∑B represents the solution that minimizes A when condition B is satisfied; δ(n) is the Dirichlet function; σ n {·} is the pair x i (n) A single-sided spectrum obtained by performing a Hilbert transform; {x i} and {ω i} represents the set of modal components and their corresponding center frequencies, and the decomposition scale is K, which is the number of components obtained by decomposition; * represents convolution; ∑ i x i represents the sum of all modal components; represents the square norm of the gradient, j is the imaginary part, n is the number of engineering cost data, and x(n) is the data component;
[0031] The objective function after removing the constraints is:
[0032]
[0033] In the formula, L({B k},{A k},σ) is the unconstrained variational model, G(t) is the original input signal, σ(t) is the Lagrange multiplier, and α is the penalty factor;
[0034] The convergence conditions are:
[0035]
[0036] In the formula, yes The Fourier transform of is the update mode, and m is the number of iterations.
[0037] As a possible implementation of this embodiment, step S3, based on the periodicity and frequency of the project cost to be predicted, constructs a time window, and performs time serialization on several orders of cost modal components based on the time window to obtain an input vector, includes the following steps:
[0038] Determine the length of the time window and the sliding step size: Determine the length of the time window and define the sliding step size of the time window based on the periodicity and forecasting requirements of the project cost data;
[0039] Extracting modal components within the time window: For each time window, extract the data within the corresponding window from the obtained several-order cost modal components;
[0040] Time series processing: The modal component data in each time window are arranged in chronological order to form time series data;
[0041] Construct input vector: Use the time-series data as the input vector.
[0042] As a possible implementation of this embodiment, step S4, constructing a long short-term memory neural network model, passing the input vector through a preset LSTM layer from both the forward and reverse directions to obtain a forward hidden state sequence and a reverse hidden state sequence, and concatenating the forward and reverse hidden state sequences to obtain an output sequence, includes the following steps:
[0043] According to the time-series input vectors generated in the previous step, as the input of the LSTM model, each input vector contains modal component data within several time windows;
[0044] The input vector is input into the preset forward and backward LSTM layers respectively. The forward LSTM layer processes the data of the input vector in chronological order, while the backward LSTM layer processes the data of the input vector in the reverse chronological order.
[0045] The forward LSTM layer and the reverse LSTM layer calculate their hidden state sequences respectively;
[0046] The hidden state sequences calculated by the forward LSTM layer and the reverse LSTM layer are concatenated by time step, and the hidden state vectors of the forward LSTM layer and the reverse LSTM layer at each time step are connected together to form a longer hidden state sequence;
[0047] The concatenated hidden state sequence is used as the final output sequence.
[0048] As a possible implementation of this embodiment, the formula of the LSTM layer is:
[0049]
[0050] In the formula, i t 、f t 、a t They are input gate, output gate and forget gate respectively; c t represents the long-term memory of the cell state, η and tanh are activation functions, and h t-1 is the output of the previous stage, w ix 、w fx 、w cx 、w ax 、w ih 、w fh 、w ch 、w ah are the corresponding weights to be trained, b i , b f , b c , b a is the bias term.
[0051] As a possible implementation of this embodiment, the method of visualizing a plurality of prediction sequences with different frequencies as a time curve to obtain a project cost prediction result includes the following steps:
[0052] The periodic components in each curve were detected using periodic analysis methods;
[0053] Compare the performance of different curves by prediction error and goodness of fit;
[0054] Combined with the actual business background and needs of engineering cost forecasting, the most suitable engineering cost time curve is selected as the final forecast basis and cost forecasting is carried out to obtain the engineering cost forecast results.
[0055] In a second aspect, an embodiment of the present invention provides an intelligent prediction device for construction cost based on a long short-term memory neural network, comprising:
[0056] The data acquisition module is used to obtain the engineering cost data of the power grid project, and divide the engineering cost data into a training set and a validation set after standardization. The engineering cost data includes engineering settlement data, material price inquiry data, and the cycle and frequency of engineering cost forecast demand;
[0057] The modal decomposition module is used to perform variational modal decomposition on the training set to obtain cost modal components of several orders;
[0058] A time series module is used to construct a time window based on the periodicity and frequency of the project cost to be predicted, and to perform time series on several orders of cost modal components based on the time window to obtain an input vector;
[0059] The model building module is used to build a long short-term memory neural network model. The input vector passes through the preset LSTM layer in both the forward and reverse directions to obtain a forward hidden state sequence and a reverse hidden state sequence, and the forward and reverse hidden state sequences are concatenated to obtain an output sequence.
[0060] The model training module is used to initialize the long short-term memory neural network model, and use the training set to train the model, and continuously adjust the model parameters for optimization iteration. When the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or the maximum number of iterations is reached, the iteration is terminated to obtain the final project cost prediction model;
[0061] The cost prediction module is used to input the engineering cost data to be predicted into the engineering cost prediction model, obtain multiple prediction sequences with different frequencies, visualize the multiple prediction sequences with different frequencies as time curves, and obtain the engineering cost prediction results.
[0062] The beneficial effects of the technical solution of the embodiment of the present invention are as follows:
[0063] The technical solution of the embodiment of the present invention is a method for intelligent prediction of engineering cost based on long short-term memory neural network, comprising the following steps: step S1, obtaining engineering cost data of power grid projects, and dividing the engineering cost data into a training set and a verification set after standardization, wherein the engineering cost data includes engineering settlement data, material price inquiry data, and the periodicity and frequency of engineering cost prediction requirements; step S2, performing variational modal decomposition on the training set to obtain cost modal components of several orders; step S3, constructing a time window based on the periodicity and frequency of the engineering cost to be predicted, and performing time serialization on the cost modal components of several orders based on the time window to obtain an input vector; step S4, constructing a long short-term memory neural network model, and converting the input vector into a validation vector. The quantity passes through the preset LSTM layer from the positive and negative directions respectively, and the forward hidden state sequence and the reverse hidden state sequence are obtained, and the forward and reverse hidden state sequences are spliced to obtain the output sequence; step S5, initialize the long short-term memory neural network model, and use the training set to train the model, and continuously adjust the model parameters to perform optimization iterations. When the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or reaches the maximum number of iterations, the iteration is terminated to obtain the final project cost prediction model; S6, the project cost data to be predicted is input into the project cost prediction model, and a plurality of prediction sequences of different frequencies are obtained, and the prediction sequences of multiple different frequencies are visualized as time curves to obtain the project cost prediction results. The present invention is based on historical settlement data, combined with the price fluctuations of the material market and the impact of current new technologies on the cost, and performs cost prediction on projects of a specific scale, which solves the inaccuracy problem of the current cost prediction method and enriches the means of controlling the cost in advance.
[0064] The present invention constructs a time window based on periodicity and frequency, and performs time series processing on the modal components. It can not only effectively extract and utilize the periodic information in the engineering cost data, but also provide more reliable and effective data input for subsequent modeling and prediction, thereby enhancing the accuracy and practicability of the prediction model.
[0065] An intelligent prediction device for engineering cost based on a long short-term memory neural network according to the technical solution of an embodiment of the present invention has the same beneficial effects as an intelligent prediction method for engineering cost based on a long short-term memory neural network according to the technical solution of an embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a flow chart of a method for intelligent prediction of construction cost based on long short-term memory neural network according to an exemplary embodiment;
[0067] Figure 2 It is a structural schematic diagram of an intelligent prediction device for engineering cost based on a long short-term memory neural network according to an exemplary embodiment. DETAILED DESCRIPTION
[0068] In order to more clearly illustrate the technical features of the solution of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.
[0069] like Figure 1 As shown, an embodiment of the present invention provides an intelligent prediction method for construction cost based on a long short-term memory neural network, comprising the following steps:
[0070] Step S1, obtaining the engineering cost data of the power grid project, and dividing the engineering cost data into a training set and a validation set after standardization, wherein the engineering cost data includes engineering settlement data, material price inquiry data, and the cycle and frequency of engineering cost forecasting demand;
[0071] Step S2, performing variational modal decomposition on the training set to obtain cost modal components of several orders;
[0072] Step S3, constructing a time window based on the periodicity and frequency of the project cost to be predicted, and performing time serialization on cost modal components of several orders based on the time window to obtain an input vector;
[0073] Step S4, constructing a long short-term memory neural network model, passing the input vector through the preset LSTM layer from the forward and reverse directions respectively, obtaining a forward hidden state sequence and a reverse hidden state sequence, and concatenating the forward and reverse hidden state sequences to obtain an output sequence;
[0074] Step S5, initialize the long short-term memory neural network model, and use the training set to train the model, continuously adjust the model parameters to perform optimization iterations, and terminate the iteration when the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or reaches the maximum number of iterations, and obtain the final project cost prediction model;
[0075] S6, inputting the engineering cost data to be predicted into the engineering cost prediction model, obtaining a plurality of prediction sequences with different frequencies, visualizing the plurality of prediction sequences with different frequencies as a time curve, and obtaining the engineering cost prediction result.
[0076] As a possible implementation of this embodiment, in step S1, the engineering settlement data and material price inquiry data related to the engineering cost are standardized by adopting mean standardization, and the process of the standardization is as follows:
[0077] First, calculate the mean of the data, then calculate the features of the data, and finally combine the mean and features for mean normalization:
[0078]
[0079] In the formula, y i is the standardized construction cost data of the ith project, x i is the i-th engineering cost data, and n is the total amount of engineering cost data.
[0080] As a possible implementation of this embodiment, step S2, performing variational modal decomposition on the training set to obtain cost modal components of several orders, includes the following steps:
[0081] The engineering cost data of the training set is represented as a one-dimensional time series y(t) = [y1, y2, y3…y N ], where N is the length of the time series;
[0082] The number of modal components is set according to the period and frequency required for project cost forecasting, and is mapped into the regularization parameter;
[0083] Initialize the frequency kernel function and center frequency of each modal component;
[0084] Perform alternating optimization steps to iteratively optimize the frequency core function and center frequency until convergence or the preset number of iterations is reached to obtain the final modal components.
[0085] As a possible implementation of this embodiment, the number of modal components is set according to the period and frequency required for the project cost forecast, and the regularization parameters are mapped, including the following steps:
[0086] Analyze the periodicity and frequency characteristics of engineering cost data;
[0087] Estimate the main frequency resolutions that need to be captured based on forecast requirements and data characteristics;
[0088] Select an appropriate K based on the forecast requirements and estimated frequency resolution;
[0089] Set a regularization parameter and map the modal components into the regularization parameter.
[0090] As a possible implementation of this embodiment, during the execution of the alternating optimization step, the objective function is:
[0091]
[0092] In the formula, st∑B represents the solution that minimizes A when condition B is satisfied; δ(n) is the Dirichlet function; σ n {·} is the pair x i (n) A single-sided spectrum obtained by performing a Hilbert transform; {x i} and {ω i} represents the set of modal components and their corresponding center frequencies, and the decomposition scale is K, which is the number of components obtained by decomposition; * represents convolution; ∑ i x i represents the sum of all modal components; represents the square norm of the gradient, j is the imaginary part, n is the number of engineering cost data, and x(n) is the data component;
[0093] The objective function after removing the constraints is:
[0094]
[0095] In the formula, L({B k},{A k},σ) is the unconstrained variational model, G(t) is the original input signal, σ(t) is the Lagrange multiplier, and α is the penalty factor;
[0096] The convergence conditions are:
[0097]
[0098] In the formula, yes The Fourier transform of is the update mode, and m is the number of iterations.
[0099] As a possible implementation of this embodiment, step S3, based on the periodicity and frequency of the project cost to be predicted, constructs a time window, and performs time serialization on several orders of cost modal components based on the time window to obtain an input vector, includes the following steps:
[0100] Determine the length of the time window and the sliding step size: Determine the length of the time window and define the sliding step size of the time window based on the periodicity and forecasting requirements of the project cost data;
[0101] Extracting modal components within the time window: For each time window, extract the data within the corresponding window from the obtained several-order cost modal components;
[0102] Time series processing: The modal component data in each time window are arranged in chronological order to form time series data;
[0103] Construct input vector: Use the time-series data as the input vector.
[0104] As a possible implementation of this embodiment, step S4, constructing a long short-term memory neural network model, passing the input vector through a preset LSTM layer from both the forward and reverse directions to obtain a forward hidden state sequence and a reverse hidden state sequence, and concatenating the forward and reverse hidden state sequences to obtain an output sequence, includes the following steps:
[0105] According to the time-series input vectors generated in the previous step, as the input of the LSTM model, each input vector contains modal component data within several time windows;
[0106] The input vector is input into the preset forward and backward LSTM layers respectively. The forward LSTM layer processes the data of the input vector in chronological order, while the backward LSTM layer processes the data of the input vector in the reverse chronological order.
[0107] The forward LSTM layer and the reverse LSTM layer calculate their hidden state sequences respectively;
[0108] The hidden state sequences calculated by the forward LSTM layer and the reverse LSTM layer are concatenated by time step, and the hidden state vectors of the forward LSTM layer and the reverse LSTM layer at each time step are connected together to form a longer hidden state sequence;
[0109] The concatenated hidden state sequence is used as the final output sequence.
[0110] As a possible implementation of this embodiment, the formula of the LSTM layer is:
[0111]
[0112] In the formula, i t 、f t 、a t They are input gate, output gate and forget gate respectively; c t represents the long-term memory of the cell state, η and tanh are activation functions, and h t-1 is the output of the previous stage, w ix 、w fx 、w cx 、w ax 、w ih 、w fh 、w ch 、w ah are the corresponding weights to be trained, b i 、b f 、b c 、b a is the bias term.
[0113] As a possible implementation of this embodiment, the method of visualizing a plurality of prediction sequences with different frequencies as a time curve to obtain a project cost prediction result includes the following steps:
[0114] The periodic components in each curve were detected using periodic analysis methods;
[0115] Compare the performance of different curves by prediction error and goodness of fit;
[0116] Combined with the actual business background and needs of engineering cost forecasting, the most suitable engineering cost time curve is selected as the final forecast basis and cost forecasting is carried out to obtain the engineering cost forecast results.
[0117] like Figure 2 As shown, an embodiment of the present invention provides an intelligent prediction device for construction cost based on a long short-term memory neural network, comprising:
[0118] The data acquisition module is used to obtain the engineering cost data of the power grid project, and divide the engineering cost data into a training set and a validation set after standardization. The engineering cost data includes engineering settlement data, material price inquiry data, and the cycle and frequency of engineering cost forecast demand;
[0119] The modal decomposition module is used to perform variational modal decomposition on the training set to obtain cost modal components of several orders;
[0120] A time series module is used to construct a time window based on the periodicity and frequency of the project cost to be predicted, and to perform time series on several orders of cost modal components based on the time window to obtain an input vector;
[0121] The model building module is used to build a long short-term memory neural network model. The input vector passes through the preset LSTM layer in both the forward and reverse directions to obtain a forward hidden state sequence and a reverse hidden state sequence, and the forward and reverse hidden state sequences are concatenated to obtain an output sequence.
[0122] The model training module is used to initialize the long short-term memory neural network model, and use the training set to train the model, and continuously adjust the model parameters for optimization iteration. When the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or the maximum number of iterations is reached, the iteration is terminated to obtain the final project cost prediction model;
[0123] The cost prediction module is used to input the engineering cost data to be predicted into the engineering cost prediction model, obtain multiple prediction sequences with different frequencies, visualize the multiple prediction sequences with different frequencies as time curves, and obtain the engineering cost prediction results.
[0124] The specific process of using the audit device of the present invention to audit the settlement of power transmission and transformation project sections is as follows.
[0125] S1, obtain the engineering cost data, standardize it, and divide the engineering cost data into a training set and a validation set.
[0126] The engineering cost data includes engineering settlement data, material price inquiry data, and the cycle and frequency of engineering cost forecasting needs.
[0127] The project settlement data and material price inquiry data related to the project cost are standardized by using mean standardization. The specific process of the standardization is as follows:
[0128] First, calculate the mean of the data, then calculate the characteristics of the data, and finally combine the mean and characteristics to perform mean standardization;
[0129] The calculation formula for the mean standardization is as follows:
[0130]
[0131] In the formula, y i is the standardized construction cost data of the ith project, x i is the i-th engineering cost data, and n is the total amount of data.
[0132] S2, decompose the training set based on variational mode to obtain cost modal components of several orders.
[0133] Variational Mode Decomposition (VMD) is a signal processing technique used to decompose complex nonlinear and nonstationary signals into multiple modal components (IMFs), each of which has specific frequency and amplitude characteristics. Unlike traditional Fourier transform or wavelet transform, VMD can adaptively adjust the center frequency and bandwidth of each modal component to better adapt to the frequency variation of the signal. By alternately optimizing the decomposition process of frequency and amplitude, VMD can effectively extract the periodic components and time-varying modal characteristics in the signal, and is widely used in signal processing, biomedical engineering, image processing and other fields.
[0134] Specifically,
[0135] The engineering cost data of the training set is represented as a one-dimensional time series y(t) = [y1, y2, y3…y N ], where N is the length of the time series.
[0136] The number of modal components is set according to the period and frequency required for project cost forecasting, and is mapped into the regularization parameter;
[0137] Initialize the frequency kernel function and center frequency of each modal component;
[0138] Perform alternating optimization steps to iteratively optimize the frequency core function and center frequency until convergence or the preset number of iterations is reached to obtain the final modal components.
[0139] The number of modal components is set according to the period and frequency required for project cost prediction, and the regularization parameters are mapped into the parameters, which are specifically:
[0140] Analyze the periodicity and frequency characteristics of construction cost data. For example, whether there are annual seasonal changes, long-term trends, or other periodic components;
[0141] Estimate the main frequency resolution that needs to be captured based on prediction requirements and data characteristics; higher frequency resolution requires more modal components to characterize;
[0142] According to the prediction requirements and frequency resolution estimation, select an appropriate K. Usually, the choice of K can be initially determined by experience and spectrum analysis to ensure that the main periodic components can be captured.
[0143] The regularization parameter controls the smoothness and influence between the modal components. A larger regularization parameter will make the modal components smoother and simpler, while a smaller regularization parameter λ will allow more details and noise.
[0144] During the setup process, repeated experiments and optimization are performed to adjust the combination of modal components and regularization parameters through cross-validation or evaluation of prediction errors to obtain the best prediction performance and model interpretation ability.
[0145] The specific calculation formula of the objective function is as follows:
[0146]
[0147] In the formula, st∑B represents the solution that minimizes A when condition B is satisfied; δ(n) is the Dirichlet function; σ n {·} is the pair x i (n) A single-sided spectrum obtained by performing a Hilbert transform; {x i} and {ω i} represents the set of modal components and their corresponding center frequencies, and the decomposition scale is K, which is the number of components obtained by decomposition; * represents convolution; ∑ i x i represents the sum of all modal components; represents the square norm of the gradient, j is the imaginary part, n is the number of data, and x(n) is the data component.
[0148] The specific calculation formula of the objective function after removing the constraints is:
[0149]
[0150] In the formula, L({B k},{A k},σ) is the unconstrained variational model, G(t) is the original input signal, σ(t) is the Lagrange multiplier, and α is the penalty factor.
[0151] The convergence conditions are:
[0152]
[0153] In the formula, yes The Fourier transform of is the update mode, and m is the number of iterations.
[0154] The frequency core function and center frequency of each modal component are initialized as follows:
[0155] Select the core function: The core function determines the frequency response characteristics of each modal component. This article uses Gaussian function and Mexican hat function. The selection of the core function needs to consider the periodicity and frequency distribution characteristics of the data.
[0156] The center frequency is the center point of each modal component in the frequency domain and determines the dominant frequency of the modal component. The setting of the center frequency should be based on spectrum analysis or domain knowledge to ensure that important periodic components can be captured.
[0157] For each modal component, the parameters of the kernel function need to be initialized, such as width (for Gaussian function), variance, etc. These parameters affect the broadening degree and shape of the kernel function in the frequency domain.
[0158] By alternating optimization, the core function and center frequency of each modal component are iteratively adjusted to maximize the energy of modal decomposition and concentrate it on the main periodic components. This process can be a non-convex optimization problem, using an iterative optimization algorithm (gradient descent method) for parameter adjustment.
[0159] When the results of modal decomposition meet the convergence conditions (the energy capture rate reaches the set threshold or the number of iterations reaches the preset value), the optimization process is stopped and the final modal components are obtained.
[0160] S3, constructing a time window based on the periodicity and frequency of the project cost to be predicted, and performing time serialization on the selected modal components of the cost modal components of several orders based on the time window to obtain an input vector.
[0161] Determine the length of the time window and the sliding step size: First, determine the length of the time window based on the periodicity of the engineering cost data and the forecasting requirements. The length of the time window should be able to capture important periodic changes in the data, such as seasonal changes or the period length of other periodic components.
[0162] At the same time, define the sliding step of the time window, that is, the interval at which the sliding window moves forward each time. The selection of the step should take into account the need to fully cover the periodic characteristics of the data while avoiding excessive overlap or non-overlap between windows, resulting in duplication or omission of information.
[0163] Extract the modal components within the time window: For each time window, extract the data within the corresponding window from the obtained several-order cost modal components.
[0164] The data in each time window may be a portion of the original data in the window, or a portion of the modal component obtained after modal decomposition in the window.
[0165] Time series processing: The modal component data within each time window are arranged in chronological order to form time series data.
[0166] Time series processing can simply arrange the data in each time window into a vector or matrix in chronological order to facilitate subsequent time series modeling or deep learning model input.
[0167] Construct input vectors: Use the time-series data as input vectors. Each time window corresponds to an input vector, which will be used as input to the long short-term memory neural network (LSTM) model.
[0168] The dimension of the input vector depends on the number of selected modal components and the amount of data in each time window. Usually, the data of multiple modal components can be stacked together to form a higher-dimensional input vector to better capture complex periodic changes.
[0169] S4, construct a long short-term memory neural network model: pass the input vector through the preset LSTM layer from the forward and reverse directions respectively to obtain the forward hidden state sequence and the reverse hidden state sequence, and finally concatenate the forward and reverse hidden state sequences to obtain the output sequence.
[0170] First, the time-series input vectors generated in the previous step are used as inputs to the LSTM model. Each input vector contains modal component data within several time windows;
[0171] The input vector is input into the preset forward and backward LSTM layers respectively.
[0172] The forward LSTM layer processes the data of the input vector in chronological order, while the reverse LSTM layer processes the data of the input vector in reverse chronological order.
[0173] The forward LSTM layer and the backward LSTM layer calculate their hidden state sequences respectively. The hidden state sequence of each LSTM layer is a time series, in which each time step has a hidden state vector.
[0174] The hidden state sequences calculated by the forward LSTM layer and the reverse LSTM layer are concatenated by time step. Specifically, the hidden state vector of the forward LSTM layer and the hidden state vector of the reverse LSTM layer at each time step are concatenated together to form a longer hidden state sequence.
[0175] The concatenated hidden state sequence is used as the final output sequence. This sequence comprehensively considers the information of the forward and reverse LSTM layers, thereby being able to more comprehensively capture the temporal dependencies and periodic features in the input vector.
[0176] The formula for the LSTM layer is as follows:
[0177]
[0178] In the formula, i t 、f t 、a t They are input gate, output gate and forget gate respectively; c t represents the long-term memory of the cell state, η and tanh are activation functions, and h t-1 is the output of the previous stage, w ix 、w fx 、w cx 、w ax 、w ih 、w fh 、w ch 、w ah are the corresponding weights to be trained, b i , b f , b c , b a is the bias term.
[0179] S5, initialize the long short-term memory neural network model, train the training set through the initialized long short-term memory neural network model, and continuously adjust the parameters for optimization iteration. When the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or reaches the maximum number of iterations, terminate the iteration to obtain the optimal engineering cost prediction model.
[0180] S6, inputting the engineering cost data to be predicted into the engineering cost model, obtaining a plurality of prediction sequences with different frequencies, and visualizing the plurality of prediction sequences with different frequencies as a time curve.
[0181] S7, comparing the multiple time curves, and selecting the curve that best suits the cost forecasting requirement for cost forecasting.
[0182] Detect periodic components in each curve using periodic analysis methods (such as Fourier transform or autocorrelation function);
[0183] Compare the prediction model performances corresponding to different curves by prediction error and fit;
[0184] Based on the above analysis results, combined with the actual business background and needs of engineering cost forecasting, the most suitable engineering cost time curve is selected as the final forecast basis and cost forecasting is carried out to obtain the engineering cost forecast results.
[0185] The present invention has the following characteristics:
[0186] Adapting to periodicity and frequency changes: VMD (Variational Mode Decomposition) can effectively decompose complex construction cost data into multiple modal components, each with different frequency and amplitude characteristics; this enables the model to better adapt to periodic changes in the data, including seasonality, long-term trends, etc.
[0187] Multi-scale representation of data: VMD can capture the important components of data at different frequency resolutions by optimizing the decomposition process. This multi-scale representation helps to more fully understand the structure and dynamic changes of the data.
[0188] Flexibility and interpretability of the model: By setting the appropriate number of modal components K and regularization parameters, the complexity and interpretability of the model can be controlled. A smaller K may emphasize the main frequency components in the data, while a larger KKK can provide a more detailed frequency decomposition.
[0189] Reducing information redundancy and noise interference: VMD considers the regularization parameter λ during the decomposition process, which helps reduce the model’s sensitivity to noise and unnecessary details and improves the robustness and robustness of the prediction model.
[0190] Improved prediction accuracy: By effectively extracting and representing periodic components, VMD can provide more informative input features for subsequent prediction models. This helps improve the accuracy and predictive power of project cost prediction.
[0191] Verification in scientific and engineering practice: VMD, as a technology based on signal processing theory, has been verified and applied in many engineering and scientific fields. Its advantages include good ability to extract signal features and effective modeling of actual data change patterns.
[0192] The advantages of choosing core functions (such as Gaussian function and Mexican hat function) are mainly reflected in the following aspects:
[0193] Flexibility of frequency response characteristics: The core function can be selected according to the frequency distribution characteristics of the data. For example, the Gaussian function has a wide response characteristic in the spectrum and is suitable for capturing a wide range of frequency components; while the Mexican hat function is more suitable for capturing local high-frequency and low-frequency components. Selecting an appropriate core function can effectively extract information of different frequencies in the data, thereby better characterizing the periodic changes of the original data.
[0194] Strong adaptability: Different core functions are suitable for different types of data and periodic features. For example, if the data has multiple obvious frequency components or the frequency changes greatly, the Gaussian function can be selected to cover a wider frequency range; when finer frequency resolution is required, the Mexican hat function can better capture local frequency details.
[0195] Data smoothness and resolution: The choice of core function will also affect the smoothness and resolution of the modal components. The Gaussian function usually produces smoother modal components and is suitable for relatively stable periodic components, while the Mexican hat function tends to capture sharp changes and local frequency fluctuations, and can provide higher frequency resolution.
[0196] Theoretical support and practical experience: Gaussian function and Mexican hat function, as commonly used core functions, have been widely used and verified in signal processing and spectrum analysis. They not only have a solid theoretical basis, but also have been proven in practical applications to be able to effectively handle various types of frequency distribution and periodic characteristics.
[0197] Therefore, choosing an appropriate kernel function is crucial for variational mode decomposition (VMD) or similar spectral decomposition methods, which directly affects the model's ability to extract and decompose periodicity and frequency information in the original data, thus providing a good foundation for subsequent time series analysis and predictive modeling.
[0198] The process of time-seriesizing modal components by building time windows based on periodicity and frequency has the following advantages:
[0199] Capturing cyclical features: The time window setting can effectively capture the cyclical features in the engineering cost data, such as seasonal changes, long-term trends, etc. By adjusting the length of the time window and the sliding step size, it can flexibly adapt to different cyclical changes.
[0200] Reduce data dimensionality and complexity: Time series processing of modal components within each time window helps reduce the dimensionality and complexity of the data. The processed data can be more easily used for modeling and analysis, reducing the complexity of the original data while retaining important periodic information.
[0201] Improve model prediction accuracy: Time series data can better meet the needs of time series models, such as deep learning models such as LSTM. These models can utilize the time dependency and periodicity characteristics in time series to improve prediction accuracy and model generalization ability.
[0202] Enhance the interpretability of the model: The modal decomposition and time series process can help understand the contribution and impact of different periodic components in the construction cost data. By analyzing the modal components within each time window, the reasons and trends of the changes in construction cost can be explained more clearly.
[0203] Adapt to different forecasting needs: The length of the time window and the sliding step can be adjusted and optimized according to the forecasting needs and data characteristics. This flexibility allows the method to cope with data changes of different frequencies and periods, thereby better adapting to the needs of actual engineering cost forecasting.
[0204] In summary, constructing time windows based on periodicity and frequency and performing time series processing on modal components can not only effectively extract and utilize the periodic information in engineering cost data, but also provide more reliable and effective data input for subsequent modeling and prediction, thereby enhancing the accuracy and practicality of the prediction model.
[0205] It should be noted that the long short-term memory neural network (LSTM) is a special type of recurrent neural network (RNN) designed specifically to process and predict time series data. Compared with traditional RNN, LSTM can effectively solve the gradient vanishing and gradient exploding problems in traditional RNN by introducing gating mechanisms (such as input gate, forget gate and output gate), so as to better capture and long-term memorize the dependencies in time series. The memory units in the LSTM network structure can retain information over a long period of time, making it excellent in processing long sequences and learning time dependencies. Therefore, it is widely used in speech recognition, natural language processing, time series prediction and other fields.
[0206] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An intelligent prediction method for construction cost based on long short-term memory neural network, characterized in that: The steps include: Step S1, obtaining the engineering cost data of the power grid project, and dividing the engineering cost data into a training set and a validation set after standardization, wherein the engineering cost data includes engineering settlement data, material price inquiry data, and the cycle and frequency of engineering cost forecasting demand; Step S2, performing variational modal decomposition on the training set to obtain cost modal components of several orders; Step S3, constructing a time window based on the periodicity and frequency of the project cost to be predicted, and performing time serialization on cost modal components of several orders based on the time window to obtain an input vector; Step S4, constructing a long short-term memory neural network model, passing the input vector through the preset LSTM layer from the forward and reverse directions respectively, obtaining a forward hidden state sequence and a reverse hidden state sequence, and concatenating the forward and reverse hidden state sequences to obtain an output sequence; Step S5, initialize the long short-term memory neural network model, and use the training set to train the model, continuously adjust the model parameters to perform optimization iterations, and terminate the iteration when the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or reaches the maximum number of iterations, and obtain the final project cost prediction model; S6, inputting the engineering cost data to be predicted into the engineering cost prediction model, obtaining a plurality of prediction sequences with different frequencies, visualizing the plurality of prediction sequences with different frequencies as a time curve, and obtaining the engineering cost prediction result.
2. The intelligent prediction method for construction cost based on long short-term memory neural network according to claim 1 is characterized in that: In step S1, the engineering settlement data and material price inquiry data related to the engineering cost are standardized by adopting mean standardization, and the process of the standardization is as follows: First, calculate the mean of the data, then calculate the features of the data, and finally combine the mean and features for mean normalization: In the formula, y i is the standardized construction cost data of the ith project, x i is the i-th engineering cost data, and n is the total amount of engineering cost data.
3. The intelligent prediction method for construction cost based on long short-term memory neural network according to claim 1 is characterized in that: The step S2, performing variational modal decomposition on the training set to obtain cost modal components of several orders, includes the following steps: The engineering cost data of the training set is represented as a one-dimensional time series y(t) = [y1, y2, y3…y N ], where N is the length of the time series; The number of modal components is set according to the period and frequency required for project cost forecasting, and is mapped into the regularization parameter; Initialize the frequency kernel function and center frequency of each modal component; Perform alternating optimization steps to iteratively optimize the frequency core function and center frequency until convergence or the preset number of iterations is reached to obtain the final modal components.
4. The intelligent prediction method for construction cost based on long short-term memory neural network according to claim 3 is characterized in that: The method of setting the number of modal components according to the period and frequency required for project cost prediction and mapping the regularization parameters includes the following steps: Analyze the periodicity and frequency characteristics of engineering cost data; Estimate the main frequency resolutions that need to be captured based on forecast requirements and data characteristics; Select an appropriate K based on the forecast requirements and estimated frequency resolution; Set a regularization parameter and map the modal components into the regularization parameter.
5. The intelligent prediction method for construction cost based on long short-term memory neural network according to claim 3 is characterized in that: During the alternating optimization steps, the objective function is: In the formula, st∑B represents the solution that minimizes A when condition B is satisfied; δ(n) is the Dirichlet function; σ n {·} is the pair x i (n) A single-sided spectrum obtained by performing a Hilbert transform; {x i } and {ω i } represents the set of modal components and their corresponding center frequencies, and the decomposition scale is K, which is the number of components obtained by decomposition; * represents convolution; ∑ i x i represents the sum of all modal components; represents the square norm of the gradient, j is the imaginary part, n is the number of engineering cost data, and x(n) is the data component; The objective function after removing the constraints is: In the formula, L({B k },{A k },σ) is the unconstrained variational model, G(t) is the original input signal, σ(t) is the Lagrange multiplier, and α is the penalty factor; The convergence conditions are: In the formula, yes The Fourier transform of is the update mode, and m is the number of iterations.
6. The intelligent prediction method for construction cost based on long short-term memory neural network according to claim 1 is characterized in that: The step S3, constructing a time window based on the periodicity and frequency of the project cost to be predicted, time-sequencing several orders of cost modal components based on the time window to obtain an input vector, includes the following steps: Determine the length of the time window and the sliding step size: Determine the length of the time window and define the sliding step size of the time window based on the periodicity and forecasting requirements of the project cost data; Extracting modal components within the time window: For each time window, extract the data within the corresponding window from the obtained several-order cost modal components; Time series processing: The modal component data in each time window are arranged in chronological order to form time series data; Construct input vector: Use the time-series data as the input vector.
7. The intelligent prediction method for construction cost based on long short-term memory neural network according to any one of claims 1 to 6, characterized in that: The step S4, constructing a long short-term memory neural network model, passing the input vector through the preset LSTM layer from the forward and reverse directions respectively, obtaining a forward hidden state sequence and a reverse hidden state sequence, and splicing the forward and reverse hidden state sequences to obtain an output sequence, includes the following steps: According to the time-series input vectors generated in the previous step, as the input of the LSTM model, each input vector contains modal component data within several time windows; The input vector is input into the preset forward LSTM layer and reverse LSTM layer respectively. The forward LSTM layer processes the data of the input vector in chronological order, while the reverse LSTM layer processes the data of the input vector in reverse chronological order. The forward LSTM layer and the reverse LSTM layer calculate their hidden state sequences respectively; The hidden state sequences calculated by the forward LSTM layer and the reverse LSTM layer are concatenated by time step, and the hidden state vectors of the forward LSTM layer and the reverse LSTM layer at each time step are connected together to form a longer hidden state sequence; The concatenated hidden state sequence is used as the final output sequence.
8. The intelligent prediction method for construction cost based on long short-term memory neural network according to claim 7 is characterized in that: The formula for the LSTM layer is: In the formula, i t 、f t 、a t They are input gate, output gate and forget gate respectively; c t represents the long-term memory of the cell state, η and tanh are activation functions, and h t-1 is the output of the previous stage, w ix 、w fx 、w cx 、w ax 、w ih 、w fh 、w ch 、w ah are the corresponding weights to be trained, b i , b f , b c , b a is the bias term.
9. The intelligent prediction method for construction cost based on long short-term memory neural network according to any one of claims 1 to 6, characterized in that: The method of visualizing a plurality of prediction sequences of different frequencies as a time curve to obtain a project cost prediction result comprises the following steps: The periodic components in each curve were detected using periodic analysis methods; Compare the performance of different curves by prediction error and goodness of fit; Combined with the actual business background and needs of engineering cost forecasting, the most suitable engineering cost time curve is selected as the final forecast basis and cost forecasting is carried out to obtain the engineering cost forecast results.
10. An intelligent prediction device for construction cost based on long short-term memory neural network, characterized in that: include: The data acquisition module is used to obtain the engineering cost data of the power grid project, and divide the engineering cost data into a training set and a validation set after standardization. The engineering cost data includes engineering settlement data, material price inquiry data, and the cycle and frequency of engineering cost forecast demand; The modal decomposition module is used to perform variational modal decomposition on the training set to obtain cost modal components of several orders; A time series module is used to construct a time window based on the periodicity and frequency of the project cost to be predicted, and to perform time series on several orders of cost modal components based on the time window to obtain an input vector; The model building module is used to build a long short-term memory neural network model. The input vector passes through the preset LSTM layer in both the forward and reverse directions to obtain a forward hidden state sequence and a reverse hidden state sequence, and the forward and reverse hidden state sequences are concatenated to obtain an output sequence. The model training module is used to initialize the long short-term memory neural network model, and use the training set to train the model, and continuously adjust the model parameters for optimization iteration. When the difference between the output sequence of the previous iteration and the current iteration is less than the preset iteration termination value or the maximum number of iterations is reached, the iteration is terminated to obtain the final project cost prediction model; The cost prediction module is used to input the engineering cost data to be predicted into the engineering cost prediction model, obtain multiple prediction sequences with different frequencies, visualize the multiple prediction sequences with different frequencies as time curves, and obtain the engineering cost prediction results.
