Trench pipe culvert cost data interpolation prediction method and device and computer equipment

By using a deep learning network trained by DDPM, combining historical data and external condition information, the data diffusion process is simulated to fill the missing data, and the problem of insufficient accuracy of data interpolation in the existing technology is solved, and high-precision data interpolation of the ditch culvert engineering cost data is achieved.

CN119513484AInactive Publication Date: 2025-02-25CHENGDU JINNIU DISTRICT GOVERNMENT INVESTMENT PROJECT REVIEW CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411266305.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing data interpolation methods cannot effectively capture the complex changes and diversity of ditch culvert engineering cost data, resulting in limited accuracy of interpolation results.

Method used

The deep learning network trained by DDPM is used as an interpolation prediction model. By using historical trench culvert cost data and external specific condition information, the data diffusion process is simulated to master the laws of data change, and the missing data is filled with prediction propagation methods.

Benefits of technology

High-precision interpolation of ditch culvert engineering cost data is achieved, complex changes and diversity of data are captured, and the accuracy of missing data is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513484A_ABST
    Figure CN119513484A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a ditch pipe culvert cost data interpolation prediction method and device and computer equipment. The method comprises the following steps: acquiring ditch pipe culvert cost data with missing values to obtain data to be interpolated; inputting the data to be interpolated into an interpolation prediction model for data interpolation to obtain an interpolation result; and outputting the interpolation result. Wherein the interpolation prediction model is a model obtained by constructing a training data set by using historical ditch pipe culvert cost data and external specific condition information and training a deep learning network by using DDPM. By implementing the method provided by the embodiment of the invention, the complex change and diversity of the captured data can be realized, so that the missing data can be filled up, and the missing data interpolation precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a data interpolation method, and more specifically to a method, device and computer equipment for interpolating and predicting the cost of ditch and culvert construction data. Background Art

[0002] The cost of ditch culvert engineering is a relatively unpopular field. When conducting engineering cost analysis, it is usually necessary to refer to and organize historical data. However, these historical data are sometimes missing or incomplete, which may be caused by irregular records, loss, omissions or errors. In response to the problem of missing data, data interpolation methods can be used to fill in the missing data. The factors affecting the cost of ditch culvert engineering mainly include the current status of the ditch, the regulation plan, the cross-section after regulation (such as the bottom width, top width and depth of the channel), and the situation of road demolition. Due to the differences in costs in different regions and different regulation plans, the relationship between these factors and costs must be analyzed in detail to establish a model suitable for the interpolation of ditch culvert engineering cost data.

[0003] Traditional data interpolation methods include nearest neighbor interpolation and mean interpolation, which cannot fully capture the complex changes and diversity of data, resulting in limited accuracy of interpolation results. Nearest neighbor interpolation is only based on neighboring data points, while mean interpolation ignores the changing trends of data and other potential factors.

[0004] Therefore, it is necessary to design a new method to capture the complex changes and diversity of data in order to fill in the missing data and improve the accuracy of missing data interpolation. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a method, device and computer equipment for interpolating and predicting the cost data of ditches and culverts.

[0006] To achieve the above object, the present invention adopts the following technical solution: a method for interpolating and predicting the cost data of a ditch and culvert, comprising:

[0007] Obtain the cost data of canals and culverts with missing values ​​to obtain the data to be interpolated;

[0008] Inputting the data to be interpolated into the interpolation prediction model to perform data interpolation to obtain an interpolation result;

[0009] Outputting the interpolation result;

[0010] Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

[0011] The further technical solution is: the interpolation prediction model is a model obtained by constructing a training data set by using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network, including:

[0012] Obtain historical ditch and culvert cost data and external specific conditions information;

[0013] Constructing a training data set based on the historical ditch culvert cost data and external specific condition information;

[0014] A deep learning network is trained using DDPM according to the training data set to obtain an interpolation prediction model.

[0015] A further technical solution is: constructing a training data set based on the historical ditch culvert cost data and external specific condition information, including:

[0016] Converting historical characteristic information affecting the cost of ditch culvert engineering in the historical ditch culvert cost data into a characteristic vector;

[0017] Encoding the external specific condition information to obtain a conditional feature vector;

[0018] The historical ditch culvert cost data is converted into time series data using the characteristic vector to obtain historical time series data;

[0019] Randomly select a portion of the historical time series data to obtain a training target, and use the remaining data in the historical time series data as conditional data;

[0020] The training target and the conditional data are combined with the conditional feature vector to form a training data set.

