Commercial district generation method and device for order delivery, computer equipment and storage medium

By using a density-based clustering algorithm to cluster merchants and order delivery destinations twice, a more accurate business district is generated, which solves the problem of inaccurate traditional business district planning and improves delivery efficiency and resource utilization.

CN120975843APending Publication Date: 2025-11-18BEIJING LONGJU YIXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510953709.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Traditional delivery service area planning relies on manual operation, which cannot accurately reflect the actual coverage area of ​​merchants, resulting in inaccurate determination of order delivery service areas and affecting delivery efficiency.

Method used

A density-based clustering algorithm is used to perform two clustering operations on merchants and order delivery destinations. By combining the density distribution of merchant locations and order delivery destinations, a business district that better meets actual needs is generated.

Benefits of technology

The business districts generated through two clustering processes more accurately include core commercial service areas and consumer demand hotspots, thereby improving the utilization rate of transportation resources and delivery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120975843A_ABST
    Figure CN120975843A_ABST
Patent Text Reader

Abstract

The invention relates to a business district generation method and device for order delivery, computer equipment and a storage medium. The method comprises the steps of obtaining position information of merchants, performing first clustering according to a density-based clustering algorithm and the position information of the merchants to obtain a plurality of merchant sets, determining order delivery end points of the merchants according to the merchant sets, performing second clustering according to the density-based clustering algorithm and the order delivery end points to obtain a plurality of order delivery end points, and determining order delivery end points of the merchants according to the order delivery end points. And obtaining a set of a plurality of order delivery terminal points, selecting a set containing the most order delivery terminal points from the set of the plurality of order delivery terminal points, and obtaining a business district of order delivery. By adopting the method, the business district range can better meet the actual scene requirement and is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a business circle generation method and device for order delivery, a computer device, and a storage medium. BACKGROUND

[0002] In the modern urban commercial system, the business circle planning of the delivery industry is related to operational efficiency and service quality. With the changes in the business environment and the upgrading of consumer demand, the traditional planning method has been difficult to meet the needs of the development of the industry.

[0003] Traditional delivery business circle planning relies on manual operation, and is often centered on merchants, with a fixed radius or administrative region to simply circle the surrounding area as a business circle.

[0004] However, manual planning is limited by subjective experience and cannot accurately reflect the real radiation range of merchants, resulting in inaccurate determination of the business circle for order delivery, which in turn affects delivery efficiency. SUMMARY

[0005] Therefore, it is necessary to provide a business circle generation method and device for order delivery, a computer device, and a storage medium to solve the above technical problems.

[0006] In a first aspect, the present application provides a business circle generation method for order delivery, comprising:

[0007] Obtaining location information of merchants and performing first clustering based on a density-based clustering algorithm and the location information of the merchants to obtain a plurality of merchant sets;

[0008] Determining order delivery destinations of the merchants according to the merchant sets;

[0009] Performing second clustering based on the density-based clustering algorithm and the order delivery destinations to obtain a plurality of order delivery destination sets;

[0010] Selecting a set containing the most order delivery destinations from the plurality of order delivery destination sets to obtain a business circle for order delivery.

[0011] In one embodiment, the first clustering based on the density-based clustering algorithm and the location information of the merchants to obtain a plurality of merchant sets comprises:

[0012] Determining a core location point based on the density-based clustering algorithm, a first search radius, and the location information of the merchants;

[0013] Creating a current cluster with the current core location point as a starting point;

[0014] Determining a density direct point of the core location point and adding the density direct point to the current cluster;

[0015] When there is a new core position point in the density direct point, the density direct point of the new core position point is obtained and added to the current cluster to perform the first clustering to obtain a plurality of merchant sets.

[0016] In one of the embodiments, the order delivery terminal of the merchant is determined according to the merchant set, comprising:

[0017] The center point of the merchant set is determined according to the weighted center point algorithm.

[0018] The coverage range is determined according to the center point and the preset radius, and the target merchant set is selected from the plurality of merchant sets according to the coverage range.

[0019] The order delivery terminal of the merchant is determined according to the target merchant set.

[0020] In one of the embodiments, the center point of the merchant set is determined according to the weighted center point algorithm, comprising:

[0021] The order quantity of each merchant in the merchant set within a preset time period is obtained.

[0022] The weight of the merchant is determined according to the order quantity of the merchant.

