Distribution range generation method and device

By obtaining the collection of merchant interest areas in the electronic map, triangulation and peripheral convex hull calculations, the merchant distribution range is generated, and the problem of unreasonable distribution range in the existing technology is solved, and more accurate and efficient distribution range generation is achieved.

CN114936819BActive Publication Date: 2024-12-20RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210513784.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2024-12-20
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

When determining the delivery scope of merchants in the prior art, the method based on discrete coordinate point generation may cause some users in the same community to be unable to place an order, resulting in unreasonable delivery scope.

Method used

By obtaining the collection of target merchant interest areas in the electronic map, triangulation and calculating the peripheral convex hull, generating the distribution range, avoiding the direct use of user coordinate points, and ensuring the coverage and accuracy of the distribution range.

Benefits of technology

Ensure the rationality of the delivery range, avoiding the situation where some users are unable to place orders, and improving the generation accuracy of the delivery range and rider delivery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936819B_ABST
    Figure CN114936819B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for generating a delivery range, which relates to the field of information technology. The method includes: obtaining a set of interest regions corresponding to a target merchant in an electronic map; triangulating each interest region in the set of interest regions to obtain a set of triangles corresponding to the set of interest regions; calculating the outer convex hull corresponding to the set of triangles based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the set of triangles; and generating a delivery range corresponding to the target merchant based on the outer convex hull.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method and device for generating a distribution range. Background Art

[0002] With the development of Internet technology, the online-to-offline O2O model has been favored by more and more merchants due to its unique advantages. All walks of life are vying to join the O2O model. In the O2O model, merchants attract customers online through the Internet, and then deliver the goods to users within the corresponding delivery range through offline delivery services.

[0003] At present, when determining the delivery range of a merchant, the rider's riding length radius is usually obtained through data analysis, and the riding length radius is used as the basis for path planning to generate the merchant's delivery range. However, this method uses discrete coordinate points as boundary points to generate the merchant's delivery range, so it is very likely that for the merchant's store, users in some locations in the same community can place orders, while users in other locations cannot place orders, resulting in unreasonable coverage of the generated delivery range. Summary of the invention

[0004] In view of this, the present application provides a delivery range generation method and device, the main purpose of which is to solve the problem of unreasonable coverage area of ​​the delivery range generated based on coordinate points, thereby avoiding the situation where users in some locations in the same community can place orders, while users in other locations cannot place orders.

[0005] According to one aspect of the present application, a method for generating a distribution range is provided, the method comprising:

[0006] Obtain a set of interest areas corresponding to the target merchant in the electronic map;

[0007] Triangulate each region of interest in the set of regions of interest to obtain a set of triangles corresponding to the set of regions of interest;

[0008] Calculate the outer convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set;

[0009] Based on the outer convex hull, a delivery range corresponding to the target merchant is generated.

[0010] Optionally, the step of obtaining a set of interest areas corresponding to a target merchant in an electronic map includes:

[0011] According to the geometric center coordinates corresponding to each user area in the electronic map and the center coordinates corresponding to the target merchant, a preset navigation distance table is searched to respectively determine the navigation distance between the target merchant and each user area;

[0012] A target user area whose navigation distance is less than a preset radius is screened out from the various user areas, and the target user area is added as an interest area to the interest area set.

[0013] Optionally, triangulating each region of interest in the set of regions of interest to obtain a set of triangles corresponding to the set of regions of interest includes:

[0014] Determine the coordinate points on the line segments constituting each of the regions of interest;

[0015] Each region of interest in the set of regions of interest is triangulated based on each coordinate point to obtain a set of triangles corresponding to the set of regions of interest.

[0016] Optionally, triangulating each region of interest in the set of regions of interest based on each coordinate point to obtain a set of triangles corresponding to the set of regions of interest includes:

[0017] Determine the arrangement order corresponding to each coordinate point;

[0018] For a target coordinate point among the coordinate points, a connecting line between the target coordinate point and a coordinate point before the target coordinate point is obtained, and based on the connecting line, the set of interest regions is divided into a plurality of triangles;

[0019] Determine the circumscribed circles corresponding to the plurality of triangles respectively, and determine a target circumscribed circle including the target coordinate point from the plurality of circumscribed circles;

[0020] If there are at least two target circumscribed circles that include the target coordinate point, inner triangles corresponding to the at least two target circumscribed circles are determined, and common side lines of the at least two inner triangles are deleted to obtain updated triangles;

[0021] For other coordinate points among the coordinate points, the process of dividing and updating triangles in the interest region set is repeated, and finally a triangle set corresponding to the interest region set is output.

[0022] Optionally, after determining the coordinate points on the line segments constituting the respective regions of interest, the method further comprises:

[0023] Determine the starting coordinate point, the ending coordinate point and the middle coordinate point corresponding to any preset number of adjacent line segments among the line segments constituting each of the interest regions;

[0024] Obtaining a coordinate point connection line between the starting coordinate point and the ending coordinate point, and calculating a distance between the intermediate coordinate point and the coordinate point connection line;

[0025] Determine a maximum distance among the calculated distances, and determine whether to discard intermediate coordinate points on the preset number of line segments based on the maximum distance;

[0026] If the maximum distance is less than the preset middle coordinate point distance, the middle coordinate points on the preset number of line segments are discarded to obtain simplified coordinate points;

[0027] If the maximum distance is greater than or equal to the preset intermediate coordinate point distance, the preset number of line segments are divided into two groups of line segments using the intermediate coordinate point corresponding to the maximum distance as the dividing point, and the process of determining and discarding the intermediate coordinate point is repeated for the two groups of line segments;

[0028] The triangulating each region of interest in the region of interest set based on each coordinate point to obtain a triangle set corresponding to the region of interest set includes:

[0029] Each region of interest in the set of regions of interest is triangulated based on the simplified coordinate points to obtain a set of triangles corresponding to the set of regions of interest.

[0030] Optionally, after determining the coordinate points on the line segments constituting the respective regions of interest, the method further comprises:

[0031] Determine the angle between any two adjacent line segments among the line segments constituting each region of interest;

[0032] If the angle is greater than a preset angle, the intersection coordinate points between any two adjacent line segments are discarded to obtain simplified coordinate points;

[0033] The triangulating each region of interest in the region of interest set based on each coordinate point to obtain a triangle set corresponding to the region of interest set includes:

[0034] Each region of interest in the set of regions of interest is triangulated based on the simplified coordinate points to obtain a set of triangles corresponding to the set of regions of interest.

[0035] Optionally, the calculating the outer convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set includes:

[0036] Determine a reference vertex from each of the vertices, calculate the argument of other vertices from the vertices relative to the reference vertex, and sort the other vertices based on the argument to obtain a sorting result of the other vertices;

[0037] Based on the sorting result, the first vertex and the last vertex among the other vertices are added as target vertices to the target vertex set, and the reference vertex and the first vertex are added to a stack, wherein the first vertex is located at the top of the stack;

[0038] Obtaining a vertex line between the reference vertex and the vertex at the top of the stack, and determining whether the second-ranked vertex is the target vertex based on the position of the second-ranked vertex relative to the vertex line;

[0039] If the second-ranked vertex is the target vertex, updating the target vertex set based on the second-ranked vertex, and pushing the second-ranked vertex into a stack;

[0040] For the remaining vertices, repeat the target vertex determination process in the order of arrangement, and finally output the updated target vertex set;

[0041] Connect each target vertex in the finally updated target vertex set in sequence to obtain the outer convex hull corresponding to the triangle set.

[0042] Optionally, the method further comprises:

[0043] Encoding the geometric center coordinates corresponding to each of the regions of interest to obtain the geographic codes corresponding to each of the regions of interest;

[0044] The respective regions of interest are divided based on the geographic code to obtain a plurality of sub-regions of interest sets, wherein the regions of interest in the same sub-region of interest set have the same geographic code.

[0045] Optionally, generating a delivery range corresponding to the target merchant based on the outer convex hull includes:

[0046] Generating an initial delivery range corresponding to the target merchant according to the outer convex hull;

[0047] Determine each peripheral edge of the initial delivery range, and add each peripheral edge as a newly added peripheral edge to the newly added peripheral edge set;

[0048] Determine whether a target triangle corresponding to any one of the newly added peripheral edges in the set of newly added peripheral edges can be culled;

[0049] According to the determination result, the initial delivery range is updated;

[0050] Determine the newly added peripheral edges corresponding to the updated initial delivery range, and update the newly added peripheral edge set based on the newly added peripheral edges corresponding to the updated initial delivery range to obtain an updated newly added peripheral edge set;