[0021] A further technical solution is: the external specific condition information includes regional information, material prices, and labor costs.

[0022] A further technical solution is: using DDPM to train a deep learning network according to the training data set to obtain an interpolation prediction model, including:

[0023] Setting the number of diffusion steps and constructing input data according to the training data set;

[0024] Construct a noise generation network;

[0025] Modifying the noise generation network using conditional vector features and generating a target loss function;

[0026] According to the input data, by gradually adding noise in reverse, starting from a random noise, the prediction data of each step is calculated in sequence, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result;

[0027] The interpolation prediction model is determined based on the output results combined with the target loss function and the noise generation network.

[0028] Its further technical solution is: the input data is in, is a constant term, X miss is the training target in the training data set; is the input data; the objective loss function is Among them, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0029] A further technical solution is: the conditional vector feature is used to modify the noise generation network and generate a target loss function, including:

[0030] The conditional vector feature replaces the self-attention module input in the noise generation network and generates a target loss function.

[0031] The further technical solution is: according to the input data, by gradually adding noise in reverse, starting from a random noise, calculating the predicted data of each step in turn, using the parameters in the DDPM algorithm and the noise generation network to adjust the data to obtain the output result, including:

[0032] According to the input data, noise is added in reverse step by step, starting from a random noise, using The prediction data of each step is calculated in turn, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; wherein, is the β in the DDPM algorithm k+1 , is the α of the DDPM algorithm k+1 ,∈ θ is the modified noise generation network, Z is the standard normal distribution, σ θ The network training weights are generated for the corresponding perturbation noise, Indicates that the generated network is based on the network input conditions under the current network weight parameter θ The generated prediction data, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0033] The present invention also provides a ditch culvert cost data interpolation prediction device, comprising:

[0034] A data acquisition unit is used to acquire the cost data of canal culverts with missing values ​​to obtain data to be interpolated;

[0035] An interpolation unit, used for inputting the data to be interpolated into the interpolation prediction model to perform data interpolation to obtain an interpolation result;

[0036] An output unit, used for outputting the interpolation result;

[0037] Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

[0038] The present invention also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.

[0039] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention obtains ditch culvert cost data with missing values ​​and prepares data to be interpolated; the data to be interpolated is input into an interpolation prediction model, and the model performs interpolation based on historical data and external condition information; the interpolation result is output, and the model is generated by combining historical ditch culvert cost data and external specific condition information with a deep learning network trained by DDPM, and the diffusion process of data is simulated by the model to grasp the law of data change, and then the method of predictive propagation is used to fill in the missing data, and a variety of external factors are integrated to capture the complex changes and diversity of data to fill in the missing data and improve the accuracy of missing data interpolation.

[0040] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0042] Figure 1 A schematic diagram of a flow chart of a method for interpolating and predicting ditch and culvert cost data provided by an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of a sub-process of a method for interpolating and predicting ditch and culvert cost data provided by an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of a sub-process of a method for interpolating and predicting ditch and culvert cost data provided by an embodiment of the present invention;

[0045] Figure 4 A schematic diagram of a sub-process of a method for interpolating and predicting ditch and culvert cost data provided by an embodiment of the present invention;

[0046] Figure 5 A schematic diagram of historical ditch culvert cost data provided by an embodiment of the present invention;

[0047] Figure 6 A schematic diagram of training the interpolation prediction model provided by an embodiment of the present invention;

[0048] Figure 7 A schematic block diagram of a device for interpolating and predicting ditch and culvert cost data provided by an embodiment of the present invention;

[0049] Figure 8 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0052] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0053] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0054] See also Figure 1 , Figure 1A schematic flow chart of a method for interpolating and predicting the cost data of a ditch culvert provided in an embodiment of the present invention. The method for interpolating and predicting the cost data of a ditch culvert is applied in a server. The server interacts with a terminal and uses a diffusion model-based data interpolation method to simulate the data change process and grasp its laws by integrating information from multiple cost fields, and then uses prediction propagation to obtain interpolated data. The method has strong versatility and can make predictions based on existing historical cost data, thereby reducing costs and simplifying maintenance.

[0055] Figure 1 FIG. 1 is a flow chart of a method for interpolating and predicting the cost of ditch and culvert construction data provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S130.

[0056] S110, obtaining the ditch culvert cost data with missing values ​​to obtain the data to be interpolated.

[0057] In this embodiment, the data to be interpolated refers to the ditch culvert cost data with missing values.