[0023] The center point of the merchant set is determined according to the weighted center point algorithm, the weight of the merchant and the position information.

[0024] In one of the embodiments, the second clustering is performed according to the density-based clustering algorithm and the order delivery terminal to obtain a plurality of order delivery terminal sets, comprising:

[0025] The core delivery terminal is determined according to the density-based clustering algorithm, the second search radius and the order delivery terminal.

[0026] The current cluster is created with the current core delivery terminal as the starting point.

[0027] The density direct point of the core delivery terminal is determined, and the density direct point of the core delivery terminal is added to the current cluster to perform the second clustering to obtain a plurality of order delivery terminal sets.

[0028] In one of the embodiments, the order delivery business circle generation method further comprises:

[0029] In response to the allocation request of the current order, the merchant information and the delivery terminal corresponding to the current order are obtained.

[0030] The target business circle corresponding to the merchant information of the current order is obtained.

[0031] When the delivery terminal of the current order is in the target business circle, the current order is allocated to the delivery personnel in the target business circle.

[0032] In one of the embodiments, the method further comprises:

[0033] determining the boundary of the target business circle according to the convex hull algorithm;

[0034] acquiring the number of intersection points of the ray with the boundary of the target business circle according to the ray method;

[0035] when the number of intersection points is odd, determining that the delivery endpoint of the current order is within the target business circle.

[0036] In a second aspect, the application provides an order delivery business circle generation device, comprising:

[0037] a first clustering module configured to acquire location information of merchants and perform first clustering according to a density-based clustering algorithm and the location information of the merchants to obtain a plurality of merchant sets;

[0038] a first determination module configured to determine the delivery endpoint of the merchants according to the merchant sets;

[0039] a second clustering module configured to perform second clustering according to a density-based clustering algorithm and the delivery endpoints to obtain a plurality of delivery endpoint sets;

[0040] a second determination module configured to select a set containing the most delivery endpoints from the plurality of delivery endpoint sets to obtain the order delivery business circle.

[0041] In a third aspect, the application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the order delivery business circle generation method provided in any of the embodiments of the first aspect.

[0042] In a fourth aspect, the application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the steps of the order delivery business circle generation method provided in any of the embodiments of the first aspect.

[0043] The order delivery business circle generation method, device, computer device, and storage medium described above perform first clustering based on merchant locations and second clustering based on delivery endpoints, which combines the actual needs of consumers. The two clustering methods combine the geographical distribution of merchants with the distribution of consumer demand, breaking through the traditional single mode of only surrounding merchants to determine business circles, making the business circle range more in line with actual scene needs. The business circle determined through the two clustering methods contains both the core area of commercial service supply and the hot spot area of consumer demand concentration, making the determination of the business circle more accurate. The delivery platform can accurately allocate resource capacity based on this business circle, thereby improving resource utilization and delivery efficiency. Attached Figure Description

[0044] Figure 1 This is a flowchart illustrating the business district generation method for order delivery in some embodiments;

[0045] Figure 2 This is a flowchart illustrating the steps in some embodiments to perform the first clustering based on a density-based clustering algorithm and the location information of the merchants to obtain multiple merchant sets.

[0046] Figure 3 This is a structural block diagram of the business district generation device for order delivery in some embodiments;

[0047] Figure 4 This is a diagram showing the internal structure of a computer device in some embodiments. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0049] In the first aspect, this application provides a method for generating business districts for order delivery, such as... Figure 1 As shown, the method is applied to a server as an example, and includes the following steps:

[0050] Step S11: Obtain the location information of the merchants, and perform the first clustering based on the density-based clustering algorithm and the location information of the merchants to obtain multiple merchant sets.

[0051] Among them, the merchant's location information usually refers to the geographical coordinates of the merchant's location, such as latitude and longitude, or it can be specific address information, used to identify the merchant's specific location in space.

[0052] Density-based clustering algorithms: The core idea of ​​these algorithms is to group high-density regions into clusters, while low-density regions are considered as boundaries between clusters. A common example is the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm.

[0053] The essence of the density-based clustering algorithm is to identify clusters in the data set by defining the concept of "density", that is, to consider that a cluster is a connected region composed of regions with high enough density, and a noise point is an isolated point in a low-density region. The core logic is: in space, if the number of points contained in the neighborhood of a certain point exceeds the set threshold, it is considered as a "core point", and all points in its neighborhood are divided into the same cluster. By expanding the neighborhood of the core point, a continuous high-density region is formed, thereby realizing the clustering division of the data. The number of clusters does not need to be specified in advance, and it can effectively identify clusters of any shape and filter noise points.