[0051] Based on the updated newly added peripheral edge set, continue to update the initial delivery range for the next round until there are no removable triangles in the triangle set, and output the final updated delivery range;

[0052] The finally updated delivery range is determined as the delivery range corresponding to the target merchant.

[0053] Optionally, the determining whether a target triangle corresponding to any one of the newly added peripheral edges in the set of newly added peripheral edges can be culled includes:

[0054] Determine the angle of the corresponding angle of the newly added peripheral edge in the target triangle;

[0055] If the angle is smaller than the preset angle, the target triangle is not eliminated;

[0056] If the angle is greater than or equal to the preset angle, determining whether the target triangle is associated with any one of the interest regions in the interest region set;

[0057] If the target triangle is associated with any region of interest in the set of regions of interest, the target triangle is not eliminated;

[0058] If the target triangle is not related to any of the interest regions in the interest region set, the target triangle is eliminated.

[0059] Optionally, the determining whether the target triangle is associated with any one of the interest regions in the interest region set includes:

[0060] Encoding the geometric center coordinates corresponding to the target triangle to obtain the geographic code corresponding to the target triangle;

[0061] Determine a target sub-area of ​​interest set having the same geocode as the target triangle from a plurality of sub-area of ​​interest sets;

[0062] Determine whether any interest region in the target sub-interest region set contains the target triangle;

[0063] If any one of the interest regions contains the target triangle, it is determined that the target triangle is associated with the any one of the interest regions.

[0064] According to another aspect of the present application, a distribution range generating device is provided, the device comprising:

[0065] An acquisition unit, used to acquire a set of interest areas corresponding to a target merchant in an electronic map;

[0066] A triangulation unit, configured to triangulate each region of interest in the set of regions of interest to obtain a set of triangles corresponding to the set of regions of interest;

[0067] A calculation unit, configured to calculate a peripheral convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set;

[0068] A generating unit is used to generate a delivery range corresponding to the target merchant based on the outer convex hull.

[0069] Optionally, the acquisition unit includes: a first determination module and a screening module,

[0070] The first determination module is used to query a preset navigation distance table according to the geometric center coordinates corresponding to each user area and the center coordinates corresponding to the target merchant in the electronic map, and determine the navigation distance between the target merchant and each user area respectively;

[0071] The screening module is used to screen out the target user area whose navigation distance is less than a preset radius from the various user areas, and add the target user area as an interest area to the interest area set.

[0072] Optionally, the segmentation unit includes: a second determination module and a segmentation module,

[0073] The second determining module is used to determine the coordinate points on the line segments constituting each of the regions of interest;

[0074] The triangulation module is used to triangulate each region of interest in the set of regions of interest based on each coordinate point to obtain a set of triangles corresponding to the set of regions of interest.

[0075] Optionally, the segmentation module is specifically used to determine the arrangement order corresponding to the various coordinate points; for a target coordinate point among the various coordinate points, obtain a connecting line between the target coordinate point and the coordinate point before it in the arrangement order, and based on the connecting line, divide the interest area set into multiple triangles; determine the circumscribed circles corresponding to the multiple triangles, and determine the target circumscribed circle containing the target coordinate point from the multiple circumscribed circles; if there are at least two target circumscribed circles containing the target coordinate point, determine the inner triangles corresponding to at least two target circumscribed circles, and delete the common side connecting lines of at least two inner triangles to obtain updated triangles; for other coordinate points among the various coordinate points, repeat the process of dividing and updating triangles in the interest area set, and finally output the triangle set corresponding to the interest area set.

[0076] Optionally, the segmentation unit further includes: a first calculation module, a first determination module and a simplification module.

[0077] The second determination module is further used to determine the starting coordinate point, the ending coordinate point and the intermediate coordinate point corresponding to any preset number of adjacent line segments in the line segments constituting each of the interest regions;

[0078] The first calculation module is used to obtain a coordinate point connection line between the starting coordinate point and the ending coordinate point, and calculate the distance between the intermediate coordinate point and the coordinate point connection line;

[0079] The first determination module is used to determine the maximum distance among the calculated distances, and determine whether to discard the middle coordinate points on the preset number of line segments based on the maximum distance;

[0080] The simplification module is used to discard the middle coordinate points on the preset number of line segments to obtain simplified coordinate points if the maximum distance is less than the preset middle coordinate point distance;

[0081] The first determination module is further configured to divide the preset number of line segments into two groups of line segments using the middle coordinate point corresponding to the maximum distance as a dividing point if the maximum distance is greater than or equal to the preset middle coordinate point distance, and repeat the process of determining and discarding the middle coordinate point for the two groups of line segments;

[0082] The triangulation module is further specifically configured to triangulate each region of interest in the region of interest set based on the simplified coordinate points to obtain a triangle set corresponding to the region of interest set.

[0083] Optionally, the segmentation unit further includes: a simplification module,

[0084] The second determination module is further used to determine the angle between any two adjacent line segments in the line segments constituting each of the regions of interest;

[0085] The simplification module is used to discard the intersecting coordinate points between any two adjacent line segments if the angle is greater than a preset angle, so as to obtain simplified coordinate points;

[0086] The triangulation module is further specifically configured to triangulate each region of interest in the region of interest set based on the simplified coordinate points to obtain a triangle set corresponding to the region of interest set.

[0087] Optionally, the calculation unit includes: a second calculation module, an adding module, a second determination module, a first updating module and a connecting module.

[0088] The second calculation module is used to determine a reference vertex from each vertex, calculate the argument of other vertices among the vertices relative to the reference vertex, and sort the other vertices based on the argument to obtain a sorting result of the other vertices;

[0089] The adding module is used to add the first vertex and the last vertex among the other vertices as target vertices to the target vertex set based on the sorting result, and add the reference vertex and the first vertex to the stack, wherein the first vertex is located at the top of the stack;

[0090] The second determination module is used to obtain a vertex line between the reference vertex and the vertex at the top of the stack, and determine whether the second-ranked vertex is the target vertex based on the position of the second-ranked vertex relative to the vertex line;

[0091] The first updating module is used for updating the target vertex set based on the second-ranked vertex if the second-ranked vertex is the target vertex, and pushing the second-ranked vertex into a stack;

[0092] The second determination module is further used to repeat the determination process of the target vertices according to the arrangement order for the remaining vertices, and finally output an updated target vertex set;

[0093] The connection module is used to sequentially connect the target vertices in the finally updated target vertex set to obtain the outer convex hull corresponding to the triangle set.

[0094] Optionally, the device further comprises: an encoding unit and a dividing unit,

[0095] The encoding unit is used to encode the geometric center coordinates corresponding to each of the regions of interest to obtain the geographic code corresponding to each of the regions of interest;

[0096] The division unit is used to divide each of the interest regions based on the geographic code to obtain a plurality of sub-interest region sets, wherein the interest regions in the same sub-interest region set have the same geographic code.

[0097] Optionally, the generating unit includes: a generating module, a third determining module, a third judging module and a second updating module.

[0098] The generating module is used to generate an initial delivery range corresponding to the target merchant according to the outer convex hull;

[0099] The third determination module is used to determine each peripheral edge of the initial delivery range, and add each peripheral edge as a newly added peripheral edge to the newly added peripheral edge set;

[0100] The third determination module is used to determine whether a target triangle corresponding to any one of the newly added peripheral edges in the set of newly added peripheral edges can be eliminated;

[0101] The second updating module is used to update the initial delivery range according to the determination result;

[0102] The third determination module is further used to determine the newly added peripheral edges corresponding to the updated initial delivery range, and to update the newly added peripheral edge set based on the newly added peripheral edges corresponding to the updated initial delivery range to obtain an updated newly added peripheral edge set;

[0103] The second updating module is further used to continue to perform a next round of updating on the initial delivery range based on the updated newly added peripheral edge set, until no removable triangles exist in the triangle set, and output a final updated delivery range;

[0104] The third determination module is further used to determine the finally updated delivery range as the delivery range corresponding to the target merchant.

[0105] Optionally, the third determination module includes: a determination submodule, a removal submodule and a determination submodule.

[0106] The determination submodule is used to determine the angle of the corresponding angle of the newly added peripheral edge in the target triangle;

[0107] The culling submodule is used for not culling the target triangle if the angle is smaller than a preset angle;

[0108] The determination submodule is configured to determine whether the target triangle is associated with any one of the interest regions in the interest region set if the angle is greater than or equal to the preset angle;