[0058] S120, inputting the data to be interpolated into an interpolation prediction model to perform data interpolation to obtain an interpolation result.

[0059] In this embodiment, the interpolation result refers to the result formed after interpolating the missing values ​​in the data to be interpolated.

[0060] Specifically, the original cost data with missing values ​​can be converted into a time series format. Time series data are usually arranged in chronological order, which helps to identify trends and patterns in the data; by converting the data into a time series format, time series analysis methods can be used to capture the time dependency and trend of the data, providing a more structured data input for the interpolation model, thereby improving the accuracy of interpolation.

[0061] Secondly, the data after time series conversion is input into the trained interpolation prediction model for data interpolation. Using a special interpolation prediction model, the missing values ​​can be reasonably predicted according to the historical trends and patterns of the data, thereby generating more accurate and reliable interpolation results. This can improve the integrity of the data and facilitate subsequent analysis and decision-making.

[0062] Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

[0063] In one embodiment, see Figure 2The above-mentioned interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network, including steps S121 to S123.

[0064] S121. Obtain historical ditch culvert cost data and external specific conditions information.

[0065] In this embodiment, the external specific condition information includes region information, material prices, and labor costs.

[0066] like Figure 5 As shown, the historical ditch culvert cost data includes the general historical characteristic information that will affect the cost of ditch culvert projects, as well as the cost price and cross-section related data.

[0067] S122: construct a training data set based on the historical ditch culvert cost data and external specific condition information.

[0068] In this embodiment, the training data set refers to a data set used to train a network.

[0069] In one embodiment, see Figure 3 , the above-mentioned step S122 may include steps S1221 to S1225.

[0070] S1221. Convert the historical characteristic information affecting the construction cost of the ditch culvert project in the historical ditch culvert construction cost data into a characteristic vector.

[0071] In this embodiment, the general historical characteristic information affecting the cost of the canal culvert project is converted into a characteristic vector represented by mathematical symbols, which is set as x i =[f1, f2, f3…, f K ], represents the feature data vector at time i, and k represents the number of features.

[0072] Converting historical data into feature vectors allows the data to be uniformly processed and analyzed in machine learning models. The feature vector format simplifies the representation of data, making model training more efficient and accurate. By clearly identifying the various features that affect construction costs, the model can better capture patterns and relationships in the data.

[0073] S1222. Encode the external specific condition information to obtain a conditional feature vector.

[0074] In this embodiment, the conditional feature vector refers to the result of encoding the external specific condition information.

[0075] Special condition factors that affect the cost of ditch culvert engineering are numerically encoded, such as converting regional geographic information, regional material price information, labor cost information, etc. into conditional feature vectors. For example, the basic information of a certain region A can be converted into a feature vector C = {region code, accuracy, dimension, GDP, population, labor force ratio, ...}. In the process of converting into a feature vector, the basic information is encoded, for example, the region name can be encoded using national standards, and other information can be encoded in digital form, so that a numerical vector is obtained.

[0076] Converting external condition information into numerical vectors can more accurately capture the impact of these factors on construction costs; the encoded feature vectors can be combined with historical feature vectors to unify the data format, which is helpful for data processing in the training and prediction process; the conditional feature vectors provide additional contextual information to help the model consider more external influencing factors when making predictions.

[0077] S1223. Use the characteristic vector to convert the historical ditch culvert cost data into time series data to obtain historical time series data.

[0078] In this embodiment, the historical time series data refers to the result of converting the historical ditch and culvert cost data into time series data.

[0079] The historical engineering cost data can be expressed as a time series data, recorded as X = [x1, x2, x3…, x T ], T represents the number of historical records, so in, Indicates the data space dimension; if there are missing values ​​in the historical time series data X, the missing values ​​are uniformly replaced by 0, and the missing data are counted and marked, recorded as the missing value matrix X Mask ,Xx ask If the data is 0, it means the element at that position is missing.

[0080] Converting data into time series form can capture the changing trend over time, which is very important for prediction and modeling. By marking and filling missing values, it ensures that the model can handle incomplete data sets during training, thereby improving the robustness of the model. The time series data format meets the input requirements of many prediction models (such as RNN, LSTM), which helps to improve prediction performance.

[0081] S1224. Randomly select a portion of the historical time series data to obtain a training target, and use the remaining data in the historical time series data as conditional data.

[0082] In this embodiment, a random selection algorithm, such as a random number generation method in a programming language, is used to randomly extract part of the historical time series data X, and the extracted data is used as training data to train the predicted true value X. miss The remaining data is used as the conditional data in training, namely X obv .

