Intelligent project cost prediction method and device and electronic equipment
By constructing a knowledge graph and using a generative adversarial network for training, the problem of data correlation being ignored in existing engineering cost prediction methods is solved, and highly accurate and efficient cost prediction is achieved.
Patent Information
- Application Number
- CN202510721806.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing construction cost forecasting methods rely on empirical estimation or basic statistical analysis, ignoring the correlation between data, resulting in low forecast accuracy.
By acquiring historical engineering data, performing keyword extraction, entity recognition, and relationship extraction, a knowledge graph is constructed, and adversarial training is performed using the generator network and the discriminator network to generate high-quality cost data samples.
It improves the accuracy and efficiency of engineering cost forecasting, can automatically analyze and understand large amounts of complex historical engineering data, has a high degree of accuracy and adaptability, and supports cost forecasting and management of engineering projects.
Smart Images

Figure CN120634602A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and specifically to an intelligent engineering cost prediction method, device and electronic equipment. Background Art
[0002] With the rapid development of the global construction industry and the increasing number of engineering projects, accurate cost forecasting has become increasingly important. Accurate cost forecasting not only helps companies develop more effective budget plans, but also reduces resource waste and improves project economics. Furthermore, with advances in data technology, more and more historical project data is becoming available, making it possible to utilize advanced cost forecasting techniques.
[0003] Currently, traditional construction cost forecasting methods rely primarily on empirical estimates or basic statistical analysis, which often overlook the correlations between data. For example, while linear regression and time series analysis are widely used, they have significant shortcomings in handling nonlinear relationships and pattern recognition, resulting in low forecast accuracy.
[0004] Therefore, there is an urgent need for an intelligent engineering cost prediction method, device and electronic equipment. Summary of the Invention
[0005] The present application provides an intelligent engineering cost prediction method, device and electronic equipment, which improves the accuracy of engineering cost prediction.
[0006] In a first aspect of the present application, an intelligent engineering cost prediction method is provided, which includes: obtaining historical engineering data, wherein the historical engineering data includes historical cost data; performing keyword extraction, entity recognition, and relationship extraction on the historical engineering data to obtain target knowledge, and constructing a knowledge graph of the target knowledge in the form of nodes and edges; constructing a generator network, and using conditional data and random noise in the knowledge graph as inputs of the generator network to obtain cost data samples; constructing a discriminator network, and performing adversarial training on the generator network and the discriminator network to obtain target cost data for each scenario.
[0007] By employing the above technical solution, historical engineering data is acquired, keyword extraction, entity recognition, and relationship extraction are performed on it to construct a knowledge graph. Adversarial training is then performed using a generator network and a discriminator network to ultimately generate target cost data for various scenarios. This approach fully leverages the knowledge and patterns inherent in the historical data, making them explicit and structured through the knowledge graph, providing rich conditional information for subsequent data generation. Furthermore, the introduction of a generative adversarial network allows the generator and discriminator to continuously evolve through a game of game theory. The generator learns the distribution characteristics of real data and produces high-quality cost data samples, while the discriminator accurately distinguishes between generated and real data, improving its discriminative capabilities. This alternating training of the two avoids the limitations of a single model while fully leveraging historical data and domain knowledge. Ultimately, target cost data covering various scenarios is generated, providing strong support for cost forecasting and management of engineering projects. This method can automatically analyze and understand large amounts of complex historical engineering data with high accuracy and adaptability. It should also leverage machine learning and artificial intelligence to automatically extract and learn deep relationships between data and dynamically adjust the forecasting model based on real-time market changes. Through this approach, the accuracy and efficiency of project cost forecasting can be significantly improved, thereby better supporting decision-making and budget management.
[0008] Optionally, the generator network is constructed, and the conditional data and random noise in the knowledge graph are used as inputs of the generator network to obtain cost data samples, specifically including: constructing a stacked autoencoder network as the main structure of the generator network; using the conditional data in the knowledge graph as the input layer data of the autoencoder network, and using the random noise as the hidden layer data of the autoencoder network, and generating the cost data samples through the autoencoder network.
[0009] By adopting the above technical solution, a stacked autoencoder network is constructed as the main structure of the generator network, the conditional data in the knowledge graph is used as the input layer data, and random noise is used as the hidden layer data to generate cost data samples. This approach fully utilizes the advantages of the autoencoder network in data compression and feature extraction. By stacking multiple layers, it can learn high-order abstract features of the data, and introduce random noise in the hidden layer, increasing the diversity and randomness of data generation. At the same time, using the conditional data in the knowledge graph as input is equivalent to providing constraints for the generator, making the generated data more consistent with the characteristics and laws of engineering costs. This generator network combining knowledge graphs and autoencoders can generate a large number of high-quality and diverse cost data samples with limited training data, providing sufficient data support for subsequent discriminator training and cost prediction.
[0010] Optionally, the discriminator network is constructed, and the generator network and the discriminator network are subjected to adversarial training to obtain target cost data for each scenario, specifically including: constructing a convolutional neural network composed of multiple convolutional layers and fully connected layers as the main structure of the discriminator network, wherein the convolutional layer is used to extract local features of the input data, and the fully connected layer is used to integrate the local features to obtain classification results; the cost data samples generated by the generator network and the historical cost data are respectively input into the discriminator network for binary classification training to obtain a loss function; the target parameters of the generator network are obtained by minimizing the loss function; under the target parameters, the target cost data of each scenario generated by the generator network is determined.
[0011] By adopting the above technical solution, a convolutional neural network consisting of multiple convolutional layers and fully connected layers is constructed as the main structure of the discriminator network. The cost data samples and historical cost data generated by the generator network are respectively input into the discriminator network for binary classification training to obtain the loss function. The target parameters of the generator network are obtained by minimizing the loss function, and the target cost data for each scenario is finally determined. This approach fully utilizes the advantages of convolutional neural networks in feature extraction and classification tasks. By extracting local features of the data through the convolution layer and integrating these features through the fully connected layer, it can effectively distinguish between generated data and real data. At the same time, through binary classification training and the definition of the loss function, the feedback information of the discriminator is passed to the generator, guiding the generator to optimize its own parameters and improve the authenticity and diversity of the generated data.
[0012] Optionally, the cost data samples generated by the generator network and the historical cost data are respectively input into the discriminator network for binary classification training to obtain a loss function, which specifically includes: marking the cost data samples generated by the generator network as negative samples, and marking the historical cost data as positive samples; randomly mixing the negative samples and the positive samples to obtain a mixed data set; inputting the mixed data set into the discriminator network, and performing binary classification on the mixed data set through the discriminator network to obtain a classification result; based on the classification result, calculating the loss function of the discriminator network, and optimizing the parameters of the discriminator network through the back propagation algorithm to minimize the loss function.
[0013] By employing this technical solution, the cost data samples generated by the generator network are labeled as negative samples, and the historical cost data are labeled as positive samples. These samples are then randomly mixed into a mixed dataset and fed into the discriminator network for binary classification training. This data labeling and random mixing effectively prevents the discriminator from overfitting to a particular type of data, improving its robustness. Simultaneously, based on the discriminator's classification results, a loss function is calculated, and the discriminator parameters are optimized using a backpropagation algorithm to minimize the loss function. This process continuously improves the discriminator's classification performance and enhances its ability to distinguish generated data from real data.
[0014] Optionally, the mixed data set is input into the discriminator network, and the mixed data set is binary-classified by the discriminator network to obtain a classification result, which specifically includes: inputting the mixed data set into the convolutional layer of the discriminator network, extracting local features of the mixed data set through the convolutional layer; passing the local features to the fully connected layer of the discriminator network, and integrating the local features through the fully connected layer; and obtaining the classification result of the mixed data set through the output of the fully connected layer, wherein the classification result includes the probability that each sample in the mixed data set is a positive sample.
[0015] By employing this technical solution, the mixed dataset is input into the convolutional layer of the discriminator network, extracting local features from the data. These local features are then passed to the fully connected layer for integration and classification. Ultimately, the output of the fully connected layer yields the probability that each sample is a positive sample. This approach leverages the strengths of convolutional neural networks in feature extraction and abstraction. Through convolution and pooling operations, it automatically learns local patterns and texture information in the data, capturing key features. Simultaneously, through the nonlinear transformations and combinations of the fully connected layers, these local features are mapped into a high-dimensional space, ultimately yielding a probability value indicating that the sample is a positive sample. Through the collaborative work of the convolutional and fully connected layers, the discriminator can more accurately and comprehensively assess the authenticity of each sample in the mixed dataset, providing strong support for the training of generative adversarial networks.
[0016] Optionally, the keyword extraction, entity recognition and relationship extraction of the historical engineering data to obtain target knowledge specifically include: preprocessing the historical engineering data, the preprocessing including data cleaning, data integration and data transformation; extracting keywords based on the preprocessed historical engineering data, and constructing a keyword dictionary based on the keywords; using named entity recognition technology to identify entities in the historical engineering data; extracting the semantic relationship between the keywords and the entities according to a preset relationship template, constructing a relationship triple, and obtaining the target knowledge.
[0017] By employing the above technical solution, historical engineering data is preprocessed, including data cleaning, data integration, and data transformation, to improve data quality and consistency. Keywords are then extracted from the preprocessed data to construct a keyword dictionary. Named entity recognition (NER) technology is used to identify entities within the data. Semantic relationships between keywords and entities are extracted based on pre-set relationship templates, and relationship triples are constructed to ultimately obtain the target knowledge. This approach, through the steps of data preprocessing, keyword extraction, entity recognition, and relationship extraction, fully exploits the knowledge and information contained in historical engineering data. Data preprocessing removes noise and outliers, improving data usability; keyword extraction automatically identifies important terms and concepts within the data and constructs a domain dictionary; entity recognition identifies key objects and elements within the data; and relationship extraction discovers semantic connections between these entities and constructs relationship triples. Through these steps, unstructured historical engineering data can be transformed into a structured knowledge representation, providing a high-quality data foundation for subsequent knowledge graph construction and data generation.
[0018] Optionally, constructing a knowledge graph of the target knowledge in the form of nodes and edges specifically includes: taking the keywords and the entities as nodes of the knowledge graph, and taking the relationships in the relationship triples as edges connecting the nodes; annotating the nodes and the edges with attributes to obtain target nodes and target edges; and storing the target nodes and the target edges as graph data to form the knowledge graph.
[0019] By adopting the above technical solution, keywords and entities are used as nodes in the knowledge graph, and the relationships in the relationship triples are used as edges connecting the nodes, constructing the basic skeleton of the knowledge graph. These nodes and edges are then annotated with attributes to obtain more complete target nodes and target edges. Finally, these target nodes and target edges are stored as graph data to form a knowledge graph. This approach, with keywords and entities as the core and relationships as the link, organizes scattered data and knowledge into a structured and semantic knowledge graph. Attribute annotation further enriches the information dimension of nodes and edges, enabling the knowledge graph to express more complex and fine-grained domain knowledge.
[0020] In a second aspect of the present application, an intelligent engineering cost prediction device is provided, which includes: an acquisition module and a processing module, wherein: the acquisition module is used to acquire historical engineering data, and the historical engineering data includes historical cost data; the processing module is used to perform keyword extraction, entity recognition and relationship extraction on the historical engineering data to obtain target knowledge, and construct a knowledge graph with the target knowledge in the form of nodes and edges; the processing module is also used to construct a generator network, and use the conditional data and random noise in the knowledge graph as inputs of the generator network to obtain cost data samples; the processing module is also used to construct a discriminator network, and generate adversarial training between the generator network and the discriminator network to obtain target cost data for each scenario.
[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device performs any of the methods described above.
[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions. When the instructions are executed, any one of the methods described above is executed.
[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By acquiring historical engineering data, performing keyword extraction, entity recognition, and relationship extraction on it, a knowledge graph is constructed. Adversarial training is then performed using a generator network and a discriminator network to ultimately obtain target cost data for various scenarios. This approach fully leverages the knowledge and patterns inherent in historical data, making them explicit and structured through the knowledge graph, providing rich conditional information for subsequent data generation. Simultaneously, a generative adversarial network is introduced, allowing the generator and discriminator to continuously evolve in a game. The generator can learn the distribution characteristics of real data and produce high-quality cost data samples, while the discriminator can accurately distinguish between generated and real data, improving its ability to distinguish. Alternating training of the two avoids the limitations of a single model while fully leveraging historical data and domain knowledge. Ultimately, target cost data covering various scenarios is obtained, providing strong support for cost forecasting and management of engineering projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a flow chart of an intelligent engineering cost prediction method disclosed in an embodiment of the present application; Figure 2This is a module diagram of an intelligent engineering cost prediction device disclosed in an embodiment of the present application; Figure 3 This is a structural diagram of an electronic device disclosed in an embodiment of the present application.
[0025] Description of the accompanying drawings: 201, acquisition module; 202, processing module; 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0027] In the description of the embodiments of this application, words such as "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "for example" or "for instance" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "for example" or "for instance" is intended to present the relevant concepts in a concrete manner.
[0028] In the description of the embodiments of the present application, the term "multiple" means two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0029] This application provides a method for predicting the cost of intelligent engineering construction. Figure 1 , Figure 1 This is a flow chart of an intelligent engineering cost prediction method provided in an embodiment of the present application. The method is applied to a server, which is a server that executes the intelligent engineering cost prediction program. The server can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. The method includes steps S101 to S109, which are as follows: Step S101: Acquire historical engineering data, which includes historical cost data.
[0030] In step S101, the server establishes a connection with the databases of various engineering projects. These databases can be internal management system databases of various engineering companies, or public databases maintained by government departments or industry associations. Through this database connection, the server can directly access and obtain historical data for each engineering project, including basic project information, design documents, budget documents, and final accounting documents. These documents contain cost-related data such as bills of quantities, material usage, labor costs, and machinery costs.
[0031] Secondly, the server automatically collects and crawls data related to project costs from the internet using web crawler technology. The server pre-configures keywords and crawling rules, such as "project budget," "project final accounts," and "material prices." It then extracts relevant news reports, industry analysis, and material price quotes from major portals, industry websites, forums, and other channels. Using natural language processing technology, the server can extract useful cost information from unstructured text data.
[0032] Thirdly, the server can connect with the information systems of various material suppliers and equipment leasing companies, regularly obtaining price fluctuations for materials and equipment rentals from their databases. Since material and equipment costs are a significant component of project costs, understanding their price fluctuation trends can help the server more accurately predict project costs.
[0033] Step S102: Perform keyword extraction, entity recognition, and relationship extraction on historical engineering data to obtain target knowledge, and construct a knowledge graph in the form of nodes and edges based on the target knowledge.
[0034] In step S102, keyword extraction, entity recognition, and relationship extraction are performed on the historical engineering data to obtain target knowledge. Specifically, the process includes: preprocessing the historical engineering data, including data cleaning, data integration, and data transformation; extracting keywords based on the preprocessed historical engineering data, and constructing a keyword dictionary based on the keywords; using named entity recognition technology to identify entities in the historical engineering data; extracting semantic relationships between keywords and entities based on preset relationship templates, and constructing relationship triples to obtain target knowledge. The target knowledge is constructed into a knowledge graph in the form of nodes and edges, specifically including: using keywords and entities as nodes of the knowledge graph, and using relationships in relationship triples as edges connecting nodes; annotating nodes and edges with attributes to obtain target nodes and target edges; and storing the target nodes and target edges as graph data to form a knowledge graph.
[0035] Specifically, the server preprocesses historical engineering data. Preprocessing includes three steps: data cleaning, data integration, and data transformation. During the data cleaning phase, the server identifies and removes noise, outliers, and duplicate values from the historical engineering data. During the data integration phase, the server integrates historical engineering data from various data sources to create a unified data view. During the data transformation phase, the server performs operations such as format conversion, numerical normalization, and feature extraction on the data to make it suitable for subsequent analysis and processing.
[0036] Next, the server extracts keywords based on preprocessed historical engineering data and constructs a keyword dictionary. Using the TF-IDF algorithm, the server automatically extracts high-frequency, highly discriminative keywords from engineering documents, such as "rebar," "concrete," and "scaffolding." The server then removes duplicates, merges, and expands these extracted keywords to construct a keyword dictionary. This keyword dictionary includes not only keywords but also their synonyms, hyponyms, and hyponyms, providing support for subsequent entity recognition and relationship extraction.
[0037] Third, the server uses named entity recognition technology to identify important entities from historical engineering data. Entities include engineering projects, materials, equipment, personnel, and organizations. The server uses rule-based, statistical machine learning (such as conditional random fields), and deep learning-based named entity recognition methods (such as BiLSTM-CRF) to extract entities from historical engineering data.
[0038] The server then extracts the semantic relationships between keywords and entities based on preset relationship templates, constructing relationship triples. Relationship templates are predefined sentence structures, such as "A is B's material" and "A participated in project B." Using techniques like pattern matching and dependency analysis, the server identifies sentences that match the relationship templates from the text, extracts the keywords and entities, and constructs relationship triples in the subject-verb-object format, such as "Rebar is a material for concrete pouring projects."
[0039] Finally, the server constructs a knowledge graph using the target knowledge in the form of nodes and edges. The server uses keywords and entities as nodes in the knowledge graph and the relationships in the relationship triples as edges connecting the nodes. Next, the server annotates the nodes and edges, assigning them attributes such as type and weight, to form target nodes and target edges. For example, the type attribute of the "rebar" node could be "material," and the weight attribute of the "participation" edge could reflect the entity's level of involvement in the project. The server stores and manages the target nodes and target edges in the form of a graph database, constructing a structured and semantically sound knowledge graph.
[0040] Step S103: Construct a generator network, and use the conditional data and random noise in the knowledge graph as inputs to the generator network to obtain cost data samples.
[0041] In step S103, a generator network is constructed, and the conditional data and random noise in the knowledge graph are used as inputs of the generator network to obtain cost data samples, specifically including: constructing a stacked autoencoder network as the main structure of the generator network; using the conditional data in the knowledge graph as the input layer data of the autoencoder network, and using random noise as the hidden layer data of the autoencoder network, and generating cost data samples through the autoencoder network.
[0042] Specifically, the server constructs a stacked autoencoder network as the main structure of the generator network. An autoencoder is a type of unsupervised learning neural network consisting of two parts: an encoder and a decoder. The encoder compresses the input data into a low-dimensional hidden representation, and the decoder restores the hidden representation to the original data. The stacked autoencoder is composed of multiple autoencoder layers, with the output of each layer serving as the input to the next. Through layer-by-layer training, high-level abstract features of the data can be learned. Based on the dimensionality and characteristics of historical cost data, the server designs the autoencoder's parameters, including the number of layers, number of neurons, and activation function, to construct a generator network suitable for engineering cost data.
[0043] Next, the server uses the conditional data in the knowledge graph as input to the autoencoder network. Conditional data refers to various factors that influence project costs, such as project quantity, material prices, and labor costs. This data is scattered across different nodes and edges in the knowledge graph. Using the query and reasoning capabilities of the knowledge graph, the server extracts the conditional data relevant to the target project and converts it into a numerical vector acceptable to the autoencoder. For example, the server can search the knowledge graph for the corresponding material price and labor cost for each item in the bill of quantities, then normalize this data to a value between 0 and 1 to form a conditional vector.
[0044] Next, the server uses random noise as the hidden layer data for the autoencoder network. Random noise is a set of randomly generated low-dimensional vectors that follow a probability distribution, such as a Gaussian or uniform distribution. The introduction of random noise increases the diversity and randomness of the generated data, preventing the generator from falling into deterministic output. Based on the dimensions of the autoencoder's hidden layer, the server generates a set of random noise vectors and concatenates or fuses them with the conditional vector to form a complete hidden layer representation.
[0045] Finally, the server uses the trained autoencoder network to convert the conditional data and random noise into a cost data sample. The decoder portion of the autoencoder can restore the hidden layer representation to output data with the same dimensions and format as the input data. The server inputs the conditional vector and noise vector into the generator network. After decoding and transformation by multiple layers of autoencoders, a cost data sample is generated. This sample not only incorporates the characteristics of the conditional data but also introduces the variation of random noise, resulting in a distribution and characteristics similar to real cost data.
[0046] For example, the server extracts conditional data for a construction project from the knowledge graph, including building area, number of floors, structural form, and exterior wall material, and converts it into a 20-dimensional conditional vector. The server then generates a 10-dimensional Gaussian noise vector and concatenates it with the conditional vector to form a 30-dimensional hidden layer representation. The server then inputs this representation into a pre-trained generator network. After decoding through a three-layer autoencoder, a cost data sample containing 50 features is generated. This sample not only reflects the basic situation of the project but also incorporates some random cost fluctuations, sharing statistical characteristics similar to real-world construction cost data. The server can generate large quantities of such cost data samples in batches for subsequent discriminator training and cost prediction.
[0047] Step S104: Construct a discriminator network, and perform adversarial training on the generator network and the discriminator network to obtain target cost data for each scenario.
[0048] In step S104, a discriminator network is constructed, and the generator network and the discriminator network are subjected to adversarial training to obtain target cost data for each scenario, specifically including: constructing a convolutional neural network composed of multiple convolutional layers and fully connected layers as the main structure of the discriminator network, wherein the convolutional layer is used to extract local features of the input data, and the fully connected layer is used to integrate the local features to obtain classification results; the cost data samples and historical cost data generated by the generator network are respectively input into the discriminator network for binary classification training to obtain a loss function; the target parameters of the generator network are obtained by minimizing the loss function; under the target parameters, the target cost data of each scenario generated by the generator network is determined.
[0049] Specifically, the server constructs a convolutional neural network consisting of multiple convolutional layers and fully connected layers as the main structure of the discriminator network. A convolutional neural network is a hierarchical deep learning model that excels at extracting local features and spatial relationships in data. The convolutional layer slides and convolves the input data using convolution kernels, generating a series of feature maps that capture the data's local patterns and texture information. The fully connected layer integrates and transforms the features extracted by the convolutional layer to generate the final classification or prediction results. Based on the characteristics of the cost data, the server designs parameters such as the number of convolutional layers, kernel size, and pooling method to construct a discriminator network.
[0050] Next, the server inputs the cost data samples and historical cost data generated by the generator network into the discriminator network for binary classification training. The discriminator's goal is to classify the input data into two categories: real data and generated data. The server uses the historical cost data as real data and the cost data samples generated by the generator as generated data, assigning binary labels of "1" and "0", respectively. The server then randomly divides this labeled data into training and validation sets and inputs the training set into the discriminator network for training. The discriminator extracts local features of the data through convolutional layers, integrates these features through fully connected layers, and ultimately generates a probability value between 0 and 1, indicating the likelihood that the input data is real data.
[0051] Next, the server optimizes and trains the discriminator network by constructing and minimizing a loss function. The loss function measures the difference between the discriminator network's predictions and the true labels. The loss function can be a binary cross-entropy loss function. In each training batch, the server first fixes the parameters of the generator and then uses the backpropagation algorithm and gradient descent to adjust the weights and biases of the discriminator network, enabling it to distinguish between real data and generated data as accurately as possible. Simultaneously, the server transmits the discriminator's feedback signal to the generator, guiding it to improve the authenticity of the generated data. Through multiple rounds of iteration and confrontation, the generator and discriminator continuously improve their respective performance, ultimately reaching a dynamic equilibrium.
[0052] Finally, after training, the server uses the optimized generator network to generate target cost data for various scenarios. The server inputs conditional data from different scenarios, such as projects of different periods and sizes, into the generator, which then generates corresponding cost data samples based on these conditions. Because the generator has learned the distribution and characteristics of real-world cost data and has undergone adversarial training with the discriminator, the generated target cost data is more realistic and can reflect cost changes and fluctuations in different scenarios.
[0053] For example, the server constructed a discriminator network consisting of three convolutional layers and two fully connected layers. The input data had a dimension of 50, and the output was a probability value between 0 and 1. The server extracted 1,000 real cost data samples from a historical database and simultaneously generated 1,000 virtual cost data samples using a generator network. These samples were labeled and mixed to form a training set. The server used this training set to train the discriminator, continuously adjusting the model parameters until the discriminator could distinguish between real and generated data with over 90% accuracy. Simultaneously, the server used feedback from the discriminator to update the generator network, enabling it to produce more realistic and diverse cost data. After 1,000 rounds of generative adversarial training, the server used the optimized generator network to generate a series of target cost data for different years and project types, providing strong support for investment decisions for engineering projects.
[0054] In one possible implementation, the cost data samples generated by the generator network and the historical cost data are respectively input into the discriminator network for binary classification training to obtain a loss function, which specifically includes: marking the cost data samples generated by the generator network as negative samples, and marking the historical cost data as positive samples; randomly mixing the negative samples and the positive samples to obtain a mixed data set; inputting the mixed data set into the discriminator network, and performing binary classification on the mixed data set through the discriminator network to obtain a classification result; based on the classification result, calculating the loss function of the discriminator network, and optimizing the parameters of the discriminator network through the back propagation algorithm to minimize the loss function.
[0055] Specifically, the server labels the cost data samples and historical cost data generated by the generator network. The server labels the data samples generated by the generator network as negative samples, indicating that the data is false or fabricated; and labels the historical data as positive samples, indicating that the data is authentic and trustworthy. The server can use different numerical values or symbols to represent positive and negative labels, such as labeling positive samples as 1 and negative samples as 0.
[0056] Next, the server randomly mixes the labeled negative and positive samples to create a mixed dataset. This mixed dataset contains an equal amount of generated data and real data, in a random order. This prevents the discriminator from overfitting to a particular type of data during training and improves the robustness of the discriminator network. The server can use a random number generation algorithm to achieve this random mixing of data.
[0057] Next, the server feeds the mixed dataset into the discriminator network for binary classification training. The discriminator network's task is to classify the input data into two categories: real data and generated data. The server feeds the mixed dataset into the discriminator in batches of a specified size. The discriminator extracts local features of the data through convolutional layers and integrates these features through fully connected layers, ultimately generating a probability value between 0 and 1, indicating the likelihood that the input data is real. The server compares this probability value with the data's true label to calculate the classification accuracy and error rate.
[0058] The server then calculates the loss function value based on the classification results of the discriminator. The loss function measures the difference between the discriminator's prediction results and the true label. The loss function can be a cross-entropy loss function or a mean square error loss function. Preferably, in the embodiment of the present application, the cross-entropy loss function is used. The server substitutes the discriminator's prediction results and the true label into the loss function to obtain a scalar value representing the performance and effect of the discriminator in the current state.
[0059] Finally, the server uses the backpropagation algorithm and gradient descent to optimize and adjust the parameters of the discriminator network to minimize the loss function. The backpropagation algorithm is a neural network training method that uses the chain rule to calculate the gradient of the loss function with respect to each layer's parameters and then updates the parameter values based on the direction and magnitude of the gradient. In each training batch, the server first calculates the forward propagation to obtain the loss function value, then calculates the gradient through backpropagation. Finally, gradient descent is used to apply the gradient to the parameters to correct and update them. Through multiple rounds of iteration and optimization, the discriminator network's classification ability continues to improve, and the loss function value continues to decrease, ultimately reaching a stable state.
[0060] For example, the server extracts 500 cost data samples from the generator network and 500 real cost data samples from the historical database, labels them as 0 and 1, respectively, and then randomly mixes them into a mixed dataset of 1,000 samples. The server uses a convolutional neural network-based discriminator to input the mixed dataset into batches of 100 samples. After processing through three convolutional layers and two fully connected layers, the discriminator obtains the probability that each sample is real data. The server substitutes these probabilities and the real labels of the samples into the cross-entropy loss function, calculating a loss value of 0.8 for the current batch. The server then uses the backpropagation algorithm to calculate the gradient of the loss function with respect to the parameters of each layer and updates the parameters using gradient descent with a learning rate of 0.01. After 100 rounds of training and optimization, the discriminator's classification accuracy increased to 95%, and the loss value decreased to 0.1, effectively distinguishing between real data and generated data.
[0061] In one possible implementation, the mixed data set is input into the discriminator network, and the mixed data set is subjected to binary classification by the discriminator network to obtain a classification result, specifically including: inputting the mixed data set into the convolutional layer of the discriminator network, extracting local features of the mixed data set through the convolutional layer; passing the local features to the fully connected layer of the discriminator network, and integrating the local features through the fully connected layer; and obtaining the classification result of the mixed data set through the output of the fully connected layer, wherein the classification result includes the probability that each sample in the mixed data set is a positive sample.
[0062] Specifically, the server inputs the mixed dataset into the convolutional layer of the discriminator network. The convolutional layer is the core component of the convolutional neural network, performing feature extraction and pattern recognition on the input data through convolution operations. Based on the characteristics of the cost data, the server designs a network structure containing multiple convolutional layers. Each convolutional layer consists of multiple convolution kernels, each of which is a small weight matrix. The server feeds the mixed dataset into the convolutional layer according to a certain batch size. The convolution kernel slides over the data, performing convolution calculations on each local area, and generating a series of feature maps. In this way, the convolutional layer can automatically learn and extract local features in the data, such as edges, textures, shapes, etc.
[0063] Next, the server passes the local features extracted by the convolutional layer to the fully connected layer of the discriminator network. The fully connected layer is the final component of a convolutional neural network. Its function is to integrate the features extracted by the convolutional layer to classify or predict the data. The server designed a network structure consisting of multiple fully connected layers. Each fully connected layer consists of multiple neurons, which are connected by weight matrices and bias vectors. The server flattens the output feature map of the convolutional layer into a one-dimensional vector and then feeds it into the fully connected layer for processing. The fully connected layer transforms the local features into higher-level abstract features through matrix multiplication and nonlinear transformations, ultimately generating an output vector representing the classification result.
[0064] Next, the server obtains the classification result of the mixed dataset through the output of the fully connected layer. In a binary classification problem, the output of the fully connected layer is typically a two-element vector, representing the probability or confidence that the sample belongs to the positive and negative classes, respectively. The server compresses the original output of the fully connected layer to a value between 0 and 1, resulting in a scalar value representing the probability of a positive sample. The closer this probability value is to 1, the more confident the discriminator is that the sample is real cost data; the closer the probability value is to 0, the more confident the discriminator is that the sample is forged by the generator. The server compares the positive sample probability of each sample with a preset threshold (such as 0.5) to obtain the final classification result, that is, whether each sample is classified as real data or generated data.
[0065] Finally, the server returns the positive probability for each sample in the mixed dataset as the classification result. These probabilities reflect not only the discriminator's judgment of the authenticity of each sample, but also its confidence and uncertainty. For samples with a positive probability close to 0.5, the discriminator is struggling to determine their authenticity and requires further training and optimization. For samples with a positive probability close to 0 or 1, the discriminator can accurately distinguish between real and generated data, demonstrating good classification performance. The server can use these probabilities to evaluate and fine-tune the discriminator's performance, continuously improving its ability to identify and discriminate construction cost data.
[0066] For example, the server inputs a mixed dataset containing 1,000 samples into a discriminator network consisting of three convolutional layers and two fully-connected layers. The data first passes through the first convolutional layer, which contains 32 5x5 convolution kernels. This convolution operation extracts local features from the data and generates 32 feature maps. The feature maps then pass through the second convolutional layer (containing 64 3x3 convolution kernels) and the third convolutional layer (containing 128 3x3 convolution kernels) to extract more abstract and high-level features. The output of the convolutional layer is then passed to a fully-connected layer and processed by two fully-connected layers containing 256 neurons, ultimately generating a two-element output vector. The server uses a sigmoid function to compress the output vector to a value between 0 and 1, thus obtaining the positive probability for each sample. For example, for the first sample, the discriminator outputs a positive probability of 0.85, indicating that the discriminator is 85% confident that the sample is genuine cost data. The server performs the same process on all 1,000 samples, obtains a set of positive sample probability values, and returns them as the classification results of the discriminator.
[0067] Reference Figure 2 The present application also provides an intelligent engineering cost prediction device, which is a server. The server includes an acquisition module 201 and a processing module 202, wherein: the acquisition module 201 is used to obtain historical engineering data, and the historical engineering data includes historical cost data; the processing module 202 is used to perform keyword extraction, entity recognition and relationship extraction on the historical engineering data to obtain target knowledge, and construct a knowledge graph of the target knowledge in the form of nodes and edges; the processing module 202 is also used to construct a generator network, and use the conditional data and random noise in the knowledge graph as inputs of the generator network to obtain cost data samples; the processing module 202 is also used to construct a discriminator network, and generate adversarial training between the generator network and the discriminator network to obtain target cost data for each scenario.
[0068] In one possible implementation, the processing module 202 constructs a generator network, and uses the conditional data and random noise in the knowledge graph as inputs of the generator network to obtain cost data samples, specifically including: the processing module 202 constructs a stacked autoencoder network as the main structure of the generator network; the processing module 202 uses the conditional data in the knowledge graph as the input layer data of the autoencoder network, and uses the random noise as the hidden layer data of the autoencoder network, and generates cost data samples through the autoencoder network.
[0069] In one possible implementation, the processing module 202 constructs a discriminator network and generates adversarial training between the generator network and the discriminator network to obtain target cost data for each scenario, specifically including: the processing module 202 constructs a convolutional neural network composed of multiple convolutional layers and fully connected layers as the main structure of the discriminator network, wherein the convolutional layer is used to extract local features of the input data, and the fully connected layer is used to integrate the local features to obtain classification results; the processing module 202 inputs the cost data samples and historical cost data generated by the generator network into the discriminator network for binary classification training to obtain a loss function; the processing module 202 obtains the target parameters of the generator network by minimizing the loss function; the processing module 202 determines the target cost data of each scenario generated by the generator network under the target parameters.
[0070] In one possible implementation, the processing module 202 inputs the cost data samples generated by the generator network and the historical cost data into the discriminator network for binary classification training to obtain a loss function, specifically including: the processing module 202 marks the cost data samples generated by the generator network as negative samples and marks the historical cost data as positive samples; the processing module 202 randomly mixes the negative samples and the positive samples to obtain a mixed data set; the processing module 202 inputs the mixed data set into the discriminator network, and performs binary classification on the mixed data set through the discriminator network to obtain a classification result; the processing module 202 calculates the loss function of the discriminator network based on the classification result, and optimizes the parameters of the discriminator network through the back propagation algorithm to minimize the loss function.
[0071] In one possible implementation, the processing module 202 inputs the mixed data set into the discriminator network, and performs binary classification on the mixed data set through the discriminator network to obtain a classification result, specifically including: the processing module 202 inputs the mixed data set into the convolutional layer of the discriminator network, and extracts local features of the mixed data set through the convolutional layer; the processing module 202 passes the local features to the fully connected layer of the discriminator network, and integrates the local features through the fully connected layer; the processing module 202 obtains the classification result of the mixed data set through the output of the fully connected layer, wherein the classification result includes the probability that each sample in the mixed data set is a positive sample.
[0072] In one possible implementation, the processing module 202 performs keyword extraction, entity recognition, and relationship extraction on the historical engineering data to obtain target knowledge, specifically including: the processing module 202 preprocesses the historical engineering data, and the preprocessing includes data cleaning, data integration, and data transformation; the processing module 202 extracts keywords based on the preprocessed historical engineering data, and constructs a keyword dictionary based on the keywords; the processing module 202 uses named entity recognition technology to identify entities in the historical engineering data; the processing module 202 extracts the semantic relationship between keywords and entities based on a preset relationship template, constructs relationship triples, and obtains target knowledge.
[0073] In one possible implementation, the processing module 202 constructs a knowledge graph with the target knowledge in the form of nodes and edges, specifically including: the processing module 202 uses keywords and entities as nodes of the knowledge graph, and uses the relationships in the relationship triples as edges connecting the nodes; the processing module 202 labels the nodes and edges with attributes to obtain target nodes and target edges; the processing module 202 stores the target nodes and target edges as graph data to form a knowledge graph.
[0074] It should be noted that the above embodiments provide devices that implement their functions using only the division of the above functional modules as examples. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0075] This application also provides an electronic device. Figure 3 , Figure 3 3. This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0076] The communication bus 302 is used to implement the connection and communication between these components.
[0077] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0078] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0079] The processor 301 may include one or more processing cores. Using various interfaces and circuits, the processor 301 connects to various components within the server. It executes instructions, programs, code sets, or instruction sets stored in the memory 305, as well as accesses data stored in the memory 305, to perform various server functions and process data. Optionally, the processor 301 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 301 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display screen; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 301 but implemented as a separate chip.
[0080] Among them, the memory 305 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may also optionally be at least one storage device located away from the aforementioned processor 301. Refer to Figure 3 , as a computer storage medium, the memory 305 may include an operating system, a network communication module, a user interface module, and an application program of an intelligent engineering cost prediction method.
[0081] exist Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call the application program of an intelligent engineering cost prediction method stored in the memory 305. When executed by one or more processors 301, the electronic device 300 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited by the described order of actions, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for this application.
[0082] The present application further provides a computer-readable storage medium storing instructions, which, when executed by one or more processors 301 , enable the electronic device 300 to perform one or more of the methods described in the above embodiments.
[0083] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic, such as the division of units, which is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0085] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0086] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0087] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of this application. The aforementioned memory includes various media that can store program code, such as USB flash drives, mobile hard drives, magnetic disks, or optical disks.
[0088] The foregoing is merely an exemplary embodiment of the present disclosure and is not intended to limit the scope of the present disclosure. In other words, any equivalent variations and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the disclosure and the practical implications thereof.
[0089] This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not described herein. The description and examples are to be considered as exemplary only, and the scope and spirit of the present disclosure are to be defined by the claims.
Claims
1. A method for predicting the cost of intelligent engineering construction, characterized in that: The method comprises: Acquiring historical engineering data, wherein the historical engineering data includes historical cost data; Perform keyword extraction, entity recognition, and relationship extraction on the historical engineering data to obtain target knowledge, and construct a knowledge graph of the target knowledge in the form of nodes and edges; Constructing a generator network, and using the conditional data and random noise in the knowledge graph as inputs to the generator network to obtain cost data samples; A discriminator network is constructed, and the generator network and the discriminator network are subjected to adversarial training to obtain target cost data for each scene.
2. The method according to claim 1, characterized in that The generator network is constructed, and the conditional data and random noise in the knowledge graph are used as inputs of the generator network to obtain cost data samples, specifically including: Constructing a stacked autoencoder network as the main structure of the generator network; The conditional data in the knowledge graph is used as the input layer data of the autoencoder network, the random noise is used as the hidden layer data of the autoencoder network, and the cost data sample is generated through the autoencoder network.
3. The method according to claim 1, characterized in that The discriminator network is constructed, and adversarial training is performed between the generator network and the discriminator network to obtain target cost data for each scenario, specifically including: Constructing a convolutional neural network consisting of multiple convolutional layers and fully connected layers as the main structure of the discriminator network, wherein the convolutional layers are used to extract local features of the input data, and the fully connected layers are used to integrate the local features to obtain classification results; Inputting the cost data samples generated by the generator network and the historical cost data into the discriminator network for binary classification training to obtain a loss function; Obtaining target parameters of the generator network by minimizing the loss function; Under the target parameters, target cost data for each of the scenarios generated by the generator network is determined.
4. The method according to claim 3, characterized in that The cost data samples generated by the generator network and the historical cost data are respectively input into the discriminator network for binary classification training to obtain a loss function, specifically including: Marking the cost data samples generated by the generator network as negative samples, and marking the historical cost data as positive samples; Randomly mixing the negative samples and the positive samples to obtain a mixed data set; Inputting the mixed data set into the discriminator network, performing binary classification on the mixed data set through the discriminator network to obtain a classification result; Based on the classification result, a loss function of the discriminator network is calculated, and the parameters of the discriminator network are optimized by a back propagation algorithm to minimize the loss function.
5. The method according to claim 4, characterized in that Inputting the mixed data set into the discriminator network, and performing binary classification on the mixed data set by the discriminator network to obtain a classification result specifically includes: Inputting the mixed data set into the convolutional layer of the discriminator network, and extracting local features of the mixed data set through the convolutional layer; Passing the local features to a fully connected layer of the discriminator network, and synthesizing the local features through the fully connected layer; A classification result of the mixed data set is obtained through the output of the fully connected layer, wherein the classification result includes the probability that each sample in the mixed data set is a positive sample.
6. The method according to claim 1, characterized in that The keyword extraction, entity recognition and relationship extraction of the historical engineering data to obtain target knowledge specifically include: Preprocessing the historical engineering data, wherein the preprocessing includes data cleaning, data integration, and data transformation; Extracting keywords based on the pre-processed historical engineering data, and constructing a keyword dictionary based on the keywords; Using named entity recognition technology, identifying entities in the historical engineering data; According to a preset relationship template, the semantic relationship between the keyword and the entity is extracted, a relationship triple is constructed, and the target knowledge is obtained.
7. The method according to claim 1, characterized in that Constructing a knowledge graph of the target knowledge in the form of nodes and edges specifically includes: The keywords and entities are used as nodes of a knowledge graph, and the relationships in the relationship triples are used as edges connecting the nodes; Perform attribute labeling on the nodes and edges to obtain target nodes and target edges; The target node and the target edge are stored as graph data to form the knowledge graph.
8. An intelligent engineering cost prediction device, characterized in that: The device comprises an acquisition module (201) and a processing module (202), wherein: The acquisition module (201) is used to acquire historical engineering data, wherein the historical engineering data includes historical cost data; The processing module (202) is used to perform keyword extraction, entity recognition and relationship extraction on the historical engineering data to obtain target knowledge, and construct a knowledge graph of the target knowledge in the form of nodes and edges; The processing module (202) is further used to construct a generator network, and use the conditional data and random noise in the knowledge graph as inputs of the generator network to obtain cost data samples; The processing module (202) is further used to construct a discriminator network, and perform adversarial training on the generator network and the discriminator network to obtain target cost data for each scene.
9. An electronic device, characterized in that: The electronic device (300) comprises a processor (301), a memory (305), a user interface (303) and a network interface (304), wherein the memory (305) is used to store instructions, the user interface (303) and the network interface (304) are used to communicate with other devices, and the processor (301) is used to execute the instructions stored in the memory (305) so that the electronic device (300) executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.