Building cost prediction method and system based on neural network
Through the combination of BP neural network and dynamic scaling module, the problems of low cost efficiency and insufficient prediction capabilities of traditional manual computing are solved, efficient and accurate construction cost prediction is achieved, and staff's decision-making support capabilities and project economic benefits are improved.
Patent Information
- Application Number
- CN202411141608.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional manual calculation of building cost is inefficient, error-prone and difficult to accurately predict the cost of complex construction projects, especially when facing new materials, new technologies and new processes.
Using the building cost prediction method based on BP neural network, the construction cost prediction method is adopted to collect factor data such as building area, structure, materials, and management, and combine the actual cost data to build and train the neural network model, and integrate dynamic scaling modules to adapt to market price fluctuations and improve the prediction. Accuracy and generalization ability.
It achieves efficient and accurate construction cost forecasts, provides valuable decision-making support, helps staff evaluate cost risks and return on investment, and improves work efficiency and project economic benefits.
Smart Images

Figure CN118967198A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of construction engineering technology, in particular to the application of neural network technology in the field of construction cost, and in particular to a construction cost prediction method and system based on neural network. Background Art
[0002] Construction cost is an important part of construction project management. It involves the estimation, calculation and control of the costs required for the entire process of construction project from planning, design, construction to completion.
[0003] Although manual cost calculation has been the main method of construction cost management for a long time in the past, as the scale and complexity of construction projects continue to increase, traditional manual cost calculation has gradually exposed the following technical defects:
[0004] (1) Inefficiency: Traditional manual cost calculation requires a lot of time and manpower to calculate and summarize the project quantity, material prices, labor costs, etc. This method is not only inefficient, but also prone to errors, resulting in inaccurate cost results.
[0005] (2) Insufficient forecasting ability: Since manual cost calculation relies on experience and historical data, it is often difficult to accurately forecast complex and ever-changing construction projects. In particular, when faced with new materials, new technologies and new processes, traditional manual cost calculation methods are even more inadequate.
[0006] To this end, the present invention proposes a construction cost prediction method and system based on neural network. Summary of the invention
[0007] In view of this, the embodiment of the present invention hopes to provide a construction cost prediction method and system based on a neural network to solve or alleviate the technical problems existing in the prior art, that is, how to efficiently predict the construction cost so as to provide decision support for staff and at least provide a beneficial option for this; the technical solution of the present invention is implemented as follows:
[0008] First, the construction cost prediction method based on neural network:
[0009] 1. Overview:
[0010] The present invention aims to solve the above technical problems. By using BP neural network to predict the construction cost, by collecting and analyzing multiple types of influencing factor data such as building area, building structure, building materials, basic building parameters and building management, and combining actual cost data as output targets, a neural network model is constructed and trained. At the same time, a dynamic scaling module is integrated to adapt to the characteristics of different construction projects and improve the accuracy and generalization ability of the prediction. Finally, the trained model is applied to new construction projects to achieve effective prediction of construction costs.
[0011] (II) Technical solution:
[0012] To achieve the above technical objectives, this solution needs to execute the following steps S1 to S3.
[0013] 2.1 Step S1, Data Engineering:
[0014] Collect influencing factor data: including building area factor a, building structure factor b, building material factor c, building parameter d and building management factor e, and construct them into input vector x and data set D. At the same time, collect the corresponding actual cost data y as the output target of the model:
[0015] The input vector x is: x = [a, b, c, d, e] T ;
[0016] Where T stands for transpose, which converts the row vector into a column vector.
[0017] The data set D is: D = {(x1, y1), (x2, y2), ..., (x n ,y n )};
[0018] Where n is the number of samples (x i ,y i ) quantity.
[0019] Then, regular data cleaning can be performed to remove duplicate, erroneous or abnormal data records.
[0020] 2.2 Step S2, read the BP neural network structure:
[0021] The sigmoid activation function is used in conjunction with the BP neural network structure for calculation. At the same time, the dynamic scaling logic designed according to the characteristics of the influencing factors is read. The dynamic scaling logic is to dynamically adjust the price factor according to market price fluctuations.
[0022] 2.2.1 Step S200, BP neural network structure:
[0023] 1) The number of neurons in the input layer is the same as the number of influencing factors, that is, 5;
[0024] 2) Hidden layer: M hidden layer nodes, the activation function is the sigmoid function, then the output of the hidden layer is:
[0025]
[0026] Among them, w ij is the weight from the input layer to the hidden layer, b j is the bias of the hidden layer node, is the sigmoid activation function.
[0027] 3) The number of neurons in the output layer is equivalent to the predicted construction cost, that is, 1; the predicted value y of the output layer is:
[0028]
[0029] Among them, v jk is the weight from the hidden layer to the output layer, c k is the bias of the output layer nodes.
[0030] 2.2.2 Step S201, integrating dynamic scaling module:
[0031] Assuming the market price volatility coefficient is α, the adjusted output is y′=α·y.
[0032] 2.3 Model training:
[0033] Although the above step S2 uses a BP neural network, the model needs to be trained before it can be used in practice. The training method includes:
[0034] 2.3.1 Division:
[0035] Construct a data set D and randomly divide it into k subsets of equal size, namely D1, D2, ..., D k
[0036] 2.3.2 Loop execution:
[0037] 1) Select D i As the test set D test , and the remaining subsets are combined as training set D train ;
[0038] 2) Use mean square error as the loss function E:
[0039]
[0040] Among them, t k is the target output, y k is the actual output of the network.
[0041] Then, the weights and biases are updated by gradient descent to minimize the loss function E.
[0042] 3) Use the test set D test Test the trained BP neural network model and record the recall rate.
[0043] 4) Calculate the average of k test results as the final evaluation of model performance.
[0044] 5) After the model converges or reaches the predetermined number of iterations, stop training. And select the weight v that minimizes the loss function E jk , bias c k , weight w ij , bias b j , the number of nodes N and the number of hidden layer nodes M are taken as the optimal model parameters.
[0045] 2.4 Step S3, model application:
[0046] Input new construction project influencing factor data into the model to make construction cost forecasts.
[0047] Predicted construction cost: y'=NN(x), where NN represents the trained BP neural network model.
[0048] (III) Mechanism for solving technical problems:
[0049] The present invention covers multiple influencing factors such as building area, building structure, building materials, basic building parameters and building management, ensuring that the prediction model can comprehensively consider various key factors. The number of input layer neurons is determined according to the number of influencing factors, and the output layer is set to a single neuron to output the predicted building cost. The number of hidden layers and the number of neurons in each layer are determined through experiments to balance the complexity of the model and the prediction performance.
[0050] At the same time, for factors such as price factors that are greatly affected by market fluctuations, a dynamic scaling module is integrated to dynamically adjust the input data according to market price fluctuations, thereby improving the model's sensitivity to market price changes.
[0051] The model is trained using batch gradient descent or other efficient optimization algorithms, and the weight and bias parameters are optimized by continuously iterating to reduce the loss function value. At the same time, the model performance is evaluated using methods such as cross-validation to select the optimal model parameters. Since the BP neural network has strong nonlinear mapping and generalization capabilities, it can capture the complex relationship between influencing factors and construction costs, and thus can achieve high-precision predictions.
[0052] The forecast results can provide valuable reference information for staff, helping them to more accurately assess the cost risks and investment returns of construction projects, so as to make more scientific and reasonable decisions. For example, in the bidding process, accurate cost forecasts can help to formulate more competitive quotation strategies; in the construction stage, resources can be reasonably arranged according to the forecast results. Schedule plan, effectively control costs.
[0053] Second, the construction cost prediction system based on neural network:
[0054] like Figure 2As shown, the system includes a processor and a register coupled to the processor, wherein the register stores program instructions, and when the program instructions are executed by the processor, the processor executes the construction cost prediction method as described above.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] 1. Improve prediction accuracy: The solution of the present invention covers multiple influencing factors such as building area, building structure, building materials, basic building parameters and building management, ensuring that the prediction model can comprehensively consider various key factors, thereby improving the accuracy of the prediction. For factors such as price factors that are greatly affected by market fluctuations, the present invention integrates a dynamic scaling module to dynamically adjust the input data according to market price fluctuations, so that the model can more accurately reflect the impact of market price changes on construction costs.
[0057] 2. Enhance decision-making support capabilities: The forecast results provide valuable reference information for staff, helping them to more accurately assess the cost risks and investment returns of construction projects, so as to make more scientific and reasonable decisions. Through accurate cost forecasts, staff can reasonably arrange resource inputs and schedules, effectively control costs, and improve the economic benefits of the project.
[0058] 3. Improve work efficiency: The trained BP neural network model has the ability to quickly predict and can process the data of the influencing factors of new construction projects and output the prediction results in a short time, which greatly improves work efficiency. The data processing and model prediction processes in the solution can be automated, reducing manual intervention and repetitive work, and further improving work efficiency.
[0059] 4. Promote intelligent development: Through accurate construction cost forecasting, construction companies can formulate quotation strategies and control costs more accurately, thereby improving their competitiveness in the market. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0062] Figure 2 It is a schematic diagram of the system composition of the present invention. DETAILED DESCRIPTION
[0063] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;
[0064] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0065] Embodiment 1: Figure 1 As shown, this embodiment discloses a construction cost prediction method based on a neural network, which includes the following steps S1 to S3.
[0066] In this embodiment, regarding step S1, data engineering: collecting influencing factor data is the key to building a prediction model. In this technical solution, we consider five main influencing factors: building area factor a, building structure factor b, building material factor c, building parameter d and building management factor e.
[0067] These influencing factors are constructed into an input vector x, that is, x = [a, b, c, d, e] T , where T stands for transpose, which converts the row vector into a column vector. This representation makes the data more structured and easier to process and analyze.
[0068] At the same time, we also need to collect the corresponding actual cost data y as the output target of the model. The actual cost data is the "label" in the model training process, which is used to guide the model to learn how to predict the construction cost from the input vector x.
[0069] The input vector x and the actual cost data y are combined into a data set D, that is,
[0070] D={(x1,y1),(x2,y2),…,(x n ,y n )}, where n is the number of samples (x i ,y i ). Dataset D is the basis for model training and contains all the information required for model learning.
[0071] After constructing the dataset D, regular data cleaning is required. The purpose of data cleaning is to remove duplicate, erroneous or abnormal data records to improve the quality of the data and the prediction accuracy of the model. For example, for duplicate records, we can choose to keep one and delete the rest; for erroneous or abnormal records, we can correct or delete them according to certain rules.
[0072] Furthermore, the Python execution program of step S1 is as follows:
[0073]
[0074]
[0075] In the above program, the pandas library is used to read the data in the CSV file, which contains all the necessary columns, namely, the influencing factors and the actual cost. The influencing factor data is extracted from the read data to construct the input vector x, and the actual cost data is extracted as the output target y. This cleans the data to remove duplicate, erroneous or abnormal data records. After cleaning, x and y constitute our dataset, which can be used for subsequent model training.
[0076] In this embodiment, regarding step S2, the BP neural network structure is read:
[0077] The sigmoid activation function is used in conjunction with the BP neural network structure for calculation. At the same time, the dynamic scaling logic designed according to the characteristics of the influencing factors is read. The dynamic scaling logic is to dynamically adjust the price factor according to market price fluctuations.
[0078] Specifically, in step S200, the BP neural network structure is:
[0079] 1) The number of neurons in the input layer is the same as the number of influencing factors, that is, 5. These 5 neurons correspond to the building area factor, building structure factor, building material factor, building parameter and building management factor respectively. This design ensures that the neural network can fully receive and process all key influencing factor information.
[0080] 2) Hidden layer: The hidden layer contains M nodes, each of which uses the sigmoid activation function. The sigmoid function has nonlinear characteristics and can help neural networks learn complex patterns and data relationships. The output of the hidden layer is obtained by weighted summing and adding a bias, and then applying the sigmoid function:
[0081]
[0082] Among them, w ij is the weight from the input layer to the hidden layer, b jis the bias of the hidden layer node, is the sigmoid activation function.
[0083] 3) The number of neurons in the output layer is 1, corresponding to the predicted construction cost. The output of the output layer is obtained by weighted summing the output of the hidden layer and adding the bias, and then applying the sigmoid function again to get the predicted construction cost:
[0084]
[0085] Among them, v jk is the weight from the hidden layer to the output layer, c k is the bias of the output layer nodes.
[0086] Specifically, step S201 integrates a dynamic scaling module: assuming that the market price fluctuation coefficient is α, which is a dynamically changing parameter that is adjusted according to the market price fluctuation. Multiply the predicted value y output by the neural network by the market price fluctuation coefficient α to obtain the adjusted predicted value y'. In this way, the predicted value can be dynamically adjusted according to the market price fluctuation, which is more in line with the actual market situation.
[0087] It is understandable that by designing the number of input layer neurons to be the same as the number of influencing factors, it ensures that all key influencing factors are fully considered, improving the accuracy of the prediction. The hidden layer uses the sigmoid activation function, which gives the neural network nonlinear learning ability, enabling it to handle complex data relationships and patterns. By integrating the dynamic scaling module, the predicted value can be dynamically adjusted according to market price fluctuations, improving the real-time and accuracy of the prediction. This helps staff better grasp market dynamics and make more informed decisions.
[0088] Furthermore, the Python execution program of step S2 is as follows:
[0089]
[0090]
[0091]
[0092] In the above program: a neural network is defined with an input layer, a hidden layer, and an output layer. The number of neurons in the input layer is the same as the number of influencing factors (5), and the number of neurons in the output layer is 1, corresponding to the predicted construction cost. The weights and biases are initialized with random numbers, which is the starting point for neural network training.
[0093] The forward propagation algorithm is defined to calculate the output of the neural network. The input data is first linearly transformed through the weights and biases of the input layer to the hidden layer, and then the sigmoid activation function is applied. Next, the output of the hidden layer is linearly transformed through the weights and biases of the hidden layer to the output layer, and the sigmoid activation function is applied again to get the final predicted value.
[0094] A market price volatility coefficient alpha is defined to dynamically adjust the predicted value of the neural network. In this way, the predicted value can be adjusted in real time according to market price fluctuations, which is more in line with the actual market situation.
[0095] A prediction function is defined, which accepts input data, obtains the predicted value through the forward propagation algorithm, and applies dynamic scaling logic to obtain the predicted construction cost considering the market price fluctuations.
[0096] In this embodiment, regarding step S3, model application: for new construction projects, collect their influencing factor data, which should be consistent with the data format and range used when training the model. The influencing factor data may include various factors such as building area, geographical location, building material cost, building complexity, etc. The prepared influencing factor data of the new construction project is used as input feature x and input into the trained BP neural network model NN.
[0097] The predicted construction cost y' is calculated by the forward propagation algorithm of the BP neural network model. The predicted construction cost y' is calculated by the model based on the input feature x and the learned weights and biases.
[0098] It can be understood that the BP neural network model NN has learned the mapping relationship between the input feature x and the output label y (actual construction cost) through the training process. When the influencing factor data of a new construction project is input, the model can calculate the predicted construction cost y' based on this mapping relationship through the forward propagation algorithm. The predicted construction cost y' is a manifestation of the model's generalization ability for the current input feature x, that is, the model can apply the learned knowledge to new and unseen data.
[0099] The BP neural network model can quickly predict the cost of new construction projects without tedious manual calculations or relying on empirical judgment. Since the model is learned from a large amount of training data, it can capture the complex factors that affect the construction cost and give relatively accurate prediction results. The predicted construction cost can provide decision-making support for staff, helping them better control costs, budget planning and project management.
[0100] Furthermore, the Python execution program of step S3 is as follows:
[0101]
[0102]
[0103] In the above program: W1, b1, W2, b2 are the parameters of the BP neural network model that have been obtained through the training process, which respectively represent the weight matrix from the input layer to the hidden layer, the bias vector of the hidden layer, the weight matrix from the hidden layer to the output layer, and the bias vector of the output layer.
[0104] The forward_propagation function implements the forward propagation algorithm of the BP neural network. It accepts the new construction project influencing factor data new_project_data as input, as well as the model parameters W1, b1, W2, b2. Through calculation, the predicted construction cost predicted_cost is obtained.
[0105] Prediction process: Input the new construction project impact factor data new_project_data into the forward_propagation function. The function calculates the predicted construction cost through the forward propagation algorithm based on the input data and model parameters. Finally, the prediction result is output.
[0106] Embodiment 2: Although the BP neural network is used in Embodiment 1, the model needs to be trained before it can be used in practice. The training method includes:
[0107] The first step is to divide:
[0108] Construct a data set D and randomly divide it into k subsets of equal size, namely D1, D2, ..., D k ; This data set contains multiple samples, each of which has corresponding input (influencing factor) and output (actual cost).
[0109] The second step is loop execution:
[0110] 1) Select D i As the test set D test , and the remaining subsets are combined as training set D train ;
[0111] 2) Use mean square error as the loss function E:
[0112]
[0113] Among them, t k is the target output, y k is the actual output of the network.
[0114] Then, the weights and biases are updated by the gradient descent method to minimize the loss function E. By continuously iteratively updating the weights and biases, the predicted output of the network becomes closer and closer to the actual output.
[0115] 3) Use the test set D test Test the trained BP neural network model and record the recall rate.
[0116] 4) Calculate the average of k test results as the final evaluation of model performance.
[0117] It is understandable that through cross-validation, we can more comprehensively evaluate the performance of the model because each subset has the opportunity to be used as a test set. The mean squared error is used as the loss function because it is a commonly used loss function for regression tasks that measures the difference between the predicted value and the actual value.
[0118] The third step is to stop training after the model converges (i.e., the loss function E no longer decreases significantly) or reaches a predetermined number of iterations. And select the weight v that minimizes the loss function E jk , bias c k , weight w ij , bias b j , the number of nodes N and the number of hidden layer nodes M are taken as the optimal model parameters.
[0119] Model convergence means that the neural network has learned the rules in the data set, and the weights and biases have stabilized. The parameters that minimize the loss function are selected as the optimal parameters because these parameters can make the model's predicted output closest to the actual output, thereby improving the model's prediction accuracy.
[0120] Furthermore, the Python execution program of the training method of this embodiment is as follows:
[0121]
[0122]
[0123]
[0124]
[0125] In the above program: the KFold class of the sklearn library is used to perform k-fold cross validation, and the recall_score function is used to calculate the recall rate.
[0126] The above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0127] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0128] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Claims
1. A construction cost prediction method based on a neural network, characterized in that: The steps include: S1, collect the influencing factor data to construct the input vector x and data set D, and collect the corresponding actual cost data y as the output target of the model; S2 uses the sigmoid activation function in conjunction with the BP neural network structure for calculations, and reads the dynamic scaling logic designed based on the characteristics of the influencing factors, and dynamically adjusts the price factor based on market price fluctuations; S3, input new construction project influencing factor data into the model to make construction cost prediction.
2. The construction cost prediction method according to claim 1, characterized in that: In S1, the influencing factor data includes building area factor a, building structure factor b, building material factor c, building parameter d and building management factor e.
3. The construction cost prediction method according to claim 2, characterized in that: The input vector x is: x = [a, b, c, d, e] T ; Where T represents transpose; The data set D is: D = {(x1, y1), (x2, y2), ..., (x n ,y n )}; where n is the sample (x i ,y i ) quantity.
4. The construction cost prediction method according to claim 2, characterized in that: In S2, the structure of the BP neural network is: The number of neurons in the input layer is the same as the number of influencing factors, that is, 5; The hidden layer has a total of M hidden layer nodes, and the activation function is the sigmoid function The number of neurons in the output layer is equivalent to the predicted construction cost, which is 1.
5. The construction cost prediction method according to claim 4, characterized in that: In the hidden layer, its output is: Among them, w ij is the weight from the input layer to the hidden layer, b j is the bias of the hidden layer node, is the sigmoid activation function.
6. The construction cost prediction method according to claim 5, characterized in that: In the output layer, the output is: Among them, v jk is the weight from the hidden layer to the output layer, c k is the bias of the output layer nodes.
7. The construction cost prediction method according to claim 4, characterized in that: In S2, assuming that the market price fluctuation coefficient is α, the adjusted output is y′=α·y.
8. The construction cost prediction method according to claim 6, characterized in that: The training method of the BP neural network model described in S2 is to select the weight v that minimizes the loss function E. jk , bias c k , weight w ij , bias b j , the number of nodes N and the number of hidden layer nodes M are taken as the optimal model parameters.
9. The construction cost prediction method according to claim 1, characterized in that: In S3, the predicted construction cost is: y'=NN(x), where NN represents the trained BP neural network model.
10. The construction cost prediction system based on neural network is characterized by: The system includes a processor and a register coupled to the processor, wherein the register stores program instructions, and when the program instructions are executed by the processor, the processor executes the construction cost prediction method as described in any one of claims 1-9.
Citation Information
Cited By
Urban pipe network management system and method based on GIS
CN119830385A
