Method, device and equipment for dynamically adjusting urban garbage cleaning path and medium
Through prediction models and path planning algorithms, the path of garbage cleaning trucks is dynamically adjusted, and the efficiency and cost problems caused by fluctuations in garbage generation and changes in urban activities are solved, and efficient garbage disposal and environmental sanitation are achieved.
Patent Information
- Application Number
- CN202411958242.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-08
AI Technical Summary
The existing technology cannot effectively respond to fluctuations in garbage generation and changes in urban activities, resulting in inefficient cleaning, unreasonable resource allocation and increased operating costs.
By obtaining the city's historical garbage collection data, urban activity data, seasonal change data and weather condition data, after pre-processing, a dynamic garbage generation prediction model is established based on the long-term and short-term memory network, and the urban garbage cleaning path is planned using the Ant algorithm and local search strategy, and real-time adjustments are made to adapt to changes.
It has achieved accurate prediction of the amount of garbage generated in different regions in different time periods, dynamically adjusted the cleaning path of garbage cleaning trucks, improved the flexibility and adaptability of resource allocation, and improved the efficiency of garbage disposal and urban environmental sanitation level.
Smart Images

Figure CN119783932A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for dynamically adjusting a city garbage cleaning path. Background Art
[0002] At present, the collection and treatment of urban garbage usually relies on fixed cleaning routes and fixed frequency collection methods. Specifically, the collection of urban garbage is usually carried out by fixed garbage collection vehicles according to preset routes and schedules. Existing technologies cannot effectively cope with the fluctuations in the amount of garbage generated and the changes in urban activities. For example, during holidays or special events, the amount of garbage generated often increases significantly, and the traditional fixed cleaning routes and frequencies cannot be adjusted in time to cope with such changes, resulting in low cleaning efficiency, extended operation time, and even garbage accumulation and environmental pollution. In addition, with the development and changes of cities, new commercial and residential areas continue to emerge, and the functions of old areas may also change. These changes will directly affect the amount and distribution of garbage. However, the existing garbage collection and treatment methods have failed to keep up with such changes in a timely manner, resulting in unreasonable resource allocation and increased operating costs.
[0003] From the above, it can be seen that how to accurately predict the amount of garbage generated in different areas at different time periods, dynamically adjust the cleaning routes of garbage trucks, improve the flexibility and adaptability of resource allocation, the efficiency of garbage disposal, and improve the level of urban environmental sanitation are issues to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for dynamically adjusting the urban garbage cleaning path, which can accurately predict the amount of garbage generated in different areas at different time periods, dynamically adjust the cleaning path of garbage cleaning vehicles, improve the flexibility and adaptability of resource allocation, the efficiency of garbage disposal, and improve the level of urban environmental sanitation. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a method for dynamically adjusting a path for cleaning urban garbage, comprising:
[0006] Acquire historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city, and pre-process the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data; the pre-processing includes data cleaning, missing value filling, and normalization processing;
[0007] Establishing a dynamic garbage generation prediction model based on a long short-term memory network, and using the processed data to train and test the dynamic garbage generation prediction model to obtain a target dynamic garbage generation prediction model;
[0008] Acquire urban activity data and meteorological data to be predicted, and input the urban activity data and meteorological data to be predicted into the target dynamic garbage generation prediction model to output a garbage generation prediction value;
[0009] Based on the predicted value of garbage generation and using ant algorithm and local search strategy, the city's garbage cleaning path is planned, the city's real-time garbage generation and traffic conditions data are obtained, and the city's garbage cleaning path is dynamically adjusted and optimized based on the real-time garbage generation and traffic conditions data.
[0010] Optionally, the historical garbage collection data includes historical daily garbage collection volume, collection frequency, garbage type distribution and impact of special events on garbage collection; the urban activity data includes schedules for holidays and specific activity scenarios, number of participants, activity types, and garbage generation forecast data; the seasonal change data includes traditional festival times and season change data; the weather condition data includes temperature, precipitation, and wind speed.
[0011] Optionally, the preprocessing of the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data includes:
[0012] Performing data cleaning and abnormal data removal on the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain cleaned data;
[0013] Using interpolation or averaging to fill missing values in the cleaned data to obtain filled data;
[0014] The padded data are converted to the same scale and normalized to obtain processed data.
[0015] Optionally, the using the processed data to train and test the dynamic garbage generation prediction model includes:
[0016] Dividing the processed data into a training set and a test set;
[0017] The dynamic garbage generation prediction model is trained using the training set, weights and bias items are adjusted using a back propagation algorithm, and the trained dynamic garbage generation prediction model is tested using the test set.
[0018] Optionally, the step of inputting the to-be-predicted urban activity data and meteorological data into the target dynamic garbage generation prediction model to output a predicted value of garbage generation includes:
[0019] Inputting the urban activity data to be predicted and the meteorological data into the input layer of the target dynamic garbage generation prediction model;
[0020] Using the hidden layer in the target dynamic garbage generation prediction model to perform time series analysis on the urban activity data and meteorological data to be predicted, so as to obtain a predicted value of garbage generation; the hidden layer includes a plurality of long and short-term memory units;
[0021] The output layer in the target dynamic garbage generation amount prediction model is used to output the garbage generation amount prediction value.
[0022] Optionally, the method of planning a city garbage cleaning path based on the predicted value of garbage generation and using an ant algorithm and a local search strategy includes:
[0023] Based on the predicted value of garbage generation, an ant path is planned using an ant algorithm;
[0024] A local search strategy is introduced to update and optimize the ant path to obtain a city garbage cleaning path.
[0025] Optionally, the acquiring of real-time garbage generation and traffic condition data of a city, and dynamically adjusting and optimizing the garbage cleaning path of the city based on the real-time garbage generation and traffic condition data, includes:
[0026] Use sensors or IoT technology to obtain real-time data on waste generation and traffic conditions in the city;
[0027] Based on the real-time garbage generation and traffic condition data, the model parameters in the target dynamic garbage generation prediction model and the fitness function in the ant algorithm are dynamically adjusted and corrected and optimized.
[0028] In a second aspect, the present application discloses a device for dynamically adjusting a path for cleaning urban garbage, comprising:
[0029] A data acquisition and processing module, used to acquire historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city, and pre-process the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data; the pre-processing includes data cleaning, missing value filling, and normalization processing;
[0030] A model training and testing module, used to establish a dynamic garbage generation prediction model based on a long short-term memory network, and train and test the dynamic garbage generation prediction model using the processed data to obtain a target dynamic garbage generation prediction model;
[0031] A prediction module, used for obtaining the city activity data and meteorological data to be predicted, inputting the city activity data and meteorological data to be predicted into the target dynamic garbage generation prediction model to output the garbage generation prediction value;
[0032] A dynamic adjustment and optimization module is used to plan the urban garbage cleaning path based on the predicted value of garbage generation and using the ant algorithm and local search strategy, obtain the real-time garbage generation and traffic conditions data of the city, and dynamically adjust and optimize the urban garbage cleaning path based on the real-time garbage generation and traffic conditions data.
[0033] In a third aspect, the present application discloses an electronic device, comprising:
[0034] Memory, used to store computer programs;
[0035] The processor is used to execute the computer program to implement the aforementioned method for dynamically adjusting the urban garbage cleaning path.
[0036] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for dynamically adjusting the urban garbage cleaning path are implemented.
[0037] It can be seen that the present application provides a method for dynamically adjusting urban garbage collection paths, including obtaining historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city, and preprocessing the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data; the preprocessing includes data cleaning, missing value filling, and normalization processing; establishing a dynamic garbage generation prediction model based on a long short-term memory network, and using the processed data to train and test the dynamic garbage generation prediction model to obtain a target dynamic garbage generation prediction model; obtaining urban activity data and meteorological data to be predicted, and inputting the urban activity data and meteorological data to be predicted into the target dynamic garbage generation prediction model to output a garbage generation prediction value; planning an urban garbage collection path based on the garbage generation prediction value and using an ant algorithm and a local search strategy, obtaining real-time garbage generation and traffic condition data in the city, and dynamically adjusting and optimizing the urban garbage collection path based on the real-time garbage generation and traffic condition data. This application obtains historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city to provide a comprehensive data basis for the prediction model, and uses the long short-term memory network to establish a dynamic garbage generation prediction model, which can accurately predict the predicted values of garbage generation in different areas at different time periods, and use the ant algorithm and local search strategy to plan the urban garbage cleaning path to minimize driving distance and time. Based on real-time garbage generation and traffic conditions data, the urban garbage cleaning path is dynamically adjusted and optimized, and the cleaning path and frequency can be automatically adjusted. It can not only significantly improve the efficiency and effectiveness of garbage cleaning, improve the flexibility and adaptability of resource allocation, and reduce operating costs, but also effectively respond to the dynamic changes encountered in urban garbage management, provide strong support for urban sustainable development, and improve the level of urban environmental sanitation. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0039] Figure 1 A flow chart of a method for dynamically adjusting a path for cleaning urban garbage disclosed in this application;
[0040] Figure 2 This is a flow chart of a path for a garbage collection vehicle dynamically planned using an ant colony algorithm disclosed in the present application;
[0041] Figure 3 A flow chart for dynamically adjusting and optimizing the path of urban garbage cleaning disclosed in this application;
[0042] Figure 4 This is a structural diagram of a system for dynamically adjusting the path of urban garbage cleaning disclosed in this application;
[0043] Figure 5 A workflow diagram for dynamically adjusting a city garbage cleaning path disclosed in this application;
[0044] Figure 6 This is a schematic diagram of the structure of a device for dynamically adjusting the path of urban garbage cleaning disclosed in this application;
[0045] Figure 7 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] At present, the collection and treatment of urban garbage usually rely on fixed cleaning paths and fixed frequency collection methods. Specifically, the collection of urban garbage is usually carried out by fixed garbage collection vehicles according to preset routes and schedules. Existing technologies cannot effectively cope with the fluctuations in the amount of garbage generated and the changes in urban activities. For example, during holidays or special events, the amount of garbage generated often increases significantly, and the traditional fixed cleaning paths and frequencies cannot be adjusted in time to cope with such changes, resulting in low cleaning efficiency, extended operation time, and even garbage accumulation and environmental pollution. In addition, with the development and changes of cities, new commercial areas and residential areas continue to emerge, and the functions of old areas may also change. These changes will directly affect the amount and distribution of garbage. However, the existing garbage collection and treatment methods have failed to keep up with this change in time, resulting in unreasonable resource allocation and increased operating costs. As can be seen from the above, how to accurately predict the amount of garbage generated in different areas at different time periods, realize dynamic adjustment of the cleaning path of garbage collection vehicles, improve the flexibility and adaptability of resource allocation, the efficiency of garbage treatment, and improve the level of urban environmental sanitation are problems to be solved in this field.
[0048] See also Figure 1 As shown, the embodiment of the present invention discloses a method for dynamically adjusting a city garbage cleaning path, which may specifically include:
[0049] Step S11: Obtain historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city, and pre-process the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data; the pre-processing includes data cleaning, missing value filling, and normalization processing.
[0050] In this embodiment, historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city are obtained; the historical garbage collection data includes historical daily garbage collection volume, collection frequency, garbage type distribution, and impact data of special events on garbage collection; the urban activity data includes schedules for holidays and specific activity scenarios, number of participants, activity types, and garbage generation forecast data; the seasonal change data includes traditional holiday times and season change data; the weather condition data includes temperature, precipitation, and wind speed; then, the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data are cleaned and abnormal data is removed to obtain cleaned data; the missing values of the cleaned data are filled by interpolation or mean method to obtain filled data; the filled data are converted to the same scale for normalization to obtain processed data.
[0051] In this embodiment, the historical garbage collection data collected include but are not limited to: daily garbage collection volume, collection frequency, garbage type distribution (such as organic garbage, inorganic garbage, recyclables, etc.) covering a period of time in the past (for example, the past five years) and the impact of special events (such as public health emergencies) on garbage collection. These data will be classified and stored by date, location (specific to streets or communities), garbage type and other dimensions; urban activity data include but are not limited to: for specific scenarios such as holidays and large-scale events, the data collection module will collect the schedule of related activities, the number of participants, the type of activity (such as sports events, music festivals, exhibitions, etc.) and the garbage generation forecast data of the activity location. For example, during the Spring Festival, the module will collect the estimated number of participants and garbage generation estimates for activities such as temple fairs and fireworks shows in various places; seasonal change data include but are not limited to: paying attention to the impact of festival celebrations (such as traditional festivals such as the Spring Festival and Mid-Autumn Festival) and seasonal changes (such as spring cleaning, winter heating, etc.) on garbage collection. For example, in summer, due to the rising temperature, food waste is easy to rot, so the collection frequency needs to be increased; in winter, snowfall may affect the efficiency of garbage collection, so advance planning is required; weather condition data includes but is not limited to: real-time or regular acquisition of weather data such as temperature, precipitation, wind speed, etc. These data will be used to evaluate the impact of weather conditions on garbage collection work. For example, heavy rain may make it difficult for garbage collection vehicles to drive, and the collection route and time need to be adjusted. Then, the above data is preprocessed, including data cleaning (removing invalid or abnormal data), missing value filling (using interpolation or mean method) and normalization (converting data to the same scale).
[0052] Step S12: establishing a dynamic garbage generation prediction model based on the long short-term memory network, and using the processed data to train and test the dynamic garbage generation prediction model to obtain a target dynamic garbage generation prediction model.
[0053] In this embodiment, a dynamic garbage generation prediction model is established based on a long short-term memory network, and the processed data is divided into a training set and a test set; the dynamic garbage generation prediction model is trained using the training set, and the weights and bias items are adjusted using a back propagation algorithm, and the trained dynamic garbage generation prediction model is tested using the test set to obtain a target dynamic garbage generation prediction model.
[0054] Specifically, the processed data is input into a dynamic garbage generation prediction model based on LSTM (Long Short-Term Memory). The structure of the dynamic garbage generation prediction model includes an input layer, a hidden layer, and an output layer. The hidden layer uses long short-term memory units to capture long-term dependencies in time series data. By training the model, it can accurately predict future garbage generation.
[0055] In the dynamic garbage generation prediction model, the input layer: input features include historical garbage collection, urban activity indicators and meteorological data; hidden layer: use long short-term memory units (LSTM units). Assume that a hidden layer with 128 LSTM units is used; output layer: outputs the predicted value of garbage generation in a certain period of time in the future. The mathematical expression of LSTM unit is as follows:
[0056] Forget gate (forget unimportant information):
[0057] ;
[0058] Input gate (determines what new information is stored in the cell state):
[0059] ;
[0060] Candidate status (new candidate value):
[0061] ;
[0062] Cell state update (combined with forget gate and input gate):
[0063] ;
[0064] Output gate (determines what value to output):
[0065] ;
[0066] Hidden state (output result):
[0067]
[0068] in, is the weight matrix, is the bias term, is the hidden state, is the cell state, is the current input, is the sigmoid function, and * represents the Hadamard product (element-wise multiplication).
[0069] In the process of training and testing the dynamic garbage generation prediction model, the processed data is first divided into a training set and a test set; then the training set data is used to train the dynamic garbage generation prediction model, and the weights and bias items are adjusted through the back propagation algorithm; finally, the test set is used to evaluate the model performance, and the model parameters are adjusted to optimize the prediction results.
[0070] Step S13: obtaining the city activity data and meteorological data to be predicted, and inputting the city activity data and meteorological data to be predicted into the target dynamic garbage generation prediction model to output the garbage generation prediction value.
[0071] In this embodiment, the city activity data and meteorological data to be predicted are obtained, and the city activity data and meteorological data to be predicted are input into the input layer of the target dynamic garbage generation prediction model; the hidden layer in the target dynamic garbage generation prediction model is used to perform time series analysis on the city activity data and meteorological data to be predicted to obtain a garbage generation prediction value; the hidden layer includes a plurality of long short-term memory units; and the output layer in the target dynamic garbage generation prediction model is used to output the garbage generation prediction value.
[0072] In this embodiment, the trained target dynamic garbage generation prediction model is used, and the latest urban activity data and meteorological data to be predicted are input, and the model will output the predicted value of garbage generation in the future. For example, the garbage generation every day in the next week can be predicted.
[0073] Step S14: Based on the predicted value of garbage generation and using the ant algorithm and local search strategy, a city garbage cleaning path is planned, real-time garbage generation and traffic condition data of the city are obtained, and the city garbage cleaning path is dynamically adjusted and optimized based on the real-time garbage generation and traffic condition data.
[0074] In this embodiment, an ant path is planned based on the predicted value of garbage generation and using an ant algorithm; a local search strategy is introduced to update and optimize the ant path to obtain a city garbage cleaning path; sensors or Internet of Things technology are used to obtain real-time garbage generation and traffic conditions data in the city; based on the real-time garbage generation and traffic conditions data, the model parameters in the target dynamic garbage generation prediction model and the fitness function in the ant algorithm are dynamically adjusted and corrected and optimized.
[0075] This application uses ACO (Ant Colony Optimization) to dynamically plan the path of the garbage collection truck based on the predicted value of garbage generation. The process is as follows: Figure 2 As shown, the steps are as follows:
[0076] First, set the initial parameters, including the number of ants (set to N), the pheromone volatility coefficient (set to ) etc. These parameters will directly affect the search efficiency and results of the ant colony algorithm.
[0077] Next, a fitness function is constructed based on the predicted amount of garbage generated. The fitness function is used to evaluate the quality of the path, and can comprehensively consider factors such as the path length (set as L) and the amount of garbage collected (set as Q). The fitness function can be expressed as:
[0078] ;
[0079] in, and It is the weight coefficient used to adjust the proportion of path length and garbage collection amount in the fitness function.
[0080] Then, the search process of ants on the path is simulated. Each ant starts from the starting point and selects the next garbage collection point to visit based on the pheromone concentration at the current location and the heuristic function (usually inversely proportional to the distance). The heuristic function can be expressed as:
[0081] ;
[0082] in, is the distance between garbage collection points i and j.
[0083] During the ant search process, the pheromone concentration on the path is constantly updated. The formula for updating the pheromone concentration is:
[0084] ;
[0085] Among them, Q is a constant, and L_k is the length of the path walked by the kth ant. The concentration of pheromone after volatilization is:
[0086] ;
[0087] in, is the pheromone concentration before volatilization.
[0088] When the termination condition is reached (such as reaching the maximum number of iterations or finding the optimal path), the search process is stopped and the ant path is output.
[0089] As a further improvement of the present application, a local search strategy is introduced on the basis of the ant colony algorithm to further optimize the path. Based on the ant path, the local search strategy attempts to make small-scale adjustments to find a better path. The specific steps are as follows: 1. Randomly select two points from the current optimal path (i.e., the ant path), exchange their positions, and generate a new path. 2. Calculate the fitness value of the new path and compare it with the fitness value of the current optimal path. 3. If the fitness value of the new path is higher, replace the current optimal path with the new path. 4. Repeat the above process until the maximum number of iterations of the local search is reached or the fitness value no longer increases.
[0090] The local search strategy can significantly improve the convergence speed and solution quality of the ant colony algorithm, making the path planning of the garbage truck more efficient and accurate. In this way, an optimized garbage truck path can be obtained, which minimizes the total driving distance and time while meeting the garbage collection needs.
[0091] For example, a city has 10 garbage collection points, the amount of garbage generated at each point is known, and the road distances in the city have also been measured. The garbage collection points and the amount of garbage generated are shown in Table 1:
[0092] Table 1
[0093]
[0094] The road distance matrix (unit: km) is shown in Table 2:
[0095] Table 2
[0096]
[0097] Ant colony algorithm parameters: number of ants N=30; pheromone volatility coefficient =0.2; constant Q=100; weight coefficient =1, =2 (indicates more emphasis on garbage collection efficiency);
[0098] Fitness function: ; Where L is the path length (unit: km), Q is the total amount of garbage collected on the path (unit: tons / day);
[0099] Heuristic function: ; Where d(i, j) is the distance between collection points i and j.
[0100] Pheromone Update:
[0101] ;
[0102] ;
[0103] Algorithm execution: 1. Initialize the pheromone concentration matrix is a constant. 2. Each ant starts from the starting point (assuming it is collection point 1) and selects the next garbage collection point to visit based on the pheromone concentration at the current location and the heuristic function. 3. After each ant completes a path, the path length L_k and the total amount of garbage collected Q_k are calculated according to the formula, and the pheromone concentration is updated. 4. After all ants complete an iteration, the fitness value of each path is calculated according to the fitness function, and the current optimal path is recorded. 5. Repeat steps 2-4 until the maximum number of iterations (such as 100 times) is reached or the fitness value no longer increases.
[0104] Algorithm execution process and calculation examples:
[0105] 1. Initialization: Initialize the pheromone concentration matrix is 1.
[0106] 2. Ant path selection: Taking Ant 1 as an example, it starts from the starting point (collection point 1).
[0107] According to the pheromone concentration and heuristic function at the current location Calculate the transition probability and choose the next garbage collection point to visit.
[0108] Assume that Ant 1 chooses to visit collection point 2 for the first time (based on transition probability and roulette method).
[0109] This process is repeated until Ant 1 has visited all collection points and returned to the starting point, forming a complete path.
[0110] 3. Calculation of path length and total garbage collection: For the path formed by ant 1, calculate the path length L1 and the total garbage collection Q1.
[0111] Assume that the path of ant 1 is 1->2->3->4->5->6->7->8->9->10->1, then: path length L1 = 4 +2 + 2 + 2 + 4 + 2 + 2 + 2 + 2 + 20 = 42 kilometers.
[0112] Total garbage collected Q1 = 5 + 3 + 4 + 2 + 6 + 3 + 5 + 2 + 4 + 3 = 37 tons / day.
[0113] 4. Pheromone update:
[0114] According to the formula and Update pheromone concentration.
[0115] For the path of ant 1, update the pheromone concentrations between all adjacent collection points on the path.
[0116] Assuming constant Q = 100, the pheromone volatility coefficient = 0.2, then:
[0117] (For all pairs of adjacent collection points on ant 1's path)
[0118] Updated pheromone concentration (for all pairs of adjacent collection points on ant 1's path).
[0119] 5. Iteration and fitness calculation:
[0120] After all ants complete one iteration, according to the fitness function Calculate the fitness value of each path.
[0121] Record the current optimal path and its fitness value.
[0122] Repeat steps 2-4 until the maximum number of iterations (e.g., 100) is reached or the fitness value no longer improves.
[0123] Search strategy: Based on the current optimal path, perform the following operations:
[0124] 1. Randomly select two points (such as collection point 3 and collection point 7), exchange their positions, and generate a new path.
[0125] 2. Calculate the fitness value of the new path and compare it with the fitness value of the current optimal path.
[0126] 3. If the fitness value of the new path is higher, replace the current optimal path with the new path.
[0127] 4. Repeat the above process until the maximum number of iterations of local search is reached (such as 20 times) or the fitness value no longer increases.
[0128] Result output: After optimization by ant colony algorithm and local search strategy, the optimal path is: 1 -> 5 -> 7 -> 3 -> 9 -> 6 -> 2 -> 10 -> 4 -> 8 -> 1, with a total path length of 80 kilometers and a total garbage collection volume of 30 tons / day. This path not only meets the garbage collection needs, but also minimizes the total driving distance and time, thus improving the efficiency and benefits of garbage collection.
[0129] This route minimizes the total driving distance and time while meeting the garbage collection needs, thus improving the efficiency and benefits of garbage collection.
[0130] Finally, the real-time garbage generation and traffic condition data are obtained through sensors or Internet of Things technology. Then, the prediction model and path planning algorithm are corrected and adjusted according to the real-time garbage generation and traffic condition data. The correction and adjustment may include updating model parameters, recalculating fitness functions, etc. Finally, the adjusted cleaning path is output, and the garbage collection vehicle is guided to perform the cleaning task along the path.
[0131] Assume that during a real-time adjustment, sensors or IoT technology obtain the following real-time data:
[0132] Real-time garbage generation (changed from the predicted value): Collection point 1: increased to 6 tons / day; Collection point 5: decreased to 5 tons / day; other collection points remained unchanged or changed slightly (this is a simplified example, in reality all points may change);
[0133] Real-time traffic conditions: Road 1->5 is congested, and the estimated travel time increases by 20%; Road 7->3 is unobstructed, and the estimated travel time decreases by 10%; other road conditions remain unchanged or change slightly (also a simplified example);
[0134] The real-time adjustment process is as follows: Figure 3 As shown, the steps are as follows:
[0135] 1. Update the prediction model: Update relevant parameters in the prediction model, such as the garbage growth rate, based on the real-time garbage generation.
[0136] 2. Recalculate the fitness function: Combine real-time traffic data and adjust the weight coefficient in the fitness function and For example, increasing the weight of path length in the fitness function on congested roads.
[0137] 3. Path replanning: Use the updated prediction model and fitness function to rerun the ant colony algorithm for path planning.
[0138] 4. Generate an adjusted cleaning path: Generate an adjusted cleaning path based on the replanned path and transmit it to the garbage collection vehicle via wireless communication.
[0139] 5. Execute the cleaning task: The garbage cleaning truck executes the garbage cleaning task according to the adjusted cleaning path received.
[0140] The system outputs the optimized cleaning path and sends the path information to the garbage truck via wireless communication. The garbage truck performs the cleaning task according to the path and feeds back the execution results to the system in real time. The system can further adjust and optimize the model and algorithm based on the feedback results.
[0141] The key point of the present invention is to use machine learning technology, especially long short-term memory network (LSTM) and ant colony algorithm (ACO), to realize dynamic urban garbage generation prediction and cleaning path planning. The urban garbage cleaning path dynamic adjustment system can be divided into the following modules, including data collection module, garbage generation prediction module, cleaning path planning module and real-time adjustment module. The structure of the urban garbage cleaning path dynamic adjustment system is as follows: Figure 4As shown in the figure, the data collection module integrates multi-source data, including historical garbage collection data, urban activity data, seasonal change data, weather condition data, etc., to provide a comprehensive data foundation for the prediction model. Next, the garbage generation prediction module uses the LSTM algorithm to predict the garbage generation in each area based on time series analysis. Then, the cleaning path planning module uses the ACO algorithm to optimize the garbage truck's cleaning path based on the prediction results to minimize the driving distance and time. Finally, the real-time adjustment module dynamically adjusts the cleaning path based on the latest garbage generation and traffic conditions data to ensure the efficient execution of garbage cleaning operations.
[0142] The overall workflow of this application is as follows Figure 5 As shown, data collection is first performed by collecting and analyzing historical data on urban garbage generation, real-time monitoring of urban activity information, and using advanced prediction algorithms. Then, according to the predicted garbage generation, the ant colony algorithm is used to dynamically plan the path of the garbage cleaning vehicle. Finally, the cleaning path is adjusted in real time according to the real-time garbage generation and traffic conditions. The technical effects of the present application are as follows: improving the accuracy of prediction, by integrating multiple data sources such as historical garbage collection data, urban activity patterns, seasonal changes, and weather conditions, and using the machine learning technology of long short-term memory network (LSTM), the present invention can more accurately predict the amount of garbage generated in different areas at different time periods. The accuracy of this prediction is crucial for the rational allocation of resources and the precise formulation of operation plans; optimizing resource allocation, based on accurate garbage generation prediction, the present invention can dynamically adjust the path and operation frequency of the garbage cleaning vehicle to ensure that the cleaning frequency is increased in areas and time periods with high garbage generation, and reduced in areas and time periods with low garbage generation. This flexible resource allocation method effectively improves the efficiency of garbage disposal and reduces unnecessary resource waste; reduces operating costs, by optimizing the cleaning path, reducing the driving distance and time of the garbage truck, thereby reducing fuel consumption and vehicle maintenance costs. At the same time, since the amount of garbage generated can be predicted more accurately, the additional costs caused by excessive or insufficient cleaning are reduced; the cleaning efficiency and service quality are improved. The present invention improves the response speed and service quality of garbage cleaning through dynamic path planning and real-time adjustment mechanisms. In time periods or areas where the amount of garbage generated increases suddenly, the cleaning strategy can be quickly adjusted to reduce garbage accumulation and improve the level of urban environmental sanitation; the adaptability and flexibility of the system are enhanced. The real-time adjustment module enables the system to quickly respond to changes in urban activities and traffic conditions based on real-time data, such as holidays, special events and traffic congestion. This adaptability and flexibility ensures that garbage cleaning operations can be carried out continuously and stably, and can remain efficient even in the face of emergencies.
[0143] In this embodiment, historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city are obtained, and the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data are preprocessed to obtain processed data; the preprocessing includes data cleaning, missing value filling, and normalization processing; a dynamic garbage generation prediction model is established based on a long short-term memory network, and the dynamic garbage generation prediction model is trained and tested using the processed data to obtain a target dynamic garbage generation prediction model; the urban activity data and meteorological data to be predicted are obtained, and the urban activity data and meteorological data to be predicted are input into the target dynamic garbage generation prediction model to output a garbage generation prediction value; based on the garbage generation prediction value and using the ant algorithm and local search strategy, a city garbage cleaning path is planned, the real-time garbage generation and traffic condition data of the city are obtained, and the city garbage cleaning path is dynamically adjusted and optimized based on the real-time garbage generation and traffic condition data. This application obtains historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city to provide a comprehensive data basis for the prediction model, and uses the long short-term memory network to establish a dynamic garbage generation prediction model, which can accurately predict the predicted values of garbage generation in different areas at different time periods, and use the ant algorithm and local search strategy to plan the urban garbage cleaning path to minimize driving distance and time. Based on real-time garbage generation and traffic conditions data, the urban garbage cleaning path is dynamically adjusted and optimized, and the cleaning path and frequency can be automatically adjusted. It can not only significantly improve the efficiency and effectiveness of garbage cleaning, improve the flexibility and adaptability of resource allocation, and reduce operating costs, but also effectively respond to the dynamic changes encountered in urban garbage management, provide strong support for urban sustainable development, and improve the level of urban environmental sanitation.
[0144] See also Figure 6 As shown, the embodiment of the present invention discloses a device for dynamically adjusting the path of urban garbage cleaning, which may specifically include:
[0145] The data acquisition and processing module 11 is used to acquire historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city, and pre-process the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data; the pre-processing includes data cleaning, missing value filling, and normalization processing;
[0146] A model training and testing module 12, for establishing a dynamic garbage generation prediction model based on a long short-term memory network, and using the processed data to train and test the dynamic garbage generation prediction model to obtain a target dynamic garbage generation prediction model;
[0147] The prediction module 13 is used to obtain the city activity data and meteorological data to be predicted, and input the city activity data and meteorological data to be predicted into the target dynamic garbage generation prediction model to output the garbage generation prediction value;
[0148] The dynamic adjustment and optimization module 14 is used to plan the urban garbage cleaning path based on the predicted value of garbage generation and using the ant algorithm and local search strategy, obtain the real-time garbage generation and traffic conditions data of the city, and dynamically adjust and optimize the urban garbage cleaning path based on the real-time garbage generation and traffic conditions data.
[0149] In some specific embodiments, the historical garbage collection data includes historical daily garbage collection volume, collection frequency, garbage type distribution, and impact of special events on garbage collection; the urban activity data includes schedules for holidays and specific activity scenarios, number of participants, activity types, and garbage generation forecast data; the seasonal change data includes traditional holiday times and season change data; the weather condition data includes temperature, precipitation, and wind speed.
[0150] In some specific embodiments, the data acquisition and processing module 11 may specifically include:
[0151] A data cleaning and removal module, used for cleaning the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data and removing abnormal data to obtain cleaned data;
[0152] A missing value filling module is used to fill the missing values of the cleaned data by using an interpolation method or a mean method to obtain filled data;
[0153] The normalization processing module is used to convert the padded data to the same scale for normalization processing to obtain processed data.
[0154] In some specific embodiments, the model training and testing module 12 may specifically include:
[0155] A data partitioning module, used for partitioning the processed data into a training set and a test set;
[0156] The training and testing module is used to train the dynamic garbage generation prediction model using the training set, adjust the weights and bias items using a back propagation algorithm, and test the trained dynamic garbage generation prediction model using the test set.
[0157] In some specific embodiments, the prediction module 13 may specifically include:
[0158] A data input module, used for inputting the urban activity data and meteorological data to be predicted into the input layer of the target dynamic garbage generation prediction model;
[0159] A time series analysis module, used to perform time series analysis on the urban activity data and meteorological data to be predicted using the hidden layer in the target dynamic garbage generation prediction model to obtain a predicted value of garbage generation; the hidden layer includes a plurality of long short-term memory units;
[0160] The output module is used to output the predicted value of garbage generation volume by using the output layer in the target dynamic garbage generation volume prediction model.
[0161] In some specific embodiments, the dynamic adjustment and optimization module 14 may specifically include:
[0162] An ant path planning module, used to plan an ant path based on the predicted value of garbage generation and using an ant algorithm;
[0163] The path updating and optimization module is used to introduce a local search strategy to update and optimize the ant path to obtain a city garbage cleaning path.
[0164] In some specific embodiments, the dynamic adjustment and optimization module 14 may specifically include:
[0165] A real-time data acquisition module is used to obtain real-time garbage generation and traffic status data of the city using sensors or Internet of Things technology;
[0166] The dynamic adjustment and correction optimization module is used to dynamically adjust and correct the model parameters in the target dynamic garbage generation prediction model and the fitness function in the ant algorithm based on the real-time garbage generation and traffic status data.
[0167] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the method for dynamically adjusting the urban garbage cleaning path performed by the electronic device disclosed in any of the aforementioned embodiments.
[0168] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0169] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0170] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the urban garbage cleaning path dynamic adjustment method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can also further include a computer program that can be used to complete other specific tasks. In addition to including data transmitted from an external device received by the urban garbage cleaning path dynamic adjustment device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0171] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0172] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the method for dynamically adjusting the urban garbage cleaning path disclosed in any of the aforementioned embodiments are implemented.
[0173] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0174] The above is a detailed introduction to the method, device, equipment and storage medium for dynamically adjusting the urban garbage cleaning path provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for dynamically adjusting a path for cleaning up urban garbage, characterized in that: include: Acquire historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city, and pre-process the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data; The preprocessing includes data cleaning, missing value filling and normalization processing; Establishing a dynamic garbage generation prediction model based on a long short-term memory network, and using the processed data to train and test the dynamic garbage generation prediction model to obtain a target dynamic garbage generation prediction model; Acquire urban activity data and meteorological data to be predicted, and input the urban activity data and meteorological data to be predicted into the target dynamic garbage generation prediction model to output a garbage generation prediction value; Based on the predicted value of garbage generation and using ant algorithm and local search strategy, the city's garbage cleaning path is planned, the city's real-time garbage generation and traffic conditions data are obtained, and the city's garbage cleaning path is dynamically adjusted and optimized based on the real-time garbage generation and traffic conditions data.
2. The method for dynamically adjusting the urban garbage cleaning path according to claim 1, characterized in that: The historical garbage collection data includes historical daily garbage collection volume, collection frequency, garbage type distribution, and the impact of special events on garbage collection; the urban activity data includes schedules for holidays and specific activity scenarios, number of participants, activity types, and garbage generation forecast data; the seasonal change data includes traditional festival times and season change data; the weather condition data includes temperature, precipitation, and wind speed.
3. The method for dynamically adjusting the urban garbage cleaning path according to claim 1, characterized in that: The preprocessing of the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data includes: Performing data cleaning and abnormal data removal on the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain cleaned data; Using interpolation method or mean method to fill missing values in the cleaned data to obtain filled data; The padded data are converted to the same scale and normalized to obtain processed data.
4. The method for dynamically adjusting the urban garbage cleaning path according to claim 1, characterized in that: The method of using the processed data to train and test the dynamic garbage generation prediction model includes: Dividing the processed data into a training set and a test set; The dynamic garbage generation prediction model is trained using the training set, weights and bias items are adjusted using a back propagation algorithm, and the trained dynamic garbage generation prediction model is tested using the test set.
5. The method for dynamically adjusting the urban garbage cleaning path according to claim 1, characterized in that: The step of inputting the to-be-predicted urban activity data and meteorological data into the target dynamic garbage generation prediction model to output a predicted value of garbage generation includes: Inputting the urban activity data to be predicted and the meteorological data into the input layer of the target dynamic garbage generation prediction model; Using the hidden layer in the target dynamic garbage generation prediction model to perform time series analysis on the urban activity data and meteorological data to be predicted, so as to obtain a predicted value of garbage generation; the hidden layer includes a plurality of long and short-term memory units; The output layer in the target dynamic garbage generation amount prediction model is used to output the garbage generation amount prediction value.
6. The method for dynamically adjusting the urban garbage cleaning path according to claim 1, characterized in that: The method of planning a city garbage cleaning path based on the predicted value of garbage generation and using an ant algorithm and a local search strategy includes: Based on the predicted value of garbage generation, an ant path is planned using an ant algorithm; A local search strategy is introduced to update and optimize the ant path to obtain a city garbage cleaning path.
7. The method for dynamically adjusting the urban garbage cleaning path according to any one of claims 1 to 6, characterized in that: The obtaining of real-time data on the amount of garbage generated and traffic conditions in the city, and dynamically adjusting and optimizing the garbage cleaning path in the city based on the real-time data on the amount of garbage generated and traffic conditions, includes: Use sensors or IoT technology to obtain real-time data on waste generation and traffic conditions in the city; Based on the real-time garbage generation and traffic condition data, the model parameters in the target dynamic garbage generation prediction model and the fitness function in the ant algorithm are dynamically adjusted and corrected and optimized.
8. A device for dynamically adjusting the path of urban garbage cleaning, characterized in that: include: A data acquisition and processing module, used to acquire historical garbage collection data, urban activity data, seasonal change data, and weather condition data in the city, and pre-process the historical garbage collection data, the urban activity data, the seasonal change data, and the weather condition data to obtain processed data; The preprocessing includes data cleaning, missing value filling and normalization processing; A model training and testing module, used to establish a dynamic garbage generation prediction model based on a long short-term memory network, and train and test the dynamic garbage generation prediction model using the processed data to obtain a target dynamic garbage generation prediction model; A prediction module, used for obtaining the city activity data and meteorological data to be predicted, inputting the city activity data and meteorological data to be predicted into the target dynamic garbage generation prediction model to output the garbage generation prediction value; A dynamic adjustment and optimization module is used to plan the urban garbage cleaning path based on the predicted value of garbage generation and using the ant algorithm and local search strategy, obtain the real-time garbage generation and traffic conditions data of the city, and dynamically adjust and optimize the urban garbage cleaning path based on the real-time garbage generation and traffic conditions data.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the method for dynamically adjusting the urban garbage cleaning path as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, it implements the method for dynamically adjusting the urban garbage cleaning path as described in any one of claims 1 to 7.
Citation Information
Cited By
Mobile garbage compression station transportation allocation system and method based on environmental data
CN120338453A
Mobile garbage compression station transportation and allocation system and method based on environmental data
CN120338453B
Urban construction waste treatment method and system
CN120655279A
Robot multi-target path planning method and system
CN121028789A