Intelligent drinking water distribution path optimization method based on mobile terminal
By adopting a mobile-based intelligent path optimization method in the drinking water distribution system, combining user classification, real-time road conditions and ant colony algorithm, the problem of existing systems being difficult to adapt to traffic changes and optimized resource allocation is solved, and more efficient distribution path planning and resource utilization are achieved.
Patent Information
- Application Number
- CN202411575699.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-25
AI Technical Summary
The existing drinking water distribution system is difficult to flexibly adapt to traffic changes in the distribution area, and lacks accurate analysis of user needs and container recovery rates, which makes it difficult to achieve optimal resource allocation and path planning.
Through the intelligent drinking water distribution path optimization method based on mobile terminal, users are classified using user historical order data and container recycling records, combined with real-time road conditions information and delivery staff location information, ant colony algorithm is used to solve the multi-objective optimization model, and the delivery path is dynamically adjusted.
It significantly improves the optimization of the distribution path, reduces delivery time and resource waste, improves the on-board capacity utilization rate, balances the workload of delivery personnel, and improves the overall delivery efficiency and service quality.
Smart Images

Figure CN119515242A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of route optimization, and in particular to a mobile-based intelligent drinking water distribution route optimization method. Background Art
[0002] In the existing technology, drinking water distribution systems usually rely on traditional path planning methods, which are based on static routes and fixed scheduling rules, and rarely consider real-time road conditions, changes in user demand, or dynamic adjustments of distribution resources. Some systems try to optimize distribution by analyzing historical data in advance, but lack flexibility and the ability to respond quickly to unforeseen situations. In addition, in order to improve user experience, some distribution platforms have been trying to use mobile technology to provide order management and simple path optimization functions, but there is still room for improvement in overall efficiency.
[0003] However, common problems in existing technologies include: the inability to flexibly adapt to the ever-changing traffic conditions in the delivery area, the lack of accurate analysis of user needs and container recycling rates, which makes it difficult to achieve optimal resource allocation and route planning. In addition, the workload of delivery personnel is uneven and the utilization rate of vehicle capacity is low, which affects the overall delivery efficiency and service quality. Existing solutions often cannot efficiently integrate real-time and historical data, and it is even more difficult to dynamically optimize routes to cope with the complexity of delivery tasks.
[0004] Therefore, a new approach is urgently needed to overcome these limitations and improve the overall efficiency of drinking water distribution. Summary of the invention
[0005] The present application provides a mobile-based intelligent drinking water distribution path optimization method to improve the overall efficiency of drinking water distribution.
[0006] The present application provides a mobile-based intelligent drinking water distribution path optimization method, including:
[0007] According to the user's historical order data and container recycling records, the user's order regularity coefficient and container recycling rate are obtained; according to the user's order regularity coefficient, the user is divided into four types of identification: high frequency fixed, high frequency fluctuating, low frequency fixed and low frequency fluctuating;
[0008] Receive a drinking water delivery order sent by a target user via a mobile terminal; determine a basic order priority according to a type identifier of the target user; calculate a time urgency weight according to an expected delivery time in the delivery order; determine an order priority value according to the basic order priority and the time urgency weight;
[0009] Collecting real-time traffic information and delivery personnel location information in the delivery area; generating an order density heat map according to the geographic location information of the delivery address in the delivery order and the order priority value; dividing the delivery area into grids based on the density distribution of the order density heat map, wherein the grid size of the high-density area is smaller than the grid size of the low-density area;
[0010] According to the grid division result, characteristic parameters of each grid unit are calculated, wherein the characteristic parameters include the number of orders in the grid, the cumulative sum of priority values of all orders in the grid, the number of container recycling predicted based on historical data, and the travel time between adjacent grids obtained in combination with the real-time traffic information;
[0011] The vehicle capacity status of each deliveryman is collected, and a multi-objective optimization model is established based on the grid unit characteristic parameters, the deliveryman location information and the vehicle capacity status. The optimization model includes the following objectives: minimizing the weighted delivery time with the order priority value as the weight, maximizing the vehicle capacity utilization rate, maximizing the container recycling efficiency, and balancing the deliveryman workload;
[0012] The grid feature parameters are converted into heuristic information, the multi-objective optimization model is solved by using an ant colony algorithm to obtain an initial delivery path plan, and the initial delivery path plan is sent to a mobile terminal of a corresponding delivery person;
[0013] The vehicle capacity change data is recorded in real time during the delivery process. When the vehicle capacity change data shows that the deviation between the actual number of recycled containers and the predicted number exceeds a preset threshold, the multi-objective optimization model is re-solved based on the updated vehicle capacity status to generate an updated delivery route plan.
[0014] Furthermore, obtaining the user order regularity coefficient and container recovery rate according to the user's historical order data and container recovery records includes:
[0015] Extract the user's order data for at least the past six months and calculate the average interval and standard deviation of the user's order placement as the basis for the user's order regularity coefficient;
[0016] Count all container recycling completed by the user in the corresponding time period, and calculate the ratio of the number of successful recycling times to the total number of delivery times as the user container recycling rate;
[0017] The order regularity coefficient and container recycling rate are combined using a weighted average method to form the key indicators required for user type identification.
[0018] Furthermore, the receiving of the drinking water delivery order sent by the target user via the mobile terminal includes:
[0019] receiving order details entered by the user through a mobile application, including the quantity to be delivered, the expected delivery time, and the number of return containers;
[0020] Verify the integrity of the format and content of the data entered by the user, and store the order in the system database if the information is correct;
[0021] After the order is successfully received, a confirmation notification is sent to the user, and the order data is synchronized to trigger the subsequent optimization calculation process.
[0022] Furthermore, determining the order basic priority according to the type identifier of the target user includes:
[0023] Extracting the type identification of the target user from the user classification information;
[0024] Mapping to a preset priority rule set according to the user type identifier, the rule set includes basic priority values corresponding to high-frequency fixed users, high-frequency fluctuating users, low-frequency fixed users and low-frequency fluctuating users respectively;
[0025] According to the user type identifier, a corresponding basic priority value is selected from the priority rule set and assigned to the order to ensure that the order is properly processed and scheduled in subsequent path optimization.
[0026] Furthermore, the real-time traffic information and the location information of the delivery person in the delivery area are collected, including:
[0027] Through API integration with third-party traffic information service providers, real-time traffic flow data and congestion conditions in the delivery area can be obtained;
[0028] Use GPS modules to obtain the current location information of each delivery person from their mobile device and transmit this data to the central control system;
[0029] Real-time traffic data is matched with the delivery personnel’s location information to dynamically adjust the delivery route planning and optimize the overall delivery efficiency.
[0030] Furthermore, generating an order density heat map includes:
[0031] Map the geographic location information of each order to the two-dimensional coordinate system of the delivery area, and count the number of orders at each coordinate point;
[0032] Use the kernel density estimation algorithm to generate a heat map of order distribution to visualize the order density and highlight high-density and low-density areas;
[0033] According to the results of the order density heat map, the delivery area is divided into high-density and low-density grids for subsequent adaptive path optimization.
[0034] The beneficial effects of the technical solution provided by this application include:
[0035] (1) By classifying users based on their historical order data and container recycling records, and optimizing order priority values in combination with order basic priority and time urgency weights, the present invention can significantly improve the optimization degree of the delivery path, reduce delivery time and resource waste, and thus improve the overall delivery efficiency. (2) By using real-time road conditions information and delivery personnel location information, and combining the ant colony algorithm to solve the multi-objective optimization model, the present invention can adjust the delivery path in real time. When the deviation between the actual number of recycled containers and the predicted number exceeds the threshold, the system can dynamically recalculate the path to ensure rapid response to emergencies and path optimization. (3) By collecting the on-board capacity status of each delivery person and incorporating it into the multi-objective optimization model, the present invention maximizes the utilization of the on-board capacity, reduces the situation of empty or inefficiently loaded vehicles, optimizes resource allocation and reduces operating costs. (4) By optimizing the goal of balancing the workload of delivery personnel in the model, the present invention can more reasonably allocate delivery tasks, avoid individual delivery personnel from being too heavy or idle, and thus improve the overall team's work efficiency and personnel satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flow chart of a mobile-based intelligent drinking water distribution route optimization method provided in the first embodiment of the present application. DETAILED DESCRIPTION
[0037] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0038] The first embodiment of the present application provides a method for optimizing the route of intelligent drinking water distribution based on a mobile terminal. Figure 1 , which is a schematic diagram of the first embodiment of the present application. Figure 1 The first embodiment of the present application provides a mobile-based intelligent drinking water distribution path optimization method for a detailed description.
[0039] Step S101: obtaining a user order regularity coefficient and a container recovery rate according to the user's historical order data and container recovery records; and dividing the user into four types of identifications, namely, high frequency fixed, high frequency fluctuating, low frequency fixed and low frequency fluctuating, according to the user order regularity coefficient.
[0040] First, the user's historical order data and container recycling records are extracted from the user database. The historical order data can include the user's order time, order frequency, order quantity and other relevant details, while the container recycling record includes information on whether the user returns the empty container after each delivery. The extracted data is stored in the memory for further analysis.
[0041] Next, the system evaluates the user's order behavior pattern by calculating the user's order regularity coefficient. Specifically, the system analyzes the user's order interval time and calculates the standard deviation and mean of the order interval. The order regularity coefficient can be calculated by comparing the volatility of the user's order interval time (such as standard deviation) with the mean to quantify the stability of the user's order. If the standard deviation is small, it means that the user's order regularity is high.
[0042] The system then calculates the container recycling rate by counting the number of times the user successfully recycled the container in the historical order and the total number of orders. The system traverses each user's container recycling record and records whether the container is successfully recycled each time. The system adds up all the successful recycling times and divides it by the total number of orders to get the user's container recycling rate. This ratio is usually expressed as a percentage to quantify the user's performance in recycling containers.
[0043] Once the user's order regularity coefficient is obtained, the system classifies the user into four types according to this parameter, namely high-frequency fixed, high-frequency fluctuating, low-frequency fixed, and low-frequency fluctuating. The classification logic is as follows: if the user's order regularity coefficient is high and the order frequency is high, the user is identified as high-frequency fixed; if the regularity coefficient is low but the frequency is still high, the user is identified as high-frequency fluctuating; similarly, low-frequency fixed users have lower order frequency but higher regularity, while low-frequency fluctuating users have both low frequency and low regularity. The purpose of classification is to optimize the delivery route according to the different demand characteristics of users in the subsequent steps.
[0044] In order to improve the accuracy of classification, the system can also set a threshold range to further filter and adjust the regularity coefficient. These classification information are stored and associated with the user's account information for use in subsequent order processing.
[0045] Furthermore, obtaining the user order regularity coefficient and container recovery rate according to the user's historical order data and container recovery records includes:
[0046] Extract the user's order data for at least the past six months and calculate the average interval and standard deviation of the user's order placement as the basis for the user's order regularity coefficient;
[0047] Count all container recycling completed by the user in the corresponding time period, and calculate the ratio of the number of successful recycling times to the total number of delivery times as the user container recycling rate;
[0048] The order regularity coefficient and container recycling rate are combined using a weighted average method to form the key indicators required for user type identification.
[0049] First, the system extracts the user's order data for at least the past six months from the user database. This period is long enough to reliably analyze the user's order behavior pattern. The extracted data includes the timestamp of each order, which is used to calculate the order interval. The system accumulates the time difference between consecutive orders and divides it by the total number of orders to obtain the user's average order interval.
[0050] Next, the system calculates the standard deviation of the user's order intervals. The standard deviation is calculated by square the difference between each order interval and the average interval, summing the difference and dividing by the total number of orders, and then taking the square root. The standard deviation is used to measure the stability of the user's order behavior. The smaller the standard deviation, the more regular the user's order pattern, and vice versa. The user's order regularity coefficient can be used to describe the regularity of the user's order behavior based on the combination of the average interval time and the standard deviation.
[0051] When calculating a user's container recycling rate, the system counts all container recycling records completed by the user during the same six-month period. After each delivery task, the system records whether the user successfully recycled the delivered empty container. The container recycling rate is calculated by the ratio of all successful recycling times to the total number of deliveries. This ratio can be expressed as a percentage, representing the user's enthusiasm for container recycling.
[0052] Finally, in order to more comprehensively reflect the behavioral characteristics of users, the system uses a weighted average method to combine the user order regularity coefficient with the container recovery rate. The distribution of weights can be adjusted according to operational strategies or business needs to highlight more important indicators. Through this combination, the system generates a key indicator for classifying users into different types of identifications such as high-frequency fixed, high-frequency fluctuating, low-frequency fixed, or low-frequency fluctuating. These identifications provide accurate user behavior models for subsequent route optimization, making the planning of delivery routes more efficient and personalized.
[0053] Step S102: receiving a drinking water delivery order sent by a target user via a mobile terminal; determining a basic order priority according to a type identifier of the target user; calculating a time urgency weight according to an expected delivery time in the delivery order; and determining an order priority value according to the basic order priority and the time urgency weight.
[0054] First, the system receives a drinking water delivery order from a user through a mobile application. When a user opens the mobile application and submits an order, the user needs to enter relevant information, such as the required amount of drinking water, the desired delivery time, and whether the empty container needs to be recycled. The system verifies these input data to ensure that all fields are filled in correctly and in the required format, such as the quantity is a positive integer, the expected time is within a reasonable delivery range, etc. After the data is successfully verified, the order information is transmitted to the backend server for processing.
[0055] Once a complete order is received, the system extracts the type identifier associated with the user, which is divided based on the user order regularity coefficient and container recovery rate calculated in the previous step. The system uses the type identifier to determine the basic priority of the order. Specifically, for high-frequency fixed users, the system may assign a higher basic priority, while low-frequency fluctuating users may receive a lower basic priority to ensure the rationality of resource allocation.
[0056] Next, the system calculates the time urgency weight based on the expected delivery time of the order. The system determines the time sensitivity of the order by the time difference between the current time and the user's expected delivery time. The smaller the time difference, the higher the time urgency weight, and vice versa. This weight is used to reflect the time requirements of the order and plays a key role in the delivery route optimization.
[0057] Finally, the system combines the basic priority of the order with the time urgency weight to calculate the final priority value of the order. This calculation may be based on a preset weighted rule, combining the basic priority and time urgency appropriately to generate a value for subsequent route optimization and distribution resource allocation. After the priority value is determined, the order is marked as ready for the next step of processing, waiting for further route optimization calculation and resource allocation.
[0058] Furthermore, the receiving of the drinking water delivery order sent by the target user via the mobile terminal includes:
[0059] receiving order details entered by the user through a mobile application, including the quantity to be delivered, the expected delivery time, and the number of return containers;
[0060] Verify the integrity of the format and content of the data entered by the user, and store the order in the system database if the information is correct;
[0061] After the order is successfully received, a confirmation notification is sent to the user, and the order data is synchronized to trigger the subsequent optimization calculation process.
[0062] First, the user submits the order details through the application on the mobile device. The user must enter specific order data in the application interface, including the amount of drinking water to be delivered, the expected delivery time, and if the drinking water container (such as a bucket) needs to be recycled, the expected number of empty containers to be recycled. The application interface provides users with intuitive input options and uses elements such as prompts or drop-down menus to ensure ease and accuracy of input.
[0063] Once the user submits an order, the system first performs data validation. This includes checking whether the input data format meets the expected requirements, such as ensuring that the delivery quantity is a positive integer, the expected delivery time is within the time range supported by the system, and the number of recycling containers is a non-negative integer. In addition, the system will check the completeness of the input to ensure that all required fields are filled in. If the system detects that the data is incomplete or in the wrong format, it will prompt the user to make corresponding modifications to avoid invalid or erroneous order information entering the system.
[0064] After all data is verified, the system stores the order information in the system database. The database uses an efficient structure to ensure that order data can be quickly retrieved and managed to support subsequent optimization and scheduling calculations. After successful storage, the system will immediately send a confirmation notification to the user. This notification can be implemented through the message push function of the mobile application, and the content includes confirmation of order details, delivery estimate time, and the recycling service selected by the user (if applicable). This not only allows users to understand the status of the order, but also provides users with a feedback mechanism to confirm that the input is correct.
[0065] At the same time, the system will synchronize the order data and pass it as input to the subsequent route optimization module. This synchronization process triggers the subsequent optimization calculation process, ensuring that the order can be quickly included in the overall distribution plan to improve the system's response speed and resource scheduling efficiency.
[0066] Furthermore, determining the order basic priority according to the type identifier of the target user includes:
[0067] Extracting the type identification of the target user from the user classification information;
[0068] Mapping to a preset priority rule set according to the user type identifier, the rule set includes basic priority values corresponding to high-frequency fixed users, high-frequency fluctuating users, low-frequency fixed users and low-frequency fluctuating users respectively;
[0069] According to the user type identifier, a corresponding basic priority value is selected from the priority rule set and assigned to the order to ensure that the order is properly processed and scheduled in subsequent path optimization.
[0070] First, the system extracts the type identification of the target user from the user classification information. The type identification is calculated and divided in the previous step based on the user's order regularity coefficient and container recovery rate. The categories may include high-frequency fixed users, high-frequency fluctuating users, low-frequency fixed users, and low-frequency fluctuating users. The system quickly retrieves the type identification related to the target user by accessing the user classification information stored in the database.
[0071] Next, the system maps the type identifier to a pre-set priority rule set. The priority rule set consists of multiple specific rules, each of which corresponds to a user type and defines the basic priority value of this type of user. Specifically, high-frequency fixed users are usually assigned a higher basic priority value to ensure that their orders can be processed quickly and with priority; high-frequency fluctuating users may have a slightly lower basic priority because their order frequency is high but the time intervals are irregular. Although low-frequency fixed users do not place orders frequently, they may get a medium priority value because their order regularity is strong; and low-frequency fluctuating users usually have lower priority values because their order behavior is both irregular and infrequent.
[0072] The system matches the target user's type identification with the corresponding priority value in the rule set through a simple mapping process. After the matching is completed, the system assigns the corresponding basic priority value to the current order. This basic priority value is used in subsequent path optimization and resource scheduling to ensure that the system can process orders efficiently according to the importance and urgency of user needs. In this way, the system can meet the needs of different user types while maintaining overall delivery efficiency.
[0073] Furthermore, determining the order priority value according to the order basic priority and the time urgency weight includes:
[0074] According to the following formula 1, the order priority value P is calculated:
[0075]
[0076] Among them, α, β, γ are adjustment parameters; U p Indicates the order basic priority determined according to the user type identifier; T w represents the time urgency weight calculated based on the expected delivery time; D is the geographical distance weight of the delivery order, which is calculated based on the distance between the delivery address and the current location of the delivery person; D threshold is the reference threshold of the distance, which is used to control the smooth adjustment of the priority; λ is the parameter for adjusting the steepness of the change of the priority value;
[0077] The order base priority U p Calculated by the following formula 2:
[0078]
[0079] Where T represents the total number of historical orders of the user; ω i is the order weight coefficient of the i-th historical order; O i represents the amount weight of the i-th historical order; R i is the container recovery rate impact coefficient related to the i-th historical order; δ i is the time reduction coefficient associated with the ith historical order; Var(T i ) represents the time interval between the i-th historical order and the previous order. Order interval T i Variance of φ(T type ) is the user type identification influence coefficient, which is determined according to the user type identification;
[0080] The time urgency weight T w Calculated by the following formula 3:
[0081]
[0082] Among them, κ is the time influence coefficient; T max is the maximum value of the delivery time; T expected Indicates the expected delivery time of the order; T current is the current time; η is the time proportion influencing factor; ζ is the nonlinear time adjustment parameter; μ is the time urgency smoothing adjustment coefficient.
[0083] Formula 1 is used to comprehensively calculate the order priority value P:
[0084]
[0085] The meaning of each parameter is as follows:
[0086] α, β, and γ are adjustment parameters used to adjust the impact of each part in the formula on the final priority value. By adjusting α, β, and γ, the relative contribution of the order base priority, time urgency weight, and distance weight to the priority value P can be more flexibly controlled.
[0087] U p is the basic order priority, which is determined by the user's type identifier and is calculated as shown in Formula 2. It reflects the basic priority based on the user's historical order behavior. For example, users with high long-term regularity and high recovery rate may receive a higher basic priority.
[0088] T wis the time urgency weight, calculated as shown in Formula 3. It reflects the time sensitivity of the order and is calculated based on the current time and the expected delivery time of the order. For example, when the expected delivery time is close to the current time, the weight T w will increase significantly, indicating that the order has a higher urgency.
[0089] It is a smoothing adjustment term based on geographic distance and adopts the Sigmoid function form.
[0090] D represents the geographical distance weight of the delivery order, which is calculated by measuring the distance between the delivery address and the current delivery person's location. For example, if the delivery distance is far, D will increase, thereby reducing the priority of this route.
[0091] D threshold It is the reference threshold of the distance, which is used to control the starting point of smooth adjustment. It can be obtained through experimental data or set according to expert knowledge.
[0092] λ is a parameter that adjusts the steepness of the change in priority value and determines the steepness of the Sigmoid function. For example, a higher λ value will make the priority value close to D threshold , while a lower λ will make the change more gradual. It can be obtained through experimental data or set based on expert knowledge.
[0093] Formula 2 describes how to calculate the order-based priority U p :
[0094]
[0095] T represents the total number of historical orders of the user. For example, if the user has placed 10 orders in the past six months, then T = 10.
[0096] ω i The order weight coefficient of the i-th historical order is used to reflect the importance of the order, which can be based on the order amount or the priority specified by the user.
[0097] O i is the amount weight of the i-th historical order. Orders with larger amounts are given higher weights. i , to reflect users' high expectations for services.
[0098] R i is the container recycling rate influence coefficient, which is related to the i-th historical order. If the user recycles the container on time, R i higher; otherwise lower, reflecting the user's enthusiasm for recycling.
[0099] δ iis the time decay coefficient, which is related to the i-th order and is used to reduce the impact of temporally unrelated orders. i It can be set based on the time difference of the orders or the relative freshness of the orders. For example, a recently placed order may have a smaller δ i value, thereby reducing the decay effect, while an order from one year ago has a larger δ i value, significantly reducing its impact.
[0100] Var(T i ) represents the order interval T i The variance of reflects the regularity of user orders. i A large variance indicates that users place orders at irregular times, resulting in lower priority.
[0101] Indicates the user type identification influence coefficient, which is set based on the user type identification. For example, high-frequency fixed users may have a higher For example, for high-frequency fixed users, is 1.5, for high frequency fluctuation users, is 1.0, for low-frequency fixed users, is 0.8, for low-frequency fluctuation users, is 0.5.
[0102] Formula 3 is used to calculate the time urgency weight T w :
[0103]
[0104] κ is the time impact coefficient, which is used to adjust the overall magnitude of the time urgency weight. A higher k value will make time sensitivity more significant.
[0105] T max The maximum value of the delivery time is set to the longest acceptable time period for delivery.
[0106] T expected is the expected delivery time of the order. For example, if the user wants the order to be delivered at 3 pm, T expected That is the timestamp of 3:00 PM.
[0107] T current is the current time, which is compared with the expected time.
[0108] η is the time ratio influence factor, which is used to adjust the nonlinear relationship between the current time and the expected time.
[0109] ζ is a nonlinear time adjustment parameter used to increase the nonlinear effect of the time weight. For example, when ζ is high, the weight increases sharply when the time is close to the expected value.
[0110] μ is the smooth adjustment coefficient of time urgency, which controls the degree of smooth change of urgency.
[0111] Step S103: Collect real-time traffic information and delivery personnel location information in the delivery area; generate an order density heat map based on the geographic location information of the delivery address in the delivery order and the order priority value; and divide the delivery area into grids based on the density distribution of the order density heat map, wherein the grid size of the high-density area is smaller than the grid size of the low-density area.
[0112] First, the system collects real-time traffic information within the delivery area. This can be done by integrating third-party traffic data services, such as calling the API interface of the real-time traffic data provider to obtain updates on information including road congestion, construction areas, traffic accidents, etc. These real-time traffic data will be continuously refreshed and stored in the system memory for dynamic analysis.
[0113] At the same time, the system collects location information from each delivery person's mobile device. The delivery person's device can provide accurate geolocation data through the built-in GPS module or mobile application. The system periodically sends location requests to each delivery person's device and receives their current location, including latitude and longitude coordinates and timestamp. To improve the accuracy of the data, the frequency of location information collection can be adjusted according to the urgency of the delivery task, such as increasing the collection frequency for high-priority delivery tasks.
[0114] Next, the system generates an order density heat map based on the geographic location information and order priority values of the delivery address in each delivery order. The process of generating a heat map involves mapping the location of each order into a two-dimensional coordinate system and assigning a corresponding priority value to each point as a weight. The system uses a density estimation method to calculate the order density of each area and visualizes the results in the form of a heat map to clearly show high-density and low-density order areas.
[0115] Based on the density distribution of the order density heat map, the system performs adaptive meshing of the delivery area. Meshing is to divide the entire delivery area by defining multiple grid cells, where the size of the grid cells is adjusted according to the order density. High-density areas use smaller grid sizes to manage orders more finely and optimize delivery routes; low-density areas use larger grid sizes to reduce the consumption of computing resources. The results of meshing are stored in the system for optimization calculations in subsequent steps.
[0116] The entire process ensures that the system can dynamically adjust the delivery strategy based on real-time traffic conditions and the location of the delivery person, and provides support for efficient route planning through density heat maps and grid division methods.
[0117] Furthermore, the real-time traffic information and the location information of the delivery person in the delivery area are collected, including:
[0118] Through API integration with third-party traffic information service providers, real-time traffic flow data and congestion conditions in the delivery area can be obtained;
[0119] Use GPS modules to obtain the current location information of each delivery person from their mobile device and transmit this data to the central control system;
[0120] Real-time traffic data is matched with the delivery personnel’s location information to dynamically adjust the delivery route planning and optimize the overall delivery efficiency.
[0121] First, the system integrates with the API of a third-party traffic information service provider to obtain real-time traffic flow data in the entire delivery area. This data includes current road congestion, accident reports, construction areas, and other information that may affect traffic conditions. The API integration method enables the system to continuously update traffic data, thereby maintaining an accurate grasp of the traffic environment.
[0122] At the same time, the system obtains the real-time location information of each delivery person from their mobile device. This is achieved through the built-in GPS module of the device, which regularly sends the precise geographic coordinates of the delivery person, including longitude and latitude. The system is designed to adjust the frequency of location information collection regularly or dynamically according to delivery needs to ensure timely response to the movement of the delivery person. All collected location information is transmitted to the central control system via wireless communication, and the central system integrates and stores this data.
[0123] The core of this method is to match real-time traffic data with the location information of the delivery personnel. The system correlates the traffic data with the geographic location of the delivery personnel to identify the current traffic environment of each delivery personnel. Based on these matching results, the system can dynamically adjust the delivery route and select the best route to avoid congested areas, thereby optimizing delivery efficiency. If a planned route encounters severe traffic congestion, the system will recalculate alternative routes for the affected delivery personnel and send the adjusted instructions to their mobile devices. In this way, delivery personnel can obtain the best route suggestions in real time, so as to efficiently complete delivery tasks in complex traffic environments.
[0124] Through this data collection and dynamic route adjustment mechanism, this method can significantly improve the overall delivery efficiency and reduce delays caused by traffic jams, making the system more responsive and flexible.
[0125] Furthermore, generating an order density heat map includes:
[0126] Map the geographic location information of each order to the two-dimensional coordinate system of the delivery area, and count the number of orders at each coordinate point;
[0127] Use the kernel density estimation algorithm to generate a heat map of order distribution to visualize the order density and highlight high-density and low-density areas;
[0128] According to the results of the order density heat map, the delivery area is divided into high-density and low-density grids for subsequent adaptive path optimization.
[0129] First, the system converts and maps the geographic location information of each order into a two-dimensional coordinate system within the delivery area. The geographic location information includes the latitude and longitude coordinates of the order, which are accurately mapped to the coordinate system to ensure that the system can accurately mark the location of each order in geographic space. The system traverses all order data and counts the number of orders at each coordinate location point by point, thus forming a data set with distribution density.
[0130] Next, the system applies a kernel density estimation algorithm to generate a heat map of the order distribution. Kernel density estimation is a nonparametric statistical method used to smooth the distribution of discrete data points to create a continuous distribution map. Specifically, the system assigns an influence range to each order location and calculates the overall distribution density by combining the influence ranges of all order locations. Areas with higher density are marked as areas of high order concentration and displayed as "hot spots" in the heat map, while areas with lower density are displayed as "cold spots." This allows for a clear and intuitive visualization of the order distribution, highlighting which areas have more concentrated orders and which areas are more sparse.
[0131] Based on the generated order density heat map, the system further divides the delivery area into high-density and low-density grids. The division process takes into account the order density: high-density areas are divided into smaller grid cells to enable more refined path planning and resource allocation, while low-density areas are divided into larger grid cells to reduce the use of computing resources and optimize the efficiency of overall path planning. This grid division provides structured input for subsequent adaptive path optimization, enabling the system to flexibly adjust the delivery strategy based on the actual order distribution.
[0132] With this approach, the system can not only accurately identify areas where orders are concentrated, but also effectively optimize delivery routes based on order density, thereby improving overall delivery efficiency and making delivery services more flexible and efficient.
[0133] Step S104: Calculate characteristic parameters of each grid unit according to the grid division result, wherein the characteristic parameters include the number of orders in the grid, the cumulative priority values of all orders in the grid, the number of container recycling predicted based on historical data, and the travel time between adjacent grids obtained in combination with the real-time traffic information.
[0134] First, the system goes through each grid unit one by one according to the results of the previous grid division and counts the number of all orders in the grid. The number of orders is achieved by identifying the geographical location information of the orders in the grid and counting the orders that fall within the grid area. The system maintains a counter, and when an order is found in the current grid, the counter is incremented by one until all orders are counted.
[0135] Next, the system calculates the cumulative sum of the priority values of all orders in the grid. To do this, the system traverses the orders in each grid cell, extracts the priority value of each order, and adds these priority values together to get a sum. This cumulative value is used to evaluate the overall importance and urgency of the grid cell, providing key data support for subsequent path optimization.
[0136] The system then predicts the number of containers recycled within the grid unit based on historical data. The container recycling number prediction is done by analyzing the historical data of container recycling rates of users within that grid. The system uses past data patterns, such as the average recycling success rate and ordering patterns of users within that grid area, to infer the number of recycling that the current order may involve. The prediction value is generated through simple statistical models or more complex machine learning methods to ensure the accuracy of the prediction.
[0137] Finally, the system calculates the travel time between adjacent grid cells in combination with real-time traffic information. This operation involves using real-time traffic information obtained from a traffic data service and estimating the time required for a delivery vehicle to move from one grid to an adjacent grid based on the geographic distance and traffic conditions between the grid cells. The system adjusts the calculation of travel time to take into account factors such as traffic congestion, construction or weather effects to ensure that the travel time estimate is as accurate as possible. After these characteristic parameters are calculated, the system stores this data and uses it in subsequent route optimization.
[0138] Furthermore, the calculating of characteristic parameters of each grid unit according to the grid division result includes:
[0139] Count all orders within each grid cell and record the geographic location of the orders to determine the order distribution;
[0140] Calculate the priority value of each order, and add up the priority values of all orders to obtain the cumulative sum of the order priorities of the grid unit;
[0141] A prediction model based on historical data is used to estimate the expected number of container returns in each grid cell, and combined with real-time traffic information, the estimated travel time between adjacent grid cells is calculated to provide accurate path planning parameters.
[0142] First, the system traverses each grid cell and counts the number of all orders within the cell. This statistical operation is performed by identifying the geographic location of the orders that fall within the grid cell range to ensure that the distribution of each order can be accurately captured. The specific geographic location of each order is recorded in detail to further analyze the spatial density and distribution pattern of the orders. This data will provide basic support for subsequent path planning and resource optimization.
[0143] While counting the number of orders, the system calculates the priority value for each order. The priority value is set based on the characteristics and urgency of the order, such as the basic priority and time sensitivity of the order. The system adds up the priority values of each order one by one to obtain the cumulative sum of the order priorities of the entire grid unit. This cumulative value is used to measure the overall importance and urgency of the orders in the grid unit, so as to give appropriate weights when optimizing the path, ensuring that high-priority orders can be responded to and processed faster.
[0144] Next, the system uses a prediction model based on historical data to estimate the expected number of container recycling within each grid unit. The prediction model analyzes the historical recycling behavior data of users in the grid unit, combines each user's container recycling rate and order regularity, and provides an estimated recycling quantity. This estimate helps the system arrange resources more effectively when planning routes, especially the demand distribution of recycling services.
[0145] Finally, the system combines real-time traffic information to calculate the estimated travel time between adjacent grid cells. Real-time traffic data is provided by traffic information service providers and takes into account current traffic flow, road congestion, and other factors that may affect travel time. By integrating this data, the system is able to generate accurate path planning parameters for each grid cell. These parameters will be used to adjust delivery routes, optimize travel time, avoid unnecessary delays, and improve overall delivery efficiency.
[0146] This process ensures that the system can fully understand the order requirements and traffic conditions of each grid unit, thereby providing a smarter delivery route optimization solution to meet the personalized needs of different users.
[0147] Furthermore, the calculating of the characteristic parameters of each grid unit includes:
[0148] Based on the following formula 4, the cumulative sum S of the priority values of all orders in the grid is calculated:
[0149]
[0150] Where L represents the total number of orders in the grid unit; P j represents the priority value of the jth order in the grid cell, which is determined according to the order basic priority and time urgency weight; θ is the recovery coefficient; C j represents the expected number of container returns for the jth order in the grid cell; ρ is the distance effect smoothing parameter; ξ is the geographic distance sensitivity parameter; D j It represents the geographical distance weight of the jth order in the grid cell, which indicates the distance between the delivery person’s current location and the order address.
[0151] In Formula 4, L is the total number of orders in the grid unit, indicating the number of orders that need to be processed in the current grid unit. The system will traverse all orders, count and determine the value of L. For example, if there are 5 orders in a grid unit, then L = 5.
[0152] P j is the priority value of the jth order, calculated based on the order basic priority and time urgency weight. p and time urgency weight T w The calculation method of has been explained in detail in the previous content. j Reflects the urgency and importance of the order. For example, if the basic priority of an order is 2.0 and the time urgency weight is 1.5, then P j It can be calculated as 2.0×1.5=3.0.
[0153] θ is a recycling factor that adjusts the impact of the number of container recycling on the priority value. It is a pre-set constant, and the specific value can be selected according to the operation strategy. For example, if the company wants to pay more attention to recycling behavior, θ can be set to a larger value, such as 0.8.
[0154] C j is the expected number of containers returned for the jth order, indicating the number of empty containers that the user may return in this delivery. Based on the user’s historical recycling data and order characteristics, the system predicts and derives C j For example, if a user usually returns 2 empty containers, and the expected number of returns for this order is 3, then C j =3.
[0155] ρ is the distance effect smoothing parameter, which is used to smoothly adjust the effect of geographic distance on the priority value. This parameter determines the smoothness of the distance effect and is usually set to a positive number. For example, if ρ = 0.5, it means that the distance effect is relatively smooth and will not change dramatically.
[0156] ξ is the geographic distance sensitivity parameter, which controls how sensitive geographic distance is to the priority value adjustment. A larger ξ will make the distance effect change more dramatically, while a smaller ξ will make the effect change more slowly. For example, if a distribution company wants distance to have a greater impact on route selection, it can set ξ = 1.0.
[0157] D j is the geographical distance weight of the jth order, which represents the distance between the delivery person’s current location and the order address. Distance weight D j It can be determined by measuring the straight-line distance or road distance between the delivery person’s current GPS coordinates and the order destination coordinates. For example, if the delivery person is 5 kilometers away from the order address, then D j =5.
[0158] Step S105: Collect the vehicle capacity status of each deliveryman, and establish a multi-objective optimization model based on the grid unit characteristic parameters, the deliveryman location information and the vehicle capacity status. The optimization model includes the following objectives: minimizing the weighted delivery time with the order priority value as the weight, maximizing the vehicle capacity utilization, maximizing the container recovery efficiency, and balancing the deliveryman workload.
[0159] The specific implementation of step S105 first involves collecting vehicle capacity status data from each delivery person's mobile device or vehicle-mounted device. The vehicle capacity status of each delivery person represents the total amount of drinking water currently loaded in their vehicle, which, when compared with the vehicle's maximum carrying capacity, can reflect the remaining loading space available to each delivery person. The system communicates with each delivery person's device through wireless data transmission methods, such as mobile networks or Wi-Fi, to regularly obtain and update these capacity data. All collected vehicle capacity status data is recorded and stored in the central server for use in optimization calculations.
[0160] Next, the system integrates the characteristic parameters of each grid unit calculated in the previous step, including the number of orders, the cumulative value of order priority, the predicted number of container recycling, and the travel time between adjacent grids, with the location information of the delivery personnel and the vehicle capacity status. The location information of the delivery personnel is obtained in real time based on the GPS system, indicating the current geographic coordinates of each delivery personnel. These data provide the specific distribution of delivery personnel in the delivery area and can be analyzed in combination with order density and real-time traffic information.
[0161] After obtaining all the necessary input data, the system builds a multi-objective optimization model that aims to optimize multiple delivery objectives at the same time. The objectives considered in the model include minimizing the weighted delivery time with order priority values as weights, maximizing the utilization of vehicle capacity, maximizing the efficiency of container recovery, and balancing the workload of delivery personnel. Specifically, the weighted delivery time minimization objective ensures that more urgent orders are processed first; the objective of maximizing the utilization of vehicle capacity aims to reduce the empty operation of delivery vehicles and improve the efficiency of resource use; the objective of maximizing the efficiency of container recovery enables the system to efficiently arrange recovery tasks; the objective of workload balancing avoids some delivery personnel being too busy or idle by reasonably allocating tasks.
[0162] The model building process involves converting all these optimization objectives into mathematical expressions and incorporating constraints (such as capacity constraints of delivery vehicles, feasible delivery routes, etc.) into the model. The system uses these mathematical expressions and constraints to define a solvable multi-objective optimization problem. By combining all input data, the model provides a comprehensive analysis and path planning basis for delivery tasks, ensuring that the entire distribution network operates at maximum efficiency while taking into account flexibility and resource balance.
[0163] Step S106: converting the grid feature parameters into heuristic information, using an ant colony algorithm to solve the multi-objective optimization model, obtaining an initial delivery path plan, and sending the initial delivery path plan to the mobile terminal of the corresponding delivery person.
[0164] The implementation of step S106 involves multiple steps of data conversion and calculation to ensure the optimal planning of the delivery path. First, the system converts the characteristic parameters of each grid unit into heuristic information. In the process of converting the grid characteristic parameters into heuristic information, the system first collects the characteristic parameters within each grid unit, which usually include the number of orders, the cumulative sum of order priority values, the expected number of recycling containers, and the travel time with adjacent grid units. These parameters each reflect the different weights and importance of the grid unit in the delivery path optimization.
[0165] In order for these characteristic parameters to provide clear guidance for path selection, the parameters must first be standardized. The purpose of standardization is to eliminate the differences in magnitude of different parameters so that they can be comparable in calculations. For example, some parameters may have larger original values, while other parameters have smaller values. Through standardization, all parameters are scaled to the same range, ensuring that no parameter is overly dominant or ignored during path selection.
[0166] Once the parameters are standardized, the system integrates these feature parameters to form a single heuristic information value. This heuristic information is usually designed to be proportional to the attractiveness of the path, that is, grid cells with higher order priorities, more orders, or fewer recycling containers will be given higher heuristic information values. Correspondingly, paths with shorter travel times will also increase the attractiveness of the path. The heuristic information value takes into account all standardized feature parameters to form a value that can be used to guide ants in choosing paths.
[0167] The core purpose of this transformation is to condense the complex and diverse feature parameters into a simple and useful indicator, so that the ant colony algorithm can effectively judge and select the optimal path based on the heuristic information. In this way, the heuristic information provides a clear metric for each path, helping to optimize the entire delivery process.
[0168] Next, the system applies the ant colony algorithm to solve the multi-objective optimization model. The ant colony algorithm is a heuristic optimization method based on the foraging behavior of ants in nature, which has the ability to efficiently search for the global optimal path. The implementation steps of the algorithm include initializing the ant colony, where each ant represents a potential delivery path solution. Each ant selects a path in the distribution network with a certain probability, which is determined by the pheromone concentration and heuristic information on the path. During the path selection process, ants tend to choose paths with higher pheromone concentrations or more attractive heuristic information.
[0169] After the ant colony completes the path selection, the system calculates the total delivery time, vehicle capacity utilization, container recovery efficiency, and load balance of the delivery personnel for each path, and compares these results with the optimization goal. After completing the path traversal, the system updates the pheromone concentration based on the quality of the path. The pheromone concentration increases on efficient paths to increase the probability that ants will choose this path in the future, and decreases on inefficient paths to gradually eliminate undesirable solutions.
[0170] Through multiple rounds of iterations, the ant colony algorithm gradually converges to one or more optimal delivery path solutions. After the algorithm is completed, the system selects the optimal solution as the initial delivery path and sends the solution to the mobile terminal of the relevant delivery person through the wireless network. The delivery person's mobile terminal receives and displays the delivery path, including the detailed delivery sequence and driving direction, so that the delivery person can complete the task efficiently.
[0171] The entire process ensures that route planning can adapt to the dynamic changes of the distribution network in real time and provide delivery personnel with optimized delivery solutions, thereby improving overall operational efficiency and customer satisfaction.
[0172] Furthermore, the multi-objective optimization model is solved by the objective function provided by the following formula 5, and the path optimization is realized by combining the improved ant colony algorithm:
[0173]
[0174] Where Z represents the objective function value; ω1, ω2, ω3, and ω4 are weight coefficients; P is the total number of orders, indicating the number of all orders that need to be optimized; P k represents the priority value of the kth order; T k represents the estimated delivery time of the kth order; N is the total number of couriers, which represents the number of all couriers currently involved in the delivery; C i is the current vehicle capacity of the ith delivery person; C max represents the maximum vehicle capacity of a single delivery person; M is the total number of container recovery tasks; R m represents the mth recycling task, which is used to identify whether the container is successfully recycled, 1 indicates successful recycling, and 0 indicates unrecycled; Var(W) represents the variance of the deliveryman’s workload, and W represents the workload set of each deliveryman;
[0175] The improved ant colony algorithm comprises the following steps:
[0176] Generate an initial path set, randomly assign a starting point to each ant and initialize it according to the path generation rule; when the ant selects a path, it uses the probabilistic selection mechanism based on heuristic information and path pheromone concentration provided by the following formula 6:
[0177]
[0178] Among them, p ij represents the probability of an ant moving from node i to node j; τ ij represents the pheromone concentration on the path (i, j), reflecting the historical preference of the path being selected; η ij Represents the heuristic information of path (i, j), which is inversely correlated with the delivery distance and time, and is used to guide ants to choose a better path; α and β are weight coefficients; allowed represents the set of all candidate nodes to which the ant can legally move; τ ik represents the pheromone concentration on the path (i, k); η ik Represents the heuristic information on the path (i, k);
[0179] After the ant completes the path, the pheromone concentration on the path is updated using the following formula 7:
[0180] τ ij =(1-ρ)·τ ij +Δτ ij (7)
[0181] Where ρ represents the pheromone volatility coefficient; Δτ ijis the pheromone increment on the path (i, j), which is calculated using the following formula 8:
[0182]
[0183] Where Q represents the pheromone intensity coefficient; Z represents the path cost calculated by the objective function in Formula 5;
[0184] According to the progress of the current path optimization, the values of α, β and ρ are adaptively adjusted to improve the search efficiency and convergence speed;
[0185] When all ants fail to find a better path in multiple iterations or the maximum number of iterations is reached, the optimization is stopped and the best path solution is output.
[0186] The objective function Z is a comprehensive function that contains multiple weighted terms, each corresponding to a different optimization goal, all of which work together to improve the overall delivery efficiency:
[0187] The first optimization goal:
[0188] This term measures the weighted average delivery time of all orders, where P is the total number of orders and P k is the priority value of the kth order, T k is the estimated delivery time of the kth order. When calculating, the estimated delivery time T of each order k According to its priority P k The weighting is performed so that orders with higher priority contribute more to the average delivery time. The weight coefficient ω1 controls the importance of this term in the overall optimization. For example, if the company prioritizes delivery time, ω1 can be set higher.
[0189] The second optimization goal:
[0190] This is aimed at maximizing the utilization of vehicle capacity, where N is the total number of delivery personnel, C i is the current vehicle capacity of the ith delivery person, C max is the maximum vehicle capacity of a single delivery person. By calculating the absolute difference between the current vehicle capacity of each delivery person and the maximum capacity and taking the average of all delivery persons, the system hopes to minimize this difference so that the delivery persons can set off with as full a load as possible and reduce resource waste. The weight coefficient ω2 is used to adjust the priority of this goal.
[0191] The third optimization goal:
[0192] This optimization goal focuses on improving the efficiency of container recycling, where M is the total number of container recycling tasks, and R mIndicates the completion status of the mth recycling task, successful recycling is recorded as 1, and unrecovered is recorded as 0. By calculating the successful recycling rate By subtracting it from 1, the system seeks to minimize the proportion of unrecycled materials, thereby improving the overall recycling efficiency. The weight coefficient ω3 determines the impact of this goal.
[0193] The fourth optimization goal: ω4·Var(W)
[0194] This term measures the variance of the delivery worker's workload, where W represents the set of workloads of each delivery worker. By minimizing the variance of the workload, the system hopes to achieve a balanced distribution of workload, avoiding that some delivery workers are too busy while others are relatively idle. The weight coefficient ω4 controls the importance of workload balance in the overall optimization.
[0195] To achieve optimization, this embodiment adopts an improved ant colony algorithm, which is a bionic optimization method that simulates the behavior of ants in nature to find the shortest path by releasing pheromones.
[0196] Initial path set generation: The system assigns a random starting point to each ant and initializes it according to the path generation rules. The ants explore the distribution network and gradually select paths to find the best distribution solution.
[0197] Path selection mechanism: When ants choose a path, they use the probability formula:
[0198]
[0199] Here, p ij is the probability of an ant moving from node i to node j, τ ij Represents the pheromone concentration on the path (i, j), reflecting the historical selection preference of the path. A higher pheromone concentration indicates that the path is selected more frequently. η ij It is the heuristic information of the path, which is usually inversely proportional to the delivery distance and time, and guides the ants to choose a better path. Parameters α and β adjust the relative importance of pheromone concentration and heuristic information.
[0200] Heuristic information η ij According to the path distance d ij or estimated delivery time t ij A common definition is:
[0201]
[0202] or
[0203]
[0204] where d ijis the distance from node i to node j, t ij is the estimated delivery time, and ∈ is a small positive number used to prevent the denominator from being zero.
[0205] Pheromone update mechanism: After the ant completes the path, the system updates the pheromone concentration on the path using the formula:
[0206] τ ij =(1-ρ)·τ ij +Δτ ij
[0207] Where ρ is the pheromone volatility coefficient, which indicates the rate at which pheromones evaporate naturally over time. A higher ρ value will accelerate the decay of pheromones, allowing the algorithm to explore new paths faster. Increment Δτ ij represents the amount of pheromone contributed by all ants on the path (i, j), which is calculated as follows:
[0208]
[0209] Here, Q is the pheromone intensity coefficient, which determines the amount of pheromone released by the ant after finding a better path, and Z is the path cost calculated by the objective function. The lower the path cost, the greater the pheromone increment, which encourages other ants to choose the same path. In Formula 8, all ants refers to all ants participating in this round of path search. After completing the entire path search, each ant will calculate the cost Z (objective function value) of each path it has passed through, and release the corresponding pheromone according to the quality of the path. The lower the path cost Z, the better the path, and the more pheromone the ant releases on the path.
[0210] Summation symbol ∑ all ants It means to traverse all ants and add up the amount of pheromone released by each ant on the path (i, j). The specific steps are as follows:
[0211] (1) Calculation of each ant’s contribution: For each ant, if the ant selects edge (i, j) in its path, it calculates the pheromone increment based on the path cost Z Here, Q is the pheromone intensity coefficient, and Z is the total path cost calculated after the ant completes the path.
[0212] (2) Accumulate the contributions of all ants: The system traverses all ants and calculates the amount of pheromone they contribute on the path (i, j). This forms the total pheromone increment Δτ on the path (i, j) ij .
[0213] Q is usually chosen based on the size and complexity of the problem, and the range of path costs. The following is a common strategy:
[0214] (1) Setting according to the path cost range: If the path cost Z usually fluctuates within a larger range, such as from tens to tens, Q can be set to a constant of the same order of magnitude as the path cost to ensure that the pheromone increment Δτ ij In this way, even if the path cost is large, the pheromone increment will not be too small.
[0215] (2) Experiment and adjust the settings: In practice, the Q value usually needs to be adjusted through experiments to achieve the best algorithm performance. You can try different Q values and observe the algorithm's recovery speed and the quality of the solution.
[0216] Parameter adaptive adjustment: During the optimization process, the system adaptively adjusts the values of α, β, and ρ according to the current path selection and optimization progress to improve the search efficiency and the convergence speed of the algorithm. In this way, the algorithm can explore paths more extensively in the early stages and focus on searching for the optimal path in the later stages.
[0217] In the early stages, in order to increase the diversity of exploration, the system will set a smaller α value and a larger β value. In this way, ants will make choices based more on the heuristic information of the path (such as distance), explore new paths, and reduce their reliance on historical paths. As the algorithm progresses, if it is observed that the pheromone concentration of some paths begins to be significantly higher than other paths (indicating that these paths may be good paths), the system will gradually increase the value of α, strengthen the reliance on historical path selection, and reduce the value of β, thereby focusing on searching these paths that are considered to be better.
[0218] In the early stages, the system sets ρ to a high value, such as 0.8, to accelerate the volatilization of pheromones, prompting ants to explore new paths and prevent certain paths from becoming the main choice too early. As the number of iterations increases and the search range gradually shrinks, the system will reduce the ρ value, such as to 0.3, so that the accumulated high concentration of pheromones can affect path selection more persistently, thereby focusing on searching for potential optimal solutions.
[0219] Optimization termination condition: When all ants fail to find a better path in multiple iterations, or when the preset maximum number of iterations is reached, the system stops optimizing and outputs the current optimal delivery path.
[0220] Step S107: During the delivery process, the vehicle capacity change data is recorded in real time. When the vehicle capacity change data shows that the deviation between the actual number of recycled containers and the predicted number exceeds a preset threshold, the multi-objective optimization model is re-solved based on the updated vehicle capacity state to generate an updated delivery route plan.
[0221] The implementation of step S107 includes continuous monitoring and dynamic adjustment of the delivery path to ensure the efficiency and adaptability of the system. During the delivery process, the system will record the vehicle capacity change data of each delivery person in real time. The collection of vehicle capacity change data is completed by communicating with sensors installed on the delivery vehicle. These sensors can detect the actual capacity of the current vehicle, including the number of newly added recycling containers during the delivery process. The system transmits this data to the central control server in real time and records the timestamp of each data point to provide a complete capacity change situation.
[0222] Once the recorded on-board capacity change data shows that the actual number of recycled containers deviates significantly from the previous forecast based on historical data, the system will determine whether the deviation exceeds the preset threshold. This preset threshold is set based on actual operational needs to identify situations where route re-optimization is required. If the deviation exceeds the threshold, the system immediately triggers a re-optimization process to dynamically adjust the delivery plan.
[0223] After triggering the route re-optimization, the system will re-solve the multi-objective optimization model based on the updated vehicle capacity state. At this time, the system will consider the latest vehicle capacity data, combined with real-time traffic information, the current location of the delivery person, and the characteristic parameters of the grid unit to recalculate the optimal delivery route. The optimization process uses the optimization methods described previously, such as the ant colony algorithm, to ensure that the route adjustment is rapid and globally optimal.
[0224] After the optimization is completed, the system generates an updated delivery route plan and sends it to the relevant delivery personnel's mobile terminal through wireless communication. The delivery personnel's device will immediately display the new route guidance, including the delivery order and the adjusted driving direction. In this way, the delivery personnel can immediately continue to complete the delivery task according to the new route without reducing efficiency or wasting resources due to deviations in the number of containers.
[0225] This dynamic adjustment mechanism ensures that the delivery process can respond to changes in actual conditions in real time, improving the flexibility and overall efficiency of the delivery system. It can also adapt to the unpredictability of user behavior and the environment, thereby providing more stable and efficient delivery services.
[0226] A second embodiment of the present application provides an electronic device, the electronic device comprising:
[0227] processor;
[0228] The memory is used to store a program, and when the program is read and executed by the processor, it executes a mobile-based intelligent drinking water distribution path optimization method provided in the first embodiment of the present application.
[0229] The third embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, a mobile-based intelligent drinking water distribution path optimization method provided in the first embodiment of the present application is executed.
[0230] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A mobile-based intelligent drinking water distribution path optimization method, characterized in that: include: According to the user's historical order data and container recycling records, the user's order regularity coefficient and container recycling rate are obtained; according to the user's order regularity coefficient, the user is divided into four types of identification: high frequency fixed, high frequency fluctuating, low frequency fixed and low frequency fluctuating; Receiving a drinking water delivery order sent by a target user via a mobile terminal; determining a basic order priority according to a type identifier of the target user; calculating a time urgency weight according to an expected delivery time in the delivery order; Determining an order priority value according to the order basic priority and the time urgency weight; Collecting real-time traffic information and delivery personnel location information within the delivery area; generating an order density heat map based on the geographic location information of the delivery address in the delivery order and the order priority value; Gridding the delivery area based on the density distribution of the order density heat map, wherein the grid size of the high-density area is smaller than the grid size of the low-density area; According to the grid division result, characteristic parameters of each grid unit are calculated, wherein the characteristic parameters include the number of orders in the grid, the cumulative sum of priority values of all orders in the grid, the number of container recycling predicted based on historical data, and the travel time between adjacent grids obtained in combination with the real-time traffic information; The vehicle capacity status of each deliveryman is collected, and a multi-objective optimization model is established based on the grid unit characteristic parameters, the deliveryman location information and the vehicle capacity status. The optimization model includes the following objectives: minimizing the weighted delivery time with the order priority value as the weight, maximizing the vehicle capacity utilization rate, maximizing the container recycling efficiency, and balancing the deliveryman workload; The grid feature parameters are converted into heuristic information, the multi-objective optimization model is solved by using an ant colony algorithm to obtain an initial delivery path plan, and the initial delivery path plan is sent to a mobile terminal of a corresponding delivery person; The vehicle capacity change data is recorded in real time during the delivery process. When the vehicle capacity change data shows that the deviation between the actual number of recycled containers and the predicted number exceeds a preset threshold, the multi-objective optimization model is re-solved based on the updated vehicle capacity status to generate an updated delivery route plan.
2. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1 is characterized in that: The obtaining of the user order regularity coefficient and the container recovery rate according to the user's historical order data and container recovery records includes: Extract the user's order data for at least the past six months and calculate the average interval and standard deviation of the user's order placement as the basis for the user's order regularity coefficient; Count all container recycling completed by the user in the corresponding time period, and calculate the ratio of the number of successful recycling times to the total number of delivery times as the user container recycling rate; The order regularity coefficient and container recycling rate are combined using a weighted average method to form the key indicators required for user type identification.
3. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1 is characterized in that: The receiving of the drinking water delivery order sent by the target user via the mobile terminal comprises: receiving order details entered by the user through a mobile application, including the quantity to be delivered, the expected delivery time, and the number of return containers; Verify the integrity of the format and content of the data entered by the user, and store the order in the system database if the information is correct; After the order is successfully received, a confirmation notification is sent to the user, and the order data is synchronized to trigger the subsequent optimization calculation process.
4. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1 is characterized in that: The determining the order basic priority according to the type identifier of the target user includes: Extracting the type identification of the target user from the user classification information; Mapping to a preset priority rule set according to the user type identifier, the rule set includes basic priority values corresponding to high-frequency fixed users, high-frequency fluctuating users, low-frequency fixed users and low-frequency fluctuating users respectively; According to the user type identifier, a corresponding basic priority value is selected from the priority rule set and assigned to the order to ensure that the order is properly processed and scheduled in subsequent path optimization.
5. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1 is characterized in that: The real-time traffic information and the location information of the delivery personnel in the delivery area are collected, including: Through API integration with third-party traffic information service providers, real-time traffic flow data and congestion conditions in the delivery area can be obtained; Use GPS modules to obtain the current location information of each delivery person from their mobile device and transmit this data to the central control system; Real-time traffic data is matched with the delivery personnel’s location information to dynamically adjust the delivery route planning and optimize the overall delivery efficiency.
6. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1 is characterized in that: The generating of the order density heat map comprises: Map the geographic location information of each order to the two-dimensional coordinate system of the delivery area, and count the number of orders at each coordinate point; Use the kernel density estimation algorithm to generate a heat map of order distribution to visualize the order density and highlight high-density and low-density areas; According to the results of the order density heat map, the delivery area is divided into high-density and low-density grids for subsequent adaptive path optimization.
7. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1 is characterized in that: The step of calculating the characteristic parameters of each grid unit according to the grid division result includes: Count all orders within each grid cell and record the geographic location of the orders to determine the order distribution; Calculate the priority value of each order, and add up the priority values of all orders to obtain the cumulative sum of the order priorities of the grid unit; A prediction model based on historical data is used to estimate the expected number of container returns in each grid cell, and combined with real-time traffic information, the estimated travel time between adjacent grid cells is calculated to provide accurate path planning parameters.
8. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1 is characterized in that: Determining the order priority value according to the order basic priority and the time urgency weight includes: According to the following formula 1, the order priority value P is calculated: Among them, α, β, γ are adjustment parameters; U p Indicates the order basic priority determined according to the user type identifier; T w represents the time urgency weight calculated based on the expected delivery time; D is the geographical distance weight of the delivery order, which is calculated based on the distance between the delivery address and the current location of the delivery person; D threshold is the reference threshold of the distance, which is used to control the smooth adjustment of the priority; λ is the parameter for adjusting the steepness of the change of the priority value; The order base priority U p Calculated by the following formula 2: Where T represents the total number of historical orders of the user; ω i is the order weight coefficient of the i-th historical order; O i represents the amount weight of the i-th historical order; R i is the container recovery rate impact coefficient related to the i-th historical order; δ i is the time reduction coefficient associated with the ith historical order; Var(T i ) represents the time interval between the i-th historical order and the previous order. Order interval T i Variance of φ(T type ) is the user type identification influence coefficient, which is determined according to the user type identification; The time urgency weight T w Calculated by the following formula 3: Among them, κ is the time influence coefficient; T max is the maximum value of the delivery time; T expected Indicates the expected delivery time of the order; T current is the current time; η is the time proportion influencing factor; ζ is the nonlinear time adjustment parameter; μ is the time urgency smoothing adjustment coefficient.
9. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1, characterized in that: The calculation of the characteristic parameters of each grid unit includes: Based on the following formula 4, the cumulative sum S of the priority values of all orders in the grid is calculated: Where L represents the total number of orders in the grid unit; P j represents the priority value of the jth order in the grid cell, which is determined according to the order basic priority and time urgency weight; θ is the recovery coefficient; C j represents the expected number of container returns for the jth order in the grid cell; ρ is the distance effect smoothing parameter; ξ is the geographic distance sensitivity parameter; D j It represents the geographical distance weight of the jth order in the grid cell, which indicates the distance between the delivery person’s current location and the order address.
10. The mobile terminal-based intelligent drinking water distribution path optimization method according to claim 1, characterized in that: The multi-objective optimization model is solved by the objective function provided by the following formula 5, and the path optimization is realized by combining the improved ant colony algorithm: Where Z represents the objective function value; ω1, ω2, ω3, and ω4 are weight coefficients; P is the total number of orders, indicating the number of all orders that need to be optimized; P k represents the priority value of the kth order; T k represents the estimated delivery time of the kth order; N is the total number of couriers, which represents the number of all couriers currently involved in the delivery; C i is the current vehicle capacity of the ith delivery person; C max represents the maximum vehicle capacity of a single delivery person; M is the total number of container recovery tasks; R m represents the mth recycling task, which is used to identify whether the container is successfully recycled, 1 indicates successful recycling, and 0 indicates unrecycled; Var(W) represents the variance of the deliveryman’s workload, and W represents the workload set of each deliveryman; The improved ant colony algorithm comprises the following steps: Generate an initial path set, randomly assign a starting point to each ant and initialize it according to the path generation rule; when the ant selects a path, it uses the probabilistic selection mechanism based on heuristic information and path pheromone concentration provided by the following formula 6: Among them, p ij represents the probability of an ant moving from node i to node j; τ ij represents the pheromone concentration on the path (i, j), reflecting the historical preference of the path being selected; η ij Represents the heuristic information of path (i, j), which is inversely correlated with the delivery distance and time, and is used to guide ants to choose a better path; α and β are weight coefficients; allowed represents the set of all candidate nodes to which the ant can legally move; τ ik represents the pheromone concentration on the path (i, k); η ik Represents the heuristic information on the path (i, k); After the ant completes the path, the pheromone concentration on the path is updated using the following formula 7: t ij =(1-ρ)·τ ij +Δt ij (7) Where ρ represents the pheromone volatility coefficient; Δτ ij is the pheromone increment on the path (i, j), which is calculated using the following formula 8: Where Q represents the pheromone intensity coefficient; Z represents the path cost calculated by the objective function in Formula 5; According to the progress of the current path optimization, the values of α, β and ρ are adaptively adjusted to improve the search efficiency and convergence speed; When all ants fail to find a better path in multiple iterations or the maximum number of iterations is reached, the optimization is stopped and the best path solution is output.
Citation Information
Cited By
Urban logistics distribution range collaborative optimization method and system
CN120563000A
Excavator oil consumption prediction optimization method and system based on cloud platform
CN121559878A
Self-adaptive matching distribution method based on order recovery scene
CN122472384A