[0054] The merchant set refers to a set formed by clustering algorithm to divide merchants with similar location information and belonging to the same high-density region in spatial distribution into a group. The merchants in the same set are closely connected in geographical location and have strong spatial aggregation, while the merchants between different sets are relatively dispersed in spatial distribution.

[0055] Specifically, the present application can obtain the latitude and longitude coordinates or address information of merchants through a database or other data sources, and organize them into structured data, such as a two-dimensional coordinate point set. Select a density-based clustering algorithm, such as the DBSCAN algorithm. The merchant location information is taken as input and substituted into the algorithm. The algorithm will divide the merchant points that meet the density condition into a set according to the set parameters, and the points that do not meet the density condition may be considered as noise points. After the algorithm runs, multiple merchant sets are output, and the merchants in each set belong to a high-density region in spatial location, that is, belong to the same cluster.

[0056] Step S12, determining the order delivery terminal of the merchant according to the merchant set.

[0057] The order delivery terminal of the merchant refers to the actual delivery location of the order received by the merchant, which is usually the delivery address provided by the customer and is the final destination of the goods in the logistics distribution process.

[0058] Specifically, the present application can match the order data of each merchant with the merchant set to which it belongs, and determine the distribution of the order delivery terminal of the merchants in each set. The delivery terminal address is converted into geographic coordinates, such as latitude and longitude, or the existing coordinate data is directly used.

[0059] Step S13, performing a second clustering according to the density-based clustering algorithm and the order delivery terminal to obtain multiple sets of order delivery terminals.

[0060] The order delivery end point addresses of each merchant set are standardized, such as being converted into latitude and longitude and cleaned and deduplicated, a density-based clustering algorithm is selected, appropriate neighborhood radius and minimum point number parameters are set, the processed delivery end point coordinates are input into the algorithm, a plurality of clusters are divided by calculating the neighborhood density of each point, the rationality of the clusters is verified and the parameters are adjusted to optimize the results, and finally the delivery end point clusters are obtained.

[0061] Step S14, a target set containing the most order delivery end points is selected from the plurality of order delivery end point sets, and a business circle for order delivery is determined according to the target set.

[0062] The business circle for order delivery refers to a geographic area where order delivery end points are highly concentrated, usually centered on a core place with high-frequency delivery, and radiating surrounding areas with commercial activities or residential needs, reflecting the concentrated distribution range of order demand.

[0063] The target set refers to the set containing the most delivery end points in the plurality of order delivery end point sets, representing the area with the most concentrated order demand.

[0064] Specifically, the present application can traverse all the order delivery end point sets obtained by the second clustering, calculate the number of delivery end points contained in each cluster, compare the number of end points of each cluster, and select the cluster with the most number as the target set, which corresponds to the area with the most concentrated order demand.

[0065] The geographic coordinates such as latitude and longitude or address information of all delivery end points in the target set are extracted, and the spatial distribution characteristics are analyzed. The business circle for order delivery is determined according to the spatial distribution characteristics.

[0066] In one embodiment, the present application can calculate the average value of all end point coordinates in the target set to obtain the core position of the business circle. The specific geographic range of the business circle is determined according to the distribution range of the delivery end points with the core position as the center.

[0067] Specifically, the present application performs the second clustering for each merchant set to obtain the corresponding business circle for order delivery. Finally, the business circles for order delivery corresponding to each merchant set are obtained.

[0068] In one embodiment, as shown in Figure 2 the first clustering is performed according to the density-based clustering algorithm and the location information of the merchants to obtain a plurality of merchant sets, including:

[0069] Step S21, determining a core position point according to the density-based clustering algorithm, the first search radius, and the location information of the merchants.

[0070] Step S22, creating a current cluster with the current core position point as the starting point.

[0071] Step S23, determine the density direct point of the core location point, and add the density direct point to the current cluster.

[0072] Step S24, when there is a new core location point in the density direct point, obtain the density direct point of the new core location point, and add it to the current cluster to obtain a plurality of merchant sets through the first clustering.

[0073] The first search radius refers to the neighborhood distance threshold set in the density clustering algorithm, which is used to determine whether two points belong to adjacent regions, that is, a point is considered to be a searchable adjacent point when it is within the first search radius of another point.

