Collection area determination method and device, storage medium and electronic equipment
By acquiring and processing the collection data of the distribution point and using the convex hull algorithm to generate the collection area, the problem of inaccurate determination of the collection area in the existing technology is solved, and the collection accuracy and distribution experience of the distribution point are improved.
Patent Information
- Application Number
- CN202510086537.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, there is inaccuracy in determining the collection area, which leads to the inability of delivery objects of the transaction party to timely deliver.
By obtaining the collection data of the distribution point, traversing the data to obtain the geographic data and coordinate data set of the transaction party, the convex hull algorithm is used to generate the collection area, thereby determining the collection area of the transaction party that the distribution point can collect.
It improves the accuracy of collecting delivery objects by the delivery point, improves the delivery experience and the accuracy of pushing delivery objects to the delivery party.
Smart Images

Figure CN120030248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for determining a collection area. Background Art
[0002] Nowadays, with the rapid development of the economy and the popularization of the Internet, instant delivery services have become an indispensable part of people's daily life. In order to improve the convenience of delivery, the method of aggregate delivery is adopted. The delivery objects of all parties in the collection area covered by the aggregate delivery are collected to the delivery point, and then the delivery parties at the distribution point will uniformly deliver the collected delivery objects.
[0003] In the related art, when collecting delivery objects, there are cases where the transaction party in the collection area needs to be collected, but the delivery point does not collect the delivery object of the transaction party, resulting in the transaction party's delivery object cannot be delivered in time. Therefore, how to determine the collection area is an issue that needs to be solved urgently. Summary of the invention
[0004] The embodiments of this specification provide a method, device, storage medium and electronic device for determining a collection area. By determining the collection area of the business party that the delivery point can collect based on the collection data, the delivery point can improve the accuracy of collecting the delivery object, thereby improving the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party.
[0005] In a first aspect, an embodiment of the present specification provides a method for determining a collection area, the method comprising:
[0006] Acquire the collection data of at least one delivery point, wherein the collection data includes the transaction parties whose transaction objects have been collected by each delivery point in the transaction area;
[0007] Traversing the collected data to obtain geographic data corresponding to each of the transaction parties, and determining a coordinate data set corresponding to the geographic data;
[0008] A convex hull algorithm is used to generate a collection area corresponding to the coordinate data set.
[0009] Through the above technical scheme, it is possible to obtain the geographic data of each transaction party and the corresponding coordinate data set by traversing the collection data of the acquired delivery points, and use the convex hull algorithm to generate the corresponding collection area according to the coordinate data set, so as to determine the collection area of the transaction party that the delivery point can collect according to the collection data, thereby improving the accuracy of the delivery point in collecting the delivery object, thereby improving the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party.
[0010] In combination with the first aspect and the above implementation manner, in some possible implementation manners, traversing the collected data to obtain geographic data corresponding to the transaction party, and determining a coordinate data set corresponding to the geographic data includes:
[0011] Traversing the collection data, obtaining the longitude and latitude data corresponding to each of the transaction parties in the collection data;
[0012] Each of the latitude and longitude data is mapped in a pre-constructed coordinate system to determine a coordinate data set corresponding to each of the geographic data.
[0013] Through the above technical solution, the collection data is traversed to obtain the longitude and latitude data, and then the longitude and latitude data are mapped in the coordinate system, so as to obtain the coordinate data set corresponding to the geographic data, so as to facilitate data processing according to the coordinate data set and improve the accuracy and efficiency of generating the collection area.
[0014] In combination with the first aspect and the above implementations, in some possible implementations, the step of using a convex hull algorithm to generate a collection area corresponding to the coordinate data set includes:
[0015] determining a reference point in the coordinate data set;
[0016] Determine a first arrangement order corresponding to each coordinate point based on the reference point, wherein the coordinate point is other coordinate data in the coordinate data set except the reference point;
[0017] Based on the first arrangement order, each of the coordinate points is screened to obtain regional vertices, and each of the regional vertices is sequentially connected to generate a collection area corresponding to the coordinate data set.
[0018] Through the above technical scheme, the coordinate points in the coordinate data set are screened to obtain the regional vertices in the coordinate data set, and the regional vertices are connected to obtain the collection area corresponding to the coordinate data set, thereby obtaining the collection area of the transaction party that the distribution point can collect, thereby improving the accuracy of the distribution point in collecting the delivery object.
[0019] In combination with the first aspect and the above implementation manner, in some possible implementation manners, determining the reference point in the coordinate data set includes:
[0020] Selecting a first coordinate with the smallest ordinate in the coordinate data set, and determining the first coordinate as a reference point;
[0021] If the coordinate data set includes a plurality of first coordinates with the same vertical coordinate and the smallest vertical coordinate, the second coordinate with the smallest horizontal coordinate among the first coordinates is selected as the reference point in the coordinate data set.
[0022] In combination with the first aspect and the above implementation manner, in some possible implementation manners, determining the first arrangement order corresponding to each coordinate point based on the reference point includes:
[0023] Connecting the reference point with each of the coordinate points respectively to obtain the coordinate angle of each of the coordinate points;
[0024] Arrange the coordinate points in ascending order based on the coordinate angles to obtain a first arrangement order corresponding to the coordinate points.
[0025] In combination with the first aspect and the above implementation manner, in some possible implementation manners, arranging the coordinate points in ascending order based on the coordinate angles includes:
[0026] Obtaining the coordinate distance between each of the coordinate points and the reference point;
[0027] The same-direction coordinate points are arranged from small to large based on the coordinate distance, and the same-direction coordinate points are coordinate points with the same coordinate angle.
[0028] Through the above technical scheme, the same-direction coordinate points with the same coordinate angle are sorted in combination with the coordinate distance, and the sorting of each coordinate point is completed, thereby improving the accuracy of the sorting of the coordinate points, and then the collection area can be generated according to the first arrangement order, thereby improving the accuracy of the delivery point in collecting the delivery object.
[0029] In combination with the first aspect and the above implementation manner, in some possible implementation manners, the filtering of the coordinate points based on the first arrangement order to obtain regional vertices, and sequentially connecting the regional vertices to generate a collection area corresponding to the coordinate data set includes:
[0030] Adding the reference point and each of the coordinate points in the first arrangement sequence to a stack list in sequence;
[0031] Calculate the angle value of each of the coordinate points in sequence using a calculation formula based on the first arrangement order;
[0032] Deleting coordinate points in the stack list whose angle values are greater than the turning angle to obtain the region vertex, where the turning angle is a preset threshold for determining the turning direction of the coordinate points;
[0033] Based on the second arrangement order of the area vertices in the stack list, the area vertices are connected in sequence to generate a collection area corresponding to the coordinate data set.
[0034] Through the above technical solution, the collection area of the party that the delivery point can collect is determined based on the collection data, thereby improving the accuracy of the delivery point in collecting the delivery object, thereby improving the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party.
[0035] In a second aspect, an embodiment of the present specification provides a method for determining a collection area, the method comprising:
[0036] A data acquisition unit, used to acquire the collection data of at least one delivery point, wherein the collection data includes the transaction parties whose transaction objects have been collected by each of the delivery points in the transaction area;
[0037] A set acquisition unit, configured to traverse the collected data to obtain geographic data corresponding to each of the transaction parties, and determine a coordinate data set corresponding to the geographic data;
[0038] The area determination unit is used to generate a collection area corresponding to the coordinate data set by using a convex hull algorithm.
[0039] In a third aspect, an embodiment of the present specification provides a computer program product, wherein the computer program product stores at least one instruction, and the at least one instruction is suitable for being loaded by a processor and executing the above-mentioned method steps.
[0040] In a fourth aspect, an embodiment of the present specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.
[0041] In a fifth aspect, an embodiment of the present specification provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in this specification or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A system architecture diagram of a method for determining a collection area provided in an embodiment of this specification;
[0044] Figure 2 A flowchart of a method for determining a collection area provided in an embodiment of this specification;
[0045] Figure 3 A flowchart of a method for determining a collection area provided in an embodiment of this specification;
[0046] Figure 4 This is a schematic diagram of an example of obtaining coordinate data provided in an embodiment of this specification;
[0047] Figure 5 An exemplary schematic diagram of obtaining a first arrangement order according to a coordinate angle provided in an embodiment of this specification;
[0048] Figure 6 This is a schematic diagram of an example of arranging coordinate points in the same direction provided in an embodiment of this specification;
[0049] Figure 7 An example schematic diagram of determining the angle of a coordinate point provided in an embodiment of this specification;
[0050] Figure 8 This is an example schematic diagram of connecting area vertices to generate a collection area provided in an embodiment of this specification;
[0051] Fig. 9 A schematic diagram of the structure of a collection area determination device provided in an embodiment of this specification;
[0052] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0053] In order to make the features and advantages of this specification more obvious and easy to understand, the technical solutions in this specification are described clearly and completely in conjunction with the drawings in this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this specification.
[0054] See also Figure 1 , which provides a system architecture diagram for determining a collection area in the embodiments of this specification. Figure 1 As shown, the method for determining the collection area provided in the embodiment of this specification can be applied to a terminal device to implement the process of determining the collection area. The system architecture provided in the embodiment of this specification mainly includes a terminal device 10 and a transaction server 20. The terminal device 10 can be a device with a data processing function, such as a personal microcomputer, such as a personal computer, a notebook computer, etc.; the transaction server 20 can be a large integrated server used by an enterprise, or a microcomputer, such as a personal computer, etc.
[0055] In an embodiment of the present specification, the terminal device 10 obtains the collection data of at least one delivery point from the transaction server 20, traverses the collection data of each delivery point to obtain the geographic data corresponding to each transaction party, maps the geographic data in the coordinate system to obtain a coordinate data set, uses a convex hull algorithm to filter each coordinate data in the coordinate data set, and generates a collection area corresponding to the coordinate data set, thereby improving the accuracy of the delivery point in collecting the delivery object by determining the collection area of the transaction party that can be collected by the delivery point based on the collection data, thereby improving the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party.
[0056] based on Figure 1 The system architecture shown below will be combined with Figure 2 , the method for determining the collection area provided in the embodiments of this specification is introduced in detail.
[0057] See also Figure 2 , which is a flow chart of a method for determining a collection area according to an embodiment of this specification. Figure 2 As shown, the method may include the following steps S101-S103.
[0058] S101, obtaining collection data of at least one delivery point;
[0059] In one embodiment, collection data indicating a delivery point included in a transaction area corresponding to a delivery transaction is obtained. The delivery transaction may be a transaction for delivering delivery objects of various transaction parties in the transaction area. The transaction area may be the area covered by the delivery transaction, such as the area where a university is located. The delivery point may be the location where the delivery party distributes and delivers the delivery objects of various transaction parties after collecting them. The collection data may be order data corresponding to the delivery objects collected by the delivery point. The collection data includes the transaction parties whose transaction objects have been collected by various delivery points in the transaction area.
[0060] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the collection data and geographic data involved in this specification are all obtained with full authorization.
[0061] S102, traversing the collected data to obtain geographic data corresponding to each transaction party, and determining a coordinate data set corresponding to the geographic data;
[0062] In one embodiment, the transaction data related to each transaction party included in the collected data is traversed, and the transaction data may be data related to the transaction party, such as identification data and geographic data of the transaction party, to obtain geographic data corresponding to each transaction party, and the geographic data of each transaction party is mapped in a pre-constructed coordinate system to obtain a coordinate data set corresponding to each transaction party, and the coordinate data set includes at least three coordinate data. It can be understood that if the coordinate data is one or two, the figure generated according to the coordinate number set is only a point or a line segment, and an area cannot be generated.
[0063] Among them, the identification data can be data used to identify the transaction party, such as the name of the transaction party, etc.; the geographic data can be data used to mark the location of the transaction party, such as latitude and longitude data, or data with location marking function generated by a preset geographic marking method.
[0064] S103, using a convex hull algorithm to generate a collection area corresponding to the coordinate data set;
[0065] In one embodiment, a convex hull algorithm is used to identify each coordinate data in the coordinate data set corresponding to each transaction party, and determine the vertices in the coordinate data set. The vertices can be calculated by using the convex hull algorithm to calculate each coordinate data in the coordinate data set, and the coordinates determined to cover the position of the coordinate data set are connected in sequence according to the determination order of each vertex to generate a collection area corresponding to the coordinate data set.
[0066] Specifically, the collection area may be an area corresponding to the transaction area that is used to represent the transaction area and that can collect the transaction objects. The delivery party at the distribution point will collect the delivery objects of the transaction party that is in the collection area and has joined the delivery transaction. If the transaction party is not included in the collection area, then even if the delivery transaction is joined, the delivery party at the distribution point will not change the transaction party to collect the delivery objects.
[0067] In an embodiment of the present specification, by traversing the collection data of the acquired delivery points, the geographic data of each transaction party and the corresponding coordinate data set are obtained, and the convex hull algorithm is used to generate the corresponding collection area according to the coordinate data set, so as to determine the collection area of the transaction party that the delivery point can collect according to the collection data, thereby improving the accuracy of the delivery point in collecting the delivery object, thereby improving the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party.
[0068] See also Figure 3 , which is a flow chart of a method for determining a collection area according to an embodiment of this specification. Figure 3 As shown, the method may include the following steps S201-S206.
[0069] S201, obtaining collection data of at least one delivery point;
[0070] In one embodiment, collection data indicating a delivery point included in a transaction area corresponding to a delivery transaction is obtained. The delivery transaction may be a transaction for delivering delivery objects of various transaction parties in the transaction area. The transaction area may be the area covered by the delivery transaction, such as the area where a university is located. The delivery point may be the location where the delivery party distributes and delivers the delivery objects of various transaction parties after collecting them. The collection data may be order data corresponding to the delivery objects collected by the delivery point. The collection data includes the transaction parties whose transaction objects have been collected by various delivery points in the transaction area.
[0071] It should be noted that a delivery transaction can be a service for collecting and delivering delivery objects of a transaction party in a region. After a transaction party joins the delivery transaction, the server of the delivery transaction receives the delivery request for the delivery object uploaded by the transaction party, and the delivery party at the delivery point responds to the delivery request and collects the delivery object from the transaction party.
[0072] Furthermore, the collection data can be the data uploaded by the person in charge of each distribution point to the distribution affairs server for each preset time period, so as to determine the operation status of the distribution point and the update of the collection data by requiring the preset time period to upload the collection data, thereby improving the accuracy of the collection data. The specific duration of the preset time period can be set according to the actual situation, for example, it can be 7 days.
[0073] S202, traversing the collection data to obtain the longitude and latitude data corresponding to each transaction party in the collection data;
[0074] In one embodiment, the transaction data related to each transaction party included in the collected data is traversed, and the transaction data may be data related to the transaction party, such as identification data and geographic data of the transaction party, to obtain the geographic data corresponding to each transaction party.
[0075] Among them, the identification data can be data used to identify the transaction party, such as the name of the transaction party, etc.; the geographic data can be data used to mark the location of the transaction party, such as latitude and longitude data, or it can be data with a location marking function generated by a preset geographic marking method, wherein the geographic marking method can be a method used by the server of the distribution transaction to mark the location of the server, and the specific setting can be based on actual conditions.
[0076] S203, mapping each latitude and longitude data into a pre-constructed coordinate system, and determining a coordinate data set corresponding to each geographic data;
[0077] In one embodiment, the longitude and latitude data corresponding to each transaction party are mapped in a pre-constructed coordinate system to obtain the coordinate data corresponding to each longitude and latitude data in the coordinate system, and determine the coordinate data set corresponding to each geographic data. The coordinate data set includes at least three coordinate data. It is understandable that if the coordinate data is one or two, the figure generated according to the coordinate data set is only a point or a line segment, and an area cannot be generated.
[0078] For example, Figure 4 As shown, Figure 4 The longitude and latitude data of the three transaction parties are included in it, "30°N, 120°E", "30°1'N, 120°2'E" and "30°2'N, 120°1'E". Each longitude and latitude is mapped in the coordinate system to obtain the corresponding coordinate data (2, 2), (3, 4) and (4, 3).
[0079] S204, determining a reference point in the coordinate data set;
[0080] In one embodiment, after determining the coordinate data set corresponding to each geographic data, each coordinate data in the coordinate data set is screened to determine the coordinate data with the smallest ordinate in the coordinate data set as the reference point corresponding to the coordinate data set.
[0081] Specifically, a feasible method for filtering coordinate data to obtain a reference point can be: select the first coordinate with the smallest vertical coordinate in the coordinate data set, and determine the first coordinate as the reference point. If the coordinate data set includes multiple first coordinates with the same and smallest vertical coordinates, then select the second coordinate with the smallest horizontal coordinate among the first coordinates as the reference point in the coordinate data set.
[0082] Exemplarily, the coordinate data set includes three first coordinates m(1,1), n(2,1) and p(4,1) with the same and smallest vertical coordinates, then m(1,1) with the smallest horizontal coordinate among the three first coordinates is selected as the reference point in the coordinate data set.
[0083] S205, determining a first arrangement order corresponding to each coordinate point based on the reference point;
[0084] In one embodiment, after determining the reference point in the coordinate data set, the reference point is connected to each coordinate point respectively. The coordinate point is other coordinate data in the coordinate data set except the reference point, and the coordinate angle of each coordinate point is obtained. The coordinate angle can be the angle between the line representing the coordinate point and the reference point and the horizontal axis of the coordinate system. Based on the coordinate angle, each coordinate point is arranged from small to large to obtain the first arrangement order corresponding to each coordinate point. The first arrangement order can be the order obtained by arranging the coordinate angles of each coordinate point from small to large.
[0085] For example, Figure 6 As shown, Figure 6 For the central reference point o, the coordinate angle of coordinate point a relative to the reference point o is 30 degrees, the coordinate angle of horizontal axis mark point b is 60 degrees, the coordinate angle of coordinate point c is 45 degrees, the coordinate angle of coordinate point d is 90 degrees, and the coordinate angle of coordinate point e is 135 degrees. Then the first arrangement order corresponding to each coordinate point is coordinate point a, coordinate point c, coordinate point b, coordinate point d, and coordinate point e.
[0086] Furthermore, if there are coordinate points with the same coordinate angle, the coordinate points with the same coordinate angle can be sorted according to the coordinate distance of the coordinate point. The coordinate distance can be used to characterize the distance between the coordinate point and the reference point. Specifically, the method of sorting the first coordinate according to the coordinate distance can be: obtaining the coordinate distance between each coordinate point and the reference point, and arranging the coordinate points in the same direction from small to large based on the coordinate distance. The coordinate points in the same direction are the coordinate points with the same coordinate angle.
[0087] Exemplarily, the coordinate angles of coordinate point f and coordinate point g in the first coordinate are the same, so coordinate point f and coordinate point g are co-directional coordinate points. The coordinate distance 5 of coordinate point f and the coordinate distance 7 of coordinate point g are obtained. Then, when coordinate point f and coordinate point g are arranged based on the coordinate distance, coordinate point f in the first arrangement order is arranged before coordinate point g.
[0088] For example, Figure 6 As shown, Figure 6 The coordinate angles of coordinate point o and coordinate point f as well as coordinate point o and coordinate point g are the same, so coordinate point f and coordinate point g are in the same direction. The coordinate distance 5 between coordinate point f and coordinate point o and the coordinate distance 8 between coordinate point g and coordinate point o are obtained, so coordinate point f in the first arrangement order is arranged before coordinate point g.
[0089] S206, filtering each coordinate point based on the first arrangement order to obtain regional vertices, and sequentially connecting each regional vertex to generate a collection area corresponding to the coordinate data set;
[0090] In one embodiment, each coordinate point is filtered in turn based on the first arrangement order according to the filtering condition to obtain the area vertices corresponding to the coordinate data set. The filtering condition can be a condition for identifying whether each coordinate point can be used to generate a collection area. The area vertices can be coordinate points determined based on the filtering condition. The area vertices are connected in turn according to the order in which the coordinate points are determined as area vertices to generate the collection area corresponding to the coordinate data set.
[0091] Specifically, the reference point and each coordinate point in the first arrangement order are added to the stack list in turn, the angle value of each coordinate point is calculated in turn using a calculation formula based on the first arrangement order, the coordinate points in the stack list whose angle values are greater than the steering angle are deleted, and the area vertices are obtained. The steering angle is a preset coordinate point turning direction judgment threshold. The turning direction judgment threshold can be used to judge whether the turning direction of the coordinate point is clockwise or counterclockwise. The area vertices are connected in turn based on the second arrangement order of each area vertices in the stack list to generate a collection area corresponding to the coordinate data set.
[0092] Among them, for the three coordinate points h(x1, y1), i(x2, y2) and j(x3, y3), a calculation formula is used to obtain the angle value corresponding to the coordinate point j. The calculation formula can be specifically shown in formula (1):
[0093] k=(x2-x1)*(y3-y1)-(y2-y1)*(x3-x1) Formula (1)
[0094] Wherein, k is the angle value calculated for the coordinate point j.
[0095] Specifically, the method for calculating the angle value of each coordinate point in turn can be: after the base point and the first coordinate point in the first arrangement order and the second coordinate point are added to the stack list in turn, the angle value corresponding to the first coordinate point is calculated according to the base point, the first coordinate point and the second coordinate point, the first coordinate point is filtered according to the angle value and the steering angle, and each coordinate point is filtered in turn according to the first arrangement order in the same manner as the first coordinate point is filtered, so as to obtain the area vertices that meet the filtering conditions.
[0096] If the first coordinate point has not been deleted from the stack list, then when calculating the angle value of the second coordinate point, the calculation is performed based on the first coordinate point, the second coordinate point and the third coordinate point; if the second coordinate point is deleted from the stack list according to the angle value of the second coordinate point, the calculation is performed based on the base point, the first coordinate point and the third coordinate point until the coordinate points in the stack list meet the filtering conditions, and the coordinate points in the first arrangement order are continued to be added to the stack list for calculation until the angle value calculation of all the coordinate points in the first arrangement order is completed.
[0097] Furthermore, the method for filtering the angle value according to the steering angle can be: comparing the size relationship between the steering angle and the angle value, if the steering angle is greater than the angle value, the second coordinate point of the three coordinate points for calculating the angle value is rotated counterclockwise relative to the first coordinate point; if the steering angle is less than the angle value, the second coordinate point of the three coordinate points for calculating the angle value is rotated clockwise relative to the first coordinate point.
[0098] For example, Figure 7 As shown, Figure 7 The coordinate point q(1,1), the coordinate point r(2,2), and the coordinate point s(4,3) in A are obtained according to the calculation formula. The angle value k of the coordinate point s is (2-1)*(3-1)-(2-1)*(4-1)=-1. Therefore, the coordinate point s is rotated counterclockwise relative to the coordinate point q and the coordinate point r. Therefore, the coordinate point s is deleted from the stack list. Figure 7 In B, there are q(1,1), coordinate point r(3,2), and coordinate point s(2,3). According to the calculation formula, the angle value k of coordinate point s is (3-1)*(3-1)-(2-1)*(2-1)=4. Therefore, coordinate point s is rotated clockwise relative to coordinate point q and coordinate point r, so coordinate point s is deleted from the stack list.
[0099] Exemplarily, after the coordinate points are screened to obtain the region vertices, the region vertices are sequentially connected according to the second arrangement order of the region vertices in the stack list to obtain the collection region, such as Figure 8 As shown, Figure 8 The stack list includes regional vertices "①", "②", "③", "④", "⑤" and "⑥". Figure 6 It can be obtained that the second arrangement order of the regional vertices in the stack list is "①", "③", "②", "④", "⑤", "⑥". Connect the regional vertices in turn according to the second arrangement order to obtain Figure 6 The collection area in.
[0100] Furthermore, in order to improve the accuracy of the collection area, it is necessary to be able to update it in time when the operating status of the distribution point changes. Therefore, a feasible method may be: monitor the operating status of each distribution point in the distribution point list of the transaction area; if the operating status of the first distribution point is switched from the on state to the off state, then generate the collection area corresponding to the transaction area based on the second distribution point in the distribution point list; the first distribution point is any distribution point in the distribution point list, and the second distribution point is other distribution points in the distribution point list except the first distribution point.
[0101] It is understandable that if the operating status of a distribution point is switched from an open state to a closed state, the delivery objects of some transaction parties will not be picked up by the delivery parties of the distribution point, resulting in delays in the delivery of the delivery objects of the transaction parties. Therefore, in order to ensure that the delivery objects can be delivered in a timely manner, when the operating status of the distribution point is monitored to change, the collection area corresponding to the transaction area is adaptively changed according to the transaction party corresponding to the distribution point, thereby improving the accuracy of the distribution point in picking up the delivery objects.
[0102] It should be noted that the convex hull algorithm used in the embodiments of this specification is a feasible algorithm. Other convex hull algorithms can also be used to generate the collection area corresponding to the coordinate data set, such as the divide and conquer method (Divide and conquer), the wrapping method (Jarvis march) or the rolling ball method (Alpha Shapes algorithm), etc. The convex hull algorithm used can be set according to the actual situation.
[0103] In the embodiments of the present specification, by traversing the collection data of the acquired distribution point, the geographic data of each transaction party and the corresponding coordinate data set are obtained, and the convex hull algorithm is used to generate the corresponding collection area according to the coordinate data set, so as to determine the collection area of the transaction party that the distribution point can collect according to the collection data, thereby improving the accuracy of the distribution point in collecting the delivery object, thereby improving the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party. Further, by combining the coordinate distance and the coordinate angle to complete the sorting of each coordinate point, the accuracy of the sorting of the coordinate point is improved, and the accuracy of the distribution point in collecting the delivery object is improved. Further, according to the collection data, the collection area of the transaction party that the distribution point can collect is determined, and the accuracy of the distribution point in collecting the delivery object, the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party are improved.
[0104] based on Figure 1 The system architecture shown below will be combined with Fig. 9 , the collection area determination device provided in the embodiment of this specification is introduced in detail. It should be noted that, Fig. 9 The collection area determination device in the embodiment of the present specification is used to execute Figures 2 to 8 For the convenience of explanation, only the part related to the embodiment of this specification is shown. For the specific technical details not disclosed, please refer to the embodiment of this specification. Figures 2 to 8 The embodiment shown.
[0105] See also Fig. 9 , is a schematic diagram of the structure of a device for determining a collection area according to an embodiment of this specification. Fig. 9 As shown, the collection area determination device 1 of the embodiment of this specification may include: a data acquisition unit 11, a set acquisition unit 12 and an area determination unit 13.
[0106] The data acquisition unit 11 is used to acquire the collection data of at least one delivery point, wherein the collection data includes the transaction parties whose transaction objects have been collected by each delivery point in the transaction area;
[0107] A set acquisition unit 12 is used to traverse the collected data to obtain geographic data corresponding to each of the transaction parties, and determine a coordinate data set corresponding to the geographic data;
[0108] The area determination unit 13 is used to generate a collection area corresponding to the coordinate data set by using a convex hull algorithm.
[0109] Optionally, the set acquisition unit 12 is further used for:
[0110] Traversing the collection data, obtaining the longitude and latitude data corresponding to each of the transaction parties in the collection data;
[0111] Each of the latitude and longitude data is mapped in a pre-constructed coordinate system to determine a coordinate data set corresponding to each of the geographic data.
[0112] Optionally, the area determination unit 13 is further configured to:
[0113] determining a reference point in the coordinate data set;
[0114] Determine a first arrangement order corresponding to each coordinate point based on the reference point, wherein the coordinate point is other coordinate data in the coordinate data set except the reference point;
[0115] Based on the first arrangement order, each of the coordinate points is screened to obtain regional vertices, and each of the regional vertices is sequentially connected to generate a collection area corresponding to the coordinate data set.
[0116] Optionally, the area determination unit 13 is further configured to:
[0117] Selecting a first coordinate with the smallest ordinate in the coordinate data set, and determining the first coordinate as a reference point;
[0118] If the coordinate data set includes a plurality of first coordinates with the same vertical coordinate and the smallest vertical coordinate, the second coordinate with the smallest horizontal coordinate among the first coordinates is selected as the reference point in the coordinate data set.
[0119] Optionally, the area determination unit 13 is further configured to:
[0120] Connecting the reference point with each of the coordinate points respectively to obtain the coordinate angle of each of the coordinate points;
[0121] Arrange the coordinate points in ascending order based on the coordinate angles to obtain a first arrangement order corresponding to the coordinate points.
[0122] Optionally, the area determination unit 13 is further configured to:
[0123] Obtaining the coordinate distance between each of the coordinate points and the reference point;
[0124] The same-direction coordinate points are arranged from small to large based on the coordinate distance, and the same-direction coordinate points are coordinate points with the same coordinate angle.
[0125] Optionally, the area determination unit 13 is further configured to:
[0126] Adding the reference point and each of the coordinate points in the first arrangement order to a stack list in sequence;
[0127] Calculate the angle value of each of the coordinate points in sequence using a calculation formula based on the first arrangement order;
[0128] Deleting coordinate points in the stack list whose angle values are greater than the turning angle to obtain the region vertex, where the turning angle is a preset coordinate point turning direction judgment threshold;
[0129] Based on the second arrangement order of the area vertices in the stack list, the area vertices are connected in sequence to generate a collection area corresponding to the coordinate data set.
[0130] In the embodiments of the present specification, by traversing the collection data of the acquired distribution point, the geographic data of each transaction party and the corresponding coordinate data set are obtained, and the convex hull algorithm is used to generate the corresponding collection area according to the coordinate data set, so as to determine the collection area of the transaction party that the distribution point can collect according to the collection data, thereby improving the accuracy of the distribution point in collecting the delivery object, thereby improving the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party. Further, by combining the coordinate distance and the coordinate angle to complete the sorting of each coordinate point, the accuracy of the coordinate point sorting is improved, and the accuracy of the distribution point in collecting the delivery object is improved. Further, according to the collection data, the collection area of the transaction party that the distribution point can collect is determined, the accuracy of the distribution point in collecting the delivery object, the delivery experience of the delivery party and the accuracy of pushing the delivery object to the delivery party are improved.
[0131] The present specification also provides a computer storage medium, which can store a plurality of program instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1-Figure 8 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 1-Figure 8 The specific description of the illustrated embodiment will not be repeated here.
[0132] The embodiment of the present specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1-Figure 8 The method for determining the collection area in the embodiment shown in the figure can be found in the specific implementation process. Figure 1-Figure 8 The specific description of the illustrated embodiment will not be repeated here.
[0133] See also Fig.10, is a schematic diagram of the structure of an electronic device provided in the embodiment of this specification. Fig.10 As shown, the electronic device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, an input / output interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As shown in FIG. Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, an input and output interface module, and a collection area determination application.
[0134] exist Fig.10 In the electronic device 1000 shown, the input-output interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user.
[0135] In one embodiment, the processor 1001 may be used to call a collection area determination application stored in the memory 1005, and specifically perform the following operations:
[0136] Acquire the collection data of at least one delivery point, wherein the collection data includes the transaction parties whose transaction objects have been collected by each delivery point in the transaction area;
[0137] Traversing the collected data to obtain geographic data corresponding to each of the transaction parties, and determining a coordinate data set corresponding to the geographic data;
[0138] A convex hull algorithm is used to generate a collection area corresponding to the coordinate data set.
[0139] Optionally, when the processor 1001 traverses the collected data to obtain geographic data corresponding to the transaction party and determines a coordinate data set corresponding to the geographic data, the processor 1001 specifically performs the following operations:
[0140] Traversing the collection data, obtaining the longitude and latitude data corresponding to each of the transaction parties in the collection data;
[0141] Each of the latitude and longitude data is mapped in a pre-constructed coordinate system to determine a coordinate data set corresponding to each of the geographic data.
[0142] Optionally, when the processor 1001 uses a convex hull algorithm to generate a collection area corresponding to the coordinate data set, the processor 1001 specifically performs the following operations:
[0143] determining a reference point in the coordinate data set;
[0144] Determine a first arrangement order corresponding to each coordinate point based on the reference point, wherein the coordinate point is other coordinate data in the coordinate data set except the reference point;
[0145] Based on the first arrangement order, each of the coordinate points is screened to obtain regional vertices, and each of the regional vertices is sequentially connected to generate a collection area corresponding to the coordinate data set.
[0146] Optionally, when determining the reference point in the coordinate data set, the processor 1001 specifically performs the following operations:
[0147] Selecting a first coordinate with the smallest ordinate in the coordinate data set, and determining the first coordinate as a reference point;
[0148] If the coordinate data set includes a plurality of first coordinates with the same vertical coordinate and the smallest vertical coordinate, the second coordinate with the smallest horizontal coordinate among the first coordinates is selected as the reference point in the coordinate data set.
[0149] Optionally, when determining the first arrangement order corresponding to each coordinate point based on the reference point, the processor 1001 specifically performs the following operations:
[0150] Connecting the reference point with each of the coordinate points respectively to obtain the coordinate angle of each of the coordinate points;
[0151] Arrange the coordinate points in ascending order based on the coordinate angles to obtain a first arrangement order corresponding to the coordinate points.
[0152] Optionally, when the processor 1001 arranges the coordinate points in ascending order based on the coordinate angle, the processor 1001 specifically performs the following operations:
[0153] Obtaining the coordinate distance between each of the coordinate points and the reference point;
[0154] The same-direction coordinate points are arranged from small to large based on the coordinate distance, and the same-direction coordinate points are coordinate points with the same coordinate angle.
[0155] Optionally, when the processor 1001 performs the following operations when filtering the coordinate points based on the first arrangement order to obtain regional vertices and sequentially connecting the regional vertices to generate a collection area corresponding to the coordinate data set:
[0156] Add the reference point and each of the coordinate points in the first arrangement order to the stack list in sequence;
[0157] Calculate the angular values of each of the coordinate points in sequence using a calculation formula based on the first arrangement order;
[0158] Delete the coordinate points in the stack list whose angular values are greater than the turning angle to obtain the region vertices, where the turning angle is a preset coordinate point turning judgment threshold;
[0159] Connect each of the region vertices in sequence based on the second arrangement order of each of the region vertices in the stack list to generate the pick-up region corresponding to the coordinate data set.
[0160] In the embodiments of the present specification, by traversing the pick-up data of the delivery points obtained, the geographical data of each party and the corresponding coordinate data sets are obtained. The convex hull algorithm is used to generate the corresponding pick-up region according to the coordinate data set, so as to determine the pick-up region of the parties that the delivery point can pick up according to the pick-up data, improve the accuracy of the delivery point in picking up the delivery objects, and further improve the delivery experience of the delivery party and the accuracy of pushing the delivery objects to the delivery party. Further, by combining the coordinate distance and the coordinate angle to complete the sorting of each coordinate point, the accuracy of the coordinate point sorting is improved, and the accuracy of the delivery point in picking up the delivery objects is improved. Further, according to the pick-up data, the pick-up region of the parties that the delivery point can pick up is determined, the accuracy of the delivery point in picking up the delivery objects, the delivery experience of the delivery party, and the accuracy of pushing the delivery objects to the delivery party are improved.
[0161] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0162] The above-disclosed are only the preferred embodiments of this specification. Of course, the scope of rights of this specification cannot be limited by this. Therefore, equivalent changes made according to the claims of this specification still fall within the scope covered by this specification.
Claims
1. A method for determining a collection area, characterized in that: The method comprises: Acquire the collection data of at least one delivery point, wherein the collection data includes the transaction parties whose transaction objects have been collected by each delivery point in the transaction area; Traversing the collected data to obtain geographic data corresponding to each of the transaction parties, and determining a coordinate data set corresponding to the geographic data; A convex hull algorithm is used to generate a collection area corresponding to the coordinate data set.
2. The method according to claim 1, characterized in that The traversing the collected data to obtain geographic data corresponding to the transaction party and determining a coordinate data set corresponding to the geographic data includes: Traversing the collection data, obtaining the longitude and latitude data corresponding to each of the transaction parties in the collection data; Each of the latitude and longitude data is mapped in a pre-constructed coordinate system to determine a coordinate data set corresponding to each of the geographic data.
3. The method according to claim 1, characterized in that The step of using a convex hull algorithm to generate a collection area corresponding to the coordinate data set includes: determining a reference point in the coordinate data set; Determine a first arrangement order corresponding to each coordinate point based on the reference point, wherein the coordinate point is other coordinate data in the coordinate data set except the reference point; Based on the first arrangement order, each of the coordinate points is screened to obtain regional vertices, and each of the regional vertices is sequentially connected to generate a collection area corresponding to the coordinate data set.
4. The method according to claim 3, characterized in that Determining the reference point in the coordinate data set includes: Selecting a first coordinate with the smallest ordinate in the coordinate data set, and determining the first coordinate as a reference point; If the coordinate data set includes a plurality of first coordinates with the same vertical coordinate and the smallest vertical coordinate, the second coordinate with the smallest horizontal coordinate among the first coordinates is selected as the reference point in the coordinate data set.
5. The method according to claim 3, characterized in that: The determining the first arrangement order corresponding to each coordinate point based on the reference point includes: Connecting the reference point with each of the coordinate points respectively to obtain the coordinate angle of each of the coordinate points; Arrange the coordinate points in ascending order based on the coordinate angles to obtain a first arrangement order corresponding to the coordinate points.
6. The method according to claim 5, characterized in that Arranging the coordinate points from small to large based on the coordinate angles includes: Obtaining the coordinate distance between each of the coordinate points and the reference point; The same-direction coordinate points are arranged from small to large based on the coordinate distance, and the same-direction coordinate points are coordinate points with the same coordinate angle.
7. The method according to claim 3, characterized in that The step of filtering the coordinate points based on the first arrangement order to obtain regional vertices, and sequentially connecting the regional vertices to generate a collection area corresponding to the coordinate data set includes: Adding the reference point and each of the coordinate points in the first arrangement sequence to a stack list in sequence; Calculate the angle value of each of the coordinate points in sequence using a calculation formula based on the first arrangement order; Deleting coordinate points in the stack list whose angle values are greater than the turning angle to obtain the region vertex, where the turning angle is a preset threshold for determining the turning direction of the coordinate points; Based on the second arrangement order of the area vertices in the stack list, the area vertices are connected in sequence to generate a collection area corresponding to the coordinate data set.
8. A collection area determination device, characterized in that: The device comprises: A data acquisition unit, used to acquire the collection data of at least one delivery point, wherein the collection data includes the transaction parties whose transaction objects have been collected by each of the delivery points in the transaction area; A set acquisition unit, configured to traverse the collected data to obtain geographic data corresponding to each of the transaction parties, and determine a coordinate data set corresponding to the geographic data; The area determination unit is used to generate a collection area corresponding to the coordinate data set by using a convex hull algorithm.
9. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 7.
10. An electronic device, comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method according to any one of claims 1 to 8.