Service circle construction method, device, storage medium and electronic device

By calculating the adjacency relationship between grids and dividing and grouping, the problem that service circle structure in the prior art depends on manual experience is solved, and the automatic construction of a continuous closed service circle is realized, which improves the efficiency and benefits of operation management.

CN114529427BActive Publication Date: 2025-03-21RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210153421.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-18
Publication Date
2025-03-21
Estimated Expiration
2042-02-18

AI Technical Summary

Technical Problem

The prior art relies on manual experience in operation management, making it difficult to automatically construct a continuous closed service circle, and existing geofence generation algorithms fail to effectively consider the limitations of fence continuity.

Method used

By determining the grid of the target area, the adjacency relationship matrix between the grids is calculated, the grid with adjacency relationship is divided into groups, and a geographically continuous and closed service circle is constructed based on the grouping and preset service circle constraints.

Benefits of technology

It realizes the automatic construction of a continuous and closed service circle, improves the efficiency and benefits of operation management, and reduces the time and cost of manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529427B_ABST
    Figure CN114529427B_ABST
Patent Text Reader

Abstract

The present application provides a service circle construction method for constructing a service circle for service units in a target area, including: determining the grids contained in the target space corresponding to the target area; calculating the grid adjacency matrix between the grids according to the geographical relationship or service demand relationship between the grids; dividing the grids with adjacency into a grid group according to the grid adjacency matrix; based on the grid grouping, forming a geographically continuous and closed service circle according to the preset service circle constraint conditions. This solution can ensure that the service circle is a geographically closed and continuous area, which is convenient for managing and coordinating the service units within the service circle, thereby saving time and cost and improving efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a service circle construction method, device, storage medium and electronic device. Background Art

[0002] At present, the operation management of districts, such as the division of operation circles, business circles, and service circles, mainly relies on manual adjustment. The known geo-fence generation algorithm considers the weight balance between fences, but does not consider the limitation of fence continuity, and most steps require manual operation. Summary of the invention

[0003] In view of this, the present application provides a service circle construction method, device, storage medium and electronic device, the main purpose of which is to automatically construct a continuous and closed service circle.

[0004] According to one aspect of the present application, a service circle construction method is provided for constructing a service circle for service units in a target area, the method comprising: determining the grids contained in the target space corresponding to the target area; calculating a grid adjacency relationship matrix between the grids according to the geographical relationship or service demand relationship between the grids; dividing the grids with adjacency relationships into a grid group according to the grid adjacency relationship matrix; based on the grid grouping, constructing a geographically continuous and closed service circle according to preset service circle constraints.

[0005] According to one aspect of the present application, a service circle construction device is provided, which is used to construct a service circle for service units in a target area, and the device includes: a grid determination unit, which is used to determine the grids contained in the target space corresponding to the target area; a matrix calculation unit, which is used to calculate the grid adjacency relationship matrix between the grids according to the geographical relationship or service demand relationship between the grids; a group division unit, which is used to divide the grids with adjacency relationships into a grid group according to the grid adjacency relationship matrix; and a service circle construction unit, which is used to construct a geographically continuous and closed service circle based on the grid grouping and according to preset service circle constraints.

[0006] According to one aspect of the present application, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned service circle construction method when running.

[0007] According to one aspect of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned service circle construction method.

[0008] By means of the above technical scheme, the present application provides a service circle construction method, device, storage medium and electronic device. The present application divides grids with adjacency relationships into a grid group, and then constructs a service circle based on the grid group. Therefore, each grid in each service circle has an adjacency relationship, so that the service circle can be guaranteed to be a geographically closed and continuous area, thereby facilitating the management and coordination of service units within the service circle, saving time and cost, and improving efficiency.

[0009] 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

[0010] 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:

[0011] Figure 1 A flowchart of an example of a service circle construction method provided in an embodiment of the present application is shown;

[0012] Figure 2 A schematic diagram of a construction service circle provided in an embodiment of the present application is shown;

[0013] Figure 3 A flow chart showing an example of a second service circle construction method provided in an embodiment of the present application is shown;

[0014] Figure 4 A grid growth flow chart provided in an embodiment of the present application is shown;

[0015] Figure 5 A schematic diagram of grid growth provided by an embodiment of the present application is shown;

[0016] Figure 6 A multi-round grid growth flow chart provided in an embodiment of the present application is shown;

[0017] Figure 7 A schematic diagram of the structure of a service circle construction device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0019] There are many service units distributed in a city (for example, smart express lockers and smart vending machines). The operating pressure and profitability of each group of smart lockers vary. The physical distance between multiple smart lockers may span tens of kilometers, and multiple operation and maintenance personnel are required to be responsible for different geographical areas. Therefore, it is necessary to reasonably group the smart lockers and divide them into different service circles. Each service circle belongs to the same management company, who manages and operates it. In order to ensure operational efficiency, when constructing service circles, the overall profitability, geographical location, and operating costs of each service circle in a city should be comparable, or the same goal can be achieved by combining service circles.

[0020] In order to realize the service circle division of the service units in the target area, the embodiment of the present application provides a service circle construction method. Through this method, based on the set basic grid and according to the service circle construction geometric calculation method, multiple service circles can be automatically constructed for the target area, so as to realize the reasonable division of the service units, improve the rationality of the division, and improve the efficiency and benefits.

[0021] See also Figure 1 , which is a flowchart of an example of a service circle construction method provided in an embodiment of the present application, including steps S101-S104.

[0022] S101: Determine the grids contained in the target space corresponding to the target area.