[0074] The core location point refers to a point that contains a number of points within its first search radius greater than or equal to a minimum point threshold (MinPts), and is called a core location point, which is the starting point and expansion center of clustering.

[0075] The density direct point refers to a point B within the first search radius of a core location point A, and A is a core point, then B is called a density direct point of A, which can be directly included in the cluster where A is located.

[0076] The cluster refers to the maximum density connected region composed of core location points and their density direct points, that is, a complete merchant set.

[0077] Specifically, the first search radius and the minimum point threshold can be set, and the position coordinates of all merchants are obtained. For each merchant location point, the number of points within its first search radius is calculated, and if it is greater than or equal to the minimum point threshold, it is marked as a core location point, otherwise it is marked as a non-core point.

[0078] Further, all unprocessed core location points are traversed, one is selected as a starting core location point, a new cluster is created and the point is added. Find all density direct points within the first search radius of the core location point, add them to the current cluster, and mark them as processed.

[0079] Further, check whether there is a core location point in the newly added density direct point, if there is, for each new core point, search its density direct point and add it to the current cluster, if there is no new core point, stop the expansion of the current cluster.

[0080] Repeat the above steps until all core location points are processed, and finally form a plurality of clusters, that is, merchant sets, and non-core points not included in any cluster are considered as noise points.

[0081] The beneficial effects of this embodiment are that the spatial aggregation area of the merchant is automatically discovered through the density condition, and the merchants in each cluster are closely connected in space, which provides accurate basic data for subsequent order distribution area division, business analysis, etc.

[0082] In one embodiment, the order delivery terminal of the merchant is determined according to the merchant set, including: determining a center point of the merchant set according to a weighted center point algorithm, determining a coverage range according to the center point and a preset radius, and selecting a target merchant set from a plurality of merchant sets according to the coverage range, and determining the order delivery terminal of the merchant according to the target merchant set.

[0083] The weighted center point algorithm is a method for determining the core position of a spatial point set, which calculates the weighted average of the coordinates of each point by assigning a weight to each point, so that the result is closer to the actual demand center of gravity.

[0084] Suppose a merchant set contains n merchants, the position coordinates of the i-th merchant are (xi, yi), xi is the longitude, yi is the latitude, and the weight is wi, and the weighted center point coordinates are (X, Y). The calculation formula of the weighted center point coordinates is:

[0085]

[0086] Specifically, for each merchant set, the position coordinates and corresponding weights of all internal merchants are obtained.

[0087] The center point coordinates of the set are calculated according to the weighted center point formula, so that the merchants with large order quantities have a greater impact on the position of the center point. A preset radius is set to form a circular coverage range (or set to a rectangular, irregular shape according to the actual scene) with the weighted center point as the center.

[0088] Check whether the weighted center point of all merchant sets is within the coverage range, or whether most of the merchants in the set are covered, and select the set that meets the conditions as the target merchant set.

[0089] Further, the order delivery terminals of all merchants in the target merchant set are extracted, and the distribution characteristics are analyzed.

[0090] The beneficial effects of this embodiment are that the center point is closer to the order-intensive merchants through weighted calculation, which is closer to the actual delivery demand center of gravity. Combined with the preset radius to select the target set, the delivery area can be limited within a reasonable range, which is convenient for the delivery personnel to cover efficiently and reduce the empty mileage.

[0091] In one embodiment, the center point of the merchant set is determined according to the weighted center point algorithm, including: obtaining the order sending quantity of each merchant in the merchant set within a preset time period, determining the weight of the merchant according to the order sending quantity of the merchant, and determining the center point of the merchant set according to the weighted center point algorithm, the weight of the merchant and the position information.

[0092] The order sending quantity refers to the number of orders sent by the merchant within the preset time period.

[0093] In the present application, historical time order information of each merchant can be obtained, specifically including order sending time, quantity and end point information. Further, the order quantity of each merchant in a unit time is calculated according to the order quantity of each merchant in each time period, and the order quantity of each merchant in a unit time is set as the weight of the corresponding merchant. Further, the center point of the merchant set is determined according to the weighted center point algorithm, the weight of the merchant and the location information. The weight reflects the importance of the merchant in the set, and the higher the order quantity in a unit time, the greater the weight.