[0083] Determine the missing values ​​corresponding to the training data and mark them as training missing values ​​X'M ask , each data with 1 in the training missing value indicates that it has not been extracted, that is, conditional data, and similarly X' Mask ∈R K×T Obviously, the calculation formula for training data construction can be deduced as follows: in, represents the product of vectors, and X represents the original historical engineering cost data without any missing items.

[0084] By randomly selecting training targets and conditional data, the diversity and representativeness of the training data are ensured; random selection can help the model learn more potential rules and improve the generalization ability of the model; clearly marking the location of missing data allows the model to focus on predicting the missing value part during training while considering the data in other parts

[0085] S1225. Combine the training target and the condition data with the condition feature vector to form a training data set.

[0086] In this embodiment, by combining the training objectives, conditional data and conditional feature vectors, more comprehensive information can be provided to the model; integrating all relevant information helps the model better understand and predict data during the training process; ensuring that the training data set contains all necessary information, thereby improving the accuracy and reliability of training and prediction.

[0087] In this embodiment, when processing data, if there are missing values ​​in the historical time series data X, these missing data are marked as X. miss , where X miss ∈R K×T In order to fill in these missing cost data, a model needs to be established that can be used to calculate the cost of the project based on the known data X. obv To predict the missing data X miss In this process, the conditional feature vector C is also used to help optimize the filling results, where C provides specific information about the external conditions. This means that a large amount of actual observation data is needed to learn how to predict the missing cost data from known data and conditional information. In other words, the goal of the model is to learn a conditional probability model q(X miss|X obv , C) to replace missing data with predicted values, thereby completing data interpolation.

[0088] S123. Using DDPM to train a deep learning network according to the training data set to obtain an interpolation prediction model.

[0089] In one embodiment, see Figure 4 , the above-mentioned step S123 may include steps S1231 to S1235.

[0090] S1231. Set the number of diffusion steps and construct input data according to the training data set.

[0091] In this embodiment, the input data is in, is a constant term, X miss is the training target in the training data set; is the input data, which is X miss and noise.

[0092] In addition, the diffusion step number refers to the number of steps used in the diffusion model. This number of steps (K steps) determines how many times the model will go through the noise addition and denoising steps during the generation process. Generally, the more steps, the more refined the generated results, but the amount of calculation will also increase.

[0093] The diffusion step of this embodiment is K steps, so k=1, 2, 3, ..., K. k represents the step number in the current algorithm cycle.

[0094] By introducing noise, the model can learn how to recover the original data from noisy data. This enables the model to handle situations with noise or missing data in practical applications; it affects the training effect and generation quality of the model, and reasonable settings can balance the computational complexity and generation quality.

[0095] S1232. Construct a noise generation network.

[0096] In this embodiment, the core of the interpolation prediction model is to learn a neural network that adds noise and then matches it with the true value through a deep neural network. The network can be a standard DiffWave architecture. In this embodiment, the noise generation network learns how to add noise and match it with the true value through a deep neural network. The DiffWave architecture is a common model for noise generation, which generates noise through a series of network layers.

[0097] Assume that the learnable parameter of the noise generation network is σ θ . This means that the training goal of the network is to optimize these parameters to minimize the difference between the generated noise and the target data.

[0098] A good noise generation network can more accurately simulate and generate noise that conforms to the actual data distribution, thereby improving the interpolation accuracy of the model; the DiffWave architecture is a mature noise generation network whose effectiveness on similar tasks can be exploited.

[0099] S1233. Use conditional vector features to modify the noise generation network and generate a target loss function.

[0100] In this embodiment, the objective loss function is Where ∈ is the real data for training prediction, Indicates that the generated network is based on the network input conditions under the current network weight parameter θ The generated prediction data, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0101] Specifically, the conditional vector feature replaces the self-attention module input in the noise generation network, and generates a target loss function.

[0102] In this embodiment, the traditional diffusion model is enhanced by introducing the conditional vector feature C, so that it can better interpolate the cost data of ditch culvert engineering. Specifically, the conditional vector feature C is first embedded and converted into a form with the same dimension as the attention input data of the denoising module in the U-Net network. Then, the input of the self-attention module in the standard U-Net denoising network is replaced with the conditional vector feature C. The purpose of this is to guide the model to generate interpolation results that are more in line with the actual geographical conditions through the conditional vector feature C. This can help the network generate interpolation results that are more in line with the actual scene based on specific conditional information. By introducing conditional features, the model can consider more contextual information, thereby generating results that are more in line with the actual situation; by optimizing the loss function, the output of the network can be adjusted more accurately to make it more consistent with the target data.