[0023] The target area can be understood as a geographical area, for example, a city (municipal or county), or a region of a city, etc. The target space corresponding to the target area refers to the geographical scope of a closed polygon describing the target area, such as the geographical fence of a province, city, or district, or a business district with commercial attributes.

[0024] A grid is the smallest geographical area for generating a service circle, such as a block, an existing operating area, etc. From a geometric perspective, a grid can be considered as a simple polygon with non-intersecting edges and no internal holes. For example, if a park is used as a basic grid unit, the artificial lake inside it is also part of the basic grid unit, rather than being removed by "digging a hole".

[0025] When dividing the target space corresponding to the target area to obtain the service unit service circle, the basic grid needs to be spread over the entire space. If there are missing grids, they can be filled in through geometric topological cutting. For example, when dividing the urban space to obtain the smart cabinet service circle, the basic grid units need to be spread over the area where the smart cabinet service circle is to be set up. If there are missing basic grid units, they can be filled in through geometric topological cutting with the help of geographical range data such as road network or regional division.

[0026] S102: Calculate a grid adjacency relationship matrix between the grids according to the geographical relationship or service demand relationship between the grids.

[0027] For any two grids, they can be strictly adjacent, at a certain distance, or far away. In practice, due to errors in basic data or actual needs, two grids at a certain distance may be required to be merged together. For example, the grid units on both sides of a river are far apart. According to the boundary requirements of operation and management, these two grid units should belong to different service circles. However, the grid units on both sides of an artificial inland river are close to each other. Although these two grid units are non-intersecting in topological relationship, they can be merged into the same service circle.

[0028] In addition, according to service requirements (operational requirements), it may also be required that the grid units on both sides of a main road or viaduct must belong to different service circles.

[0029] In one implementation, the grid adjacency matrix between grids is calculated as follows:

[0030] (1) For the current grid, traverse the geographical relationship or service demand relationship between the current grid and other grids, and determine whether the current grid is adjacent to other grids according to the pre-set geographical relationship conditions and service demand relationship conditions;

[0031] (2) Count the adjacency relationship between every two grids and obtain the grid adjacency relationship matrix between all grids.

[0032] For example, the adjacency matrix forming an arbitrary grid is:

[0033] Is the distance (m) between grid cell A and grid cell B adjacent?

[0034] SZONE001 SZONE002 300TRUE

[0035] SZONE001 SZONE003 50TRUE

[0036] …

[0037] SZONE001 SZONE120 19000FALSE

[0038] SZONE002 SZONE00380TRUE

[0039] SZONE002 SZONE004 80TRUE

[0040] …

[0041] SZONE002 SZONE120 1750 FALSE

[0042] …

[0043] Among them, the grids in the target space are uniformly numbered, and the distances of the remaining grids and the current grid are compared in the order of the numbers to determine whether the two are adjacent. For example, there are 120 grids in total. First, for SZONE001, the distances of SZONE001 and SZONE002, SZONE003...SZONE120 are compared, and whether the two are adjacent is determined based on the distance and the preset geographical relationship conditions (for example, the geographical relationship condition is: the distance within 500 meters is determined to be adjacent). For example, "SZONE001SZONE002 300TRUE" means that the distance between SZONE001 and SZONE002 is 300 meters, and the two are determined to be adjacent. Whether two grids are adjacent can be determined by the service demand relationship in addition to the distance relationship (distance). For example, for grid A and grid B, if the two are on both sides of a main road or an overpass, it is set that the two must belong to different service circles, so the adjacency relationship between the two is "not adjacent".

[0044] S103: According to the grid adjacency matrix, grids with adjacency relationships are divided into a grid group.

[0045] In one implementation, the method of dividing the grid groups includes: taking each grid as a node, determining grids with adjacency relationships as connected nodes according to a grid adjacency matrix to form a connected graph; calculating connected components in the connected graph, and determining each connected component as a grid group.

[0046] According to the grid adjacency matrix, grid cells with adjacency relationships belong to the same group. The grouping process can be solved using connected components in graph theory. In detail, all grid cells are regarded as nodes, and grid cells with adjacency relationships are regarded as connected nodes. Then all grid cells constitute a graph G, and the connected components of graph G are calculated. Each connected component is a group of grid cells. For example, a city is divided into the east bank and the west bank by a river. In the city's graph G, the grid cells on the east bank belong to one connected component, and the grid cells on the west bank belong to another connected component. At this point, the grid cells in the city are divided into two grid groups.

[0047] S104: Based on the grid grouping, a geographically continuous and closed service circle is formed according to preset service circle constraints.

[0048] Among them, the service circle constraint conditions may be: the total order quantity of all grids in the service circle is lower than the maximum order threshold; the number of service units of all grids in the service circle is lower than the maximum unit number threshold, the total number of buildings of all grids in the service circle is lower than the maximum building number threshold, and / or the total area of ​​all grids in the service circle is lower than the maximum area threshold.

[0049] See also Figure 2 , which is a schematic diagram of a service circle constructed for a target area. Each service circle is a closed and continuous area, and the service circles can be continuous or separated. Figure 2 Only three service circles, service circle 1, service circle 2, and service circle 3, are schematically shown. It is assumed that service circles 1, 2, and service circle 3 are separated by a river, and service circle 1 and service circle 2 are separated by a highway. Service circle 1 is composed of only one grid A; service circle 2 is composed of grid B, grid C, and grid D, and each grid is continuous; service circle 3 is composed of grid E, grid F, grid G, grid H, grid I, grid J, grid K, and grid L. The grids can be continuous or spaced in geographical location, but in the overall service circle, a closed and continuous service circle can be formed by morphological image processing (such as expansion and then corrosion). No matter how many grids are contained in a service circle, the service circle constraint conditions must be met, that is, the total order volume, service unit quantity, total building quantity, or total area of ​​all grids in the service circle must be within a certain range, so as to limit the scope of the service circle and avoid forming a service circle with too large a scope or too high service pressure. It can be understood that more or less service circles may be divided in actual scenarios. Moreover, the shape and range of each grid may be different. The figure only illustrates grids of the same shape for the sake of simplicity.

