Multi-target water consumption prediction method, device, equipment, medium and program product
By using clustered feature trees and random local feature conversion algorithms to generate multi-objective specific features in urban water usage prediction, the problem that the existing technology cannot achieve multi-objective water usage prediction is solved, and multi-objective prediction of urban water usage is achieved, supporting dynamic adjustment of water supply plans, and avoiding waste of water resources.
Patent Information
- Application Number
- CN202510248417.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-27
AI Technical Summary
The existing urban water consumption prediction methods cannot achieve multi-target prediction of urban water consumption, and it is difficult to predict daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption at the same time, resulting in difficult dynamic adjustment of water supply plans and easy to cause waste of water resources.
By obtaining the macro water use characteristics and micro water use characteristics of the target city and inputting them into the pre-trained water use prediction model, multi-objective specific features are generated using cluster feature tree algorithm and random local feature conversion algorithm to predict multi-objective water use.
The city's daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption have been achieved, helping relevant personnel to dynamically adjust their water supply plans and avoid waste of water resources.
Smart Images

Figure CN120218309A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular, to a multi-objective water consumption prediction method, device, equipment, medium and program product. Background Art
[0002] Existing urban water consumption prediction methods mainly include two types: urban multi-region water consumption prediction methods and urban single-objective water consumption prediction methods. For example, the urban single-objective water consumption prediction method can only predict the daily water consumption of urban residents.
[0003] However, the existing urban water consumption prediction methods cannot achieve multi-objective prediction of urban water consumption, and it is difficult to simultaneously predict the daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption of the city. As a result, it is difficult for relevant personnel to dynamically adjust the water supply plan according to the prediction results, which is likely to cause waste of water resources. Summary of the Invention
[0004] Embodiments of this application provide a multi-objective water consumption prediction method, device, equipment, medium and program product, which are used to solve the technical problem that the existing urban water consumption prediction methods cannot achieve multi-objective prediction of urban water consumption, and it is difficult to simultaneously predict the daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption of the city, resulting in difficulties for relevant personnel to dynamically adjust the water supply plan according to the prediction results and easy waste of water resources.
[0005] In a first aspect, an embodiment of this application provides a multi-objective water consumption prediction method, including: obtaining the macroscopic water consumption characteristics and microscopic water consumption characteristics of a target city; inputting the macroscopic water consumption characteristics and microscopic water consumption characteristics into a pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption of the target city output by the water consumption prediction model.
[0006] In one embodiment, before inputting the macroscopic water consumption characteristics and microscopic water consumption characteristics into a pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption, and quarterly water consumption of the target city output by the water consumption prediction model, it further includes: obtaining an original training set; the original training set includes multiple samples, each sample includes a corresponding sample feature set and a sample label corresponding to the sample feature set, the sample feature set includes sample macroscopic water consumption characteristics and sample microscopic water consumption characteristics, and the sample label includes sample daily water consumption, sample weekly water consumption, sample monthly water consumption, and sample quarterly water consumption; based on the clustering feature tree algorithm, performing sample clustering on the multiple samples to generate the clustering cluster characteristics of each sample; the clustering cluster characteristics are used to characterize the similarity of the samples in the feature space; adding the clustering cluster characteristics of each sample to the sample feature set corresponding to each sample in the original training set to generate a first training set; based on the random local feature transformation algorithm, generating multi-objective specific features for each sample; the multi-objective specific features include a first objective specific feature corresponding to the sample daily water consumption, a second objective specific feature corresponding to the sample weekly water consumption, a third objective specific feature corresponding to the sample monthly water consumption, and a fourth objective specific feature corresponding to the sample quarterly water consumption; adding the multi-objective specific features of each sample to the sample feature set corresponding to each sample in the first training set to generate a target training set; performing pre-training based on the target training set to obtain a water consumption prediction model.
[0007] In one embodiment, based on the clustering feature tree algorithm, performing sample clustering on the multiple samples to generate the clustering cluster characteristics of each sample includes: based on the clustering feature tree algorithm, constructing an initial feature tree; the initial feature tree includes multiple initial leaf nodes; performing sample clustering on the multiple samples, and respectively allocating the sample feature set corresponding to each sample to an initial leaf node of the initial feature tree to obtain a clustering feature tree; the clustering feature tree includes multiple leaf nodes, and each leaf node corresponds to a sample; determining the clustering cluster characteristics of each sample based on the clustering cluster category of each leaf node.
[0008] In one embodiment, based on the random local feature transformation algorithm, generating multi-objective specific features for each sample includes: constructing a corresponding initial gradient boosting tree model for each sample; randomly selecting the sample feature set of each sample in the original training set according to a preset ratio to obtain the local feature set of each sample; a local feature set is a subset of a sample feature set; based on each local feature set, respectively performing negative gradient residual generation learning on the initial gradient boosting tree model corresponding to each sample to obtain the gradient boosting tree model corresponding to each sample; determining the multi-objective specific features of each sample based on the residual prediction values of the leaf nodes of each gradient boosting tree model.
[0009] In one embodiment, the macroscopic water use characteristics include the regional population quantity of the target city, the type of water use strategy, and water resource information; the microscopic water use characteristics include the climate characteristics, holiday characteristics, special event characteristics, and water use characteristics of the target city.
[0010] In one embodiment, obtaining the macroscopic water use characteristics and microscopic water use characteristics of the target city includes: obtaining the initial macroscopic water use characteristics and initial microscopic water use characteristics of the target city; performing data cleaning, denoising, and normalization processing on the initial macroscopic water use characteristics and initial microscopic water use characteristics to obtain the macroscopic water use characteristics and microscopic water use characteristics.
[0011] In a second aspect, an embodiment of the present application provides a multi-objective water consumption prediction device, including: an acquisition module for acquiring the macroscopic water use characteristics and microscopic water use characteristics of the target city; a prediction module for inputting the macroscopic water use characteristics and microscopic water use characteristics into a pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption, and quarterly water consumption of the target city output by the water consumption prediction model.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements any one of the above multi-objective water consumption prediction methods.
[0013] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any one of the above multi-objective water consumption prediction methods.
[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements any one of the above multi-objective water consumption prediction methods.
[0015] The multi-objective water consumption prediction method, device, equipment, medium, and program product provided by the embodiments of the present application perform multi-objective prediction through a pre-trained water consumption prediction model according to the macroscopic water use characteristics and microscopic water use characteristics of the target city, so as to simultaneously predict the daily water consumption, weekly water consumption, monthly water consumption, and quarterly water consumption of the target city, and further enable relevant personnel to dynamically adjust the water supply plan according to the multi-objective prediction results, avoiding waste of water resources. Description of the Drawings
[0016] To more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0017] Figure 1 It is a schematic flowchart of a multi-objective water consumption prediction method provided by an embodiment of the present application.
[0018] Figure 2 It is a schematic flowchart of the training process of a water consumption prediction model provided by an embodiment of the present application.
[0019] Figure 3 It is a schematic structural diagram of a multi-objective water consumption prediction device provided by an embodiment of the present application.
[0020] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific embodiments
[0021] To make the objectives, technical solutions, and advantages of the present application clearer, the following will clearly and completely describe the technical solutions in the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.
[0022] Please refer to Figure 1 , Figure 1 It is a schematic flowchart of a multi-objective water consumption prediction method provided by an embodiment of the present application. As Figure 1 shown, in the embodiment of the present application, the multi-objective water consumption prediction method includes steps S110 to S120, and the specific steps are as follows: S110: Obtain the macroscopic water consumption characteristics and microscopic water consumption characteristics of the target city.
[0023] The prediction accuracy of the water consumption prediction model is highly correlated with the selection of features. Therefore, selecting appropriate features is an effective means to improve the multi-objective water consumption prediction accuracy. When predicting the daily, weekly, monthly, and quarterly water consumption of the target city, various characteristic factors need to be comprehensively considered. In this embodiment, the selected characteristic factors of the target city include macroscopic water consumption characteristics and microscopic water consumption characteristics.
[0024] Optionally, the macroscopic water consumption characteristics include the regional population quantity, water use strategy type, and water resource information of the target city.
[0025] Among them, the increase or decrease in the regional population can directly affect the total water consumption.
[0026] The water use strategy type specifically refers to the water use policy type, and water use policies (such as water conservation policies, water price discounts, etc.) will have a direct impact on water consumption.
[0027] Water resource information refers to the information reflecting the water resource situation, such as the total amount and available amount of water resources in the area where the target city is located. Water resource information is an important factor affecting water consumption. In areas with rich water resources, the water consumption may be relatively large; while in areas with scarce water resources, water conservation measures need to be adopted to limit water consumption.
[0028] Optionally, the micro water use characteristics include the climate characteristics, holiday characteristics, special event characteristics, and water use characteristics of the target city.
[0029] The climate characteristics include but are not limited to temperature, precipitation, seasonal conditions, etc.
[0030] The holiday characteristics and special event characteristics refer to holidays or special events, including but not limited to special events such as weekends, holidays, large-scale activities, or natural disasters.
[0031] The water use characteristics include but are not limited to the daily water consumption, weekly water consumption, monthly water consumption, quarterly water consumption, etc. in the same historical period of the target city. The time series characteristics, periodicity, and trend of the historical water consumption data are conducive to improving the accuracy of model prediction.
[0032] Specifically, after obtaining the initial macro water use characteristics and initial micro water use characteristics of the target city, data cleaning, denoising, and normalization processing are performed on the initial macro water use characteristics and initial micro water use characteristics, and the macro water use characteristics and micro water use characteristics can be obtained. Through data preprocessing such as data cleaning, denoising, and normalization, the quality and consistency of the feature data can be ensured.
[0033] S120: Input the macro water use characteristics and micro water use characteristics into the pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption, and quarterly water consumption of the target city output by the water consumption prediction model.
[0034] The multi-objective water consumption prediction method provided by the embodiments of the present application performs multi-objective prediction through the pre-trained water consumption prediction model according to the macro water use characteristics and micro water use characteristics of the target city, so as to simultaneously predict the daily water consumption, weekly water consumption, monthly water consumption, and quarterly water consumption of the target city, and further enable relevant personnel to dynamically adjust the water supply plan according to the multi-objective prediction results, avoiding waste of water resources.
[0035] In some embodiments, before inputting the macroscopic water consumption characteristics and microscopic water consumption characteristics into a pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption, and quarterly water consumption of the target city output by the water consumption prediction model, it further includes: obtaining an original training set; the original training set includes multiple samples, each sample includes a corresponding sample feature set and a sample label corresponding to the sample feature set, the sample feature set includes sample macroscopic water consumption characteristics and sample microscopic water consumption characteristics, and the sample label includes sample daily water consumption, sample weekly water consumption, sample monthly water consumption, and sample quarterly water consumption; based on the clustering feature tree algorithm, performing sample clustering on the multiple samples to generate the clustering cluster features of each sample; the clustering cluster features are used to characterize the similarity of the samples in the feature space; adding the clustering cluster features of each sample to the sample feature set corresponding to each sample in the original training set to generate a first training set; based on the random local feature transformation algorithm, generating multi-objective specific features for each sample; the multi-objective specific features include a first objective specific feature corresponding to the sample daily water consumption, a second objective specific feature corresponding to the sample weekly water consumption, a third objective specific feature corresponding to the sample monthly water consumption, and a fourth objective specific feature corresponding to the sample quarterly water consumption; adding the multi-objective specific features of each sample to the sample feature set corresponding to each sample in the first training set to generate a target training set; performing pre-training based on the target training set to obtain a water consumption prediction model.
[0036] It can be understood that before performing multi-objective water consumption prediction through the water consumption prediction model, model training is required.
[0037] In order to model the multi-objective prediction of urban daily, weekly, monthly, and quarterly water consumption, effective features for each target need to be explored. This embodiment proposes a clustering-enhanced boosting tree algorithm for multi-objective water consumption prediction. The clustering-enhanced boosting tree algorithm includes the following two algorithms: (1) Clustering Feature Tree (CF-Tree) algorithm: Using the clustering feature tree algorithm to cluster the original training set, mining the association relationships between different samples. When the samples are clustered into one category, it can be considered that the feature output spaces of the samples in the same category have a close correlation.
[0038] (2) Random local feature transformation algorithm: The random local feature transformation algorithm can be used to generate the target specific features of each target for each sample. For example, an initial model is constructed according to the random local feature transformation algorithm, the residual prediction values of each target are calculated using the gradient boosting classification tree, and the residual prediction values of the target are used as additional features to expand the feature space of the original training set.
[0039] Please refer to Figure 2 , Figure 2 which is a schematic diagram of the training process of the water consumption prediction model provided by the embodiment of the present application.
[0040] As Figure 2 shown, in the training phase, the original training set needs to be obtained , and the original training set includes multiple samples, each sample includes a corresponding sample feature set and a sample label corresponding to the sample feature set. The sample feature set includes sample macroscopic water use features and sample microscopic water use features. The sample label includes sample daily water consumption, sample weekly water consumption, sample monthly water consumption, and sample quarterly water consumption.
[0041] Among them, the original training set is specifically denoted as , represents the set of sample feature sets corresponding to multiple samples, represents the set of sample labels corresponding to multiple sample feature sets.
[0042] Furthermore, based on the clustering feature tree algorithm, the relationships between different samples in the original training set are mined, and the samples are clustered to generate the clustering cluster features of each sample. The clustering result characterizes the similar features of different samples in the feature output space; and the clustering cluster features of each sample are respectively added to the sample feature set corresponding to each sample in the original training set to generate the first training set .
[0043] Among them, the clustering cluster features are used to characterize the similarity of different samples in the feature space. The first training set is specifically denoted as , represents the set of clustering cluster features corresponding to multiple samples.
[0044] Furthermore, based on the random local feature transformation algorithm, the multi-objective specific features of each sample are generated; and the multi-objective specific features of each sample are respectively added to the sample feature set corresponding to each sample in the first training set to generate the final target training set .
[0045] Among them, the multi-objective specific features include the first objective specific feature corresponding to the sample daily water consumption, the second objective specific feature corresponding to the sample weekly water consumption, the third objective specific feature corresponding to the sample monthly water consumption, and the fourth objective specific feature corresponding to the sample quarterly water consumption.
[0046] Furthermore, based on the target training set pre-training is performed to obtain a water consumption prediction model.
[0047] Specifically, using the framework of the random local feature transformation algorithm, set the number of learning trees of the gradient boosting tree and the number of feature dimensions to be randomly selected each time. Use the residual prediction value of the gradient boosting tree model corresponding to each target as the target-specific feature, and add it as an additional feature to the original feature space, and then the final water consumption prediction model can be trained.
[0048] Similarly, in the stage of testing the trained water consumption prediction model using the test set samples, the process is the same as that in the training stage. First, construct a new test set sample, then input it into the water consumption prediction model for multi-target prediction to obtain the final prediction result, and check the model accuracy of the water consumption prediction model according to the final prediction result and the actual result.
[0049] In some embodiments, based on the clustering feature tree algorithm, perform sample clustering on multiple samples to generate the clustering cluster features of each sample, including: based on the clustering feature tree algorithm, construct an initial feature tree; the initial feature tree includes multiple initial leaf nodes; perform sample clustering on multiple samples, and respectively assign the sample feature set corresponding to each sample to an initial leaf node of the initial feature tree to obtain a clustering feature tree; the clustering feature tree includes multiple leaf nodes, and each leaf node corresponds to a sample; based on the clustering cluster category of each leaf node, determine the clustering cluster feature of each sample.
[0050] In multi-target regression prediction, the data sample is represented by a feature vector and the output vectors of multiple targets. This embodiment assumes that interdependent targets have similar features in the feature output space, that is, there is a certain correlation relationship between different samples, and uses the clustering feature tree algorithm to mine the internal correlation of different samples and find similar features in the feature output space, and its performance is better than other clustering algorithms.
[0051] Specifically, first construct an initial feature tree with a tree structure based on the clustering feature tree algorithm. The initial feature tree includes multiple initial leaf nodes.
[0052] Furthermore, perform sample clustering on multiple samples, and respectively assign the sample feature set corresponding to each sample to an initial leaf node of the initial feature tree, that is, the features corresponding to each sample will finally be assigned to an initial leaf node to obtain a clustering feature tree.
[0053] Since the clustering feature tree includes multiple leaf nodes, and each leaf node corresponds to a sample, therefore, each sample can obtain the category of the clustering cluster of its corresponding leaf node from the clustering feature tree as the clustering cluster feature.
[0054] In this embodiment, the method of applying unsupervised learning clustering feature tree is used to mine the associations between different samples, that is, the similarity of the feature output space; through the feature clustering process, the clustering clusters of all samples are obtained, and the clustering clusters of each leaf node are extended to the original feature space.
[0055] The multi-objective water consumption prediction method provided by the embodiments of this application selects to use the clustering feature tree (CF-Tree) algorithm to fully mine the internal associations of samples, find similar features in the feature output space, and cluster strongly correlated samples. Its performance is better than other clustering algorithms, which is conducive to improving the performance of the water consumption prediction model subsequently.
[0056] In some embodiments, based on the random local feature transformation algorithm, multi-objective specific features of each sample are generated, including: constructing a corresponding initial gradient boosting tree model for each sample; randomly selecting the sample feature sets of each sample in the original training set according to a preset ratio to obtain the local feature set of each sample; a local feature set is a subset of a sample feature set; based on each local feature set, negative gradient residual generation learning is respectively performed on the initial gradient boosting tree model corresponding to each sample to obtain the gradient boosting tree model corresponding to each sample; based on the residual prediction values of the leaf nodes of each gradient boosting tree model, the multi-objective specific features of each sample are determined.
[0057] In this embodiment, the random local feature transformation algorithm is constructed to extract the target specific features of each target. The random local feature transformation algorithm can ensure that the model can learn the information hidden in a small number of specific features. By setting the accumulation of the random selection times (for example, the initial value of the random selection times T is set to 100), the expression of the target specific features can be guaranteed to have discrimination, and the difference and refinement of the target specific features can be ensured.
[0058] Specifically, set the preset ratio ratio of the random local feature transformation algorithm.
[0059] For example, if the initial value of the preset ratio ratio of the random local feature transformation algorithm is 0.3, it means that 30% of the features are selected each time for the learning of the target specific features.
[0060] Further, construct a corresponding initial gradient boosting tree model for each sample.
[0061] Further, according to the preset ratio ratio, randomly select the sample feature sets of each sample in the original training set to obtain the local feature set of each sample.
[0062] Among them, a local feature set is a subset of a sample feature set.
[0063] For example, for each sample in the original training set, 30% of the features (which can be the macroscopic water use features of the sample or the microscopic water use features of the sample) can be randomly selected from the corresponding sample feature set to form the local feature set corresponding to the sample.
[0064] Furthermore, based on each local feature set, negative gradient residual generation learning is respectively performed on the initial gradient boosting tree model corresponding to each sample to obtain the gradient boosting tree model corresponding to each sample; based on the residual prediction values of the leaf nodes of each gradient boosting tree model, the multi-objective specific features of each sample are determined.
[0065] The process of the initial gradient boosting tree model learning the target specific features is the process of all initial gradient boosting tree models learning to generate negative gradient residuals. The residual prediction value of the leaf node output by any gradient boosting tree model can be transformed into the target specific feature corresponding to the target. Each tree (i.e., each gradient boosting tree model) is learned based on a randomly selected feature subset in the original feature space. If the number of trees is too small, there will be a certain amount of noise in the target specific features. To avoid the similarity of each tree being too high, generally, the value of the randomly selected number T should not be too small, and at the same time, the dimensional sampling rate (i.e., the preset ratio ratio) of the feature subset learned by each tree should not be too large.
[0066] Finally, the multi-objective specific features of each sample are added to the original space as additional features to train the final water consumption prediction model.
[0067] The multi-objective water consumption prediction method provided by the embodiments of this application uses the gradient boosting tree model in the random local feature transformation algorithm to construct specific features for each target of each sample according to the local features. These specific features are the features most relevant to the target. Therefore, the application of these features can optimize the expression ability of a single target, which is beneficial to improving the accuracy of multi-objective regression prediction, and further improving the prediction performance of the water consumption prediction model in the field of multi-objective regression.
[0068] In some embodiments, the macroscopic water use features include the regional population quantity, water use strategy type, and water resource information of the target city; the microscopic water use features include the climate features, holiday features, special event features, and water use features of the target city.
[0069] In some embodiments, obtaining the macroscopic water use features and microscopic water use features of the target city includes: obtaining the initial macroscopic water use features and initial microscopic water use features of the target city; performing data cleaning, denoising, and normalization processing on the initial macroscopic water use features and initial microscopic water use features to obtain the macroscopic water use features and microscopic water use features.
[0070] The embodiments of this application also provide a multi-objective water consumption prediction device. Please refer to Figure 3 ,Figure 3 This is a schematic structural diagram of a multi-objective water consumption prediction device provided by an embodiment of the present application. In the embodiment of the present application, the multi-objective water consumption prediction device includes an acquisition module 310 and a prediction module 320.
[0071] The acquisition module 310 is configured to acquire the macroscopic water consumption characteristics and microscopic water consumption characteristics of the target city.
[0072] The prediction module 320 is configured to input the macroscopic water consumption characteristics and microscopic water consumption characteristics into a pre-trained water consumption prediction model, and obtain the daily water consumption, weekly water consumption, monthly water consumption, and quarterly water consumption of the target city output by the water consumption prediction model.
[0073] In some embodiments, the prediction module 320 is configured to obtain an original training set; the original training set includes a plurality of samples, each sample includes a corresponding sample feature set and a sample label corresponding to the sample feature set, the sample feature set includes a sample macroscopic water consumption feature and a sample microscopic water consumption feature, and the sample label includes a sample daily water consumption, a sample weekly water consumption, a sample monthly water consumption, and a sample quarterly water consumption; based on the clustering feature tree algorithm, perform sample clustering on the plurality of samples to generate a clustering cluster feature for each sample; the clustering cluster feature is used to characterize the similarity of the sample in the feature space; add the clustering cluster feature of each sample to the sample feature set corresponding to each sample in the original training set to generate a first training set; based on the random local feature transformation algorithm, generate multi-objective specific features for each sample; the multi-objective specific features include a first objective specific feature corresponding to the sample daily water consumption, a second objective specific feature corresponding to the sample weekly water consumption, a third objective specific feature corresponding to the sample monthly water consumption, and a fourth objective specific feature corresponding to the sample quarterly water consumption; add the multi-objective specific features of each sample to the sample feature set corresponding to each sample in the first training set to generate a target training set; perform pre-training based on the target training set to obtain a water consumption prediction model.
[0074] In some embodiments, the prediction module 320 is configured to construct an initial feature tree based on the clustering feature tree algorithm; the initial feature tree includes a plurality of initial leaf nodes; perform sample clustering on the plurality of samples, and respectively assign the sample feature set corresponding to each sample to an initial leaf node of the initial feature tree to obtain a clustering feature tree; the clustering feature tree includes a plurality of leaf nodes, and each leaf node corresponds to a sample; determine the clustering cluster feature of each sample based on the clustering cluster category of each leaf node.
[0075] In some embodiments, the prediction module 320 is configured to construct a corresponding initial gradient boosting tree model for each sample; randomly select the sample feature sets of each sample in the original training set according to a preset ratio to obtain the local feature set of each sample; a local feature set is a subset of a sample feature set; based on each local feature set, perform negative gradient residual generation learning on the initial gradient boosting tree model corresponding to each sample to obtain the gradient boosting tree model corresponding to each sample; based on the residual prediction values of the leaf nodes of each gradient boosting tree model, determine the multi-objective specific features of each sample.
[0076] In some embodiments, the macroscopic water use characteristics include the regional population quantity, water use strategy type, and water resource information of the target city; the microscopic water use characteristics include the climate characteristics, holiday characteristics, special event characteristics, and water use characteristics of the target city.
[0077] In some embodiments, the acquisition module 310 is configured to acquire the initial macroscopic water use characteristics and the initial microscopic water use characteristics of the target city; perform data cleaning, denoising, and normalization processing on the initial macroscopic water use characteristics and the initial microscopic water use characteristics to obtain the macroscopic water use characteristics and the microscopic water use characteristics.
[0078] The embodiments of the present application further provide an electronic device. Figure 4 It is a schematic structural diagram of the electronic device provided by the embodiments of the present application, as Figure 4 shown. The electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440. Among them, the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440. The processor 410 can call the logical instructions in the memory 430 to execute the multi-objective water consumption prediction method.
[0079] In addition, when the logical instructions in the above-mentioned memory 430 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0080] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the multi-objective water consumption prediction method provided by the above-mentioned various methods is implemented.
[0081] An embodiment of the present application also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the multi-objective water consumption prediction method provided by the above-mentioned various methods.
[0082] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0083] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disks, optical discs, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-objective water consumption prediction method, characterized in that: include: Obtain the macro and micro water use characteristics of the target city; The macro water consumption characteristics and the micro water consumption characteristics are input into a pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption of the target city output by the water consumption prediction model.
2. The multi-objective water consumption prediction method according to claim 1 is characterized in that: Before inputting the macro water consumption characteristics and the micro water consumption characteristics into the pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption of the target city output by the water consumption prediction model, the method further includes: Obtain an original training set; the original training set includes a plurality of samples, each of the samples includes a corresponding sample feature set and a sample label corresponding to the sample feature set, the sample feature set includes a sample macro water consumption feature and a sample micro water consumption feature, and the sample label includes a sample daily water consumption, a sample weekly water consumption, a sample monthly water consumption, and a sample quarterly water consumption; Based on the clustering feature tree algorithm, the plurality of samples are clustered to generate a cluster feature of each sample; the cluster feature is used to characterize the similarity of the samples in the feature space; Adding the cluster features of each of the samples to the sample feature set corresponding to each of the samples in the original training set to generate a first training set; Based on the random local feature conversion algorithm, a multi-target specific feature of each sample is generated; the multi-target specific feature includes a first target specific feature of the corresponding sample daily water consumption, a second target specific feature of the sample weekly water consumption, a third target specific feature of the sample monthly water consumption, and a fourth target specific feature of the sample quarterly water consumption; Adding the multi-target specific features of each of the samples to the sample feature set corresponding to each of the samples in the first training set to generate a target training set; Pre-training is performed based on the target training set to obtain the water consumption prediction model.
3. The multi-objective water consumption prediction method according to claim 2 is characterized in that: The clustering feature tree algorithm is used to cluster the multiple samples to generate cluster features of each sample, including: Based on the clustering feature tree algorithm, construct an initial feature tree; the initial feature tree includes a plurality of initial leaf nodes; Performing sample clustering on the plurality of samples, assigning a sample feature set corresponding to each sample to an initial leaf node of the initial feature tree, to obtain a cluster feature tree; the cluster feature tree includes a plurality of leaf nodes, each of which corresponds to one sample; Based on the cluster category of each of the leaf nodes, the cluster feature of each of the samples is determined.
4. The multi-objective water consumption prediction method according to claim 2 is characterized in that: The generating of multi-target specific features of each sample based on a random local feature conversion algorithm includes: Constructing a corresponding initial gradient boosting tree model for each of the samples; According to a preset ratio, the sample feature set of each sample in the original training set is randomly selected to obtain a local feature set of each sample; one local feature set is a subset of one sample feature set; Based on each of the local feature sets, respectively, the initial gradient boosting tree model corresponding to each of the samples is subjected to negative gradient residual generation learning to obtain a gradient boosting tree model corresponding to each of the samples; Based on the residual prediction value of each leaf node of the gradient boosting tree model, the multi-target specific features of each sample are determined.
5. The multi-objective water consumption prediction method according to claim 1 is characterized in that: The macro water use characteristics include regional population, water use strategy type and water resource information of the target city; The micro water use characteristics include climate characteristics, holiday characteristics, special event characteristics and water use characteristics of the target city.
6. The multi-objective water consumption prediction method according to claim 1 is characterized in that: The acquisition of macro water use characteristics and micro water use characteristics of the target city includes: Obtaining initial macro water use characteristics and initial micro water use characteristics of the target city; The initial macro water use characteristics and the initial micro water use characteristics are subjected to data cleaning, denoising and normalization processing to obtain the macro water use characteristics and the micro water use characteristics.
7. A multi-objective water consumption prediction device, characterized in that: include: An acquisition module is used to obtain the macro water use characteristics and micro water use characteristics of the target city; The prediction module is used to input the macro water consumption characteristics and the micro water consumption characteristics into a pre-trained water consumption prediction model to obtain the daily water consumption, weekly water consumption, monthly water consumption and quarterly water consumption of the target city output by the water consumption prediction model.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the multi-objective water consumption prediction method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-objective water consumption prediction method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multi-objective water consumption prediction method according to any one of claims 1 to 6 is implemented.