[0109] The culling submodule is further configured to not cull the target triangle if the target triangle is associated with any one of the interest regions in the set of interest regions;

[0110] The elimination submodule is further configured to eliminate the target triangle if the target triangle is not related to any of the interest regions in the interest region set.

[0111] Optionally, the determination submodule is specifically used to encode the geometric center coordinates corresponding to the target triangle to obtain the geographic code corresponding to the target triangle; determine a target sub-area of ​​interest set having the same geographic code as the target triangle from multiple sub-area of ​​interest sets; determine whether there is any area of ​​interest in the target sub-area of ​​interest set that contains the target triangle; if there is any area of ​​interest that contains the target triangle, determine that the target triangle is associated with any one of the areas of interest.

[0112] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned delivery range generation method is implemented.

[0113] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned delivery range generation method when executing the computer program.

[0114] By means of the above technical scheme, the present application provides a method and device for generating a distribution range. Compared with the current method of generating a distribution range based on coordinate points, the present application can obtain a set of interest areas corresponding to the target merchant in the electronic map; and triangulate each interest area in the interest area set to obtain a triangle set corresponding to the interest area set; at the same time, based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set, the outer convex hull corresponding to the triangle set is calculated; finally, based on the outer convex hull, the distribution range corresponding to the target merchant is generated. Since the present invention abandons the user coordinate points and directly uses the regionalized user interest area set to generate the distribution range of the target merchant, it can be guaranteed from the source that there will be no situation where users in some locations in the same community can place orders, while users in some locations cannot place orders, that is, it can ensure that the generated distribution range covers a reasonable area. In addition, since the present invention triangulates the interest area set, it can accurately determine whether each triangle belongs to the user interest area, and update the distribution range according to the determination result, so as to ensure the generation accuracy of the distribution range, and at the same time, it can reduce the distribution range as much as possible to improve the distribution efficiency of the rider.

[0115] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0116] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0117] Figure 1 A schematic diagram of a flow chart of a method for generating a delivery range provided in an embodiment of the present application is shown;

[0118] Figure 2 A schematic diagram showing a flow chart of another method for generating a delivery range provided in an embodiment of the present application is shown;

[0119] Figure 3 A schematic diagram of generating a delivery range provided in an embodiment of the present application is shown;

[0120] Figure 4 A schematic diagram of the structure of a delivery range generating device provided in an embodiment of the present application is shown;

[0121] Figure 5 A schematic diagram showing the structure of another delivery range generating device provided in an embodiment of the present application is shown;

[0122] Figure 6 A schematic diagram of the physical structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0123] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0124] In order to solve the problem that the distribution range generated based on coordinate points covers an unreasonable area. This embodiment provides a distribution range generation method, such as Figure 1 As shown, the method includes:

[0125] Step 101: Obtain a set of interest areas corresponding to a target merchant in an electronic map.

[0126] Among them, the target merchant is any merchant whose delivery range needs to be determined. The interest area set includes various interest areas. The distance between each interest area and the target merchant is within the required radius distance. The interest area is a polygonal area divided in the electronic map, such as a hospital, a shopping mall, a residential area, etc., and there are users in the polygonal area.

[0127] The embodiment of the present invention is mainly applied to the scenario of determining the delivery range of a target merchant. The execution subject of the embodiment of the present invention is a device or equipment capable of generating a delivery range, which can be specifically set on the client or server side.

[0128] In order to fundamentally avoid the situation where users in some locations of the same community can place orders while users in other locations cannot, an embodiment of the present invention directly uses the regionalized user interest area set to generate a delivery range of a target merchant. As an optional implementation method, the method includes: querying a preset navigation distance table according to the geometric center coordinates corresponding to each user area in the electronic map and the center coordinates corresponding to the target merchant, and determining the navigation distance between the target merchant and each user area respectively; screening out a target user area whose navigation distance is less than a preset radius from each user area, and adding the target user area as an interest area to the interest area set.

[0129] The user area is any polygonal area divided in the electronic map, such as a hospital, a shopping mall, a residential area, etc., in which there are users. The geometric center coordinates are the longitude and latitude coordinates of the geometric center (centroid) of the polygon corresponding to the user area, and the center coordinates corresponding to the target merchant are the longitude and latitude coordinates of the merchant's location. In addition, the preset navigation distance table stores the riding navigation distance of the rider from the center coordinates of different merchants to the geometric center coordinates of different user areas. The preset radius distance can be set according to actual needs. For example, a merchant can provide delivery services for users within a range of 1 km or 2 km.

[0130] Specifically, the electronic map is regionalized to generate various user areas. Each user area is composed of multiple line segments. The longitude and latitude information corresponding to the coordinate points (starting coordinate points and ending coordinate points) on each line segment are all known. Therefore, the geometric center coordinates corresponding to the user area can be calculated based on the longitude and latitude information corresponding to the coordinate points on the line segments that constitute the user area. Furthermore, since the riding route of the rider is determined according to the actual road conditions during the riding process, the distance between the target merchant and different user areas is not a straight-line distance, but a navigation distance in the electronic map. Specifically, when determining the navigation distance between the target merchant and each user area, the preset navigation distance table can be queried based on the geometric center coordinates corresponding to each user area and the center coordinates corresponding to the target merchant. The preset navigation distance table records the riding navigation distance of the rider from the center coordinates of different merchants to the geometric center coordinates of different user areas. Therefore, by querying the preset navigation distance table, the navigation distance between the target merchant and each user area in the electronic map can be determined.

[0131] Furthermore, after determining the navigation distance between the target merchant and each user area, the navigation distance corresponding to each user area is compared with the preset radius distance, and the target user area whose navigation distance is less than the preset radius distance is screened out, and each screened target user area is determined as each interest area and added to the interest area set. In this way, regional processing of users can be achieved, and the delivery range generated based on the interest area set can avoid the situation where users in some locations of the same community can place orders, while users in other locations cannot place orders.

[0132] Step 102: triangulate each region of interest in the region of interest set to obtain a triangle set corresponding to the region of interest set.

[0133] For the embodiment of the present invention, after determining the set of interest areas corresponding to the target merchant, in order to generate the delivery range of the target merchant based on the set of interest areas, the set of interest areas can be triangulated using a preset triangulation algorithm to obtain a set of triangles corresponding to the set of interest areas. Specifically, when triangulating the set of interest areas using a preset triangulation algorithm, for each interest area in the set of interest areas, the coordinate points on the line segments constituting each interest area can be first determined, and then the set of interest areas is triangulated according to the longitude and latitude coordinates corresponding to each coordinate point to obtain a set of triangles corresponding to the set of interest areas.

[0134] By triangulating the set of interest regions, the embodiment of the present invention can precisely determine whether each triangle belongs to the interest region, thereby ensuring that the generated delivery range does not miss any user. At the same time, it can also precisely determine whether each triangle can be eliminated, thereby narrowing the delivery range as much as possible to improve the delivery efficiency of the rider.

[0135] Step 103: Calculate the outer convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set.

[0136] For the embodiment of the present invention, in order to calculate the outer convex hull corresponding to the triangle set, step 103 specifically includes: determining a reference vertex from each vertex, calculating the amplitude angles of other vertices among the vertices relative to the reference vertex, and sorting the other vertices based on the amplitude angle to obtain the sorting results of the other vertices; based on the sorting results, adding the first vertex and the last vertex among the other vertices as target vertices to the target vertex set, and adding the reference vertex and the first vertex to the stack, wherein the first vertex is located at the top of the stack; obtaining the vertex line between the reference vertex and the vertex at the top of the stack, and determining whether the second-ranked vertex is the target vertex based on the position of the second-ranked vertex relative to the vertex line; if the second-ranked vertex is the target vertex, updating the target vertex set based on the second-ranked vertex, and pushing the second-ranked vertex into the stack; for the remaining vertices, repeating the target vertex determination process in the order of arrangement, and finally outputting the updated target vertex set; connecting each target vertex in the finally updated target vertex set in sequence to obtain the outer convex hull corresponding to the triangle set.