[0050] In the embodiment of the present application, since the grids with adjacency relationships are divided into a grid group, and then the service circle is constructed based on the grid group, the grids in each service circle have an adjacency relationship, so it can be ensured that the service circle is a geographically closed and continuous area, thereby facilitating the management and coordination of the service units within the service circle, saving time and cost, and improving efficiency.

[0051] See also Figure 3 , shows a flow chart of a second example of a service circle construction method provided in an embodiment of the present application. The example includes the following steps S301-S307.

[0052] S301: Setting service circle division targets.

[0053] According to the operational requirements of service units (e.g. smart cabinets), we hope that the coverage area, order volume, number of smart cabinets and maintenance costs of the service circle in each operating area (e.g. a city) are balanced. For example, the total order volume in each service circle should not exceed xx orders, the total number of smart cabinets should not exceed yy orders, the service radius of the service circle in the urban area should not exceed a kilometers, and the service radius in the suburbs should not exceed b kilometers, etc.

[0054] After setting the service circle division target, starting from the seed grid, it continues to grow to the surrounding areas, merges neighbor grids, forms a service circle, and assists with the indicator constraints of each service circle, so that the generated service circle can be more balanced in the entire target operation area.

[0055] S302: Establish a grid.

[0056] The basic spatial unit is a geographical scope described by a closed polygon, such as a regional geographic fence of a province, city, district, a business district with service attributes, or a street block, or a residential area, etc. In terms of geometry, the basic grid unit is a simple polygon with non-intersecting sides and no internal holes. For example, if a park is used as a basic grid unit, the artificial lake inside it is also part of the basic grid unit, rather than being removed by "digging a hole".

[0057] When dividing the urban space to obtain the smart cabinet service circle, the basic grid units need to be spread over the area where the smart cabinet service circle is to be set up. If there are missing basic grid units, they can be filled by geometric topological cutting with the help of geographic range data such as road network or regional division.

[0058] S303: Calculate the grid adjacency matrix.

[0059] As described above, any two grid cells can be strictly adjacent, or they can be at a certain distance from each other, or they can be far away from each other. In practice, due to errors or requirements in the basic data, it may be required that two grids at a certain distance can be merged together. For example, the grid cells on both sides of a large river are far apart. According to the boundary requirements of operation and management, these two grid cells should belong to different service circles, so the adjacency relationship is "non-adjacent". The grid cells on both sides of an artificial inland river are close to each other. Although these two grid cells are non-intersecting in topological relationship, they can be merged into the same service circle, so the adjacency relationship is "adjacent". In addition, according to service requirements, it may also be required that the grid cells on both sides of a main road or viaduct must belong to different service circles, so the adjacency relationship between the two grids is "non-adjacent".

[0060] S304: Grid grouping.

[0061] After obtaining the neighbor relationship matrix of all grid cells, all grid cells with adjacency relationship belong to the same group. The grouping process can be solved using connected components in graph theory. In detail, all grid cells are regarded as nodes, and grid cells with adjacency relationship are regarded as connected nodes. Then all grid cells constitute graph G, and the connected components of graph G are calculated. Each connected component is a group of grid cells.

[0062] For example, a city is divided into the east bank and the west bank by a river. In the city's graph G, the grid cells on the east bank belong to one connected component, and the grid cells on the west bank belong to another connected component. At this point, the city's grid cells are divided into two grid groups.

[0063] S305: Forming several service circles based on the grid grouping.

[0064] In each grid group, a service circle is generated according to the service circle division target. Specifically, it can be divided into the following three cases: when there is only one grid unit in the group, the service circle is directly generated; when there are multiple grid units in the group, if the total order quantity or total area of ​​these grid units is lower than a certain threshold, they can be directly merged to form a service circle; when there are multiple grid units in the group, and the total quantity and total smart cabinet data are high, the grid growth algorithm is used to construct the service circle.

[0065] Therefore, in one implementation, the service circle construction based on the grid grouping is implemented through the following steps: (1) determining the number of grids in the grid grouping; (2) if the grid grouping includes only a single grid, generating a service circle with the single grid; if the grid grouping includes multiple grids and meets the preset service circle constraint conditions, merging the multiple grids to form a service circle; if the grid grouping includes multiple grids and does not meet the preset service circle constraint conditions, determining at least two seed grids from the multiple grids, and generating grids outwards with each seed grid as the center to form at least two service circles that meet the service circle constraint conditions.

[0066] S306: Does the service circle satisfy the constraint condition? If so, execute S307; otherwise, return to execute S305.

[0067] If the constructed service circle does not meet the constraint condition, the process returns to S305 to continue constructing the service circle until each service circle meets the constraint condition and the service circle division target of the target area is met as a whole, and the service circle construction is completed.

[0068] S307: Complete the service circle construction.

[0069] When generating a service circle by merging grids, all grids are merged based on service relationships or are very close in distance. From the perspective of computational geometry, the synthesized service circle is guaranteed to be a continuous and closed geographical range.