[0103] To achieve this goal, a new loss function is formulated This loss function incorporates conditional information to help optimize the model output so that it more accurately reflects the actual situation.

[0104] S1234. According to the input data, by gradually adding noise in reverse, starting from a random noise, the prediction data of each step is calculated in sequence, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result.

[0105] DDPM (Denoising Diffusion Probabilistic Models) is an algorithm for generating models that generates data based on a diffusion process. It is mainly used to generate high-quality images and data.

[0106] In this embodiment, the process of generating interpolated cost data is actually a process of adding noise in reverse order to generate data step by step. Assuming that it starts from a random noise data and the diffusion step is K steps, then k = K-1, ..., 1, where is the β in the DDPM algorithm k+1 , is the α of the DDPM algorithm k+1 ,∈ θ is the modified noise generation network, Z is the standard normal distribution, σ θ The network training weights are generated for the corresponding perturbation noise, Indicates that the generated network is based on the network input conditions under the current network weight parameter θ The generated prediction data, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0107] The data calculation process is shown as follows:

[0108] Through gradual denoising, data can be restored more accurately and gradually approach the target data; the process from noise to clear data is effectively simulated, which helps to generate high-quality interpolation results.

[0109] S1235. Determine an interpolation prediction model based on the output result combined with the target loss function and the noise generation network.

[0110] By comprehensively considering the effects of the loss function and the generated network, an optimized interpolation prediction model is finally determined, which can effectively improve the accuracy and practicality of the interpolation results.

[0111] In general, if Figure 6 The steps involved in the training process shown are to gradually recover data from noise by building and optimizing a diffusion model, using conditional features and a noise generation network, thereby achieving efficient and accurate data interpolation. This approach is particularly suitable for dealing with complex tasks with noisy or missing data, such as interpolation of ditch culvert project cost data.

[0112] The trained model is saved as a pytorch pth file so that it can be called at any time the next time.

[0113] In practical application, suppose a piece of actual cost data that needs to be interpolated is represented by Xreal =[x1, x2, x3, ..., x f ], X real If the corresponding position is missing data, The corresponding position data is marked as 0, so In the X real When the data is actually interpolated, X real All data in are considered as interpolation conditions, so it can be calculated The data is fed into the interpolation prediction model, according to The corresponding interpolation result can be obtained after K-step diffusion.

[0114] Will Inputting the interpolation prediction model as conditional data helps improve the accuracy of interpolation because the model can use known data to guide the interpolation process. The gradual reduction of noise through K-step diffusion helps to generate high-quality interpolation results. This method can handle many forms of missing data (such as irregular missingness) and provide accurate interpolation.

[0115] Overall, this approach improves the quality and reliability of data imputation by combining existing data with a stepwise diffusion strategy.

[0116] S130: Output the interpolation result.

[0117] Output the corresponding interpolation results for subsequent analysis.

[0118] The above-mentioned ditch culvert cost data interpolation prediction method obtains the ditch culvert cost data with missing values ​​and prepares the data to be interpolated; the data to be interpolated is input into the interpolation prediction model, and the model interpolates based on historical data and external condition information; the interpolation result is output, and the model is generated by combining historical ditch culvert cost data and external specific condition information with the deep learning network trained by DDPM, and the model is used to simulate the diffusion process of data to grasp the law of data change, and then the prediction propagation method is used to fill in the missing data, integrate multiple external factors, and realize the capture of the complex changes and diversity of data to fill in the missing data and improve the accuracy of missing data interpolation.

[0119] Figure 7 FIG. 3 is a schematic block diagram of a device 300 for interpolating and predicting the cost of ditch and culvert construction data provided by an embodiment of the present invention. Figure 7 As shown, corresponding to the above ditch culvert cost data interpolation prediction method, the present invention also provides a ditch culvert cost data interpolation prediction device 300. The ditch culvert cost data interpolation prediction device 300 includes a unit for executing the above ditch culvert cost data interpolation prediction method, and the device can be configured in a server. Figure 7The ditch culvert cost data interpolation prediction device 300 includes a data acquisition unit 301, an interpolation unit 302 and an output unit 303.

[0120] The data acquisition unit 301 is used to acquire the ditch culvert cost data with missing values ​​to obtain the data to be interpolated; the interpolation unit 302 is used to input the data to be interpolated into the interpolation prediction model to perform data interpolation to obtain the interpolation result; the output unit 303 is used to output the interpolation result;