[0137] For example, the triangle set includes three triangles, and there are 9 vertices P0, P1, P2, P3, P4, P5, P6, P7, and P8. First, according to the longitude coordinates or latitude coordinates corresponding to the 9 vertices, the vertex corresponding to the minimum longitude coordinate or the minimum latitude coordinate is determined, and it is determined as the reference vertex, such as the reference point P0. Then, the angles of the other 8 vertices P1, P2, P3, P4, P5, P6, P7, and P8 relative to the reference point P0 are calculated respectively, and the other 8 vertices are sorted from small to large according to the angles, such as the sorting result is P1, P2, P3, P4, P5, P6, P7, and P8. Then, the reference vertex, the first vertex P1, and the last vertex P8 are added to the target vertex set as target vertices, and the reference vertex P0 and the first vertex P1 are added to the stack, and P1 is at the top of the stack. Furthermore, the vertex line between the reference point P0 and the vertex P1 at the top of the stack is obtained, and it is determined whether the second-ranked vertex P2 is located on the left or right side of the line. If P2 is located on the right side of the line, it means that the vertex at the top of the stack is not a point on the convex hull, and it is popped out of the stack; if P2 is located on the left side of the line, it means that the vertex P2 is a point on the convex hull (target vertex), and it is pushed into the stack, and the target vertex set is updated at the same time. Further, the above determination process is reorganized for the remaining vertices P3, P4, P5, P6, and P7, and the updated target vertex set is finally output. The target vertices in the target vertex set are connected in sequence to obtain the outer convex hull corresponding to the triangle set.

[0138] 104. Generate a delivery range corresponding to the target merchant based on the outer convex hull.

[0139] For the embodiment of the present invention, although the calculated outer convex hull includes all the regions of interest, the outer convex hull has the largest area at this time and needs to be optimized. Based on this, the calculated outer convex hull is used as the initial delivery range, and the triangles corresponding to the outer edges constituting the initial delivery range are determined in turn whether they can be eliminated, and the initial delivery range is updated according to the determination results. Furthermore, after the initial delivery range is updated, new outer edges will be added. At this time, it is necessary to continue to determine whether the triangles corresponding to the newly added outer edges can be eliminated, thereby realizing continuous updating and iteration of the initial delivery range until there are no triangles that can be eliminated in the triangle set, and the final updated delivery range is output and determined as the delivery range corresponding to the target merchant.

[0140] For example, the outer convex hull includes 10 outer edges, and it is determined whether the triangles corresponding to the 10 outer edges can be eliminated. Assuming that the triangles corresponding to 4 of the 10 outer edges can be eliminated, since eliminating each triangle will increase two outer edges, 4 eliminated triangles will increase 8 outer edges. Furthermore, it is determined whether the triangles corresponding to the 8 newly added outer edges can be eliminated, until there are no removable triangles in the triangle set, thereby continuously updating and iterating the initial delivery range to obtain an updated delivery range. The embodiment of the present invention uses the above-mentioned optimization method to ensure that the area of ​​the delivery range is minimized as much as possible while ensuring that the generated delivery range includes all areas of interest, thereby improving the delivery efficiency of the rider. The specific process of updating and iterating the initial delivery range is detailed in step 205.

[0141] The method for generating a delivery range provided in this embodiment can obtain a set of interest areas corresponding to the target merchant in the electronic map compared with the current method of generating a delivery range based on coordinate points; and triangulate each interest area in the interest area set to obtain a triangle set corresponding to the interest area set; at the same time, based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set, the outer convex hull corresponding to the triangle set is calculated; finally, based on the outer convex hull, the delivery range corresponding to the target merchant is generated. Since the present invention abandons the user coordinate points and directly uses the regionalized user interest area set to generate the delivery range of the target merchant, it can be guaranteed from the source that there will be no situation where users in some locations in the same community can place orders, while users in some locations cannot place orders, that is, it can ensure that the generated delivery range covers a reasonable area. In addition, since the present invention triangulates the interest area set, it can accurately determine whether each triangle belongs to the user interest area, and update the delivery range according to the determination result, so as to ensure the generation accuracy of the delivery range, and at the same time, it can reduce the delivery range as much as possible to improve the delivery efficiency of the rider.

[0142] Further, as a refinement and extension of the above-mentioned specific implementation method, another method for generating a distribution range is provided, such as Figure 2 As shown, the method includes:

[0143] Step 201: Obtain a set of interest areas corresponding to a target merchant in an electronic map.

[0144] According to the embodiment of the present invention, a target user area whose navigation distance is less than a preset radius is selected from each user area, and is added to the interest area set as an interest area, such as Figure 3 As shown, each closed small polygon is an area of ​​interest.

[0145] Furthermore, in order to improve the computational efficiency of the distribution range during the optimization process, it is necessary to divide each area of ​​interest in the area of ​​interest set. Regarding the specific process of area division, as an optional implementation method, the method includes: encoding the geometric center coordinates corresponding to each area of ​​interest to obtain the geographic code corresponding to each area of ​​interest; dividing each area of ​​interest based on the geographic code to obtain multiple sub-area of ​​interest sets, wherein the areas of interest in the same sub-area of ​​interest set have the same geographic code.

[0146] For example, a region of interest is Beihai Hospital, and the corresponding geometric center coordinates of Beihai Hospital are latitude 39.928167 and longitude 116.389550. Specifically, when geocoding the geometric center coordinates of Beihai Park, the earth latitude area [-90,90] is first divided into the left interval [-90,0] and the right interval [0,90]. It can be determined that the latitude 39.928167 belongs to the right interval [0,90] and is marked as 1. Then the interval [0,90] is divided into [0, 45] and [45,90], it can be determined that the latitude 39.928167 belongs to the left interval [0,45], marked as 0. Through the above process, it can be inferred that the latitude 39.928167 always belongs to a certain interval. If the latitude 39.928167 belongs to the left interval, it is marked as 0; if the latitude 39.928167 belongs to the right interval, it is marked as 1, which will generate a latitude code 1011100011. The length of the latitude code is related to the number of times the given interval is divided. Similarly, the longitude interval of the earth is [-180,180], and the longitude 116.389550 can be encoded, and the longitude code obtained is 1101001011. Furthermore, after obtaining the latitude code and the longitude code, the longitude code and the latitude code are combined, that is, the longitude is placed in the even-numbered positions and the latitude is placed in the odd-numbered positions, and the geographic code corresponding to Beihai Hospital is 11100 1110100100 01111. Thus, the geographic code corresponding to each area of ​​interest can be obtained in the above manner.

[0147] Furthermore, after determining the geographical codes corresponding to the respective regions of interest, the regions of interest having the same geographical code are grouped into a set, thereby obtaining a plurality of sub-regions of interest sets.

[0148] Step 202: Determine the coordinate points on the line segments constituting each of the regions of interest.

[0149] For the embodiment of the present invention, since the triangulation algorithm is based on the coordinate points on the line segments constituting each region of interest for triangulation, in order to improve the computational efficiency of the triangulation, the coordinate points can be simplified, that is, the number of coordinate points can be reduced. Specifically, two methods can be used to simplify the coordinate points. For the first method of simplifying the coordinate points, as an optional embodiment, the method includes: determining the starting coordinate point, the ending coordinate point and the intermediate coordinate point corresponding to any preset number of adjacent line segments in the line segments constituting each region of interest; obtaining the coordinate point connection line between the starting coordinate point and the ending coordinate point, and calculating the The distance between the intermediate coordinate point and the line connecting the coordinate points; determine the maximum distance among the calculated distances, and determine whether to discard the intermediate coordinate points on the preset number of line segments based on the maximum distance; if the maximum distance is less than the preset intermediate coordinate point distance, discard the intermediate coordinate points on the preset number of line segments to obtain simplified coordinate points; if the maximum distance is greater than or equal to the preset intermediate coordinate point distance, divide the preset number of line segments into two groups of line segments with the intermediate coordinate point corresponding to the maximum distance as the dividing point, and repeat the process of determining and discarding the intermediate coordinate points for the two groups of line segments. The preset number of segments can be set according to actual needs, and the preset number of segments is greater than or equal to two.

[0150] For example, any four adjacent line segments are A, B, C and D, and the four line segments A, B, C and D are connected end to end in sequence to approximate a curve. The starting coordinate point corresponding to line segment A is determined as the starting coordinate point corresponding to the four line segments, and the ending coordinate point corresponding to line segment D is determined as the ending coordinate point corresponding to the four line segments, and the other points on the four line segments are used as the middle coordinate points corresponding to the four line segments. Further, the coordinate point connection line between the starting coordinate point and the ending coordinate point corresponding to the four line segments is obtained, the distance between the middle coordinate point and the coordinate point connection line is calculated, and it is determined whether the maximum distance in the distance is less than the preset distance. If the maximum distance is less than the preset distance, the middle coordinate points on the four line segments are discarded, and the four line segments A, B, C and D are merged into one line segment; if the maximum distance is greater than or equal to the preset distance, the middle coordinate point corresponding to the maximum distance is used as the dividing point, and the four line segments are divided into two groups of line segments, and the above determination process is repeated for the two groups of line segments.