[0070] The following is a further description of the grid growth algorithm based on the seed grid.

[0071] The grid growth algorithm uses the grid with higher grid priority as the seed grid, and the seed grid simultaneously expands to the surrounding areas and merges neighboring grids to generate a service circle. At each step of grid growth, the algorithm will perform constraint checks, such as when the area / service radius / total order quantity / smart cabinet data or other constraints of the service circle have been met, the service circle growth will be stopped.

[0072] See also Figure 4 , which is a grid growth flow chart provided in an embodiment of the present application, includes steps S401-S410.

[0073] S401: Determine at least two seed grids in a grid group.

[0074] Specifically, the weight of each grid is determined, and the seed grid is selected according to the weight of each grid. The grid weight is determined according to at least one seed selection dimension, and the seed selection dimension includes: the number of historical orders in the grid, the number of predicted orders in the grid, the number of existing service units in the grid, the number of potential service units in the grid, the number of buildings in the grid, and / or the area of ​​the grid. For example, the grid with the peak value of the local dimension in the grid group (for example, the grid with the largest order volume) can be selected as the seed grid, or the seed grid can be selected after multi-dimensional analysis and comparison.

[0075] S402: Determine the seed growth order of each seed grid, and expand and merge candidate grids around the seed grid according to the seed growth order.

[0076] Specifically, according to the seed growth order, a candidate grid is grown with each seed grid as the center in turn, completing one grid growth; the next grid growth is performed until the service circle constraint condition is met, and then the grid growth is stopped.

[0077] For example, within a grid group, the growth order of three seed grids is determined to be A0, B0, and C0. Then, in the first grid growth, a candidate grid A1 is grown with A0 as the center, then a candidate grid B1 is grown with B0 as the center, and finally, a candidate grid C1 is grown with C0 as the center. In the second grid growth, a candidate grid A2 is grown with A0 or A1 as the center, then a candidate grid B2 is grown with B0 or ​​B1 as the center, and finally, a candidate grid C2 is grown with C0 or C1 as the center. The grid growth of each seed grid is performed in sequence until the service circle constraint condition is met.

[0078] The following specifically introduces the process of forming a service circle with a seed grid as the center. The process of grid growth includes: taking the seed grid as the starting point of the initial service circle, gradually expanding and merging candidate grids that meet the growth conditions; merging the candidate grids that meet the growth conditions into the initial service circle to complete the service circle construction of the seed grid. Among them, gradually expanding and merging candidate grids that meet the growth conditions include: taking any grid of the current service circle as the current grid, selecting a grid that has an adjacency relationship with any grid of the current service circle (for example, it can be determined according to the grid adjacency relationship matrix) as a candidate grid; from the candidate grids, select the grid with the highest growth priority for this growth. Among them, the growth priority can be determined according to the distance or service relationship. For example, the grid closest to the current grid has the highest growth priority, or the grid with the closest service relationship with the current grid has the highest growth priority. Among them, using distance as the growth priority can avoid the formation of a long service circle.

[0079] See also Figure 5 , which is a schematic diagram of grid growth. Assuming that grid A is used as a seed grid, the grid growth process of the seed grid is as follows. First, the first growth process is performed, and grid A constitutes the initial service circle, and grid A is used as the starting point for expansion: candidate grids of grid A are selected, for example, the candidate grids of grid A include grids B, C, D, and E. According to the grid adjacency matrix, it is determined whether grids B, C, D, and E have an adjacency relationship with grid A. For example, if they have an adjacency relationship, the candidate grid with the highest growth priority is selected according to the growth priority and merged into the initial service circle. For example, candidate grid B is selected to obtain the current service circle including grid A and grid B. Then the second growth process is performed, and the grid of the current service circle is used as the center for expansion until the service circle is formed. For example, grid A and grid B are continued to be expanded, and candidate grids F and G of grid A and grid B are selected. For example, it is determined by judging that grids F and G have an adjacency relationship with grid A and grid B, and the candidate grid for this time is selected according to the growth priority. For example, grid G ​​is selected, and grid G ​​is merged into the service circle. By analogy, the service circle construction of the grid growth starting from the seed grid A is completed.

[0080] In the embodiment of the present application, the seed grid is used as the initial service circle, and N seed grids form N service circles. For the initial service circle formed with the seed grid as the starting point, the surrounding available candidate grids are merged. When the grid to be merged has been merged by other service circles, it is considered that the merger has failed; when the grid to be merged and any grid in the service circle do not have an adjacent relationship, it is considered that the merger has failed.

[0081] When merging, if the candidate grid and the already formed service circle are separated, the candidate grid and the service circle can be temporarily expanded outward by a set distance d so that the candidate grid and the service circle overlap, and then the two are merged to get the intersection, and then the same distance d is shrunk to get a new service circle. When merging, if the candidate grid and the already formed service circle are connected or overlapped, then the two are directly merged to get the intersection to get a new service circle.

[0082] Therefore, the above-mentioned grid growth process may also include the following steps: (1) determining whether the candidate grid is separated from the current service circle; (2) if so, setting the candidate grid and the current service circle to expand outward by a predetermined distance so that the candidate grid overlaps with the current service circle; after shrinking the predetermined distance, merging the candidate grid and the current service circle; (3) if not, merging the candidate grid and the current service circle.

[0083] In addition, the grid growth process also includes: counting the number of failures in the current service circle for grid growth, and if the number of failures reaches the failure threshold, the grid growth process of the current service circle is stopped. For example, when a service circle fails to merge more than 4 times during the growth process, it is considered that the service circle growth meets the formation threshold, and the growth is terminated to complete the construction process of the service circle. Limiting the number of grid merging failures can avoid the formation of long strip-shaped service circles, thereby avoiding the formation of narrow and long areas that are not conducive to operation and management.