[0121] Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

[0122] In one embodiment, the ditch culvert cost data interpolation prediction device 300 also includes an interpolation prediction model training unit; it is used to construct a training data set by utilizing historical ditch culvert cost data and external specific condition information, and use DDPM to train a deep learning network to obtain an interpolation prediction model.

[0123] In one embodiment, the interpolation prediction model training unit includes:

[0124] The data acquisition subunit is used to acquire historical ditch culvert cost data and external specific condition information; the data set construction subunit is used to construct a training data set based on the historical ditch culvert cost data and external specific condition information; the training subunit is used to train a deep learning network using DDPM based on the training data set to obtain an interpolation prediction model.

[0125] In one embodiment, the data set construction subunit includes:

[0126] An information conversion module is used to convert the historical characteristic information affecting the cost of ditch culvert projects in the historical ditch culvert cost data into a characteristic vector; an encoding module is used to encode the external specific condition information to obtain a conditional characteristic vector; a time series conversion module is used to convert the historical ditch culvert cost data into time series data using the characteristic vector to obtain historical time series data; a random selection module is used to randomly select a part of the historical time series data to obtain a training target, and use the remaining data in the historical time series data as conditional data; a combination module is used to combine the training target and the conditional data with the conditional characteristic vector to form a training data set.

[0127] In one embodiment, the training subunit includes:

[0128] A setting module is used to set the number of diffusion steps and construct input data according to the training data set; a network construction module is used to construct a noise generation network; a modification module is used to modify the noise generation network using conditional vector features and generate a target loss function; a data prediction module is used to calculate the predicted data of each step in turn by gradually adding noise in reverse according to the input data, starting from a random noise, and adjusting the data using the parameters in the DDPM algorithm and the noise generation network to obtain an output result; a model determination module is used to determine the interpolation prediction model according to the output result combined with the target loss function and the noise generation network.

[0129] In one embodiment, the modification subunit is used to replace the self-attention module input in the noise generation network with the conditional vector feature and generate a target loss function.

[0130] In one embodiment, the data prediction subunit is used to add noise in reverse step by step according to the input data, starting from a random noise, using The prediction data of each step is calculated in turn, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; wherein, is the β in the DDPM algorithm k+1 , is the α of the DDPM algorithm k+1 ,∈ θ is the modified noise generation network, Z is the standard normal distribution, σ θ The network training weights are generated for the corresponding perturbation noise, Indicates that the generated network is based on the network input conditions under the current network weight parameter θ The generated prediction data, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0131] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned ditch culvert cost data interpolation prediction device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0132] The above-mentioned ditch culvert cost data interpolation prediction device 300 can be implemented in the form of a computer program. The computer program can be used in Figure 8 Runs on the computer device shown.

[0133] See also Figure 8 , Figure 85 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.

[0134] See also Figure 8 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0135] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a method for interpolating and predicting the cost data of ditches and culverts.

[0136] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0137] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for interpolating and predicting the cost data of ditches and culverts.

[0138] The network interface 505 is used to communicate with other devices over the network. Figure 8 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0139] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:

[0140] Acquire the ditch culvert cost data with missing values ​​to obtain the data to be interpolated; input the data to be interpolated into the interpolation prediction model to perform data interpolation to obtain the interpolation result; output the interpolation result;

[0141] Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

[0142] In one embodiment, the processor 502 implements the interpolation prediction model by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network to obtain a model step, specifically implementing the following steps:

[0143] Obtain historical ditch culvert cost data and external specific condition information; construct a training data set based on the historical ditch culvert cost data and external specific condition information; and train a deep learning network using DDPM based on the training data set to obtain an interpolation prediction model.

[0144] In one embodiment, when the processor 502 implements the step of constructing a training data set according to the historical ditch culvert cost data and the external specific condition information, the processor 502 specifically implements the following steps:

[0145] The historical characteristic information affecting the cost of the ditch culvert project in the historical ditch culvert cost data is converted into a feature vector; the external specific condition information is encoded to obtain a conditional feature vector; the historical ditch culvert cost data is converted into time series data using the feature vector to obtain historical time series data; a portion of the historical time series data is randomly selected to obtain a training target, and the remaining data in the historical time series data is used as conditional data; the training target and the conditional data are combined with the conditional feature vector to form a training data set.

[0146] The external specific condition information includes regional information, material prices, and labor costs.