[0151] As an optional embodiment, the method includes: determining the angle between any two adjacent line segments in the line segments constituting each region of interest; if the angle is greater than a preset angle, discarding the intersecting coordinate points between the any two adjacent line segments to obtain simplified coordinate points. The preset angle can be set according to actual needs.

[0152] For example, the preset angle is 170 degrees, and any two adjacent line segments are E and F. The angle between line segment E and line segment F is calculated based on the longitude and latitude coordinates corresponding to the coordinate points on line segment E and line segment F. If the angle is greater than 170 degrees, it is considered that the two line segments are close to a straight line. Therefore, the intersecting coordinate point between line segment E and line segment F is discarded, and the two line segments are merged into one line segment to simplify the coordinate points.

[0153] Therefore, the above two methods can simplify the coordinate points in the set of interest regions and slightly adjust the polygon shape corresponding to the interest region, so as to improve the calculation efficiency during the triangulation process. Figure 3 The coordinate points on the line segments that make up the region of interest have been simplified, and the polygon shape corresponding to the region of interest has been slightly adjusted.

[0154] Step 203: triangulate each region of interest in the region of interest set based on each coordinate point to obtain a triangle set corresponding to the region of interest set.

[0155] For the embodiment of the present invention, in order to triangulate the interest region set using a preset triangulation algorithm, step 203 specifically includes: determining the arrangement order corresponding to each coordinate point; for a target coordinate point among the coordinate points, obtaining the connecting line between the target coordinate point and the coordinate point before it in the arrangement order, and dividing the interest region set into multiple triangles based on the connecting line; determining the circumscribed circles corresponding to the multiple triangles, and determining the target circumscribed circle containing the target coordinate point from the multiple circumscribed circles; if there are at least two target circumscribed circles containing the target coordinate point, determining the inner triangles corresponding to at least two target circumscribed circles, and deleting the common edge connecting line of at least two inner triangles to obtain an updated triangle; for other coordinate points among the coordinate points, repeating the process of dividing and updating triangles in the interest region set, and finally outputting the triangle set corresponding to the interest region set. Wherein, the target coordinate point is any one of the coordinate points.

[0156] For example, there are 4 coordinate points A, B, C and D in the interest region set. A random arrangement order of these 4 coordinate points is given, such as the arrangement order of A, B, C, D. Each coordinate point is processed as follows: for coordinate point C, the connection line between coordinate point C and coordinate point A before it in the arrangement order, and the connection line between coordinate point C and coordinate point B before it in the arrangement order are obtained. At the same time, the connection line between coordinate point C and each vertex of the pre-set reference triangle is also obtained. Based on the above connection lines, the interest region set is divided into multiple triangles. Further, the circumscribed circles corresponding to the multiple triangles are determined, and the target circumscribed circle containing the coordinate point C is determined from the multiple circumscribed circles. If at least two target circumscribed circles contain the coordinate point C, it is determined whether the inner triangles corresponding to the at least two target circumscribed circles have a common edge connection line. If at least two inner triangles have a common edge connection line, the common edge connection line is deleted from the multiple connection lines to obtain an updated triangle. The above process is performed for each coordinate point, so that the set of interest regions can be continuously divided into triangles and updated, and finally a set of triangles corresponding to the set of interest regions can be output.

[0157] In a specific application scenario, after simplifying each coordinate point in the interest region set, according to the above process, each interest region in the interest region set is triangulated based on the simplified coordinate points to obtain a triangle set corresponding to the interest region set.

[0158] Step 204: Calculate the outer convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set.

[0159] According to the embodiment of the present invention, after triangulating the set of interest regions, it is necessary to calculate the outer convex hull of the set of triangles corresponding to the set of interest regions. Figure 3 The outer dotted line in is the outer convex hull corresponding to the triangle set. The specific calculation process of the outer convex hull is exactly the same as step 103, which will not be repeated here.

[0160] Step 205: Generate a delivery range corresponding to the target merchant based on the outer convex hull.

[0161] For the embodiments of the present invention, Figure 5 Although the outer convex hull in contains all the areas of interest, the area covered by the outer convex hull is the largest at this time. Therefore, it is necessary to take the current outer convex hull as the initial delivery range and continuously optimize it to reduce the delivery range as much as possible to improve the delivery efficiency of the rider.

[0162] As an optional implementation method for iterative optimization of the initial delivery range, step 205 specifically includes: generating the initial delivery range corresponding to the target merchant based on the outer convex hull; determining each outer edge of the initial delivery range, and adding each outer edge as a newly added outer edge to the set of newly added outer edges; determining whether the target triangle corresponding to any newly added outer edge in the set of newly added outer edges can be eliminated; updating the initial delivery range based on the determination result; determining the newly added outer edge corresponding to the updated initial delivery range, and updating the set of newly added outer edges based on the newly added outer edge corresponding to the updated initial delivery range to obtain an updated set of newly added outer edges; based on the updated set of newly added outer edges, continuing to perform the next round of updating of the initial delivery range until there are no removable triangles in the triangle set, and outputting the final updated delivery range; determining the final updated delivery range as the delivery range corresponding to the target merchant.

[0163] For example, the initial delivery range includes a total of 10 outer edges. These 10 outer edges are added as newly added outer edges to the set of newly added outer edges. Then, it is determined whether the target triangle corresponding to each outer edge in the set of newly added outer edges can be eliminated. Assuming that the target triangles corresponding to 3 of the 10 outer edges can be eliminated, the target triangles corresponding to these 3 outer edges are eliminated from the initial delivery range to obtain an updated initial delivery range. Furthermore, since two outer edges will be added when a triangle is eliminated, 6 outer edges will be added when the target triangles corresponding to 3 outer edges are eliminated. The judged outer edges are deleted from the set of newly added outer edges, and the 6 newly added outer edges are added to the set to obtain an updated set of newly added outer edges. Then, it is determined whether the triangle corresponding to each outer edge in the updated set of newly added outer edges can be eliminated. Based on the determination result, the next round of updates to the initial delivery range is implemented until there are no eliminated triangles in the triangle set. The update iteration is stopped, and the final updated delivery range is output as the delivery range corresponding to the target merchant, such as Figure 3 shown.

[0164] The delivery range obtained according to the above process can not only include all areas of interest, but also ensure that the covered area is minimized, thereby improving the delivery efficiency of the rider.

[0165] Furthermore, since the final distribution range needs to include all the regions of interest in the region of interest set, if a certain triangle after the segmentation in the initial distribution range is associated with the region of interest, the triangle cannot be eliminated; if a certain triangle after the segmentation in the initial distribution range is not associated with the region of interest, the triangle can be eliminated from the initial distribution range, so as to continuously reduce the initial distribution range. Based on this, the method includes: determining the angle of the corresponding angle of the newly added outer edge in the target triangle; if the angle is less than the preset angle, the target triangle is not eliminated; if the angle is greater than or equal to the preset angle, it is determined whether the target triangle is associated with any region of interest in the region of interest set; if the target triangle is associated with any region of interest in the region of interest set, the target triangle is not eliminated; if the target triangle is not related to each region of interest in the region of interest set, the target triangle is eliminated. Among them, the preset angle can be set according to actual needs.

[0166] For example, the preset angle is 90 degrees, and the three angles of the target triangle corresponding to a newly added outer edge are angle A, angle B and angle C respectively. The newly added outer edge in the target triangle corresponds to angle C. If angle C is less than 90 degrees, there is no need to eliminate the target triangle; if angle C is greater than or equal to 90 degrees, it is necessary to further determine whether the target triangle is associated with any area of ​​interest. If so, the target triangle will not be eliminated; if not, the target triangle will be eliminated.

[0167] Furthermore, in order to improve the efficiency of determining whether the target triangle is associated with any region of interest, the geometric center coordinates corresponding to the target triangle can be geocoded, and a search can be conducted from the sub-region of interest set with the same geocode as the target triangle to determine whether there is a region of interest that contains the target triangle. If so, it means that the target triangle is associated with the region of interest and cannot be eliminated. Based on this, the method includes: encoding the geometric center coordinates corresponding to the target triangle to obtain the geocode corresponding to the target triangle; determining a target sub-region of interest set with the same geocode as the target triangle from multiple sub-region of interest sets; determining whether there is any region of interest in the target sub-region of interest set that contains the target triangle; if there is any region of interest that contains the target triangle, determining that the target triangle is associated with any one region of interest.