[0084] S403: Determine whether the currently obtained service circle has been formed. If so, execute S404; otherwise, return to S402 to continue expanding and merging candidate grids.

[0085] The service circle formation control can be performed by limiting the service circle weight, so as to control the service circle to meet the service circle constraint conditions; wherein the service circle weight is determined according to the weights of each grid constituting the service circle.

[0086] For example, the formation of the service circle can be controlled by limiting the service circle weight threshold. After a service circle merges with the grid K, if the total order volume, the total number of smart cabinets, or the number of buildings included exceeds the threshold, the service circle growth is considered to meet the formation threshold, the merging of the grid K is abandoned, the service circle growth is terminated, and the construction process of the service circle is completed.

[0087] S404: Complete grid growth and obtain at least two service circles.

[0088] It can be seen that in the embodiment of the present application, for the service circle construction process based on grid growth, the seed grid is used as the center point, and the distance from the seed grid or the service relationship is used as an indicator. The adjacent grids are merged one by one from near to far, in a form similar to spiral winding, to ensure that the length and width of the generated service circle are equivalent, avoiding a long and narrow shape.

[0089] After completing a round of grid growth, if there are still unused grids in the grid group, continue to screen seed grids and continue one or more rounds of service circle growth algorithm until all grids in the grid group are included in the service circle.

[0090] See also Figure 6 , shows a flowchart of performing multiple rounds of grid growth for a grid group provided by an embodiment of the present application, including S601-S607.

[0091] S601: Screening a seed grid.

[0092] S602: Construct a service circle based on grid growth.

[0093] S603: Are there any unmerged grids? If yes, execute S604; otherwise, execute S607.

[0094] S604: The grid growth round is increased by 1.

[0095] S605: Determine whether the grid growth round exceeds the growth round threshold, if so, execute S606, otherwise return to execute S601.

[0096] By limiting the number of growth rounds, you can avoid infinite grid growth and thus avoid excessive computational pressure. For example, if you set the growth round threshold to 3, you can only grow 3 rounds of grids at most.

[0097] S606: Merge the unused grids into the service circle according to the adjacency relationship.

[0098] For the grids that have not been used after each round of grid growth, the adjacent grids are merged into service circles according to the grid adjacency relationship.

[0099] S607: All service circles are formed.

[0100] In the process of performing multiple rounds of grid growth, the selection strategy of the seed grid in each round can be set to be different. Therefore, when performing multiple rounds of grid growth for a grid group, the following steps can also be included: determining the seed grid in each round with different seed selection dimensions, and performing multiple rounds of grid growth for each seed grid determined with different seed selection dimensions.

[0101] Specifically, the seed grids of each round are determined by different seed selection dimensions, and the process of grid growth of each seed grid determined by different seed selection dimensions can be: at least one first seed grid is selected by the first seed selection dimension, and the first round of grid growth is performed on each first seed grid; in the remaining grids of the grid group, at least one second seed grid is selected by the second seed selection dimension, and the second round of grid growth is performed on each second seed grid, and all rounds of grid growth in the grid group are completed in sequence. For example, in the first round of seed grid screening, the grids with a total order volume greater than xx orders are taken as seed grids; in the second round of grid growth, in the remaining grids, the grids with a number of smart cabinets greater than 0 and a single volume not less than yy orders are selected as seed grids; in the third round of grid growth, in the remaining grids, the grids with an order volume greater than 0 are selected as seed grids.

[0102] After all service circles are constructed for a grid group, the service circles can also be evaluated. The generated service circles can be evaluated using metrics such as the total number of service circles, the average area of ​​the service circles, the average service radius, the average number of covered smart cabinets, the average number of covered buildings, etc. When the metrics do not meet the requirements, the grid growth process can be repeated, such as selecting different seed grids, and the polling order of the service circle grid merging can be adjusted to generate a new service circle.

[0103] It can be seen that the service circle construction method provided in the embodiment of the present application groups the basic grid units that form the service circle through geometric adjacent judgment or service relationship requirements; within each grid group, the group is directly constructed into a service circle according to the number of grids contained, or the service circle is constructed through seed grid growth; wherein, the adjacent grids are merged in sequence with the seed grid as the center and the distance or service relationship as the priority, to ensure that the constructed service circle is spirally wound without gaps, avoiding the formation of elongated areas and discontinuous areas. In addition, for multiple rounds of grid growth processes, different dimensions can be set to determine seed grids of different standards, and the polling order of service circle grid merging can be adjusted to obtain a service circle with better evaluation.

[0104] See also Figure 7 , showing a schematic diagram of the structure of a service circle construction device provided in an embodiment of the present application. The service circle construction device is used to construct a service circle for a service unit in a target area, and the device includes:

[0105] A grid determination unit 701 is used to determine the grids contained in the target space corresponding to the target area;

[0106] The matrix calculation unit 702 is used to calculate the grid adjacency relationship matrix between the grids according to the geographical relationship or service demand relationship between the grids;

[0107] A grouping unit 703 is used to group the grids with adjacency relationships into a grid group according to the grid adjacency matrix;

[0108] The service circle construction unit 704 is used to construct a geographically continuous and closed service circle based on the grid grouping and according to preset service circle constraints.

