A method and system for predicting future generation of urban solid waste
Through the combination of the STEEP model and various machine learning algorithms, a prediction system for the future generation of municipal solid waste is constructed, which solves the problems of prediction complexity and insufficient accuracy in the existing technology and achieves more accurate prediction results.
Patent Information
- Application Number
- CN202410964248.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Existing technology is difficult to accurately predict the future generation of municipal solid waste, resulting in insufficient complexity and accuracy of the prediction model, and strong subjectivity in data selection, which affects the prediction results.
The STEEP model is used to analyze influencing factors, the kernel density analysis method and the Sparrow algorithm are combined to optimize the Holtwent index prediction model, the random forest machine learning method is used to calculate the importance of factors, and the elite genetic algorithm is used to optimize the random forest prediction model to build a multi-factor prediction system.
It improves the prediction accuracy of future urban solid waste generation, reduces the influence of human subjective factors, and enhances the amount of information and the scientific nature of the prediction model.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present application relates to the field of solid waste prediction, and in particular to a method and system for predicting the future generation of urban solid waste. Background Art
[0002] Predicting the generation of municipal solid waste is an important issue in urban sanitation. my country is a country with a large population. Decades of rapid economic growth, population growth and economic prosperity have accelerated the generation of municipal solid waste. According to statistics, the cumulative stockpile of solid waste in my country is about 80 billion tons, with more than 10 billion tons of new solid waste added each year, and there is a trend of increasing year by year. Successful prediction of the generation of municipal solid waste is of great significance to the planning of waste treatment. Underestimating the generation of municipal solid waste will lead to insufficient disposal capacity, which will not only cause pollution, but also cause the city to be "surrounded by waste". Many authoritative organizations have recognized the importance of municipal solid waste prediction and regard it as a necessary aspect of urban planning and legislation.
[0003] Conventional prediction methods include empirical estimation, linear and nonlinear prediction, statistical analysis prediction, and the construction of machine learning prediction models to predict the future generation of solid waste in various cities. Due to the large number of solid waste types and the different factors affecting the generation of each type of solid waste, it is not possible to use a unified method to predict the five types of solid waste at one time. This not only increases the complexity of the prediction system, but also reduces the accuracy of the prediction model for future predictions. Therefore, an effective method is needed to classify and summarize them. In addition, the prediction data includes data on the generation of urban solid waste, data on treatment and disposal technology, urban macro-statistical data, etc. The data selection is chaotic, there are few available feature data, and it is highly subjective, ignoring the fact that the accuracy of the prediction model depends largely on the influence of sample data selection. Summary of the invention
[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the first purpose of this application is to propose a method for predicting the future generation of urban solid waste, and to construct a prediction system from data selection to prediction model construction, which can more accurately predict the future generation of urban solid waste.
[0006] The second objective of this application is to propose a prediction system for the future generation of urban solid waste.
[0007] The third objective of the present application is to provide an electronic device.
[0008] A fourth objective of the present application is to provide a computer-readable storage medium.
[0009] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a method for predicting the future generation of urban solid waste, including:
[0010] For domestic garbage, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste in urban solid waste, the factors affecting the amount of solid waste generated in different cities are analyzed and classified according to the STEEP model;
[0011] For construction waste, agricultural solid waste and hazardous waste, the data anomalies are checked by kernel density analysis method in combination with the actual data availability, and the prediction of municipal solid waste generation under the influence of single factors over time is carried out based on the Holt-Winter index prediction model optimized by the Sparrow algorithm;
[0012] For domestic waste and general industrial solid waste, the importance score of each factor is calculated using the random forest machine learning method, and factors with importance scores greater than the score threshold are screened and retained;
[0013] With the corresponding screened factors as input, the Holt-Winter index prediction model optimized by the sparrow algorithm is used to obtain a multi-factor prediction result data set, which is then input into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of municipal solid waste generated by multiple factors that change over time.
[0014] Optionally, the factors for analyzing the amount of municipal solid waste generated by different types of municipal solid waste according to the content of the STEEP model include:
[0015] According to the content of the STEEP model, the factors affecting the generation of different types of municipal solid waste are analyzed from five aspects: social, technical, economic, ecological and policy;
[0016] Among them, social factors include population size, cultural level, and lifestyle; technical factors include production technology and productivity level; economic factors are divided into macroeconomic factors and microeconomic factors, including national income level, gross national product, per capita GDP, residents' consumption level, and residents' disposable income; ecological factors include geographical environment, seasons, climate change, and urbanization rate; policy factors include the country or region's social behavior system, ethical norms, and government administrative regulations.
[0017] Optionally, the process of optimizing the Holt-Winter index prediction model according to the Sparrow algorithm includes:
[0018] Initialize parameter components and input factor sample set;
[0019] Constructing a Holt-Winter index prediction model, and determining a value range of a smoothing parameter in the Holt-Winter index prediction model;
[0020] Constructing a sparrow algorithm, optimizing the smoothing parameters, obtaining a solution and assigning it to the smoothing coefficient, so as to optimize the Holt-Winter index prediction model;
[0021] Select evaluation indicators to evaluate and compare the optimized Holt-Winter index prediction model to obtain a fitness value, wherein the evaluation indicators include a root mean square error value, a mean absolute error value, a mean square error value and a determination coefficient;
[0022] Determine whether the fitness value meets the iteration stop condition;
[0023] If the iteration stop condition is met or the number of iterations is the maximum, the optimal smoothing parameter is output as the smoothing parameter of the optimized Holt-Winter index prediction model, otherwise, the optimization process of the smoothing parameter is continued.
[0024] Optionally, the importance score of each factor is calculated by a random forest machine learning method, including:
[0025] Use parameters Indicates the importance score of the factor, using the parameter represents the GiNi index, assuming that Factors , calculate the GiNi index of all factors, the expression is:
[0026]
[0027] in, Indicates that there is categories, Representation Node Medium Category The proportion of
[0028] For factors , calculate its The importance of nodes The change of GiNi index before and after branching is:
[0029]
[0030] in, and Respectively represent the GiNi index of the two new nodes after branching, Factor At the node Importance rating on
[0031] If the factor In the decision tree The nodes that appear in the set In In the The importance of each tree is scored as follows:
[0032]
[0033] in, Factor In the Importance score of each tree;
[0034] If the random forest has a total of n trees, then The sum of the importance scores across all trees is:
[0035]
[0036] in, for The sum of importance scores in all trees;
[0037] right Normalize it and get the factor The final importance score is expressed as:
[0038]
[0039] in, Factor Final importance score.
[0040] Optionally, the process of optimizing the random forest prediction model according to the elite genetic algorithm includes:
[0041] Determine the structure of the random forest prediction model;
[0042] Determining hyperparameters of the elite genetic algorithm to optimize the random forest prediction model, wherein the hyperparameters include the number of decision trees, the maximum number of features, the maximum depth, the minimum number of sample splits, and the minimum number of leaf node samples;
[0043] Determine the structure of the elite genetic algorithm and initialize the population, where each individual in the randomly generated initial population represents a set of hyperparameter configurations of the random forest prediction model;
[0044] For each individual in the initial population, a random forest prediction model is trained according to its hyperparameter configuration, and evaluation indicators are selected to evaluate and compare the trained random forest prediction model to obtain a fitness value, wherein the evaluation indicators include root mean square error value, mean absolute error value, mean square error value and determination coefficient;
[0045] Sort by fitness value, select individuals whose fitness values meet the conditions for crossover and mutation, exclude individuals whose fitness values do not meet the conditions, and obtain a population composed of new individuals;
[0046] Evaluate the fitness value of the new individual, and update the population again according to the fitness value and refer to the above steps, and repeat the above steps until the stopping condition is met;
[0047] The individual with the highest fitness value is selected in the final population as the optimal hyperparameter, and the optimal hyperparameter is used as the hyperparameter of the optimized random forest prediction model.
[0048] Optionally, for construction waste, agricultural solid waste and hazardous waste, the actual data availability is combined to check data anomalies by kernel density analysis, and the Holt-Winter index prediction model optimized by the sparrow algorithm is used to predict the amount of urban solid waste generated by a single factor that changes over time, including:
[0049] For construction waste, agricultural solid waste and hazardous waste, combined with the actual data availability, the kernel density analysis method is used to check data anomalies, revealing the clustering points and distribution patterns in the data. Based on the Holt-Winter index prediction model optimized by the Sparrow algorithm, the prediction results of construction waste generation, agricultural solid waste generation and hazardous waste generation are obtained.
[0050] Optionally, for domestic garbage and general industrial solid waste, the Holt-Winter index prediction model optimized by the sparrow algorithm is used as input to obtain a multi-factor prediction result data set, and the data set is input into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of municipal solid waste generated by the multi-factors that change over time, including:
[0051] For domestic garbage and general industrial solid waste, the corresponding screened factors are input into the Holt-Winter index prediction model optimized by the Sparrow algorithm to obtain the future generation of various factors affecting domestic garbage and general industrial solid waste to construct a multi-factor prediction result data set;
[0052] The multi-factor prediction result dataset that affects the amount of domestic waste generated and the multi-factor prediction result dataset that affects the amount of general industrial solid waste generated are input into the random forest prediction model optimized by the elite genetic algorithm to obtain the final future domestic waste generation prediction results and general industrial solid waste generation prediction results.
[0053] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a prediction system for the future generation of urban solid waste, including:
[0054] Classification and analysis module, for domestic waste, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste in urban solid waste, is used to analyze the factors affecting the amount of solid waste generated in different cities according to the STEEP model and classify them;
[0055] The first prediction module, for construction waste, agricultural solid waste and hazardous waste, is used to check data anomalies through kernel density analysis method in combination with actual data availability, and to predict the amount of municipal solid waste generated by a single factor over time based on the Holt-Winter index prediction model optimized by the sparrow algorithm;
[0056] The screening module is used to calculate the importance score of each factor for domestic waste and general industrial solid waste through the random forest machine learning method, and screen and retain factors with importance scores greater than the score threshold;
[0057] The second prediction module is used to obtain a multi-factor prediction result data set based on the Holt-Winter index prediction model optimized by the sparrow algorithm using the corresponding screened factors as input, and input it into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of urban solid waste generated by multiple factors that change over time.
[0058] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0059] The memory stores computer-executable instructions;
[0060] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects above.
[0061] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method as described in any one of the above-mentioned first aspects.
[0062] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0063] By introducing the SHEEP model, we can quickly and effectively identify the factors that affect the future generation of urban solid waste from five levels: social, technological, economic, ecological, and policy. This increases the amount of information and shields the shortcomings of some subjective factors. By performing weight analysis on the data using a random forest model, we can quantify the relevant influencing factors, avoid errors caused by a large amount of data, and make up for the shortcomings of the influence of subjective human judgment characteristics. By constructing a multi-prediction model, we can scientifically and effectively predict the future generation of solid waste of various categories, providing theoretical support for the study of solid waste generation.
[0064] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0066] Figure 1 is a flow chart of a method for predicting the future generation of urban solid waste according to an embodiment of the present application;
[0067] Figure 2 It is a technical roadmap of a method for predicting the future generation of urban solid waste according to an embodiment of the present application;
[0068] Figure 3 is a block diagram of a system for predicting future generation of urban solid waste according to an embodiment of the present application;
[0069] Figure 4 It is a block diagram of an electronic device. DETAILED DESCRIPTION
[0070] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0071] The following describes a method and system for predicting the future generation of urban solid waste according to an embodiment of the present application with reference to the accompanying drawings.
[0072] Figure 1 is a flow chart of a method for predicting the future generation of urban solid waste according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0073] Step 101, for domestic garbage, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste in urban solid waste, the factors affecting the generation amount of different urban solid wastes are analyzed and classified according to the STEEP model.
[0074] In the embodiment of the present application, urban solid waste in the city is classified into domestic waste, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste in accordance with the "Solid Waste Classification and Code Catalog".
[0075] In some embodiments of the present application, some types of domestic waste, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste are exemplified.
[0076] Domestic waste: waste generated from residents’ daily lives, such as kitchen waste, waste paper, waste plastic, waste glass, waste metal, etc.
[0077] General industrial solid waste: by-products and waste from industrial production processes, including fly ash, desulfurization gypsum, red mud, coal gangue, smelting waste, slag, sludge, tailings, etc.
[0078] Construction waste: waste generated during construction, decoration or demolition activities, such as waste concrete, bricks and tiles, waste wood, waste steel, waste aluminum, waste glass, waste plastic, etc.
[0079] Agricultural solid waste: waste generated during the agricultural production process, such as livestock and poultry manure, straw, etc.
[0080] Hazardous waste: waste that is toxic, corrosive, flammable, reactive or infectious, such as waste acid, inorganic cyanide waste, non-ferrous metal mining and smelting waste, incineration plant fly ash, etc.
[0081] In view of the analogy to which each city's solid waste belongs, this application, based on the content of the STEEP model, systematically analyzes and classifies the factors that affect the amount of solid waste generated in different cities from five levels: social, technological, economic, ecological, and policy.
[0082] It should be noted that the STEEP model is a macro-environmental analysis framework used to analyze factors affecting society, technology, economy, environment and politics.
[0083] Specifically, social factors include population size, cultural level, and lifestyle; technical factors include production technology, productivity level, etc.; economic factors are divided into macroeconomic factors and microeconomic factors, including national income level, gross national product, per capita GDP, residents' consumption level, residents' disposable income, etc.; ecological factors include geographical environment, seasons, climate change, urbanization rate, etc.; policy factors include national or regional social behavior systems, ethical norms, and government administrative regulations.
[0084] Step 102, for construction waste, agricultural solid waste and hazardous waste, combined with the actual data availability, the data outliers are checked by kernel density analysis, and the Holt-Winter index prediction model optimized by the Sparrow algorithm is used to predict the amount of urban solid waste generated by a single factor that changes over time.
[0085] It should be noted that the Holt-Winter exponential forecasting method is also called the triple exponential smoothing method. It is proposed on the basis of the Holt model of the exponential smoothing method to capture the seasonal method. This method is applicable to univariate time series with trend and / or seasonal components. The HWES forecasting model has become mature in theory and practical application in the analysis and forecasting of stationary time series. There are two methods: cumulative and multiplicative. The cumulative model is applicable to series with linear trends and seasonal effects that do not change with time, and the multiplicative model is applicable to series with linear trends and seasonal effects that change with the magnitude of the series.
[0086] Taking the cumulative multiplication method as an example, it is mainly composed of the following four formulas: trend smoothing formula, horizontal smoothing formula, seasonal smoothing formula and prediction formula. , , Respectively represent the trend component, level component, and seasonal component at time The value at time; To predict the time The predicted value at time ; , , is the smoothing coefficient, and its value is between [0,1].
[0087] The specific formula is:
[0088]
[0089] : The difference between two consecutive levels, which represents the difference between the levels level changes;
[0090] : Simply expressed The rate of change of level at , expressed recursively as the difference between the two most recent levels Has the greatest weight , and over time the weights will be times exponential decay;
[0091]
[0092] : Assume that the level and seasonality are multiplicative, that is , so if you choose to ignore noise The impact of A good estimate of ;
[0093] :By converting from arrive The level changes that occur are added to To estimate the level , that is, the trend ;
[0094]
[0095] Seasonal Components Estimation strategies and trends and level The estimation strategy is similar to .
[0096]
[0097] Select the multiplicative smoothing exponential algorithm for forecasting, from any step Start predicting the future The value of the time series with time steps, for annual changes, The value is 12.
[0098] In the embodiment of the present application, the Holt-Winter index prediction model of the cumulative multiplication method is used as the basis, and it is optimized according to the sparrow algorithm. The optimization process specifically includes:
[0099] Step 1: Initialize the parameter components and input the factor sample set.
[0100] Step 2: Construct a Holt-Winter index prediction model and determine the range of smoothing parameters in the Holt-Winter index prediction model.
[0101] In the embodiment of the present application, the smoothing parameter is set , , The value range is [0,1].
[0102] Step 3: Construct the sparrow algorithm, optimize the smoothing parameters, obtain the solution and assign it to the smoothing coefficient to optimize the Holt-Winter index prediction model.
[0103] The process of optimizing the smoothing parameters is as follows: divide the population into discoverers and followers; update the discoverer position; update the follower position; randomly select the sentinel and update the position.
[0104] Step 4: Select evaluation indicators to evaluate and compare the optimized Holt-Winter index prediction model to obtain the fitness value.
[0105] In some embodiments of the present application, the root mean square error (RMSE), mean absolute error (MAE), mean square error (MSE), determination coefficient R 2 The values are used as evaluation indicators for comparison.
[0106] Step 5: Determine whether the fitness value meets the iteration stop condition.
[0107] If the iteration stop condition is not met, the iteration cycle continues.
[0108] Step 6: If the iteration stop condition is met or the number of iterations is the maximum, the optimal smoothing parameter is output as the smoothing parameter of the optimized Holt-Winter index prediction model; otherwise, the optimization process of the smoothing parameter is continued.
[0109] It can be understood that the steps shown above based on the Holt-Winter index prediction model in a cumulative manner and optimized according to the Sparrow algorithm are general steps. When predicting the generation of different types of municipal solid waste, the type of training data should be considered.
[0110] It is understandable that, based on the actual situation, no influencing factors were used in predicting the results of construction waste generation, agricultural solid waste generation and hazardous waste generation. A single factor was used to directly predict based on time.
[0111] Finally, for construction waste, agricultural solid waste and hazardous waste, combined with the actual data availability, the kernel density analysis method was used to check data anomalies, revealing the clustering points and distribution patterns in the data, and the Holt-Winter index prediction model optimized by the Sparrow algorithm was used to obtain the prediction results of construction waste generation, agricultural solid waste generation and hazardous waste generation.
[0112] Step 103, for domestic garbage and general industrial solid waste, the importance score of each factor is calculated by a random forest machine learning method, and factors with importance scores greater than a score threshold are screened and retained.
[0113] It should be noted that there may be more than a dozen or twenty features in the data set that affect domestic waste and general industrial solid waste. How to select the features that have the greatest impact on the results to reduce the number of features when building the model is a concern of this application.
[0114] As a possible implementation method, this application uses the random forest machine learning method to analyze the correlation between various factors, quantify the impact weight of urban solid waste generation, and calculate the importance score of each factor to determine the importance of each factor.
[0115] In some embodiments of the present application, the parameter Indicates the importance score of the factor, using the parameter represents the GiNi index, assuming that Factors Now we need to calculate each factor GiNi Index score , that is, The average change in node split impurity of a factor in all decision trees of the random forest. The steps for calculating the importance score of each factor using the random forest machine learning method are as follows:
[0116] Step 1: First, calculate the GiNi index of all factors, the expression is:
[0117]
[0118] in, Indicates that there is categories, Representation Node Medium Category The proportion occupied.
[0119] Step 2: Calculate the feature importance at the node level.
[0120] For factors , calculate its The importance of nodes The change of GiNi index before and after branching is:
[0121]
[0122] in, and Respectively represent the GiNi index of the two new nodes after branching, Factor At the node Importance rating on .
[0123] Step 3: Calculate the feature importance at the decision tree level.
[0124] If the factor In the decision tree The nodes that appear in the set In In the The importance of each tree is scored as follows:
[0125]
[0126] in, Factor In the Importance score of each tree.
[0127] Step 4: Calculate the feature importance at the random forest level.
[0128] If the random forest has a total of n trees, then The sum of the importance scores across all trees is:
[0129]
[0130] in, for The sum of importance scores across all trees.
[0131] Step 5. Finally, Normalize it and get the factor The final importance score is expressed as:
[0132]
[0133] in, Factor Final importance score.
[0134] It can be understood that the random forest algorithm can evaluate the contribution of each factor to the model's predictive ability, thereby helping this application to identify which features are the most important, thereby reducing the complexity of the model and improving prediction efficiency and interpretability.
[0135] In some embodiments of the present application, factors with importance scores greater than a score threshold are retained, and other factors are discarded, wherein the score threshold is determined based on the actual scenario and is not specifically limited in the present application.
[0136] Step 104, using the corresponding screened factors as input, a multi-factor prediction result data set is obtained according to the Holt-Winter index prediction model optimized by the sparrow algorithm, and it is input into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of municipal solid waste generated by the multi-factor influence that changes over time.
[0137] It can be understood that the process of optimizing the Holt-Winter index prediction model according to the Sparrow Algorithm has been described in detail in step 103, and no further introduction will be given in this step.
[0138] In some other embodiments of the present application, the step of optimizing the random forest prediction model according to the elite genetic algorithm includes:
[0139] Step 1: Determine the structure of the random forest prediction model.
[0140] In the embodiment of the present application, the process of determining the random forest structure includes four processes: data set sampling, decision tree training, tree construction and prediction integration.
[0141] a. Dataset sampling: Randomly sample with replacement from the original training set to generate multiple subsets of the same size (called Bootstrap samples). Each Bootstrap sample is used to train a decision tree.
[0142] b. Decision tree training: For each Bootstrap sample, a decision tree is trained. When splitting each node, instead of using all features, a feature subset is randomly selected from the feature set, and the best feature is selected for splitting. For classification problems, the feature that minimizes the Gini index is selected for splitting:
[0143]
[0144] in, is the proportion of samples in the kth class.
[0145] c. Tree construction: The construction process of each tree is similar to that of a traditional decision tree until the tree reaches a maximum depth or the number of node samples is less than a certain threshold.
[0146] d. Prediction integration: For a new sample, all trees give a prediction value respectively, and the random forest takes the average of these prediction values as the final prediction result:
[0147]
[0148] in, is the number of decision trees, It is The predicted value of the tree.
[0149] Step 2: Determine the hyperparameters of the elite genetic algorithm to optimize the random forest prediction model. The hyperparameters include the number of decision trees, the maximum number of features, the maximum depth, the minimum number of sample splits, and the minimum number of leaf node samples.
[0150] Among them, the number of decision trees refers to the number of decision trees in the random forest. Generally, more trees can improve the stability and accuracy of the model, but it will also increase the computational overhead. The maximum number of features refers to the number of features randomly selected when each node splits. The maximum depth refers to the maximum depth of each tree. A larger depth will make the model more complex and prone to overfitting; a smaller depth will make the model simpler and may underfit. The minimum sample split number determines the minimum number of samples a node needs to have before it can continue to split. A larger value can prevent the model from overfitting. The minimum number of leaf node samples determines the minimum number of samples a leaf node needs to have. A larger value can prevent the model from overfitting.
[0151] Step 3: Determine the structure of the elite genetic algorithm and initialize the population, where each individual in the randomly generated initial population represents a set of hyperparameter configurations of the random forest prediction model.
[0152] In this step, a set of initial populations is randomly generated. The hyperparameter configuration of each individual in the initial population includes the number of decision trees, the maximum number of features, the maximum depth, the minimum number of sample splits, and the minimum number of leaf node samples.
[0153] Step 4: For each individual in the initial population, train the random forest prediction model according to its hyperparameter configuration, and select evaluation indicators to evaluate and compare the trained random forest prediction model to obtain the fitness value.
[0154] In one embodiment of the present application, a root mean square error value, a mean absolute error value, a mean square error value, a determination coefficient value, etc. can be selected as the fitness value.
[0155] Step 5: Sort by fitness value, select individuals whose fitness values meet the requirements for crossover and mutation, exclude individuals whose fitness values do not meet the requirements, and obtain a population composed of new individuals.
[0156] As a possible embodiment, individuals corresponding to the top 100 fitness values in the population are selected for crossover and mutation, and according to the elite retention strategy, an individual in the new population is randomly replaced with the best fitness value of this generation, and finally a new population is generated.
[0157] Step 6: Evaluate the fitness value of the new individual, and update the population again according to the fitness value by referring to the above steps, and repeat the above steps until the stopping condition is met.
[0158] In one embodiment of the present application, it is determined whether the number of population iterations reaches 100 times, and if so, the final optimization result is output.
[0159] Step 7: Select the individual with the highest fitness value in the final population as the optimal hyperparameter, and use the optimal hyperparameter as the hyperparameter of the optimized random forest prediction model.
[0160] Finally, for domestic waste and general industrial solid waste, the corresponding screened factors are input into the Holt-Winter index prediction model optimized by the Sparrow algorithm to obtain the future generation of various factors affecting domestic waste and general industrial solid waste and construct a multi-factor prediction result data set; further, the multi-factor prediction result data set corresponding to domestic waste and general industrial solid waste is input into the random forest prediction model optimized by the elite genetic algorithm to obtain the final future domestic waste generation prediction results and general industrial solid waste generation prediction results.
[0161] In addition, this application also selects root mean square error value, mean absolute error value, mean square error value, determination coefficient value, etc. as evaluation indicators to evaluate and compare the optimized models, among which, the lower the root mean square error value, the better the model performance; the smaller the mean absolute error value and the mean square error value, the better the accuracy of the prediction model in describing the experimental data; the determination coefficient value indicates the degree of fit between the model prediction output and the observed data, and the closer the calculated value of the determination coefficient is to 1, the better the regression model fits the data.
[0162] In order to implement the above-mentioned embodiment, the present application also proposes a prediction system for the future generation of urban solid waste.
[0163] Figure 3 1 is a block diagram of a system 10 for predicting future generation of urban solid waste according to an embodiment of the present application, comprising:
[0164] The classification and analysis module 100 is used to analyze and classify the factors affecting the amount of solid waste generated in different cities according to the STEEP model, for domestic garbage, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste in the city solid waste;
[0165] The first prediction module 200 is used for construction waste, agricultural solid waste and hazardous waste, to check data anomalies by kernel density analysis method in combination with actual data availability, and to predict the amount of municipal solid waste generated by a single factor that changes over time based on the Holt-Winter index prediction model optimized by the sparrow algorithm;
[0166] A screening module 300 is used to calculate the importance score of each factor for domestic waste and general industrial solid waste by using a random forest machine learning method, and screen and retain factors whose importance score is greater than a score threshold;
[0167] The second prediction module 400 is used to obtain a multi-factor prediction result data set based on the Holt-Winter index prediction model optimized by the sparrow algorithm using the corresponding filtered factors as input, and input it into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of urban solid waste generated by the multi-factors that change over time.
[0168] Regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0169] In order to implement the above embodiments, the present application also proposes an electronic device.
[0170] Figure 4A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0171] like Figure 4 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0172] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0173] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the voice instruction response method. For example, in some embodiments, the voice instruction response method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the voice instruction response method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the voice instruction response method in any other appropriate manner (e.g., by means of firmware).
[0174] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0175] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0176] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0177] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0178] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0179] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0180] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0181] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for predicting the future generation of urban solid waste, characterized in that: include: For domestic garbage, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste in urban solid waste, the factors affecting the amount of solid waste generated in different cities are analyzed and classified according to the STEEP model; For construction waste, agricultural solid waste and hazardous waste, the data anomalies are checked by kernel density analysis method in combination with the actual data availability, and the prediction of municipal solid waste generation under the influence of single factors over time is carried out based on the Holt-Winter index prediction model optimized by the Sparrow algorithm; For domestic waste and general industrial solid waste, the importance score of each factor is calculated using the random forest machine learning method, and factors with importance scores greater than the score threshold are screened and retained; With the corresponding screened factors as input, the Holt-Winter index prediction model optimized by the sparrow algorithm is used to obtain a multi-factor prediction result data set, which is then input into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of municipal solid waste generated by the multi-factors that change over time. The factors affecting the amount of solid waste generated in different cities are analyzed and classified according to the STEEP model, including: According to the content of the STEEP model, the factors affecting the amount of solid waste generated in different cities are analyzed and classified from five levels: social, technological, economic, ecological, and policy. Among them, social factors include population size, cultural level, and lifestyle; technical factors include production technology and productivity level; economic factors are divided into macroeconomic factors and microeconomic factors, including national income level, gross national product, per capita gross domestic product, residents' consumption level, and residents' disposable income; ecological factors include geographical environment, seasons, climate change, and urbanization rate; policy factors include national or regional social behavior systems, ethical norms, and government administrative regulations.
2. The method according to claim 1, characterized in that The process of optimizing the Holt-Winter index prediction model according to the Sparrow algorithm includes: Initialize parameter components and input factor sample set; Constructing a Holt-Winter index prediction model, and determining a value range of a smoothing parameter in the Holt-Winter index prediction model; Constructing a sparrow algorithm, optimizing the smoothing parameters, obtaining a solution and assigning it to the smoothing coefficient, so as to optimize the Holt-Winter index prediction model; Select evaluation indicators to evaluate and compare the optimized Holt-Winter index prediction model to obtain a fitness value, wherein the evaluation indicators include root mean square error value, mean absolute error value, mean square error value and determination coefficient; Determine whether the fitness value meets the iteration stop condition; If the iteration stop condition is met or the number of iterations is the maximum, the optimal smoothing parameter is output as the smoothing parameter of the optimized Holt-Winter index prediction model, otherwise, the optimization process of the smoothing parameter is continued.
3. The method according to claim 1, characterized in that The importance score of each factor is calculated by the random forest machine learning method, including: Use parameters Indicates the importance score of the factor, using the parameter represents the GiNi index, assuming that Factors , calculate the GiNi index of all factors, the expression is: in, Indicates that there is categories, Representation Node Medium Category The proportion of For factors , calculate its The importance of nodes The change of GiNi index before and after branching is: in, and Respectively represent the GiNi index of the two new nodes after branching, Factor At the node Importance rating on If the factor In the decision tree The nodes that appear in the set In In the The importance of each tree is scored as follows: in, Factor In the Importance score of each tree; If the random forest has a total of n trees, then The sum of the importance scores across all trees is: in, for The sum of importance scores in all trees; right After normalization, we get the factor The final importance score is expressed as: in, Factor Final importance score.
4. The method according to claim 3, characterized in that The process of optimizing the random forest prediction model according to the elite genetic algorithm includes: Determine the structure of the random forest prediction model; Determining hyperparameters of the elite genetic algorithm to optimize the random forest prediction model, wherein the hyperparameters include the number of decision trees, the maximum number of features, the maximum depth, the minimum number of sample splits, and the minimum number of leaf node samples; Determine the structure of the elite genetic algorithm and initialize the population, where each individual in the randomly generated initial population represents a set of hyperparameter configurations of the random forest prediction model; For each individual in the initial population, a random forest prediction model is trained according to its hyperparameter configuration, and evaluation indicators are selected to evaluate and compare the trained random forest prediction model to obtain a fitness value, wherein the evaluation indicators include root mean square error value, mean absolute error value, mean square error value and determination coefficient; Sort by fitness value, select individuals whose fitness values meet the conditions for crossover and mutation, exclude individuals whose fitness values do not meet the conditions, and obtain a population composed of new individuals; Evaluate the fitness value of the new individual, and update the population again according to the fitness value and refer to the above steps, and repeat the above steps until the stopping condition is met; The individual with the highest fitness value is selected in the final population as the optimal hyperparameter, and the optimal hyperparameter is used as the hyperparameter of the optimized random forest prediction model.
5. The method according to claim 4, characterized in that For construction waste, agricultural solid waste and hazardous waste, the actual data availability is combined to check data anomalies through kernel density analysis, and the Holt-Winter index prediction model optimized by the sparrow algorithm is used to predict the amount of urban solid waste generated by a single factor that changes over time, including: For construction waste, agricultural solid waste and hazardous waste, combined with the actual data availability, the kernel density analysis method is used to check data anomalies, revealing the clustering points and distribution patterns in the data. Based on the Holt-Winter index prediction model optimized by the Sparrow algorithm, the prediction results of construction waste generation, agricultural solid waste generation and hazardous waste generation are obtained.
6. The method according to claim 5, characterized in that For domestic garbage and general industrial solid waste, the Holt-Winter index prediction model optimized by the sparrow algorithm is used as input to obtain a multi-factor prediction result data set, which is then input into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of municipal solid waste generated by multiple factors that change over time, including: For domestic garbage and general industrial solid waste, the corresponding screened factors are input into the Holt-Winter index prediction model optimized by the Sparrow algorithm to obtain the future generation of various factors affecting domestic garbage and general industrial solid waste and construct a multi-factor prediction result data set; The multi-factor prediction result dataset that affects the amount of domestic waste generated and the multi-factor prediction result dataset that affects the amount of general industrial solid waste generated are input into the random forest prediction model optimized by the elite genetic algorithm to obtain the final future domestic waste generation prediction results and general industrial solid waste generation prediction results.
7. A prediction system for future generation of urban solid waste, characterized in that: include: Classification and analysis module, for domestic waste, general industrial solid waste, construction waste, agricultural solid waste and hazardous waste in urban solid waste, is used to analyze the factors affecting the amount of solid waste generated in different cities according to the STEEP model and classify them; The first prediction module, for construction waste, agricultural solid waste and hazardous waste, is used to check data anomalies through kernel density analysis method in combination with actual data availability, and to predict the amount of municipal solid waste generated by a single factor over time based on the Holt-Winter index prediction model optimized by the sparrow algorithm; The screening module is used to calculate the importance score of each factor for domestic waste and general industrial solid waste through the random forest machine learning method, and screen and retain factors with importance scores greater than the score threshold; The second prediction module is used to obtain a multi-factor prediction result data set based on the Holt-Winter index prediction model optimized by the sparrow algorithm using the corresponding screened factors as input, and input it into the random forest prediction model optimized by the elite genetic algorithm to predict the amount of municipal solid waste generated by the multi-factors that change over time; The factors affecting the amount of solid waste generated in different cities are analyzed and classified according to the STEEP model, including: According to the content of the STEEP model, the factors affecting the amount of solid waste generated in different cities are analyzed and classified from five levels: social, technological, economic, ecological, and policy. Among them, social factors include population size, cultural level, and lifestyle; technical factors include production technology and productivity level; economic factors are divided into macroeconomic factors and microeconomic factors, including national income level, gross national product, per capita gross domestic product, residents' consumption level, and residents' disposable income; ecological factors include geographical environment, seasons, climate change, and urbanization rate; policy factors include national or regional social behavior systems, ethical norms, and government administrative regulations.
8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