[0168] Since the embodiment of the present invention abandons the user coordinate points and directly uses the regionalized user interest area set to generate the delivery range of the target merchant, it can fundamentally ensure that there will not be a situation where users in some locations in the same community can place orders while users in other locations cannot place orders, that is, it can ensure that the generated delivery range covers a reasonable area. In addition, since the embodiment of the present invention triangulates the interest area set, it is possible to finely determine whether each triangle belongs to the user interest area, and update the delivery range based on the determination result, thereby ensuring the generation accuracy of the delivery range, and at the same time, it is possible to reduce the delivery range as much as possible to improve the delivery efficiency of the rider.

[0169] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in the embodiment provides a distribution range generation device, such as Figure 4 As shown, the device includes: an acquisition unit 31, a segmentation unit 32, a calculation unit 33 and a generation unit 34.

[0170] The acquisition unit 31 may be used to acquire a set of interest areas corresponding to a target merchant in an electronic map.

[0171] The triangulation unit 32 may be used to triangulate each region of interest in the region of interest set to obtain a triangle set corresponding to the region of interest set.

[0172] The calculation unit 33 may be configured to calculate the outer convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set.

[0173] The generating unit 34 may be configured to generate a delivery range corresponding to the target merchant based on the outer convex hull.

[0174] In a specific application scenario, the acquisition unit 31, such as Figure 5 As shown, it includes: a first determining module 311 and a screening module 312.

[0175] The first determination module 311 may be used to query a preset navigation distance table according to the geometric center coordinates corresponding to each user area in the electronic map and the center coordinates corresponding to the target merchant, and determine the navigation distances between the target merchant and each user area.

[0176] The screening module 312 may be used to screen out a target user area whose navigation distance is less than a preset radius from the various user areas, and add the target user area as an interest area to the interest area set.

[0177] In a specific application scenario, the segmentation unit 32 includes: a second determination module 321 and a segmentation module 322 .

[0178] The second determining module 321 may be used to determine coordinate points on line segments constituting each of the regions of interest.

[0179] The triangulation module 322 may be used to triangulate each region of interest in the set of regions of interest based on each coordinate point, to obtain a set of triangles corresponding to the set of regions of interest.

[0180] Furthermore, the segmentation module 322 can be specifically used to determine the arrangement order corresponding to the various coordinate points; for the target coordinate point among the various coordinate points, obtain the connecting line between the target coordinate point and the coordinate point before it in the arrangement order, and based on the connecting line, divide the interest area set into multiple triangles; determine the circumscribed circles corresponding to the multiple triangles, and determine the target circumscribed circle containing the target coordinate point from the multiple circumscribed circles; if there are at least two target circumscribed circles containing the target coordinate point, determine the inner triangles corresponding to at least two target circumscribed circles, and delete the common edge connecting lines of at least two inner triangles to obtain updated triangles; for other coordinate points among the various coordinate points, repeat the process of dividing and updating triangles in the interest area set, and finally output the triangle set corresponding to the interest area set.

[0181] Furthermore, the segmentation unit 32 further includes: a first calculation module 323 , a first determination module 324 and a simplification module 325 .

[0182] The first calculation module 323 may be used to determine the starting coordinate point, the ending coordinate point and the intermediate coordinate point corresponding to any preset number of adjacent line segments in the line segments constituting each of the interest regions.

[0183] The first calculation module 323 may also be used to obtain a coordinate point connection line between the starting coordinate point and the ending coordinate point, and calculate a distance between the intermediate coordinate point and the coordinate point connection line.

[0184] The first determination module 324 may be used to determine a maximum distance among the calculated distances, and determine whether to discard the intermediate coordinate points on the preset number of line segments based on the maximum distance.

[0185] The simplification module 325 may be used to discard the middle coordinate points on the preset number of line segments if the maximum distance is less than the preset middle coordinate point distance, so as to obtain simplified coordinate points.

[0186] The first determination module 324 can also divide the preset number of line segments into two groups of line segments using the middle coordinate point corresponding to the maximum distance as a dividing point if the maximum distance is greater than or equal to the preset middle coordinate point distance, and repeat the process of determining and discarding the middle coordinate point for the two groups of line segments.

[0187] The triangulation module 322 may be further specifically configured to triangulate each region of interest in the set of regions of interest based on the simplified coordinate points to obtain a set of triangles corresponding to the set of regions of interest.

[0188] Furthermore, the second determining module 321 may also be used to determine the angle between any two adjacent line segments in the line segments constituting each region of interest.

[0189] The simplification module 325 may also be configured to discard the intersecting coordinate points between any two adjacent line segments if the angle is greater than a preset angle, so as to obtain simplified coordinate points.

[0190] The triangulation module 322 may be further specifically configured to triangulate each region of interest in the set of regions of interest based on the simplified coordinate points to obtain a set of triangles corresponding to the set of regions of interest.

[0191] In a specific application scenario, the calculation unit 33 includes: a second calculation module 331 , an adding module 332 , a second determination module 333 , a first updating module 334 and a connection module 335 .

[0192] The second calculation module 331 can be used to determine a reference vertex from various vertices, calculate the argument of other vertices among the various vertices relative to the reference vertex, and sort the other vertices based on the argument to obtain the sorting result of the other vertices.

[0193] The adding module 332 can be used to add the first vertex and the last vertex among the other vertices as target vertices to the target vertex set based on the sorting result, and add the reference vertex and the first vertex to the stack, wherein the first vertex is at the top of the stack.

[0194] The second determination module 333 may be used to obtain a vertex line between the reference vertex and the vertex at the top of the stack, and determine whether the second-ranked vertex is the target vertex based on the position of the second-ranked vertex relative to the vertex line.

[0195] The first updating module 334 may be configured to update the target vertex set based on the second-ranked vertex if the second-ranked vertex is the target vertex, and push the second-ranked vertex into a stack.

[0196] The second determination module 333 may also be used to repeat the determination process of the target vertices for the remaining vertices in the arrangement order, and finally output an updated target vertex set;

[0197] The connection module 335 may be used to sequentially connect the target vertices in the finally updated target vertex set to obtain the outer convex hull corresponding to the triangle set.

[0198] In a specific application scenario, the device further includes: an encoding unit 35 and a dividing unit 36 ​​.

[0199] The encoding unit 35 may be used to encode the geometric center coordinates corresponding to each of the regions of interest to obtain the geographic codes corresponding to each of the regions of interest.

[0200] The division unit 36 ​​may be configured to divide each of the regions of interest based on the geographic code to obtain a plurality of sub-regions of interest sets, wherein the regions of interest in the same sub-region of interest set have the same geographic code.

[0201] In a specific application scenario, the generating unit 34 includes: a generating module 341 , a third determining module 342 , a third judging module 343 and a second updating module 344 .

[0202] The generating module 341 may be configured to generate an initial delivery range corresponding to the target merchant according to the outer convex hull.

[0203] The third determination module 342 may be used to determine each peripheral edge of the initial delivery range, and add each peripheral edge as a newly added peripheral edge to the newly added peripheral edge set.

[0204] The third determination module 343 may be used to determine whether a target triangle corresponding to any newly added peripheral edge in the set of newly added peripheral edges can be eliminated.

[0205] The second updating module 344 may be configured to update the initial delivery range according to the determination result.

[0206] The third determination module 342 may also be used to determine the newly added peripheral edges corresponding to the updated initial delivery range, and update the newly added peripheral edge set based on the newly added peripheral edges corresponding to the updated initial delivery range to obtain an updated newly added peripheral edge set.

[0207] The second updating module 344 can also be used to continue to perform the next round of updating on the initial delivery range based on the updated newly added peripheral edge set, until there are no culled triangles in the triangle set, and output the final updated delivery range.

[0208] The third determination module 342 may also be used to determine the finally updated delivery range as the delivery range corresponding to the target merchant.

[0209] In a specific application scenario, the third determination module 343 includes: a determination submodule, a removal submodule and a determination submodule.

[0210] The determination submodule may be used to determine the angle of the corresponding angle of the newly added peripheral edge in the target triangle.

[0211] The culling submodule may be configured to not cull the target triangle if the angle is smaller than a preset angle.

[0212] The determination submodule may be configured to determine whether the target triangle is associated with any one of the interest regions in the interest region set if the angle is greater than or equal to the preset angle.

[0213] The culling submodule may also be configured to not cull the target triangle if the target triangle is associated with any one of the interest regions in the set of interest regions.