[0109] In one implementation, the matrix calculation unit 702 is used to, for the current grid, traverse the geographical relationship or service demand relationship between the current grid and other grids, and determine whether the current grid and other grids are adjacent based on pre-set geographical relationship conditions and service demand relationship conditions; and, count the adjacency relationship between every two grids to obtain a grid adjacency relationship matrix between all grids.

[0110] In one implementation, the grouping unit 703 is used to take each grid as a node, determine the grids with adjacency relationships as connected nodes according to the grid adjacency matrix, and form a connected graph; calculate the connected components in the connected graph, and determine each connected component as a grid group.

[0111] In one implementation, the service circle constraint conditions include: the total order quantity of all grids in the service circle is lower than the maximum order threshold, the number of service units of all grids in the service circle is lower than the maximum unit number threshold, the total number of buildings of all grids in the service circle is lower than the maximum building number threshold, and / or the total area of ​​all grids in the service circle is lower than the maximum area threshold.

[0112] In one implementation, the service circle construction unit 704 is used to construct a service circle based on the number of grids in the grid group and the service circle constraint condition, and the service circle construction unit 704 includes:

[0113] The group construction subunit 7041 generates a service circle with the single grid if the grid group includes only one grid; if the grid group includes multiple grids and the preset service circle constraint condition is met, the multiple grids are merged to form the service circle;

[0114] The grid growth subunit 7042 determines at least two seed grids from the multiple grids if the grid group includes multiple grids and does not satisfy the preset service circle constraint condition, and generates grids outward with each seed grid as the center to form at least two service circles that satisfy the service circle constraint condition.

[0115] In one implementation, the grid growth subunit 7042 is used to use the seed grid as the starting point of the initial service circle, gradually expand and merge candidate grids that meet the growth conditions; merge the candidate grids that meet the growth conditions into the initial service circle, complete the round of grid growth, and obtain the service circle.

[0116] In one implementation, the grid growth subunit 7042 is further used to: take any grid in the current service circle as the current grid, determine grids that have an adjacency relationship with any grid in the current service circle as candidate grids; and select the grid with the highest growth priority from the candidate grids for this growth.

[0117] In one implementation, the grid growth subunit 7042 is also used to determine whether the candidate grid is separated from the current service circle; if so, set the candidate grid and the current service circle to expand outward by a predetermined distance so that the candidate grid overlaps with the current service circle; after shrinking the predetermined distance, merge the candidate grid and the current service circle; if not, merge the candidate grid and the current service circle.

[0118] In one implementation, the grid growth subunit 7042 is further used to control the formation of the service circle by limiting the weight of the current service circle, so as to control the service circle to meet the service circle constraint condition; wherein the service circle weight is determined according to the weights of each grid constituting the service circle.

[0119] In one implementation, the grid growth subunit 7042 is further used to count the number of failures in the grid growth of the current service circle, and if the number of failures reaches a failure threshold, stop the grid growth process of the current service circle.

[0120] In one implementation, the grid growth subunit 7042 is also used to determine the seed growth order of the seed grid; according to the seed growth order, a candidate grid is grown with each seed grid as the center in turn to complete one grid growth; the next grid growth is performed until the service circle constraint condition is met, and then the grid growth is stopped.

[0121] In one implementation, the grid growth subunit 7042 is also used to determine the weight of each grid, and determine the seed grid according to the weight of each grid; wherein the grid weight is determined based on at least one seed selection dimension, and the seed selection dimension includes: the number of historical orders in the grid, the number of predicted orders in the grid, the number of existing service units in the grid, the number of potential service units in the grid, the number of buildings in the grid, and / or the area of ​​the grid.

[0122] In one implementation, the grid growing subunit 7042 is further used to determine the seed grid of each round with different seed selection dimensions, and perform grid growth on each seed grid determined with different seed selection dimensions.

[0123] In one implementation, the grid growth subunit 7042 is further used to select at least one first seed grid with a first seed selection dimension, perform grid growth on each first seed grid in turn, and complete a first round of grid growth; select at least one second seed grid with a second seed selection dimension from the remaining grids of the grid group, perform grid growth on each second seed grid in turn, and complete a second round of grid growth; complete the next round of grid growth in turn until the service circle constraint is met or the growth round threshold is reached, then stop grid growth.

[0124] In one implementation, the grid growth subunit 7042 is further used to determine whether there are grids in the grid group that are not assigned to the service circle, and if so, merge adjacent grids into a new service circle according to the grid adjacency matrix.

[0125] In one implementation, the device further includes:

[0126] The target setting and evaluation unit 705 is used to set the service circle division target of the target area, and control the service circle construction unit to perform service circle division according to the service circle division target, so that the service circle division in the target area meets the division target, wherein the division target includes the coverage area, order volume, and service radius of the service circle in the target area.

[0127] An embodiment of the present application further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0128] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0129] (1) Determine the grid contained in the target space corresponding to the target area;

[0130] (2) Calculate the grid adjacency matrix between the grids based on the geographical relationship or service demand relationship between the grids;

[0131] (3) According to the grid adjacency matrix, the grids with adjacency relationships are divided into a grid group;

[0132] (4) Based on grid grouping and according to the preset service circle constraints, a geographically continuous and closed service circle is formed.

[0133] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0134] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0135] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0136] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0137] (1) Determine the grid contained in the target space corresponding to the target area;

[0138] (2) Calculate the grid adjacency matrix between the grids based on the geographical relationship or service demand relationship between the grids;

[0139] (3) According to the grid adjacency matrix, the grids with adjacency relationships are divided into a grid group;

[0140] (4) Based on grid grouping and according to the preset service circle constraints, a geographically continuous and closed service circle is formed.