[0094] The beneficial effect of this embodiment is that the center point is determined by the order quantity weighting, rather than simple geographical average, which is more in line with the actual needs of order distribution. The merchant weight is adjusted according to the time period (such as peak season / off-season), and the merchant weight is automatically updated according to the order quantity. The center point reflects the business hotspot area in real time.

[0095] In one embodiment, a second clustering is performed according to the density-based clustering algorithm and the order delivery end point to obtain a plurality of clusters, including: determining a core delivery end point according to the density-based clustering algorithm, a second search radius and the order delivery end point, creating a current cluster with the current core delivery end point as the starting point, determining the density direct point of the core delivery end point, and adding the density direct point of the core delivery end point to the current cluster to obtain a plurality of order delivery end point sets through the second clustering.

[0096] The second search radius refers to a parameter used to define the "neighborhood range" in the clustering algorithm. When calculating the neighborhood of a certain point, the point is taken as the center and the second search radius as the distance threshold, and the points within the range are regarded as its neighborhood points.

[0097] The core delivery end point refers to a delivery end point within the second search radius, the number of neighborhood points of which reaches or exceeds a preset threshold (MinPts), and such points are regarded as the core points of clustering.

[0098] Specifically, the present application can count the number of points in the neighborhood of each point within the second search radius for all order delivery end points. If the number of neighborhood points of a certain point is greater than or equal to MinPts, it is determined as a core delivery end point.

[0099] Further, an unprocessed core delivery end point is selected as a current core point to create a new cluster. The density direct points of the core point, i.e. all points (including core points and non-core points) within its second search radius, are found. The density direct points are added to the current cluster, and the above steps (finding the density direct points and adding them to the cluster) are recursively performed on the core points in the cluster until no new points can be added.

[0100] Repeat the above steps until all core distribution endpoints are processed, and finally obtain a plurality of clusters, each cluster being a set of order distribution endpoints.

[0101] The beneficial effect of this embodiment is that the first clustering of the application is a clustering that embodies the clustering of the merchant location density, reflecting the degree of aggregation of the commercial entities in the region. The second clustering is a clustering that embodies the demand side dimension, verifying the actual service radiation range of the merchant set through the distribution endpoint density. The combination of the two clusterings of the "merchant supply" and the "order demand" two-way data makes the business circle definition contain both the commercial entity aggregation and the actual service coverage range, avoiding the problem of business circle boundary not fitting the actual situation caused by a single dimension.

[0102] In one of the embodiments, the business circle generation method for order distribution can further include: in response to an allocation request of a current order, obtaining merchant information corresponding to the current order and a distribution endpoint, obtaining a target business circle corresponding to the merchant information of the current order, and allocating the current order to a distribution worker in the target business circle when the distribution endpoint of the current order is in the target business circle.

[0103] Specifically, the application can receive an order allocation request, parse the merchant information (such as merchant ID, location) and distribution endpoint coordinates of the current order from the request. The target business circle to which the merchant belongs is obtained through merchant information query. The distribution endpoint coordinates are spatially matched with the geographical range of the target business circle. If the distribution endpoint is in the target business circle, the list of available distribution workers in the business circle is retrieved. According to a preset rule, such as the nearest allocation, the order is assigned to a certain distribution worker in the target business circle, and the distribution worker state is updated.

[0104] The beneficial effect of this embodiment is that the distribution area is quickly located through the pre-defined business circle range, avoiding global search for distribution workers, and shortening the allocation decision time. The order is allocated to the distribution worker in the target business circle, making the distribution distance shorter and reducing the average distribution time.

[0105] In one of the embodiments, the business circle generation method for order distribution can further include: determining the boundary of the target business circle according to a convex hull algorithm, obtaining the number of intersection points of a ray with the boundary of the target business circle according to a ray method, the end point of the ray being the distribution endpoint of the current order, and determining that the distribution endpoint of the current order is in the target business circle when the number of intersection points is odd.

[0106] The convex hull algorithm is used to calculate the minimum convex polygon boundary of a set of points on a plane. For a set of distribution endpoints in the target business circle, the convex hull algorithm generates a minimum convex polygon containing all points, and the edges of the polygon are the convex hull boundaries of the business circle. Specifically, the convex hull algorithm can be Graham's scan, which is an algorithm for calculating the convex hull of a set of points on a plane.

[0107] Ray method is an algorithm to determine whether a point is inside a polygon. Make a ray in any direction with the point to be determined as the endpoint, count the number of intersection points of the ray and the polygon boundary: if the number of intersection points is odd, the point is inside the polygon; if it is even, the point is outside the polygon.