[0214] The elimination submodule may also be configured to eliminate the target triangle if the target triangle is not related to any of the interest regions in the interest region set.

[0215] Furthermore, the determination submodule can be specifically used to encode the geometric center coordinates corresponding to the target triangle to obtain the geographic code corresponding to the target triangle; determine a target sub-area of ​​interest set having the same geographic code as the target triangle from multiple sub-area of ​​interest sets; determine whether there is any area of ​​interest in the target sub-area of ​​interest set that contains the target triangle; if there is any area of ​​interest that contains the target triangle, determine that the target triangle is associated with any one of the areas of interest.

[0216] It should be noted that for other corresponding descriptions of the functional units involved in the distribution range generation device provided in this embodiment, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.

[0217] Based on the above Figure 1 and Figure 2The method shown in the embodiment of the present application is accordingly provided with a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The delivery range generation method shown.

[0218] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0219] Based on the above Figure 1 and Figure 2 The method shown, and Figure 4 and Figure 5 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, such as Figure 6 As shown, it can be a tablet computer, a smart phone, a smart watch, a smart bracelet, or other network devices, etc. The computer device includes a storage medium and a processor; the storage medium is used to store computer programs; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The delivery range generation method shown.

[0220] Optionally, the above-mentioned physical devices may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0221] Those skilled in the art will appreciate that the client device structure provided in this embodiment does not constitute a limitation on such physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0222] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the two physical devices mentioned above, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components inside the storage medium, and communication with other hardware and software in the information processing physical device.

[0223] Through the description of the above implementation methods, those skilled in the art can clearly understand that the embodiment of the present invention can obtain the set of interest areas corresponding to the target merchant in the electronic map; and triangulate each interest area in the interest area set to obtain the triangle set corresponding to the interest area set; at the same time, based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set, the outer convex hull corresponding to the triangle set is calculated; finally, based on the outer convex hull, the delivery range corresponding to the target merchant is generated. Since the present invention abandons the user coordinate points and directly uses the regionalized user interest area set to generate the delivery range of the target merchant, it can be guaranteed from the source that there will be no situation where users in some locations in the same community can place orders, while users in some locations cannot place orders, that is, it can ensure that the generated delivery range covers a reasonable area. In addition, since the present invention triangulates the interest area set, it can accurately determine whether each triangle belongs to the user interest area, and update the delivery range according to the determination result, so as to ensure the generation accuracy of the delivery range, and at the same time, it can reduce the delivery range as much as possible to improve the delivery efficiency of the rider.

[0224] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0225] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A method for generating a distribution range, characterized in that: include: Obtain a set of interest areas corresponding to the target merchant in the electronic map; Triangulate each region of interest in the set of regions of interest to obtain a set of triangles corresponding to the set of regions of interest; Calculate the outer convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set; Based on the outer convex hull, generating a delivery range corresponding to the target merchant; The step of generating the delivery range corresponding to the target merchant based on the outer convex hull includes: Generating an initial delivery range corresponding to the target merchant according to the outer convex hull; Adding each peripheral edge of the initial delivery range as a newly added peripheral edge to the newly added peripheral edge set; Determine whether a target triangle corresponding to any one of the newly added peripheral edges in the set of newly added peripheral edges can be culled; According to the determination result, the initial delivery range is updated, and the newly added peripheral edge set is updated based on the newly added peripheral edge corresponding to the updated initial delivery range to obtain an updated newly added peripheral edge set; Based on the updated newly added peripheral edge set, the initial delivery range is continuously updated for the next round until no removable triangles exist in the triangle set, and the delivery range corresponding to the target merchant is output.

2. The method according to claim 1, characterized in that The step of obtaining a set of interest areas corresponding to a target merchant in an electronic map includes: According to the geometric center coordinates corresponding to each user area in the electronic map and the center coordinates corresponding to the target merchant, a preset navigation distance table is searched to respectively determine the navigation distance between the target merchant and each user area; A target user area whose navigation distance is less than a preset radius is screened out from the various user areas, and the target user area is added as an interest area to the interest area set.

3. The method according to claim 1, characterized in that The triangulating each region of interest in the region of interest set to obtain a triangle set corresponding to the region of interest set includes: Determine the coordinate points on the line segments constituting each of the regions of interest; Each region of interest in the set of regions of interest is triangulated based on each coordinate point to obtain a set of triangles corresponding to the set of regions of interest.

4. The method according to claim 3, characterized in that The triangulating each region of interest in the region of interest set based on each coordinate point to obtain a triangle set corresponding to the region of interest set includes: Determine the arrangement order corresponding to each coordinate point; For a target coordinate point among the coordinate points, a connecting line between the target coordinate point and a coordinate point before the target coordinate point in the arrangement order is obtained, and based on the connecting line, the set of interest regions is divided into a plurality of triangles; Determine the circumscribed circles corresponding to the plurality of triangles respectively, and determine a target circumscribed circle including the target coordinate point from the plurality of circumscribed circles; If there are at least two target circumscribed circles that include the target coordinate point, inner triangles corresponding to the at least two target circumscribed circles are determined, and common side lines of the at least two inner triangles are deleted to obtain updated triangles; For other coordinate points among the coordinate points, the process of dividing and updating triangles in the interest region set is repeated, and finally a triangle set corresponding to the interest region set is output.

5. The method according to claim 3, characterized in that: After determining the coordinate points on the line segments constituting the respective regions of interest, the method further comprises: Determine the starting coordinate point, the ending coordinate point and the intermediate coordinate point corresponding to any preset number of adjacent line segments among the line segments constituting each of the interest regions; Obtaining a coordinate point connection line between the starting coordinate point and the ending coordinate point, and calculating a distance between the intermediate coordinate point and the coordinate point connection line; Determine a maximum distance among the calculated distances, and determine whether to discard intermediate coordinate points on the preset number of line segments based on the maximum distance; If the maximum distance is less than the preset middle coordinate point distance, the middle coordinate points on the preset number of line segments are discarded to obtain simplified coordinate points; If the maximum distance is greater than or equal to the preset intermediate coordinate point distance, the preset number of line segments are divided into two groups of line segments using the intermediate coordinate point corresponding to the maximum distance as the dividing point, and the process of determining and discarding the intermediate coordinate point is repeated for the two groups of line segments; The triangulating each region of interest in the region of interest set based on each coordinate point to obtain a triangle set corresponding to the region of interest set includes: Each region of interest in the set of regions of interest is triangulated based on the simplified coordinate points to obtain a set of triangles corresponding to the set of regions of interest.

6. The method according to claim 3, characterized in that After determining the coordinate points on the line segments constituting the respective regions of interest, the method further includes: Determine the angle between any two adjacent line segments among the line segments constituting each region of interest; If the angle is greater than a preset angle, the intersection coordinate points between any two adjacent line segments are discarded to obtain simplified coordinate points; The triangulating each region of interest in the region of interest set based on each coordinate point to obtain a triangle set corresponding to the region of interest set includes: Each region of interest in the set of regions of interest is triangulated based on the simplified coordinate points to obtain a set of triangles corresponding to the set of regions of interest.

7. The method according to claim 1, characterized in that The calculating the outer convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set includes: Determine a reference vertex from each of the vertices, calculate the argument of other vertices from the vertices relative to the reference vertex, and sort the other vertices based on the argument to obtain a sorting result of the other vertices; Based on the sorting result, the first vertex and the last vertex among the other vertices are added as target vertices to the target vertex set, and the reference vertex and the first vertex are added to a stack, wherein the first vertex is located at the top of the stack; Obtaining a vertex line between the reference vertex and the vertex at the top of the stack, and determining whether the second-ranked vertex is the target vertex based on the position of the second-ranked vertex relative to the vertex line; If the second-ranked vertex is the target vertex, updating the target vertex set based on the second-ranked vertex, and pushing the second-ranked vertex into a stack; For the remaining vertices, repeat the target vertex determination process in the order of arrangement, and finally output the updated target vertex set; Connect each target vertex in the finally updated target vertex set in sequence to obtain the outer convex hull corresponding to the triangle set.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Encoding the geometric center coordinates corresponding to each of the regions of interest to obtain the geographic codes corresponding to each of the regions of interest; The respective regions of interest are divided based on the geographic code to obtain a plurality of sub-regions of interest sets, wherein the regions of interest in the same sub-region of interest set have the same geographic code.