[0141] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0142] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0143] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0144] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0148] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A service circle construction method, characterized in that: The method for constructing a service circle for a service unit in a target area includes: Determine the grids contained in the target space corresponding to the target area; Calculate the grid adjacency matrix between the grids according to the geographical relationship or service demand relationship between the grids; According to the grid adjacency matrix, the grids having adjacency relationships are divided into a grid group; Based on the grid grouping, a geographically continuous and closed service circle is formed according to preset service circle constraints; The method further comprises: Obtaining a preset service circle division target for the target area; Performing service circle division according to the service circle division target, so that the service circle division within the target area meets the division target; The grid-based grouping, according to preset service circle constraints, forms a geographically continuous and closed service circle, including: Determining the number of grids in the grid group; If the grid group includes only one grid, a service circle is generated with the single grid; If the grid group includes multiple grids and meets the preset service circle constraint condition, the multiple grids are merged to form the service circle; If the grid group includes multiple grids and does not meet the preset service circle constraint condition, at least two seed grids are determined from the multiple grids, and grid generation is performed outward with each seed grid as the center to form at least two service circles that meet the service circle constraint condition.

2. The method according to claim 1, characterized in that The step of calculating the grid adjacency matrix between the grids according to the geographical relationship or service demand relationship between the grids includes: For the current grid, traverse the geographical relationship or service demand relationship between the current grid and other grids, and determine whether the current grid is adjacent to other grids according to the pre-set geographical relationship conditions and service demand relationship conditions; The adjacency relationship between every two grids is counted to obtain the grid adjacency relationship matrix between all grids.

3. The method according to claim 1, characterized in that The step of dividing each grid having an adjacency relationship into a grid group according to the grid adjacency relationship matrix comprises: Taking each grid as a node, according to the grid adjacency matrix, determining the grids with adjacency relationship as connected nodes to form a connected graph; The connected components in the connected graph are calculated, and each connected component is determined to be a grid group.

4. The method according to claim 1, characterized in that: The service circle constraints include: The total order volume of all grids in the service circle is lower than the maximum order threshold, the number of service units of all grids in the service circle is lower than the maximum unit number threshold, the total number of buildings of all grids in the service circle is lower than the maximum building number threshold, and / or the total area of ​​all grids in the service circle is lower than the maximum area threshold.

5. The method according to claim 1, characterized in that The step of generating meshes outwards from each seed mesh as a center includes: Taking any of the seed grids as the starting point of the initial service circle, gradually expanding and merging candidate grids that meet the growth conditions; The candidate grids meeting the growth conditions are merged into the initial service circle to complete the grid growth and obtain the service circle.

6. The method according to claim 5, characterized in that The step of gradually expanding and merging candidate grids that meet the growth conditions includes: Taking any grid in the current service circle as the current grid, selecting grids that have an adjacency relationship with any grid in the current service circle as candidate grids; From the candidate grids, a grid with the highest growth priority is selected for this growth.

7. The method according to claim 6, characterized in that The grid growth process also includes: Determine whether the candidate grid is separated from the current service circle; If yes, setting the candidate grid and the current service circle to expand outward by a predetermined distance so that the candidate grid overlaps with the current service circle; after shrinking the predetermined distance, merging the candidate grid and the current service circle; If not, merge the candidate grid and the current service circle.

8. The method according to claim 6, characterized in that The grid growth process also includes: The service circle is controlled to be formed by limiting the service circle weight, so as to control the service circle to meet the service circle constraint condition; wherein the service circle weight is determined according to the weights of the grids constituting the service circle.

9. The method according to claim 6, characterized in that The grid growth process also includes: The number of failures in the grid growth of the current service circle is counted. If the number of failures reaches the failure threshold, the grid growth process of the current service circle is stopped.

10. The method according to claim 1, characterized in that In the process of generating grids outwards with each seed grid as the center, the process further includes: Determine the seed growth order of the seed grid; According to the seed growth order, a candidate grid is grown with each seed grid as the center, and a grid growth is completed; The next grid growth is performed until the service circle constraint is met, and then the grid growth is stopped.

11. The method according to claim 1, characterized in that The determining of at least one seed grid comprises: Determine the weight of each grid, and determine the seed grid according to the weight of each grid; Wherein, the grid weight is determined based on at least one seed selection dimension, and the seed selection dimension includes: the number of historical orders in the grid, the number of predicted orders in the grid, the number of existing service units in the grid, the number of potential service units in the grid, the number of buildings in the grid, and / or the area of ​​the grid.

12. The method according to claim 11, characterized in that Also includes: The seed grid of each round is determined by different seed selection dimensions, and multiple rounds of grid growth are performed on each seed grid determined by different seed selection dimensions.

13. The method according to claim 12, characterized in that The step of determining the seed grid of each round by using different seed selection dimensions and performing multiple rounds of grid growth on each seed grid determined by using different seed selection dimensions includes: At least one first seed grid is selected according to the first seed selection dimension, and grid growth is performed on each first seed grid in turn to complete a first round of grid growth; Among the remaining grids of the grid group, at least one second seed grid is selected according to the second seed selection dimension, and grid growth is performed on each second seed grid in turn to complete a second round of grid growth; The next round of grid growth is completed in sequence until the service circle constraint is met or the growth round threshold is reached, then grid growth is stopped.

14. The method according to claim 1, characterized in that After mesh growing, it also includes: It is determined whether there are any grids in the grid group that are not assigned to the service circle. If so, the adjacent grids are merged into a new service circle according to the grid adjacency matrix.