[0108] The boundary of the target business circle refers to the convex polygon contour generated by the convex hull algorithm, which contains all the delivery destinations within the business circle and is the edge of the smallest convex polygon containing these points.

[0109] Specifically, the present application can collect all the delivery destination coordinates within the target business circle to form a point set S. The convex hull algorithm is performed on S to generate a convex polygon containing all the points, and the vertices and edges of the convex polygon are the convex hull boundary of the business circle.

[0110] Further, the position of the delivery destination is determined by the ray method. A ray L is made in an optional direction with the delivery destination P of the current order as the endpoint. All edges of the convex hull boundary are traversed to calculate the number of intersection points of the ray L and each edge. If the number of intersection points is odd, it is determined that P is within the target business circle; if it is even, it is determined that it is outside the business circle.

[0111] Further, when the delivery destination in the business circle changes, such as the addition of a high-frequency terminal, the convex hull boundary is recalculated to ensure that the boundary always fits the current order distribution.

[0112] The beneficial effects of this embodiment are that the boundary generated by the convex hull algorithm can tightly wrap the delivery destinations within the business circle, making the business circle range more closely match the actual order distribution. The convex hull boundary dynamically adjusts with the delivery destination set, such as the addition of an office order in a certain business circle, the convex hull boundary expands to that area, ensuring that the business circle range always reflects the latest order hotspots, avoiding distribution errors caused by fixed boundaries.

[0113] The number of polygon vertices generated by the convex hull algorithm is usually much less than the number of original point sets. The ray method only needs to calculate the intersection points with the convex hull boundary, which greatly reduces the calculation amount compared to directly judging the distance of all terminals, and is suitable for mobile terminal or edge device deployment.

[0114] In a second aspect, the present application provides an order delivery business circle generation device, as shown in Figure 3 The order delivery business circle generation device comprises a first clustering module 31, a first determination module 32, a second clustering module 33 and a second determination module 34, wherein:

[0115] The first clustering module 31 is used to obtain the location information of the merchants, and perform the first clustering based on the density-based clustering algorithm and the location information of the merchants to obtain a plurality of merchant sets.

[0116] The first determination module 32 is used to determine the order delivery destination of the merchant according to the merchant set.

[0117] The second clustering module 33 is configured to perform second clustering according to a density-based clustering algorithm and the order delivery terminal to obtain a plurality of order delivery terminal sets;

[0118] The second determining module 34 is configured to select a set containing the most order delivery terminals from the plurality of order delivery terminal sets to obtain the order delivery business circle.

[0119] In one of the embodiments, the first clustering module 31 can determine a core location point according to the density-based clustering algorithm, the first search radius and the location information of the merchant, create a current cluster with the current core location point as the starting point, determine the density direct point of the core location point and add the density direct point to the current cluster, obtain the density direct point of a new core location point when there is a new core location point in the density direct point and add the density direct point to the current cluster to perform the first clustering to obtain a plurality of merchant sets.

[0120] In one of the embodiments, the first determining module 32 can determine the center point of the merchant set according to the weighted center point algorithm, determine the coverage range according to the center point and the preset radius, select a target merchant set from the plurality of merchant sets according to the coverage range, and determine the order delivery terminal of the merchant according to the target merchant set.

[0121] In one of the embodiments, the first determining module 32 can obtain the order placing amount of each merchant in the merchant set within a preset time period, determine the weight of the merchant according to the order placing amount of the merchant, and determine the center point of the merchant set according to the weighted center point algorithm, the weight of the merchant and the location information.

[0122] In one of the embodiments, the second clustering module 33 can determine a core delivery terminal according to the density-based clustering algorithm, the second search radius and the order delivery terminal, create a current cluster with the current core delivery terminal as the starting point, determine the density direct point of the core delivery terminal and add the density direct point of the core delivery terminal to the current cluster to perform the second clustering to obtain a plurality of order delivery terminal sets.

[0123] In one of the embodiments, the second clustering module 33 can further respond to the allocation request of the current order, obtain the merchant information and the delivery terminal corresponding to the current order, obtain the corresponding target business circle according to the merchant information of the current order, and allocate the current order to the delivery personnel in the target business circle when the delivery terminal of the current order is in the target business circle.

