CN-122022859-A - Method and system for predicting manufacturing cost of box-type substation equipment based on KNN-BP
Abstract
The invention relates to a method and a system for predicting manufacturing cost of box-type substation equipment based on KNN-BP, wherein the method comprises the steps of obtaining historical manufacturing cost data of a historical box-type substation and key factor data corresponding to key factors, preprocessing, calculating a characteristic weight matrix among preprocessed data, obtaining key factor data of box-type substation equipment to be predicted, calculating distances based on a KNN algorithm and the characteristic weight matrix, screening out key factor data of the historical box-type substation corresponding to the previous K distances as characteristics after sorting according to ascending order, taking the historical manufacturing cost data as a prediction label, obtaining a training sample set, training a BP neural network with penalty items introduced by using the training sample set, inputting the key factor data of the box-type substation equipment to be predicted into the trained BP neural network, and predicting manufacturing cost, thus obtaining a manufacturing cost prediction result.
Inventors
- DAI ZHIHUI
- ZHENG ZIHAN
- Xiao Xuanwei
- HU JINSONG
- PAN YING
- WU TINGTING
- WANG JIN
- LIN HUI
Assignees
- 中国电建集团福建省电力勘测设计院有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260209
Claims (10)
- 1. The method for predicting the manufacturing cost of the box-type substation equipment based on KNN-BP is characterized by comprising the following steps: Obtaining key factors of the box-type substation by adopting an expert investigation method; acquiring related data of a historical box-type transformer substation, wherein the related data comprises historical cost data and key factor data corresponding to each key factor, and preprocessing; obtaining key factor data of box-type substation equipment to be predicted, calculating the distance between the key factor data of the box-type substation equipment to be predicted and the key factor data of a historical box-type substation based on a KNN algorithm and a characteristic weight matrix, sorting all the distances according to ascending order, and screening out the key factor data before the key factor data are selected Key factor data of a historical box-type substation corresponding to each distance is used as a characteristic, historical cost data is used as a prediction label, and a training sample set is obtained; Training the BP neural network with the penalty term introduced by using a training sample set to obtain a trained BP neural network; and inputting key factor data of the box-type substation equipment to be predicted into the trained BP neural network to perform cost prediction, so as to obtain a cost prediction result of the box-type substation to be predicted.
- 2. The KNN-BP-based box-type substation equipment manufacturing cost prediction method according to claim 1, wherein the key factors at least comprise one of box transformer form, energy efficiency level, transformer type, voltage level, switch type, capacity, purchase quantity, purchase time, copper price at purchase time, silicon steel price at purchase time and competition degree.
- 3. The KNN-BP based box-type substation equipment cost prediction method according to claim 1, wherein the preprocessing includes data format conversion and data normalization; the data format conversion is specifically to convert key factor data into statistical data based on a preset rule; the data normalization is specifically mapping the relevant data into [0,1].
- 4. The KNN-BP based box-type substation equipment cost prediction method according to claim 1, wherein the feature weight matrix between the preprocessed related data is calculated, and the specific steps are as follows: Calculating a correlation coefficient matrix between key factor data and historical cost data of each historical box-type substation , , , wherein, The number of lines, i.e. the number of key factors, Representing the number of columns, i.e. the number of historical cost data, Represent the first Line 1 Correlation coefficient matrix values of the columns; Average calculating the value of each column in the correlation coefficient matrix to obtain an average correlation coefficient matrix , wherein, Represent the first Average correlation coefficient matrix values for rows; normalizing each average correlation coefficient matrix value to obtain a characteristic weight matrix , wherein, Represent the first Characteristic weight matrix values of key factors of each historical box-type substation.
- 5. The KNN-BP-based box-type substation equipment cost prediction method according to claim 4, wherein the distance between key factor data of the box-type substation equipment to be predicted and key factor data of the historical box-type substation is calculated based on a KNN algorithm and a characteristic weight matrix in the following calculation manner: ; In the formula, Key factor data and a first item of information representing a box-type substation installation to be predicted The distance between key factor data of the historical box-type substations; Represent the first Data corresponding to key factors of box-type substation equipment to be predicted; Represent the first Historical box-type substation Key factor data.
- 6. The KNN-BP based box-type substation equipment cost prediction method according to claim 1, wherein the BP neural network comprises an input layer, a hidden layer, and an output layer, wherein: the node number of the input layer is the same as the key factor data number; The node number of the hidden layer is calculated based on the node number of the input layer and the node number of the output layer; the number of the nodes of the output layer is the same as the number of the historical cost data.
- 7. The KNN-BP based box-type substation equipment cost prediction method according to claim 6, wherein the training of the BP neural network introducing the penalty term by using the training sample set comprises the following specific steps: The input layer receives the training sample set and transmits the training sample set to the hidden layer; the hidden layer obtains the output of each hidden layer node by using a transfer function; inputting the output of each hidden layer node to an output layer to obtain the output of each output layer node; Accumulating the preset difference between the expected output of each output layer node and the output of each output layer node to obtain an error term; calculating a penalty term based on the input layer weight and the output layer weight; weighting and calculating penalty items and error items to obtain total errors; Updating the punishment items and the weighting coefficients of the error items based on the jacobian matrix of the error items to obtain updated weighting coefficients; iterating the process until the total error is smaller than a preset error threshold value or the maximum iteration times are reached, stopping iteration, and obtaining an optimal weighting coefficient; Obtaining weight variation based on the optimal weighting coefficient and the jacobian matrix of the error term; And correcting the weight of the input layer and the weight of the output layer based on the weight change amount.
- 8. Box-type substation equipment cost prediction system based on KNN-BP, characterized in that, the system includes: The data acquisition module is used for acquiring key factors of the box-type transformer substation by adopting an expert investigation method; the sample construction module is used for acquiring related data of the historical box-type transformer substation, comprising historical cost data and key factor data corresponding to each key factor, and preprocessing the data; obtaining key factor data of box-type substation equipment to be predicted, calculating the distance between the key factor data of the box-type substation equipment to be predicted and the key factor data of a historical box-type substation based on a KNN algorithm and a characteristic weight matrix, sorting all the distances according to ascending order, and screening out the key factor data before the key factor data are selected Key factor data of a historical box-type substation corresponding to each distance is used as a characteristic, historical cost data is used as a prediction label, and a training sample set is obtained; the model training module is used for training the BP neural network with the penalty term by using the training sample set to obtain a trained BP neural network; The cost prediction module is used for inputting key factor data of the box-type substation equipment to be predicted into the BP neural network after training to perform cost prediction, so as to obtain a cost prediction result of the box-type substation to be predicted.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the program is executed by the processor.
- 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 7.
Description
Method and system for predicting manufacturing cost of box-type substation equipment based on KNN-BP Technical Field The invention relates to the technical field of box-type substation manufacturing cost prediction, in particular to a method and a system for predicting manufacturing cost of box-type substation equipment based on KNN-BP. Background The box-type transformer substation is used as core key equipment of a new energy power plant, and the equipment cost occupies an important proportion in the total cost of a new energy project, so that the project investment planning and the cost management and control effect are directly influenced. Along with the rapid development of new energy industry, different new energy power plants present diversified characteristics to the technical parameter demands of box-type substations, and the prices of the box-type substations have remarkable time characteristics, even though equipment of the same specification is in the same specification, obvious differences exist in the prices due to factors such as raw material price fluctuation, market competition situation change and the like at different time points. The Chinese patent application with publication number of CN 105335818A discloses a power transmission and transformation project cost risk assessment prediction method based on BP neural algorithm. The technical scheme includes that BP neural algorithm is used for carrying out index analysis on risk indexes affecting cost to form a cost risk index system, generated cost sample data are collected and classified and summarized according to the cost risk index system, data normalization function is used for carrying out normalization processing to obtain grouped sample data, expected values are calculated, BP neural network function is created, data training is carried out on each group of sample data and the expected values to obtain a power transmission and transformation project cost risk assessment prediction model, new power transmission and transformation project cost risk is predicted, and expert prediction method is used for carrying out cost data prediction on the new power transmission and transformation project after model training is finished and used for evaluating new power transmission and transformation project cost risk. The method can accurately and reliably evaluate the manufacturing cost risk of new power transmission and transformation projects, and provides positive guidance significance for project investment construction parties. Although the above technical scheme only directly uses the original sample data to train the model, abnormal samples, redundant samples or low-correlation samples cannot be removed, so that the quality and the effectiveness of a training sample set are insufficient, and the accuracy and the stability of model prediction are further affected. In addition, the technical scheme adopts a conventional mode to train the BP neural network, does not introduce a Bayesian regularization strategy, lacks the optimization mechanism, has weaker generalization capability and anti-interference capability when facing the cost data of different power transmission and transformation projects, and is easy to influence the reliability of a prediction result by sample fluctuation. Meanwhile, the index system of the technical scheme lacks a targeted screening basis and possibly comprises indexes with low relevance to the manufacturing cost risk, so that the effectiveness of model prediction is further reduced. Disclosure of Invention In order to solve the problems in the prior art, the invention provides a method and a system for predicting the manufacturing cost of box-type substation equipment based on KNN-BP. The technical scheme of the invention is as follows: On one hand, the invention provides a method for predicting the manufacturing cost of box-type substation equipment based on KNN-BP, which comprises the following steps: Obtaining key factors of the box-type substation by adopting an expert investigation method; acquiring related data of a historical box-type transformer substation, wherein the related data comprises historical cost data and key factor data corresponding to each key factor, and preprocessing; obtaining key factor data of box-type substation equipment to be predicted, calculating the distance between the key factor data of the box-type substation equipment to be predicted and the key factor data of a historical box-type substation based on a KNN algorithm and a characteristic weight matrix, sorting all the distances according to ascending order, and screening out the key factor data before the key factor data are selected Key factor data of a historical box-type substation corresponding to each distance is used as a characteristic, historical cost data is used as a prediction label, and a training sample set is obtained; Training the BP neural network with the penalty term introduced by using a training sample s