15. The method according to any one of claims 1 to 14, characterized in that: The division target includes the coverage area, order volume or service radius of the service circle in the target area.

16. A service circle construction device, characterized in that: The device is used to construct a service circle for service units in a target area, and comprises: A grid determination unit, used to determine the grid contained in the target space corresponding to the target area; A matrix calculation unit, used for calculating a grid adjacency relationship matrix between grids according to a geographical relationship or a service demand relationship between grids; A grouping unit, used for dividing the grids with adjacency relationship into a grid group according to the grid adjacency relationship matrix; A service circle construction unit, configured to construct a geographically continuous and closed service circle based on the grid grouping and according to preset service circle constraints; The device also includes: a target setting and evaluation unit, configured to set a target for dividing a service circle of the target area, and to control the service circle construction unit to divide the service circle according to the service circle division target, so that the service circle division in the target area meets the division target; The service circle construction unit is used to construct a service circle based on the number of grids in the grid group and the service circle constraint condition, and the service circle construction unit includes: A grouping construction subunit, if the grid group includes only a single grid, generates a service circle with the single grid; if the grid group includes multiple grids and meets the preset service circle constraint condition, merges the multiple grids to form the service circle; The grid growth subunit determines at least two seed grids from the multiple grids if the grid group includes multiple grids and does not satisfy the preset service circle constraint condition, and generates grids outward with each seed grid as the center to form at least two service circles that satisfy the service circle constraint condition.

17. The device according to claim 16, characterized in that The matrix calculation unit is used to traverse the geographical relationship or service demand relationship between the current grid and other grids for the current grid, and determine whether the current grid is adjacent to other grids according to the preset geographical relationship conditions and service demand relationship conditions; And, the adjacency relationship between every two grids is counted to obtain the grid adjacency relationship matrix between all grids.

18. The device according to claim 16, characterized in that The grouping unit is used to take each grid as a node, determine the grids with adjacency relationship as connected nodes according to the grid adjacency relationship matrix, and form a connected graph; calculate the connected components in the connected graph, and determine each connected component as a grid group.

19. The device according to claim 16, characterized in that The service circle constraint conditions include: the total order quantity of all grids in the service circle is lower than the maximum order threshold, the number of service units of all grids in the service circle is lower than the maximum unit number threshold, the total number of buildings of all grids in the service circle is lower than the maximum building number threshold, and / or the total area of ​​all grids in the service circle is lower than the maximum area threshold.

20. The device according to claim 16, characterized in that The grid growth subunit is used to use the seed grid as the starting point of the initial service circle, gradually expand and merge candidate grids that meet the growth conditions; merge the candidate grids that meet the growth conditions into the initial service circle, complete the grid growth, and obtain the service circle.

21. The device according to claim 20, characterized in that The grid growth subunit is further used to: take any grid in the current service circle as the current grid, and select a grid having an adjacent relationship with any grid in the current service circle as a candidate grid; From the candidate grids, a grid with the highest growth priority is selected for this growth.

22. The device according to claim 21, characterized in that The grid growth subunit is further used to determine whether the candidate grid is separated from the current service circle; if so, set the candidate grid and the current service circle to expand outward by a predetermined distance so that the candidate grid overlaps with the current service circle; After shrinking the predetermined distance, merge the candidate grid with the current service circle; if not, merge the candidate grid with the current service circle.

23. The device according to claim 21, characterized in that The grid growth subunit is further used to control the formation of the service circle by limiting the service circle weight, so as to control the service circle to meet the service circle constraint condition; wherein the service circle weight is determined according to the weights of each grid constituting the service circle.

24. The device according to claim 21, characterized in that The grid growth subunit is further used to count the number of failures in the grid growth of the current service circle, and if the number of failures reaches a failure number threshold, stop the grid growth process of the current service circle.

25. The device according to claim 16, characterized in that The grid growth subunit is also used to determine the seed growth order of the seed grids; according to the seed growth order, a candidate grid is grown with each seed grid as the center in turn to complete a grid growth; the next grid growth is performed until the service circle constraint condition is met, and then the grid growth is stopped.

26. The device according to claim 16, characterized in that The grid growth subunit is also used to determine the weight of each grid and determine the seed grid according to the weight of each grid; wherein the grid weight is determined based on at least one seed selection dimension, and the seed selection dimension includes: the number of historical orders in the grid, the number of predicted orders in the grid, the number of existing service units in the grid, the number of potential service units in the grid, the number of buildings in the grid, and / or the area of ​​the grid.

27. The device according to claim 26, characterized in that The grid growth subunit is further used to determine the seed grid of each round with different seed selection dimensions, and to perform multiple rounds of grid growth on each seed grid determined with different seed selection dimensions.

28. The device according to claim 27, characterized in that The grid growth subunit is further used to select at least one first seed grid with the first seed selection dimension, perform grid growth on each first seed grid in turn, and complete a first round of grid growth; select at least one second seed grid with the second seed selection dimension from the remaining grids of the grid group, perform grid growth on each second seed grid in turn, and complete a second round of grid growth; and complete the next round of grid growth in turn until the service circle constraint condition is met or the growth round threshold is reached, and then the grid growth is stopped.

29. The device according to claim 16, characterized in that The grid growth subunit is further used to determine whether there are grids in the grid group that are not assigned to the service circle, and if so, merge adjacent grids into a new service circle according to the grid adjacency matrix.

30. The device according to any one of claims 16 to 29, characterized in that The division target includes the coverage area, order volume or service radius of the service circle in the target area.

31. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 15 when executed.

32. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Business district division method, device and electronic equipment

    CN109102334A