A method for managing garbage classification orders
By using a clustering algorithm in the management of garbage classification and delivery orders, taking into account the difference in order quantity and processing difficulty of recycling bins, optimizing the service area allocation of recyclers solves the problem in the existing technology that the recycler's processing capabilities do not match the orders within the service range. problem, improving the efficiency of order recovery.
Patent Information
- Application Number
- CN202411420043.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In the management of garbage classification and delivery orders, due to the complex urban routes and the use area radius, the recycling personnel's processing capacity does not match the orders within the service scope, reducing the efficiency of order recycling.
By obtaining the information of the recycling box in multiple regions in history, the number of preset recychers is used as the number of clusters, and equal recovery boxes are selected as the initial cluster center. Calculate the adaptive clustering distance, consider the difference in order quantity and processing difficulty, and ensure that the workload balance of each recyrior is balanced.
The clustering algorithm is used to optimize the service area allocation of recyclers to ensure balanced workload of each recycler and improve the efficiency of order recycling.
Smart Images

Figure CN118941282B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and more specifically, to a method for managing garbage classification and delivery orders. Background Art
[0002] With the acceleration of urbanization and the improvement of residents' living standards, the amount of garbage generated is increasing, and traditional garbage disposal methods can no longer meet the demand. In order to promote the resource utilization of garbage classification and improve the efficiency and quality of garbage disposal, enterprises in various places have begun to explore and promote the resident garbage order model.
[0003] At present, the prior art, such as the patent application document with publication number CN109741142A, discloses an order allocation method, an order allocation device, a readable storage medium and an electronic device. The order allocation method includes: obtaining the to-be-allocated orders in the target distribution area unit; clustering the to-be-allocated orders according to the location information of the to-be-allocated orders, and determining at least one order cluster, wherein the order cluster includes multiple to-be-allocated orders; allocating the to-be-allocated orders in the order cluster according to the location of each order cluster; wherein, clustering the orders using clustering parameters (such as area radius), if the number of orders in the order cluster meets a specific condition, then determining the order cluster and determining the center position of the order cluster; determining the target order cluster, determining the number of candidate delivery parties of the target order cluster, obtaining a set of candidate delivery parties within the target order cluster location range, and allocating orders in the set of candidate delivery parties according to the location information and delivery party attributes.
[0004] The above order allocation method aims to optimize the order allocation process through intelligent clustering and allocation algorithms, cluster orders through geographic location information, and intelligently allocate them according to the clustering results and the attributes of the delivery party to improve the delivery efficiency and accuracy. However, due to the complexity of urban routes, there are certain limitations in the radius of the area used, which makes the processing capacity of the collectors mismatch with the orders within the service range, greatly reducing the efficiency of order collection. Summary of the invention
[0005] In order to solve the above-mentioned technical problem of reducing the efficiency of order recovery, the present invention provides solutions in the following aspects.
[0006] A method for managing garbage classification orders, comprising:
[0007] Get the historical recycling bin information of multiple regions, including the latitude and longitude of the recycling bin, the number of the recycling bin, and the number of orders in the recycling bin;
[0008] The number of recyclers who handle recycling bins is preset; the number of recyclers is used as the number of clusters, and recycling bins equal to the number of recyclers are selected as initial cluster centers. The number of clusters and the initial cluster centers are input into the preset clustering algorithm, and the service area of each recycler, that is, the number of recycling bins contained in each cluster, is output;
[0009] The clustering allocation principle is as follows: the clustering distance between each recycling bin and the initial clustering center is calculated, and the recycling bin is divided into the cluster with the clustering center closest to it; the clustering distance is negatively correlated with the difference in order quantity between multiple recycling bins and positively correlated with the difficulty of processing the recycling bins.
[0010] The present invention uses a clustering algorithm to divide recycling bins into different clusters according to certain rules, thereby determining which recycling bins each recycler is responsible for. Specifically, by calculating an adaptive clustering distance, the recyclers are allowed to take into account the differences in order quantity and processing difficulty when allocating them, thereby making the workload of each recycler relatively balanced and improving the efficiency of order recycling.
[0011] Preferably, the information of the recycling box also includes the weight of the order.
[0012] Preferably, the preset clustering algorithm is a K-means algorithm.
[0013] Preferably, during the clustering iteration process, for each cluster, the mean of all points in the cluster is calculated and the mean is used as the new cluster center point; when the change distance of the cluster center of each cluster between two consecutive iterations is less than a preset minimum distance threshold, the iteration is stopped.
[0014] Setting a minimum distance threshold as the iteration stop condition can prevent the algorithm from looping infinitely and ensure that the algorithm can converge to a stable state after a finite number of iterations.
[0015] Preferably, when the sum of the order quantities of any two recycling boxes is greater than or equal to the maximum order quantity of the recycling boxes, the clustering distance is: ; On the contrary, the clustering distance is: ; In the formula, For the Recycling bins and The cluster distance between the initial cluster centers, For the The number of orders for recycling bins, For the The number of orders for recycling bins corresponding to the initial cluster centers, For the The difficulty of handling recycling bins, For the The processing difficulty of the recycling bins corresponding to the initial cluster centers, For the Recycling bins and The actual distance between the recycling bins corresponding to the initial cluster centers, represents normalization, It is an exponential function with the natural constant e as its base.
[0016] By incorporating the difference in the number of orders for recycling bins into the calculation of cluster distances, we can ensure that the size of the orders is taken into account when assigning recyclers. When the sum of the number of orders for two recycling bins is large, the cluster distance between them will decrease, which is conducive to assigning recycling bins with large orders to the same recycler, thereby improving recycling efficiency; recycling bins that are difficult to handle will be assigned to cluster centers that are farther away, thereby avoiding a single recycler being responsible for too many difficult-to-handle recycling bins. This can balance the workload of each recycler and ensure that they can effectively complete the recycling task.
[0017] Preferably, the process of obtaining the processing difficulty is:
[0018] Get the maximum order weight that the recycler has handled on average each time in history; calculate the average total order weight in the recycling bin on each day in history;
[0019] When the maximum order weight is less than the average of the total order weights of each day, the processing difficulty is 1; when the maximum order weight is greater than or equal to the average of the total order weights of each day, the processing difficulty is: ; In the formula, For the The difficulty of handling recycling bins, is the maximum order weight, For the The average total order weight of each recycling bin on each day in history, To handle the difficulty factor, It is an exponential function with the natural constant e as its base.
[0020] Taking processing difficulty as an important factor in the clustering process can make the clustering results more in line with the actual situation. Specifically, recycling bins with greater processing difficulty will be assigned to recyclers with stronger processing capabilities, while recycling bins with less processing difficulty may be assigned to recyclers with relatively weaker processing capabilities. This ensures that each recycler can efficiently complete the recycling task within their capabilities.
[0021] Preferably, the processing difficulty factor satisfies the relationship:
[0022] ; In the formula, To handle the difficulty factor, is the distribution density of recycling bins, For the The actual distance from the recycling bin to the waste disposal center, The total number of recycling bins in multiple regions in the history of obtaining, It is an exponential function with the natural constant e as its base.
[0023] Preferably, the processing difficulty factor also satisfies the relationship:
[0024] ; In the formula, To handle the difficulty factor, is the distribution density of recycling bins, For the The actual distance from the recycling bin to the waste disposal center, The total number of recycling bins in multiple regions in the history of obtaining, is the average capacity of the recycling bin, It is an exponential function with the natural constant e as its base.
[0025] By introducing the processing difficulty factor and considering multiple factors closely related to recycling work, the algorithm can more accurately reflect the recycling needs and challenges in actual situations. At the same time, since the processing difficulty factor can be adjusted according to different business scenarios and needs, the algorithm has high practicality and flexibility.
[0026] Preferably, the process of obtaining the distribution density of the recycling bins includes:
[0027] Calculate the mean of the average distances between all recycling bins and normalize them;
[0028] Calculate the distance difference between each recycling bin and its nearest recycling bin and farthest recycling bin, then calculate the average of the distance differences of all recycling bins and normalize them;
[0029] The product of the average of the normalized distances between all recycling bins and the average of the normalized distance differences between all recycling bins is taken as the distribution density of the recycling bins.
[0030] In cluster analysis, the distribution density of recycling bins is an important factor. By accurately obtaining the distribution density of recycling bins, we can ensure that the distribution characteristics of recycling bins are fully considered in the clustering process, thereby obtaining a clustering result that is more in line with the actual situation.
[0031] The beneficial effects of the present invention are:
[0032] The present invention divides the service area of recyclers by using a clustering algorithm and improves the traditional clustering algorithm. Specifically, by analyzing the actual distance between recycling bins, the difference in the number of orders in the recycling bins and the processing difficulty, the clustering result is more in line with the actual situation, which helps to more accurately divide the service area of recyclers and improve the efficiency of order recycling. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0034] Figure 1 It is a method flow chart of steps S1-S2 in a method for managing garbage classification and delivery orders in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0036] The present invention is aimed at the scenario of garbage recycling orders generated by urban residents after garbage classification, especially when residents choose to use the self-service garbage delivery method. The general process of this method is:
[0037] Users first recycle and preliminarily sort the garbage through some means (possibly an APP or other smart devices). Residents then place the preliminarily sorted garbage into smart recycling bins installed in the community. These recycling bins may be equipped with sensors and local servers that can record the placement of garbage and upload this information to the cloud server. After the cloud server receives the order information uploaded by the smart recycling bin, the platform performs autonomous delivery order pre-processing and appointment order module pre-processing. The recycler receives the order assigned by the cloud server through the APP, performs recycling work according to the predetermined schedule, and transfers the order to the garbage disposal center.
[0038] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0039] Reference Figure 1 A method for managing garbage classification orders includes steps S1-S2, which are as follows:
[0040] S1: Obtain the historical recycling bin information of multiple regions, including the latitude and longitude of the recycling bin, the number of the recycling bin, and the number of orders in the recycling bin.
[0041] In the embodiment of the present invention, by analyzing the past order data of a community, the demand for garbage collection in a certain period of time in the future can be predicted, which helps to plan resources in advance, such as arranging enough collectors and vehicles.
[0042] Specifically, firstly, historical data needs to be extracted from the database of the garbage collection service, including the number and location (latitude and longitude) of the recycling bin, the garbage delivery record of each recycling bin, and the weight information of each delivery, etc. For example, the number of recycling bins to be extracted is set to 100.
[0043] Organize the collected data to ensure that the number of each recycling bin corresponds to its latitude and longitude and the order quantity and weight information. You can use a data management system or write scripts to organize the data.
[0044] It should be noted that in a city, a region may contain multiple communities. Here, "region" refers to a larger geographical area, while "community" refers to a residential unit within this region.
[0045] It should be noted that the reason for choosing to obtain historical information of recycling bins is that the information of recycling bins can aggregate the data of multiple individual orders, which helps to simplify the data analysis process. Moreover, by analyzing the overall data of recycling bins, the need for individual order processing can be reduced, thereby reducing operating costs.
[0046] S2: Preset the number of recyclers who handle recycling bins; take the number of recyclers as the number of clusters, select recycling bins equal to the number of recyclers as initial cluster centers, input the number of clusters and the initial cluster centers into the preset clustering algorithm, and output the service area of each recycler, that is, the number of recycling bins contained in each cluster.
[0047] In the embodiment of the present invention, the implementer can determine the number of recyclers to be dispatched according to the amount of garbage generated and the frequency of recycling in each community.
[0048] In an embodiment of the present invention, if the orders from residents in a region are dense, it means that the demand for garbage collection in this region is high. Therefore, the service range of the recyclers should be set to be smaller so that these dense orders can be served more frequently. On the contrary, if the orders in a region are sparse, that is, the demand for garbage collection in this region is low, the service range of the recyclers can be set to be larger, so that they can serve fewer orders in a wider area without wasting time and resources. At the same time, in order to make full use of the processing capacity of the recyclers, the weight of the order needs to be considered so that the service range of the recyclers matches their processing capacity. This can avoid the situation where some recyclers are overloaded while some recyclers are idle.
[0049] First, analyze the distribution density of recycling bins based on the latitude and longitude corresponding to each recycling bin. Take a recycling bin as an example for analysis. The analysis steps are generally as follows:
[0050] The first step is to calculate The average straight-line distance between the recycling bin and all other recycling bins is recorded as ; Then, for each recycling bin, calculate the average straight-line distance between the corresponding bin and all other recycling bins, and then calculate the mean of the average distances between all recycling bins, that is, .
[0051] Step 2: Calculate The straight-line distance between the recycling bin and the recycling bin farthest from it, calculate the The straight-line distance between a recycling bin and the recycling bin closest to it is calculated, and the difference between the farthest straight-line distance and the nearest straight-line distance is calculated. Then, the average value of the difference between the farthest straight-line distance and the nearest straight-line distance corresponding to all recycling bins is calculated, that is, .
[0052] It should be noted that the operations in the first and second steps above are both normalized at the end.
[0053] Then the distribution density of the above recycling bins satisfies the relationship:
[0054]
[0055] In the formula, is the distribution density of recycling bins, For the The average straight-line distance between the recycling bin and all other recycling bins, For the The straight-line distance between a recycling bin and the recycling bin farthest from it. For the The straight-line distance between a recycling bin and the nearest recycling bin, is the number of recycling bins, i.e. , It is an exponential function with the natural constant e as its base.
[0056] Among them, based on the operation of the first step above, the relative size of the distance between the recycling bins is expressed, so as to preliminarily analyze the distribution density of the recycling bins. However, since the distribution in space may be uneven, for example, if other recycling bins near a certain recycling bin are also densely distributed, then it can be considered that these recycling bins are positively correlated in space. Therefore, based on the operation of the second step above, the first step is supplemented to comprehensively analyze the distribution density of the recycling bins.
[0057] In other embodiments, the distribution density of recycling bins may also be calculated based on the nearest neighbor method, and the general steps are as follows:
[0058] For each recycling bin, calculate its distance to all other recycling bins using the Haversing formula;
[0059] For each recycling bin, calculate the inverse of its distance to the nearest neighboring recycling bin. This inverse can be used as a preliminary distribution density indicator for the recycling bin;
[0060] Calculate the average of the inverse of all recycling bin distances to get the distribution density of the entire area.
[0061] Secondly, obtain the maximum average order weight that the recycler has handled each time in history; calculate the average total weight of orders in the recycling bin on each day in history; it should be noted that the weight information of the order handled by the recycler each time can be obtained on the cloud server platform.
[0062] When the maximum order weight is less than the average of the total order weights of each day, the processing difficulty is 1; this means that, relative to the daily order volume, occasional large orders do not pose additional processing challenges.
[0063] When the maximum order weight is greater than or equal to the average of the total order weights of each day, the processing difficulty is:
[0064]
[0065] In the formula, For the The difficulty of handling recycling bins, is the maximum order weight, For the The average total order weight of each recycling bin on each day in history, To handle the difficulty factor, It is an exponential function with the natural constant e as its base.
[0066] When the maximum order weight exceeds the daily average order weight, the processing difficulty increases as the difference between the maximum order weight and the average order weight increases, and the processing difficulty factor further adjusts the rate or degree of this increase.
[0067] Among them, the processing difficulty factor The relationship is as follows:
[0068]
[0069] In the formula, To handle the difficulty factor, is the distribution density of recycling bins, For the The actual distance from the recycling bin to the waste disposal center, To obtain the total number of recycling bins in multiple regions in history, It is an exponential function with the natural constant e as its base.
[0070] Recycling bins with high distribution density and / or long distance to the processing center will have a higher processing difficulty factor. The processing difficulty factor can be used to optimize recycling routes and prioritize recycling bins with high processing difficulty, thereby improving overall waste collection efficiency.
[0071] Furthermore, based on the original calculation of the processing difficulty factor, the processing difficulty factor is optimized in combination with the average capacity of the recycling bin, and the processing difficulty factor also satisfies the following relationship:
[0072]
[0073] In the formula, To handle the difficulty factor, is the distribution density of recycling bins, For the The actual distance from the recycling bin to the waste disposal center, The total number of recycling bins in multiple regions in the history of obtaining, is the average capacity of the recycling bin, is an exponential function with the natural constant e as its base. The larger the capacity, the more work and resources are required to process each recycling bin, so the processing becomes more difficult.
[0074] It should be noted that in actual applications, recycling bins are often not completely filled, so it is necessary to consider the filling factor (usually between 0.79-0.9). The average capacity of the recycling bin is the product of the actual average capacity and the filling factor.
[0075] Finally, in an embodiment of the present invention, the K-means algorithm is used to divide the service area of the recyclers. In this scenario, the number of recyclers will be used as the number of clusters, and the initial cluster center will select the recycling bins equal to the number of recyclers.
[0076] It should be noted that in traditional clustering algorithms, only the distance or similarity between data points is usually considered for clustering. However, in the scenario of garbage sorting order management, the allocation of recycling bins not only considers the physical distance from the initial cluster center, but also combines two non-physical factors: order quantity difference and processing difficulty.
[0077] Therefore, when the sum of the order quantities of any two recycling bins is greater than the maximum order quantity equal to the recycling bin, the clustering distance is:
[0078]
[0079] On the contrary, the clustering distance is:
[0080]
[0081] In the formula, For the Recycling bins and The cluster distance between the initial cluster centers, For the The number of orders for recycling bins, For the The number of orders for recycling bins corresponding to the initial cluster centers, For the The difficulty of handling recycling bins, For the The processing difficulty of the recycling bins corresponding to the initial cluster centers, For the Recycling bins and The actual distance between the recycling bins corresponding to the initial cluster centers, represents normalization, It is an exponential function with the natural constant e as its base.
[0082] By incorporating the difference in the number of orders for recycling bins into the calculation of cluster distances, we can ensure that the size of the orders is taken into account when assigning recyclers. When the sum of the number of orders for two recycling bins is large, the cluster distance between them will decrease, which is conducive to assigning recycling bins with large orders to the same recycler, thereby improving recycling efficiency; recycling bins that are difficult to handle will be assigned to cluster centers that are farther away, thereby avoiding a single recycler being responsible for too many difficult-to-handle recycling bins. This can balance the workload of each recycler and ensure that they can effectively complete the recycling task.
[0083] The general steps to use the K-means algorithm to divide the service area of the recycler are as follows:
[0084] The number of recyclers is taken as the number of clusters, and the recycling bins equal to the number of recyclers are selected as the initial cluster centers. The number of clusters and the initial cluster centers are input into the preset clustering algorithm. According to the cluster distance calculated above, each recycling bin is assigned to the cluster with the nearest cluster center. During the clustering iteration process, for each cluster, the mean of all points in the cluster is calculated, and the mean is used as the new center point. When the change distance of the cluster center of each cluster between two consecutive iterations is less than the preset minimum distance threshold, the iteration is stopped. Finally, the service area of each recycler is output, that is, the number of recycling bins contained in each cluster.
[0085] The minimum distance threshold may be set by the implementer based on experience.
[0086] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0087] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A method for managing garbage classification orders, characterized in that: include: Get the historical recycling bin information of multiple regions, including the latitude and longitude of the recycling bin, the number of the recycling bin, and the number of orders in the recycling bin; The number of recyclers who handle recycling bins is preset; the number of recyclers is used as the number of clusters, and recycling bins equal to the number of recyclers are selected as initial cluster centers. The number of clusters and the initial cluster centers are input into the preset clustering algorithm, and the service area of each recycler, that is, the number of recycling bins contained in each cluster, is output; The clustering allocation principle is: calculate the clustering distance between each recycling bin and the initial cluster center, and divide the recycling bin into the cluster with the nearest cluster center; when the sum of the order quantities of any two recycling bins is greater than or equal to the maximum order quantity of the recycling bins, the clustering distance is: ; On the contrary, the clustering distance is: ; In the formula, For the Recycling bins and The cluster distance between the initial cluster centers, For the The number of orders for recycling bins, For the The number of orders for recycling bins corresponding to the initial cluster centers, For the The difficulty of handling recycling bins, For the The processing difficulty of the recycling bins corresponding to the initial cluster centers, For the Recycling bins and The actual distance between the recycling bins corresponding to the initial cluster centers, represents normalization, is an exponential function with the natural constant e as base; The process of obtaining the processing difficulty is as follows: Get the maximum order weight that the recycler has handled on average each time in history; calculate the average total order weight in the recycling bin on each day in history; When the maximum order weight is less than the average of the total order weights of each day, the processing difficulty is 1; when the maximum order weight is greater than or equal to the average of the total order weights of each day, the processing difficulty is: ; In the formula, is the maximum order weight, For the The average total order weight of each recycling bin on each day in history, To handle the difficulty factor; The processing difficulty factor satisfies the relationship: ; In the formula, is the distribution density of recycling bins, For the The actual distance from the recycling bin to the waste disposal center, The total number of recycling bins in multiple areas of the acquisition history.
2. A method for managing garbage classification orders according to claim 1, characterized in that: The recycling bin information also includes the weight of the order.
3. A method for managing garbage classification orders according to claim 2, characterized in that: The preset clustering algorithm is the K-means algorithm.
4. A method for managing garbage classification orders according to claim 3, characterized in that: During the clustering iteration process, for each cluster, the mean of all points in the cluster is calculated and the mean is used as the new cluster center point; when the change distance of the cluster center of each cluster between two consecutive iterations is less than the preset minimum distance threshold, the iteration is stopped.
5. A method for managing garbage classification orders according to claim 4, characterized in that: The processing difficulty factor also satisfies the relationship: ; In the formula, To handle the difficulty factor, is the distribution density of recycling bins, For the The actual distance from the recycling bin to the waste disposal center, The total number of recycling bins in multiple regions in the history of obtaining, is the average capacity of the recycling bin, It is an exponential function with the natural constant e as its base.
6. A method for managing garbage classification orders according to claim 5, characterized in that: The process of obtaining the distribution density of the recycling bins includes: Calculate the mean of the average distances between all recycling bins and normalize them; Calculate the distance difference between each recycling bin and its nearest recycling bin and farthest recycling bin, then calculate the average of the distance differences of all recycling bins and normalize them; The product of the average of the normalized distances between all recycling bins and the average of the normalized distance differences between all recycling bins is taken as the distribution density of the recycling bins.
Citation Information
Patent Citations
Order distribution method, order distribution device, readable storage medium and electronic equipment
CN109741142A
Order processing method and apparatus
CN107392513A
Path optimization method based on efficient reduction of AGV total transportation cost
CN111178440A