[0124] In one of the embodiments, the second clustering module 33 can further determine the boundary of the target business circle according to the convex hull algorithm, obtain the intersection number of the ray with the boundary of the target business circle according to the ray method with the delivery terminal of the current order as the end point, and determine that the delivery terminal of the current order is in the target business circle when the intersection number is odd.

[0125] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the order delivery trade area generation method provided in any of the embodiments of the first aspect of the present application when executing the computer program.

[0126] In an embodiment, the computer device can be a server, and its internal structure diagram can be as shown in FIG. 1. The computer device comprises a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the order delivery trade area generation method. Figure 4

[0127] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the order delivery trade area generation method provided in any of the embodiments of the first aspect of the present application.

[0128] The computer readable storage medium can be a computer readable storage medium in the computer device as shown in FIG. 1. Figure 4

[0129] ​​Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of each method can be included. Any reference to memory, storage, databases, or other media in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0130] The technical features of the above embodiments can be combined in any way. In order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0131] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent protection of the present application should be subject to the appended claims.

Claims

1. A method for generating a business district for order delivery, characterized in that, The method includes: Obtain the location information of the merchants, and perform the first clustering based on the density-based clustering algorithm and the location information of the merchants to obtain multiple merchant sets; The destination for each merchant's order is determined based on the merchant set. A second clustering is performed based on the density-based clustering algorithm and the order delivery destination to obtain a set of multiple order delivery destinations; The business district for order delivery is obtained by selecting the set containing the most order delivery destinations from the set of multiple order delivery destinations.

2. The method according to claim 1, characterized in that, The first clustering is performed based on a density-based clustering algorithm and the location information of the merchants, resulting in multiple merchant sets, including: The core location points are determined based on the density-based clustering algorithm, the first search radius, and the merchant's location information; Create the current cluster starting from the current core location point; Determine the density reachable point of the core location point, and add the density reachable point to the current cluster; When a new core location point exists among the density reachable points, the density reachable point of the new core location point is obtained and added to the current cluster to perform the first clustering to obtain the multiple merchant sets.

3. The method according to claim 1, characterized in that, The step of determining the order delivery destination of a merchant based on the merchant set includes: The center point of the merchant set is determined according to the weighted center point algorithm; The coverage area is determined based on the center point and the preset radius, and the target merchant set is selected from the multiple merchant sets based on the coverage area; The destination for order delivery to a merchant is determined based on the target merchant set.

4. The method according to claim 3, characterized in that, Determining the center point of the merchant set according to the weighted central point algorithm includes: Get the order volume of each merchant in the merchant set within the preset time period; The weight of a merchant is determined based on the number of orders placed by that merchant. The center point of the merchant set is determined based on the weighted center point algorithm, the merchant's weight, and location information.

5. The method according to claim 1, characterized in that, The second clustering based on the density-based clustering algorithm and the order delivery destinations, to obtain a set of multiple order delivery destinations, includes: The core delivery destination is determined based on the density-based clustering algorithm, the second search radius, and the destination of the order delivery. Create the current cluster starting from the current core delivery destination; The density direct points of the core delivery destinations are determined, and the density direct points of the core delivery destinations are added to the current cluster to perform a second clustering to obtain a set of multiple order delivery destinations.

6. The method according to claim 1, characterized in that, The method further includes: In response to the current order's allocation request, obtain the merchant information and delivery destination corresponding to the current order; Obtain the corresponding target business district based on the merchant information of the current order; When the delivery destination of the current order is within the target business district, the current order is assigned to a delivery person within the target business district.

7. The method according to claim 6, characterized in that, The method further includes: The boundary of the target business district is determined using the convex hull algorithm; The number of intersections between the ray with the delivery destination of the current order and the boundary of the target business district is obtained using the ray method. When the number of intersections is odd, the delivery destination of the current order is determined to be within the target business district.

8. A business district generation device for order delivery, characterized in that, The device includes: The first clustering module is used to obtain the location information of the merchants and perform the first clustering based on the density-based clustering algorithm and the location information of the merchants to obtain multiple merchant sets; The first determining module is used to determine the order delivery destination of a merchant based on the merchant set; The second clustering module is used to perform a second clustering based on the density-based clustering algorithm and the order delivery destination to obtain a set of multiple order delivery destinations; The second determining module is used to select the set containing the most order delivery destinations from the set of multiple order delivery destinations to obtain the business district of the order delivery.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.