[0147] In one embodiment, when the processor 502 implements the step of training the deep learning network using DDPM according to the training data set to obtain the interpolation prediction model, the processor 502 specifically implements the following steps:

[0148] The number of diffusion steps is set, and input data is constructed according to the training data set; a noise generation network is constructed; the noise generation network is modified using conditional vector features, and a target loss function is generated; according to the input data, noise is added in reverse step by step, starting from a random noise, and the prediction data of each step is calculated in turn, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; the interpolation prediction model is determined according to the output result combined with the target loss function and the noise generation network.

[0149] The input data is in, is a constant term, X miss is the training target in the training data set; is the input data; the objective loss function is Among them, Xobv is the conditional data; is the input data; C is the conditional feature vector.

[0150] In one embodiment, when the processor 502 implements the step of modifying the noise generation network using the conditional vector feature and generating the target loss function, the processor 502 specifically implements the following steps:

[0151] The conditional vector feature replaces the self-attention module input in the noise generation network and generates a target loss function.

[0152] In one embodiment, when the processor 502 implements the step of adding noise in reverse step by step according to the input data, starting from a random noise, calculating the prediction data of each step in sequence, and adjusting the data using the parameters in the DDPM algorithm and the noise generation network to obtain the output result, the processor 502 specifically implements the following steps:

[0153] According to the input data, noise is added in reverse step by step, starting from a random noise, using The prediction data of each step is calculated in turn, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; wherein, is the β in the DDPM algorithm k+1 , is the α of the DDPM algorithm k+1 ,∈ θ is the modified noise generation network, Z is the standard normal distribution, σ θ The network training weights are generated for the corresponding perturbation noise, Indicates that the generated network is based on the network input conditions under the current network weight parameter θ The generated prediction data, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0154] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0155] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0156] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:

[0157] Acquire the ditch culvert cost data with missing values ​​to obtain the data to be interpolated; input the data to be interpolated into the interpolation prediction model to perform data interpolation to obtain the interpolation result; output the interpolation result;

[0158] Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

[0159] In one embodiment, when the processor executes the computer program to implement the interpolation prediction model, the processor implements the following steps when the processor executes the computer program to implement the model step of constructing a training data set using historical ditch culvert cost data and external specific condition information and using DDPM to train a deep learning network:

[0160] Obtain historical ditch culvert cost data and external specific condition information; construct a training data set based on the historical ditch culvert cost data and external specific condition information; and train a deep learning network using DDPM based on the training data set to obtain an interpolation prediction model.

[0161] In one embodiment, when the processor executes the computer program to implement the step of constructing a training data set according to the historical ditch culvert cost data and external specific condition information, the processor specifically implements the following steps:

[0162] The historical characteristic information affecting the cost of the ditch culvert project in the historical ditch culvert cost data is converted into a feature vector; the external specific condition information is encoded to obtain a conditional feature vector; the historical ditch culvert cost data is converted into time series data using the feature vector to obtain historical time series data; a portion of the historical time series data is randomly selected to obtain a training target, and the remaining data in the historical time series data is used as conditional data; the training target and the conditional data are combined with the conditional feature vector to form a training data set.

[0163] The external specific condition information includes regional information, material prices, and labor costs.

[0164] In one embodiment, when the processor executes the computer program to implement the step of training a deep learning network using DDPM according to the training data set to obtain an interpolation prediction model, the processor specifically implements the following steps:

[0165] The number of diffusion steps is set, and input data is constructed according to the training data set; a noise generation network is constructed; the noise generation network is modified using conditional vector features, and a target loss function is generated; according to the input data, noise is added in reverse step by step, starting from a random noise, and the prediction data of each step is calculated in turn, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; the interpolation prediction model is determined according to the output result combined with the target loss function and the noise generation network.

[0166] The input data is in, is a constant term, X miss is the training target in the training data set; is the input data; the objective loss function is Among them, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0167] In one embodiment, when the processor executes the computer program to implement the step of modifying the noise generation network using conditional vector features and generating a target loss function, the processor specifically implements the following steps:

[0168] The conditional vector feature replaces the self-attention module input in the noise generation network and generates a target loss function.

[0169] In one embodiment, when the processor executes the computer program to implement the step of calculating the predicted data of each step in sequence according to the input data by gradually adding noise in reverse, starting from a random noise, and adjusting the data using the parameters in the DDPM algorithm and the noise generation network to obtain the output result, the processor specifically implements the following steps:

[0170] According to the input data, noise is added in reverse step by step, starting from a random noise, using The prediction data of each step is calculated in turn, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; wherein, is the β in the DDPM algorithm k+1 , is the α of the DDPM algorithm k+1 ,∈ θ is the modified noise generation network, Z is the standard normal distribution, σ θ The network training weights are generated for the corresponding perturbation noise, Indicates that the generated network is based on the network input conditions under the current network weight parameter θ The generated prediction data, X obv is the conditional data; is the input data; C is the conditional feature vector.

[0171] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0172] Those of ordinary skill in the art will appreciate 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 terms of function in the above description. 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.

[0173] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0174] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0176] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for interpolating and predicting the cost of ditch and culvert construction data, characterized in that: include: Obtain the cost data of canals and culverts with missing values ​​to obtain the data to be interpolated; Inputting the data to be interpolated into the interpolation prediction model to perform data interpolation to obtain an interpolation result; Outputting the interpolation result; Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

2. The method for interpolating and predicting the cost of ditch and culvert according to claim 1 is characterized in that: The interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and training a deep learning network using DDPM, including: Obtain historical ditch and culvert cost data and external specific conditions information; Constructing a training data set based on the historical ditch culvert cost data and external specific condition information; A deep learning network is trained using DDPM according to the training data set to obtain an interpolation prediction model.

3. The method for interpolating and predicting the cost of ditch and culvert according to claim 2 is characterized in that: The constructing of a training data set according to the historical ditch culvert cost data and external specific condition information includes: Converting historical characteristic information affecting the cost of ditch culvert engineering in the historical ditch culvert cost data into a characteristic vector; Encoding the external specific condition information to obtain a conditional feature vector; The historical ditch culvert cost data is converted into time series data using the characteristic vector to obtain historical time series data; Randomly select a portion of the historical time series data to obtain a training target, and use the remaining data in the historical time series data as conditional data; The training target and the conditional data are combined with the conditional feature vector to form a training data set.

4. The method for interpolating and predicting the cost of ditch and culvert according to claim 3 is characterized in that: The external specific condition information includes regional information, material prices, and labor costs.

5. The method for interpolating and predicting the cost of ditch and culvert according to claim 3 is characterized in that: The step of training a deep learning network using DDPM according to the training data set to obtain an interpolation prediction model includes: Setting the number of diffusion steps and constructing input data according to the training data set; Construct a noise generation network; Modifying the noise generation network using conditional vector features and generating a target loss function; According to the input data, by gradually adding noise in reverse, starting from a random noise, the prediction data of each step is calculated in sequence, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; The interpolation prediction model is determined based on the output results combined with the target loss function and the noise generation network.

6. The method for interpolating and predicting the cost of ditch and culvert according to claim 5, characterized in that: The input data is in, is a constant term, X miss is the training target in the training data set; is the input data; the objective loss function is Among them, X obv is the conditional data; is the input data; C is the conditional feature vector.

7. The method for interpolating and predicting the cost of ditch and culvert according to claim 6, characterized in that: The adopting of conditional vector features to modify the noise generation network and generate a target loss function includes: The conditional vector feature replaces the self-attention module input in the noise generation network and generates a target loss function.

8. The method for interpolating and predicting the cost of ditch and culvert according to claim 7, characterized in that: The method starts from a random noise and calculates the prediction data of each step in turn by adding noise in reverse step by step according to the input data, and adjusts the data by using the parameters in the DDPM algorithm and the noise generation network to obtain the output result, including: According to the input data, noise is added in reverse step by step, starting from a random noise, using The prediction data of each step is calculated in turn, and the parameters in the DDPM algorithm and the noise generation network are used to adjust the data to obtain the output result; wherein, is the β in the DDPM algorithm k+1 , is the α of the DDPM algorithm k+1 ,∈ θ is the modified noise generation network, Z is the standard normal distribution, σ θ The network training weights are generated for the corresponding perturbation noise, Indicates that the generated network is based on the network input conditions under the current network weight parameter θ The generated prediction data, X obv is the conditional data; is the input data; C is the conditional feature vector.

9. A device for interpolating and predicting the cost data of ditches and culverts, characterized in that: include: A data acquisition unit is used to acquire the cost data of canal culverts with missing values ​​to obtain data to be interpolated; An interpolation unit, used for inputting the data to be interpolated into the interpolation prediction model to perform data interpolation to obtain an interpolation result; An output unit, used for outputting the interpolation result; Among them, the interpolation prediction model is a model obtained by constructing a training data set using historical ditch culvert cost data and external specific condition information, and using DDPM to train a deep learning network.

10. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.