9. The method according to claim 1, characterized in that: The determining whether a target triangle corresponding to any one of the newly added peripheral edges in the set of newly added peripheral edges can be culled includes: Determine the angle of the corresponding angle of the newly added peripheral edge in the target triangle; If the angle is smaller than the preset angle, the target triangle is not eliminated; If the angle is greater than or equal to the preset angle, determining whether the target triangle is associated with any one of the interest regions in the interest region set; If the target triangle is associated with any region of interest in the set of regions of interest, the target triangle is not eliminated; If the target triangle is not related to any of the interest regions in the interest region set, the target triangle is eliminated.

10. The method according to claim 9, characterized in that The determining whether the target triangle is associated with any one of the interest regions in the interest region set includes: Encoding the geometric center coordinates corresponding to the target triangle to obtain the geographic code corresponding to the target triangle; Determine a target sub-area of ​​interest set having the same geocode as the target triangle from a plurality of sub-area of ​​interest sets; Determine whether any interest region in the target sub-interest region set contains the target triangle; If any one of the interest regions contains the target triangle, it is determined that the target triangle is associated with the any one of the interest regions.

11. A distribution range generating device, characterized in that: include: An acquisition unit, used to acquire a set of interest areas corresponding to a target merchant in an electronic map; A triangulation unit, configured to triangulate each region of interest in the set of regions of interest to obtain a set of triangles corresponding to the set of regions of interest; A calculation unit, configured to calculate a peripheral convex hull corresponding to the triangle set based on the longitude and latitude coordinates corresponding to the vertices of each triangle in the triangle set; A generating unit, configured to generate a delivery range corresponding to the target merchant based on the outer convex hull; Wherein, the generating unit comprises: a generating module, a third determining module, a third judging module and a second updating module; The generating module is used to generate an initial delivery range corresponding to the target merchant according to the outer convex hull; The third determining module is used to add each peripheral edge of the initial delivery range as a newly added peripheral edge to the newly added peripheral edge set; The third determination module is used to determine whether a target triangle corresponding to any one of the newly added peripheral edges in the set of newly added peripheral edges can be eliminated; The second updating module is used to update the initial delivery range according to the determination result; The third determination module is further configured to update the newly added peripheral edge set based on the newly added peripheral edge corresponding to the updated initial delivery range to obtain an updated newly added peripheral edge set; The second updating module is further used to continue to perform the next round of updating on the initial delivery range based on the updated newly added peripheral edge set until there are no removable triangles in the triangle set, and output the delivery range corresponding to the target merchant.

12. The device according to claim 11, characterized in that The acquisition unit includes: a first determination module and a screening module, The first determination module is used to query a preset navigation distance table according to the geometric center coordinates corresponding to each user area and the center coordinates corresponding to the target merchant in the electronic map, and determine the navigation distance between the target merchant and each user area respectively; The screening module is used to screen out the target user area whose navigation distance is less than a preset radius from the various user areas, and add the target user area as an interest area to the interest area set.

13. The device according to claim 11, characterized in that The segmentation unit includes: a second determination module and a segmentation module, The second determining module is used to determine the coordinate points on the line segments constituting each of the regions of interest; The triangulation module is used to triangulate each region of interest in the set of regions of interest based on each coordinate point to obtain a set of triangles corresponding to the set of regions of interest.

14. The device according to claim 13, characterized in that The segmentation module is specifically used to determine the arrangement order corresponding to each coordinate point; for a target coordinate point among the coordinate points, obtain a connecting line between the target coordinate point and a coordinate point whose arrangement order is before the target coordinate point, and divide the interest area set into a plurality of triangles based on the connecting line; determine the circumscribed circles corresponding to the plurality of triangles, and determine a target circumscribed circle including the target coordinate point from the plurality of circumscribed circles; If there are at least two target circumscribed circles that contain the target coordinate point, the inner triangles corresponding to the at least two target circumscribed circles are determined, and the common side lines of the at least two inner triangles are deleted to obtain updated triangles; for other coordinate points among the coordinate points, the process of dividing and updating triangles in the interest area set is repeated, and finally a triangle set corresponding to the interest area set is output.

15. The device according to claim 13, characterized in that The segmentation unit further includes: a first calculation module, a first determination module and a simplification module. The second determination module is further used to determine the starting coordinate point, the ending coordinate point and the intermediate coordinate point corresponding to any preset number of adjacent line segments in the line segments constituting each of the interest regions; The first calculation module is used to obtain a coordinate point connection line between the starting coordinate point and the ending coordinate point, and calculate the distance between the intermediate coordinate point and the coordinate point connection line; The first determination module is used to determine the maximum distance among the calculated distances, and determine whether to discard the middle coordinate points on the preset number of line segments based on the maximum distance; The simplification module is used to discard the middle coordinate points on the preset number of line segments to obtain simplified coordinate points if the maximum distance is less than the preset middle coordinate point distance; The first determination module is further configured to divide the preset number of line segments into two groups of line segments using the middle coordinate point corresponding to the maximum distance as a dividing point if the maximum distance is greater than or equal to the preset middle coordinate point distance, and repeat the process of determining and discarding the middle coordinate point for the two groups of line segments; The triangulation module is further specifically configured to triangulate each region of interest in the region of interest set based on the simplified coordinate points to obtain a triangle set corresponding to the region of interest set.

16. The device according to claim 13, characterized in that The subdivision unit further includes: a simplification module, The second determination module is further used to determine the angle between any two adjacent line segments in the line segments constituting each of the regions of interest; The simplification module is used to discard the intersecting coordinate points between any two adjacent line segments if the angle is greater than a preset angle, so as to obtain simplified coordinate points; The triangulation module is further specifically configured to triangulate each region of interest in the region of interest set based on the simplified coordinate points to obtain a triangle set corresponding to the region of interest set.

17. The device according to claim 11, characterized in that The calculation unit includes: a second calculation module, an adding module, a second determination module, a first updating module and a connecting module. The second calculation module is used to determine a reference vertex from each vertex, calculate the argument of other vertices among the vertices relative to the reference vertex, and sort the other vertices based on the argument to obtain a sorting result of the other vertices; The adding module is used to add the first vertex and the last vertex among the other vertices as target vertices to the target vertex set based on the sorting result, and add the reference vertex and the first vertex to the stack, wherein the first vertex is located at the top of the stack; The second determination module is used to obtain a vertex line between the reference vertex and the vertex at the top of the stack, and determine whether the second-ranked vertex is the target vertex based on the position of the second-ranked vertex relative to the vertex line; The first updating module is used for updating the target vertex set based on the second-ranked vertex if the second-ranked vertex is the target vertex, and pushing the second-ranked vertex into a stack; The second determination module is further used to repeat the determination process of the target vertices according to the arrangement order for the remaining vertices, and finally output an updated target vertex set; The connection module is used to sequentially connect the target vertices in the finally updated target vertex set to obtain the outer convex hull corresponding to the triangle set.

18. The device according to any one of claims 11 to 17, characterized in that The device further comprises: an encoding unit and a dividing unit, The encoding unit is used to encode the geometric center coordinates corresponding to each of the regions of interest to obtain the geographic code corresponding to each of the regions of interest; The division unit is used to divide each of the interest regions based on the geographic code to obtain a plurality of sub-interest region sets, wherein the interest regions in the same sub-interest region set have the same geographic code.

19. The device according to claim 11, characterized in that The third determination module includes: a determination submodule, a removal submodule and a determination submodule. The determination submodule is used to determine the angle of the corresponding angle of the newly added peripheral edge in the target triangle; The culling submodule is used for not culling the target triangle if the angle is smaller than a preset angle; The determination submodule is configured to determine whether the target triangle is associated with any one of the interest regions in the interest region set if the angle is greater than or equal to the preset angle; The culling submodule is further configured to not cull the target triangle if the target triangle is associated with any one of the interest regions in the set of interest regions; The elimination submodule is further configured to eliminate the target triangle if the target triangle is not related to any of the interest regions in the interest region set.

20. The device according to claim 19, characterized in that The determination submodule is specifically used to encode the geometric center coordinates corresponding to the target triangle to obtain the geographic code corresponding to the target triangle; determine a target sub-area of ​​interest set having the same geographic code as the target triangle from multiple sub-area of ​​interest sets; determine whether there is any area of ​​interest in the target sub-area of ​​interest set that contains the target triangle; if there is any area of ​​interest that contains the target triangle, determine that the target triangle is associated with the any one area of ​​interest.

21. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

22. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Route network coverage determination method and device

    CN103916869A

  • Method and device for processing area boundary information

    CN107480274A

  • Method and device for identifying mixed delivery mode suitable for delivery party

    CN110288296A