Map area merging method, device, electronic device and storage medium
By expanding the map area and connecting and merging the intersection areas, combined with concave hull processing and eliminating non-belonging areas, the irregular shape problem in map area merging is solved, and an accurate and stable merging process is achieved.
Patent Information
- Application Number
- CN202011385668.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-01
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2040-12-01
AI Technical Summary
In the prior art, in the process of merging map areas, there are difficulties in merging due to irregular shapes, making it difficult to accurately merge map areas.
By expanding the first map area and the second map area, the intersection area is determined, and the intersection area is merged when it is connected to the map area. Combined with concave hull processing and elimination of non-belonging map areas, the accuracy and stability of the merger are ensured.
Improved the accuracy and stability of map area merging, avoiding mistaken merging of other areas and ensuring accurate execution of subsequent operations.
Smart Images

Figure CN114581477B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a map area merging method, device, electronic device and storage medium. Background Art
[0002] Many current scenarios require dividing or merging map areas. For example, merging map areas may be necessary when managing delivery areas or distinguishing between different city areas. However, map areas can be irregular in shape, making merging difficult. Therefore, accurately merging map areas has become a pressing issue. Summary of the Invention
[0003] The embodiments of the present application provide a map region merging method, device, electronic device, and storage medium, which can accurately merge map regions and improve the accuracy of the merged map regions. The technical solution is as follows:
[0004] In one aspect, a method for merging map regions is provided, the method comprising:
[0005] Performing expansion processing based on the first map area and the second map area, where the minimum distance between the first map area and the second map area is less than a distance threshold;
[0006] Determine an intersection area of an expanded area of the first map area and an expanded area of the second map area;
[0007] In a case where the intersection area is connected to the first map area and the second map area, the intersection area is merged with the first map area and the second map area.
[0008] In a possible implementation, after determining the intersection area of the expanded area of the first map area and the expanded area of the second map area, the method further includes:
[0009] When the intersection area is not connected with the first map area and the second map area, the expansion processing continues based on the first map area and the second map area until the intersection area of the expansion area of the first map area and the expansion area of the second map area is connected with the first map area and the second map area.
[0010] In another possible implementation, the performing the expansion processing based on the first map area and the second map area includes:
[0011] The first map area and the second map area are expanded using a first expansion step size.
[0012] In another possible implementation, after determining the intersection area of the expanded area of the first map area and the expanded area of the second map area, the method further includes:
[0013] When the intersection area is not connected to the first map area and the second map area, doubling the first outward expansion step length to obtain a second outward expansion step length;
[0014] The first map area and the second map area are expanded using the second expansion step until an intersection of the expanded area of the first map area and the expanded area of the second map area is connected to the first map area and the second map area.
[0015] In another possible implementation, after determining the intersection area of the expanded area of the first map area and the expanded area of the second map area, the method further includes:
[0016] When the intersection area is not connected to the first map area and the second map area, obtaining a first merged area and a second merged area, where the first merged area is a map area formed by merging the first map area with an expanded area of the first map area, and the second merged area is a map area formed by merging the second map area with an expanded area of the second map area;
[0017] Continue to use the first expansion step size to expand the first merged area and the second merged area until the intersection area of the expanded area of the first map area obtained after multiple expansion processes and the expanded area of the second map area obtained after multiple expansion processes are connected to the first map area and the second map area.
[0018] In another possible implementation, the performing the expansion processing based on the first map area and the second map area includes:
[0019] Obtaining an expanded unit area having a target size;
[0020] The first map area and the second map area are expanded using the expansion unit area as a unit.
[0021] In another possible implementation, when the intersection area is connected to the first map area and the second map area, after merging the intersection area with the first map area and the second map area, the method further includes:
[0022] A concave hull process is performed on the intersection area and the map area obtained by merging the first map area and the second map area to obtain a concave hull area.
[0023] In another possible implementation, performing concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area to obtain the concave hull area includes:
[0024] Determine, in the merged map area, a plurality of vertices located on a boundary of the first map area or on a boundary of the second map area;
[0025] The multiple vertices are connected in sequence to generate the concave hull area.
[0026] In another possible implementation, after performing concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area to obtain the concave hull area, the method further includes:
[0027] The first map area, the second map area and the concave hull area are merged.
[0028] In another possible implementation, when the intersection area is connected to the first map area and the second map area, after merging the intersection area with the first map area and the second map area, the method further includes:
[0029] Acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than the distance threshold;
[0030] From the merged area, an intersection area between the merged area and the third map area is removed.
[0031] In another possible implementation, when the intersection area is connected to the first map area and the second map area, after merging the intersection area with the first map area and the second map area, the method further includes:
[0032] Acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than the distance threshold;
[0033] Performing expansion processing based on the third map area;
[0034] From the merged area, a map area that does not belong to the first map area or the second map area in an intersection area between the merged area and the expanded area of the third map area is removed.
[0035] In one aspect, a map region merging device is provided, the device comprising:
[0036] An expansion module, configured to perform expansion processing based on a first map area and a second map area, wherein a minimum distance between the first map area and the second map area is less than a distance threshold;
[0037] a determination module, configured to determine an intersection area of an expanded area of the first map area and an expanded area of the second map area;
[0038] A merging module is configured to merge the intersection area with the first map area and the second map area when the intersection area is connected to the first map area and the second map area.
[0039] In one possible implementation, the expansion module is further configured to, when the intersection area is not connected with the first map area and the second map area, continue to perform expansion processing based on the first map area and the second map area until the intersection area of the expansion area of the first map area and the expansion area of the second map area is connected with the first map area and the second map area.
[0040] In another possible implementation, the expansion module includes:
[0041] The first expansion unit is configured to perform expansion processing on the first map area and the second map area by using a first expansion step size.
[0042] In another possible implementation, the apparatus further includes:
[0043] a step-length expansion module, configured to double the first outward expansion step length to obtain a second outward expansion step length when the intersection area is not connected to the first map area and the second map area;
[0044] The expansion module is further configured to expand the first map area and the second map area using the second expansion step size until an intersection of the expanded area of the first map area and the expanded area of the second map area is connected to the first map area and the second map area.
[0045] In another possible implementation, the apparatus further includes:
[0046] a region acquisition module, configured to acquire, when the intersection region is not connected to the first map region and the second map region, a first merged region being a map region formed by merging the first map region with an area extending outward from the first map region, and a second merged region being a map region formed by merging the second map region with an area extending outward from the second map region;
[0047] The expansion module is further configured to continue expanding the first merged area and the second merged area using the first expansion step size until an intersection of an expanded area of the first map area obtained after multiple expansions and an expanded area of the second map area obtained after multiple expansions is connected to the first map area and the second map area.
[0048] In another possible implementation, the expansion module includes:
[0049] A region acquisition unit, configured to acquire an outward expansion unit region having a target size;
[0050] The second expansion unit is configured to perform expansion processing on the first map area and the second map area based on the expansion unit area.
[0051] In another possible implementation, the apparatus further includes:
[0052] The concave hull processing module is used to perform concave hull processing on the intersection area and the map area obtained by merging the first map area and the second map area to obtain a concave hull area.
[0053] In another possible implementation, the concave hull processing module includes:
[0054] A vertex determination unit, configured to determine, in the merged map area, a plurality of vertices located on a boundary of the first map area or on a boundary of the second map area;
[0055] The concave hull processing unit is used to connect the multiple vertices in sequence to generate the concave hull area.
[0056] In another possible implementation, the concave hull processing module further includes:
[0057] The concave hull merging unit is used to merge the first map area, the second map area and the concave hull area.
[0058] In another possible implementation, the apparatus further includes:
[0059] a map area acquisition module, configured to acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than the distance threshold;
[0060] The elimination module is used to eliminate the intersection area of the merged area and the third map area from the merged area.
[0061] In another possible implementation, the apparatus further includes:
[0062] a map area acquisition module, configured to acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than the distance threshold;
[0063] The expansion module is further configured to perform expansion processing based on the third map area;
[0064] The elimination module is configured to eliminate, from the merged area, a map area that does not belong to the first map area or the second map area in an intersection area between the merged area and the expanded area of the third map area.
[0065] On the one hand, an electronic device is provided, which includes one or more processors and one or more memories, wherein the one or more memories store at least one instruction, and the at least one instruction is loaded and executed by the one or more processors to implement the operations performed by the map area merging method in any possible implementation as described above.
[0066] On the one hand, a computer-readable storage medium is provided, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement the operations performed by the map area merging method in any possible implementation as described above.
[0067] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0068] The map area merging method, device, electronic device and storage medium provided in the embodiments of the present application can adaptively determine map areas whose minimum distance is less than a distance threshold, determine these map areas whose minimum distance is less than the distance threshold as map areas with a closer distance, merge the map areas with a closer distance, and avoid mistakenly merging other areas when merging map areas with a farther distance, thereby effectively improving the stability and accuracy of the merging process, and subsequently performing other operations on the merged map areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0070] Figure 1 This is a flowchart of a map area merging method provided in an embodiment of the present application;
[0071] Figure 2 is a schematic diagram of a map area provided in an embodiment of the present application;
[0072] Figure 3 is a flowchart of another map area merging method provided in an embodiment of the present application;
[0073] Figure 4 is a schematic diagram of a map area and an intersection area provided in an embodiment of the present application;
[0074] Figure 5 is a schematic diagram of another map area and intersection area provided in an embodiment of the present application;
[0075] Figure 6 is a schematic diagram of an intersection area and a merged area provided in an embodiment of the present application;
[0076] Figure 7 is a schematic diagram of a concave area provided in an embodiment of the present application;
[0077] Figure 8 is a schematic diagram of a merged area provided in an embodiment of the present application;
[0078] Figure 9 is a schematic diagram of another merged region provided in an embodiment of the present application;
[0079] Figure 10 is a schematic diagram of another merged region provided in an embodiment of the present application;
[0080] Figure 11 is a schematic diagram of another merged region provided in an embodiment of the present application;
[0081] Figure 12 is a schematic diagram of another merged region provided in an embodiment of the present application;
[0082] Figure 13 is a schematic diagram of another merged region provided in an embodiment of the present application;
[0083] Figure 14 is a schematic diagram of another merged region provided in an embodiment of the present application;
[0084] Figure 15 is a flowchart of another map area merging method provided in an embodiment of the present application;
[0085] Figure 16 This is a structural diagram of a map area merging device provided in an embodiment of the present application;
[0086] Figure 17 This is a structural diagram of another map area merging device provided in an embodiment of the present application;
[0087] Figure 18 is a schematic diagram of the structure of the terminal provided in an embodiment of the present application;
[0088] Figure 19 It is a structural diagram of the server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0089] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0090] Figure 1 This is a flowchart of a map area merging method provided in an embodiment of the present application, which is applied to electronic devices. Figure 1 , the embodiment includes:
[0091] In step 101, an expansion process is performed based on the first map area and the second map area.
[0092] This embodiment of the application uses the first map area and the second map area as examples to illustrate the process of merging map areas. Wherein, if the minimum distance between the first map area and the second map area is less than a distance threshold, it means that the first map area and the second map area are close to each other. The distance threshold can be a preset value.
[0093] In step 102 , an intersection area between an expanded area of the first map area and an expanded area of the second map area is determined.
[0094] After performing expansion processing based on the first map area and the second map area, the electronic device obtains the expanded area of the first map area and the expanded area of the second map area, and then determines the overlapping area of the expanded area of the first map area and the expanded area of the second map area. The overlapping area is the intersection area of the expanded area of the first map area and the expanded area of the second map area.
[0095] For example, see Figure 2Area A is the first map area, area B is the second map area, area H and area K are map areas that are not selected for merging, area C is the expanded area of the first map area, area D is the expanded area of the second map area, and the intersection area of area C and area D is area E, which is the intersection area between the expanded area of the first map area and the expanded area of the second map area.
[0096] In step 103 , when the intersection area is connected to the first map area and the second map area, the intersection area is merged with the first map area and the second map area.
[0097] The map area merging method provided in the embodiment of the present application can adaptively determine map areas whose minimum distance is less than a distance threshold, determine these map areas whose minimum distance is less than the distance threshold as map areas with a closer distance, merge the map areas with a closer distance, and avoid mistakenly merging other areas when merging map areas with a farther distance, thereby effectively improving the stability and accuracy of the merging process, and other operations can be performed on the merged map areas subsequently.
[0098] Figure 3 This is a flowchart of a map area merging method provided in an embodiment of the present application, which is applied to electronic devices. The electronic devices can be terminals or servers. The terminals can be various types of devices such as mobile phones, personal computers, and tablet computers. The server can be a single server, a server cluster consisting of several servers, or a cloud computing server center. This embodiment of the present application does not specifically limit this. Figure 3 , the embodiment includes:
[0099] 301. Perform expansion processing based on the first map area and the second map area.
[0100] In many scenarios, it is necessary to divide the map area and merge the divided map areas. For example, with the development of Internet technology, more and more people are shopping online. By dividing the map area into multiple distribution areas and setting corresponding distribution capacity for different distribution areas, it is possible to achieve effective distribution of goods. However, the distribution capacity, item provider or other information in any distribution area may change, resulting in a decrease in distribution efficiency or distribution disputes when distributing items based on the currently divided distribution area. Therefore, it is necessary to merge the currently divided distribution areas, so that the merged areas can be divided again later. To this end, an embodiment of the present application provides a map area merging method that can merge different map areas.
[0101] In the embodiment of the present application, two map areas whose minimum distance is less than a distance threshold are merged, that is, two map areas that are relatively close to each other are merged. If the minimum distance between the two map areas is not less than the distance threshold, it means that the two map areas are relatively far apart. In this case, if the two map areas are merged, the merged map area will contain too many other map areas, resulting in poor accuracy. Therefore, it is possible to adaptively determine whether any two map areas meet the merging conditions, and only merge the map areas that meet the merging conditions, while not merging the map areas that do not meet the conditions. In addition, to avoid unclear geographical scope, the first map area is a connected map area, and the second map area is also a connected map area.
[0102] Considering that if there are overlapping areas or overlapping boundaries between two map areas, the overlapping areas or overlapping boundaries will belong to both map areas at the same time, resulting in problems such as repeated attribution or incorrect attribution. When relevant operations are performed on the two map areas separately, problems such as repeated operations or incorrect operations will also occur in the overlapping areas or overlapping boundaries.
[0103] For example, in an item delivery scenario, the first map area and the second map area each have corresponding delivery capacities. If there is an overlapping area between the first map area and the second map area, the delivery orders in the overlapping area will fall into the two delivery areas. Then, when allocating the item delivery order, it will be impossible to determine the delivery capacity corresponding to the delivery order, or the item delivery order will be repeatedly allocated to two delivery capacities, affecting the subsequent delivery efficiency of the items.
[0104] Therefore, when the map areas are divided in advance, there are no overlapping areas or overlapping boundaries between any two divided map areas. If the divided map areas cannot match the actual situation, the method provided in the embodiment of the present application is used to merge the map areas, and there are no overlapping areas or overlapping boundaries between the two merged map areas.
[0105] First, the electronic device performs expansion processing based on the first map area and the second map area respectively to obtain an expanded area of the first map area and an expanded area of the second map area.
[0106] In one possible implementation, the process of performing expansion processing based on the first map area and the second map area includes: determining a first expansion step size, and using the first expansion step size to expand the first map area and the second map area, respectively. The first expansion step size can be a preset expansion step size or an expansion step size determined by technicians based on experience. For example, the first expansion step size can be one-quarter the width of a city block.
[0107] In another possible implementation, the process of respectively expanding the first map area and the second map area using the first expansion step includes: expanding the outer edge of the first map area outward by a distance equal to the first expansion step to obtain the expansion area of the first map area; and expanding the outer edge of the second map area outward by a distance equal to the first expansion step to obtain the expansion area of the second map area.
[0108] In another possible implementation, the process of performing expansion processing based on the first map area and the second map area includes: obtaining an expansion unit area with a target size, and performing expansion processing on the first map area and the second map area respectively based on the expansion unit area.
[0109] Among them, the outward expansion unit area can be a circular area, a square area or an area of other shapes. When the outward expansion unit area is a circular area, the target size can be the radius or diameter of the outward expansion unit area. When the outward expansion unit area is a square area, the target size can be the side length of the outward expansion unit area. When the outward expansion unit area is of other shapes, the target size is the size that can determine the size of the outward expansion unit area under the corresponding shape.
[0110] In another possible implementation, the expansion unit area is a square area, and the expansion processing is performed on the first map area and the second map area respectively based on the expansion unit area: obtaining the Minkowski sum of the expansion unit area and the map area to be processed, that is, the process of performing expansion processing on the first map area and the second map area respectively based on the expansion unit area, including: obtaining the Minkowski sum of the square area and the first map area, and the obtained map area includes the first map area and the expansion area of the first map area; obtaining the Minkowski sum of the square area and the second map area, and the obtained map area includes the second map area and the expansion area of the second map area.
[0111] 302. Determine an intersection area between an expanded area of the first map area and an expanded area of the second map area.
[0112] When an expansion step is used to expand the first map area and the second map area respectively, if the expansion step is a preset value, and after the first map area and the second map area are expanded respectively using the expansion step, there is no intersection between the expansion area of the first map area and the expansion area of the second map area, then it means that the expansion step setting is unreasonable. The expansion step can be enlarged or doubled to ensure that after the first map area and the second map area are expanded respectively using the changed expansion step, there is an intersection between the expansion area of the first map area and the expansion area of the second map area.
[0113] To obtain the intersection of the expanded area of the first map area and the expanded area of the second map area, the first expansion step size can be set to be greater than half the minimum distance between the first map area and the second map area. Considering that the minimum distance between any two map areas may be different, the first expansion step size can be set to a value greater than half the distance threshold.
[0114] In order to merge the first map area with the second map area, the obtained intersection area must be connected to the first map area and the second map area. If the intersection area is not connected to the first map area and the second map area, it means that the intersection area, the first map area, and the second map area are still separate map areas and cannot be merged. Therefore, in the embodiment of the present application, after obtaining the intersection area, it is necessary to determine whether the intersection area is connected to the first map area and the second map area.
[0115] When the obtained intersection area is connected to the first map area and the second map area, the following step 304 is performed.
[0116] In the case that the obtained intersection area is not connected with the first map area and the second map area, the following step 303 is executed until the obtained intersection area is connected with the first map area and the second map area, and the following step 304 is continued to be executed.
[0117] 303. When the intersection area is not connected with the first map area and the second map area, continue to perform expansion processing based on the first map area and the second map area until the intersection area of the expansion area of the first map area and the expansion area of the second map area is connected with the first map area and the second map area.
[0118] When the first expansion step is used to expand the first map area and the second map area to obtain an intersection area, if the intersection area is not connected to the first map area and the second map area, the area after the expansion of the first map area and the area after the expansion of the second map area can be further expanded based on the first expansion step, or the first expansion step can be expanded and the expanded step size can be used to expand the first map area and the second map area.
[0119] (1) The first expansion step is enlarged, and the enlarged expansion step is used for the first map area and the second map area:
[0120] In one possible implementation, when the intersection area is not connected to the first map area and the second map area, the electronic device doubles the first expansion step size to obtain a second expansion step size. The electronic device then expands the first map area and the second map area using the second expansion step size. If the intersection area of the expansion area of the first map area and the expansion area of the second map area obtained at this time is connected to the first map area and the second map area, the electronic device executes the following step 304. If the intersection area of the expansion area of the first map area and the expansion area of the second map area obtained at this time is not connected to the first map area and the second map area, the electronic device further doubles the second expansion step size and continues expanding the first map area and the second map area using the expanded expansion step size until the intersection area of the expansion area of the first map area and the expansion area of the second map area is connected to the first map area and the second map area.
[0121] For example, see Figure 4 In the first figure, the first expansion step size m is used to expand the first map area A and the second map area B. When the obtained intersection area C is not connected with the first map area A and the second map area B, see Figure 4 In the second image, double the first expansion step length m to obtain a second expansion step length of 2m. Using this second expansion step length of 2m, expand the first map area A and the second map area B to obtain the intersection area D. This intersection area D is connected to the first map area A and the second map area B, and the expansion process stops. Here, m is an arbitrary value greater than 0.
[0122] (2) Based on the first expansion step length, the expansion process is continued on the area after the first map area expansion process and the area after the second map area expansion process:
[0123] In another possible implementation, when the intersection area is not connected to the first map area and the second map area, the electronic device first obtains the first merged area and the second merged area, then continues to expand the first merged area and the second merged area using the first expansion step size to obtain a third merged area and a fourth merged area. If the intersection area of the expansion area of the third merged area relative to the first map area and the expansion area of the fourth merged area relative to the second map area is connected to the first map area and the second map area, the electronic device executes the following step 304. If the intersection area of the expansion area of the third merged area relative to the first map area and the expansion area of the fourth merged area relative to the second map area is not connected to the first map area and the second map area, the electronic device continues to expand the third merged area and the fourth merged area using the first expansion step size until the intersection area of the expansion area of the first map area obtained after multiple expansion processes and the expansion area of the second map area obtained after multiple expansion processes are connected to the first map area and the second map area.
[0124] Among them, the first merged area is the map area formed by the merger of the first map area and the expanded area of the first map area, the second merged area is the map area formed by the merger of the second map area and the expanded area of the second map area, the third merged area is the map area formed by the merger of the first merged area and the expanded area of the first merged area, and the fourth merged area is the map area formed by the merger of the second merged area and the expanded area of the second merged area.
[0125] For example, see Figure 5 In the first figure, the first map area A1 and the second map area B1 are expanded using the first expansion step length m. When the obtained intersection area C is not connected to the first map area A1 and the second map area B1, the first merged area A3 (A1+A2) of the first map area A1 and the expanded area A2 of the first map area is obtained, and the second merged area B3 (B1+B2) of the second map area B1 and the expanded area B2 of the second map area is obtained. See Figure 5 In the second image, the first expansion step size m is continued to be used to expand the first merged area A3 and the second merged area B3, resulting in a third merged area A5, which is the product of the first merged area A3 and the expanded area A4 of the first merged area, and a fourth merged area B5, which is the product of the second merged area B3 and the expanded area B4 of the second merged area. At this point, the intersection (shaded area) of the third merged area A5's expanded area relative to the first map area A1 (A2 + A4) and the fourth merged area B5's expanded area relative to the second map area B1 (B2 + B4) connects to the first map area A1 and the second map area B1, and the expansion process stops. m is an arbitrary value greater than 0.
[0126] 304. When the intersection area is connected to the first map area and the second map area, merge the intersection area with the first map area and the second map area.
[0127] When the obtained intersection area is connected with the first map area and the second map area, it means that the first map area and the second map area can meet the conditions for map area merging after expansion processing. At this time, the electronic device merges the obtained intersection area with the first map area and the second map area to obtain the map area after the first map area and the second map area are merged, which is used as the merged area of the first map area and the second map area.
[0128] For example, see Figure 6 In the first picture, when the intersection area C is connected to the first map area A and the second map area B, the intersection area C is merged with the first map area A and the second map area B. Figure 6 In the second picture, the map area composed of the intersection area C, the first map area A and the second map area B is the merged area of the first map area A and the second map area B.
[0129] 305. Perform concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area to obtain a concave hull area.
[0130] In order to avoid merging too many map areas that do not belong to the first map area or the second map area during the merging process, the electronic device performs concave hull processing on the area obtained by merging the first map area and the second map area to obtain a concave hull area. The concave hull area can be considered as the merged area of the first map area and the second map area.
[0131] By performing concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area, a concave hull area is obtained. This can reduce the number of other map areas merged, effectively improve the rationality, stability and accuracy of the merged area of the first map area and the second map area, and thus improve the accuracy of subsequent operations based on the merged area. It can also remove the sharp corners in the intersection area, which is conducive to a smoother integration of the intersection area into the merged area.
[0132] In one possible implementation, a concave hull process is performed on the map area obtained by merging the intersection area with the first map area and the second map area to obtain a concave hull area, including: determining a plurality of vertices in the merged map area that are located on the boundary of the first map area or on the boundary of the second map area, and connecting the plurality of vertices in sequence to generate a concave hull area.
[0133] For example, see Figure 7 , area A is the first map area, area B is the second map area, and area C is the intersection area. In the map area obtained by merging areas A, B, and C, the points located on the boundary of the first map area include P0, P1, P8, and P9, and the points located on the boundary of the second map area include P2, P3, P4, P5, P6, and P7. Connecting P0, P1, P2, P3, P4, P5, P6, P7, P8, and P9 in sequence will result in a polygonal area, which is the concave hull area corresponding to the merged map area.
[0134] 306. Merge the first map area, the second map area, and the concave hull area.
[0135] Considering that the first map area and the second map area may be irregular polygons, when performing concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area, various situations may occur, and different concave hull areas correspond to different situations. In these various situations, the concave hull area may only include part of the map area of the first map area, or only include part of the map area of the second map area, resulting in the problem of missing part of the first map area or the second map area after the concave hull processing on the merged area of the first map area and the second map area. Therefore, after generating the concave hull area in step 305, the electronic device further merges the first map area, the second map area and the concave hull area, which can ensure that the acquired merged area of the first map area and the second map area includes the complete first map area and the second map area, and does not miss part of the first map area or the second map area, thereby effectively improving the accuracy of the merged area of the first map area and the second map area.
[0136] 307. Eliminate map areas belonging to other map areas or extended areas of other map areas from the merged area.
[0137] Considering that there are other map areas near the first map area or the second map area, and either map area may be an irregular polygon, in this case, when merging the first map area and the second map area, map areas belonging to other map areas may be merged into the merged area of the first map area and the second map area, resulting in overlapping map areas, affecting subsequent operations performed based on the obtained merged area and reducing accuracy.
[0138] To this end, after obtaining the merged area of the first map area and the second map area, the electronic device removes map areas belonging to other map areas or extended areas of other map areas from the merged area to adjust the merged area and improve the accuracy of the merged area.
[0139] In one possible implementation, the electronic device obtains a third map area. Since the third map area is a map area other than the first map area or the second map area and does not overlap with the first map area or the second map area, the electronic device simply removes the intersection of the merged area and the third map area from the merged area of the first map area and the second map area. The minimum distance between the third map area and at least one of the first map area and the second map area is less than a distance threshold.
[0140] For example, see Figure 8 In the first map, area A is the combined area of the first and second map areas, and area B is the third map area. There is an overlapping area C between area A and area B. Figure 8 In the second picture, the map area D obtained by removing the overlapping area C from area A is the adjusted map area after the merger of the first map area and the second map area.
[0141] In another possible implementation, the electronic device obtains a third map area, performs expansion processing based on the third map area, and obtains an expanded area of the third map area. Considering that the expanded area of the third map area may overlap with the first map area or the second map area, the electronic device removes, from the merged area of the first map area and the second map area, the map area that does not belong to the first map area or the second map area in the intersection area of the merged area and the expanded area of the third map area.
[0142] For example, see Figure 9 In the first map, area A is the combined area of the first and second map areas, and area B is the third map area. There is an overlapping area between area A and the outer expansion area of area B. The overlapping area includes area C1 and area C2. Area C1 does not belong to the first map area, nor to the second map area, while area C2 belongs to the second map area. Figure 9 In the second picture, the map area D obtained by removing the overlapping area C1 from the area A is the map area after the adjustment of the combined area of the first map area and the second map area. This map area contains the complete first map area and the complete second map area.
[0143] It should be noted that after executing step 304, the electronic device may directly execute step 307. In this case, the merged area in step 307 is the merged area obtained by executing step 304, that is, the map area obtained by merging the intersection area with the first map area and the second map area. Alternatively, after executing step 304, the electronic device may first execute steps 305 and 306, and then execute step 307. In this case, the merged area in step 307 is the merged area obtained by executing step 306, that is, the map area obtained by merging the first map area, the second map area, and the concave hull area.
[0144] The method provided in the embodiment of the present application can not only merge map areas, but also divide the map area obtained after the merger again to achieve map area adjustment, that is, adjust the map area before the merger to the map area after the division.
[0145] For example, due to excess delivery capacity in the three delivery areas within geographic area A, business personnel plan to adjust geographic area A into two delivery areas and reduce the previous three delivery capacities to two. The specific process is to merge the three delivery areas separately, and then re-divide the final merged area into two delivery areas, setting a delivery capacity for each delivery area, thereby achieving the adjustment of multiple map areas.
[0146] The map area merging method provided in the embodiment of the present application can adaptively determine map areas whose minimum distance is less than a distance threshold, determine these map areas whose minimum distance is less than the distance threshold as map areas with a closer distance, merge the map areas with a closer distance, and avoid mistakenly merging other areas when merging map areas with a farther distance, thereby effectively improving the stability and accuracy of the merging process, and other operations can be performed on the merged map areas subsequently.
[0147] Furthermore, even if at least one of the two map areas is an irregular polygon, the map areas can still be merged.
[0148] Furthermore, by excluding map areas belonging to other map areas or extended areas of other map areas from the merged area, the accuracy of the merged area can be further improved. The merged area obtained after the exclusion does not have the problem of map area overlap and is more accurate.
[0149] It should be noted that in an embodiment of the present application, after obtaining the merged area of the first map area and the second map area in step 304, steps 305 and 306 can be executed to perform concave hull processing on the merged area, merge the concave hull area with the first map area and the second map area, and then execute step 307 to eliminate map areas belonging to the outward expansion areas of other map areas or other map regions. Alternatively, step 307 can be executed directly after step 304 to eliminate map areas belonging to the outward expansion areas of other map areas or other map regions. These two methods are used to further improve the accuracy of the merged area obtained in step 304 from different directions. These two methods can be implemented separately or together to achieve different effects. When these two methods are implemented separately, the process of merging map areas by the electronic device includes steps 301-306, or includes steps 301-304 and 307. When these two methods are implemented together, the process of merging map areas by the electronic device includes steps 301-307.
[0150] The merged area obtained by directly performing concave hull processing on the two map areas is as follows Figure 10 As shown in , there are two narrow areas outside the merged map area, which do not belong to the merged map area and are not convenient for merging with other map areas. The merged area obtained by directly performing convex hull processing on the two map areas is as follows Figure 11 As shown, the merged map area contains too many map areas other than the two map areas, resulting in poor accuracy.
[0151] The embodiment of the present application first uses the expansion step size to perform an expansion process on the two map areas, and then performs a concave hull process on the area obtained after the expansion process to obtain a merged area of the two map areas. Figure 12 、 Figure 13 and Figure 14 , Figure 12-14 They represent the merged area of the two map areas obtained by performing concave hull processing on the areas obtained after the expansion process by using an expansion step of 1 meter, 2 meters, and 3 meters.
[0152] In summary, the map area merging method provided in the embodiment of the present application, compared with the method of merging map areas using the convex hull processing method, includes smaller areas of other map areas, and the determined merged area is more reasonable and accurate. Compared with the method of merging map areas using the concave hull processing method, there is no slit area and it is smoother. In addition, by setting different expansion step sizes, the map area incorporated in the process of merging two map areas can be stably changed, achieving a gradual improvement effect between the convex hull processing method and the concave hull processing method. According to the actual situation, the expansion step size and the expanded map area are continuously fed back and adjusted, and finally the expansion step size can be determined at a relatively stable value to ensure the accuracy of the merged map area.
[0153] In addition, the embodiment of the present application is only described by merging two map areas as an example. In another embodiment, multiple map areas can also be merged. The specific merging process is similar to that of the embodiment of the present application and will not be repeated here.
[0154] The map area merging method provided in the embodiment of the present application can be applied to scenarios such as the field of item distribution, the adjustment and management of geographical areas, etc., where map areas need to be merged or adjusted. Taking the application of the map area merging method to the field of item distribution as an example, for multiple distribution areas, each distribution area has a corresponding distribution capacity, and the merchant who provides items has a corresponding geographical location. The distribution area to which the merchant belongs is determined based on the geographical location, and the item distribution orders related to the merchant are distributed by the corresponding distribution capacity. The distribution capacity has a high degree of familiarity with the distribution area to which it belongs, and the distribution efficiency when distributing items within the distribution area is also high, which can ensure that the items are delivered in a timely and effective manner. Taking into account that the distribution capacity and merchants may change, such as the increase and decrease of distribution capacity, the application of distribution capacity to change distribution areas, or the joining and exit of merchants, it is necessary to adjust the currently divided distribution areas. By merging the currently divided distribution areas and then dividing them again, the current changes can be matched. The embodiment of the present application takes the first distribution area and the second distribution area as an example to illustrate the process of obtaining the merged area of the first distribution area and the second distribution area. It is applied to electronic devices, see Figure 15 The specific process includes:
[0155] 1. Get the first delivery area and the second delivery area.
[0156] If the minimum distance between the first and second delivery areas is less than the distance threshold, the delivery capacity corresponding to the first delivery area is the first delivery capacity, which is used to deliver item delivery orders belonging to the first delivery area. The delivery capacity corresponding to the second delivery area is the second delivery capacity, which is used to deliver item delivery orders belonging to the second delivery area.
[0157] 2. Use the expansion step size to expand the first delivery area and the second delivery area to obtain the expansion area of the first delivery area and the expansion area of the second delivery area.
[0158] 3. Obtain the intersection area of the expanded area of the first delivery area and the expanded area of the second delivery area.
[0159] 4. Determine whether the intersection area is connected to the first delivery area and the second delivery area. If so, execute step 6; if not, execute step 5.
[0160] 5. Double the expansion step length to obtain an updated expansion step length. Continue to perform the expansion process on the first and second delivery areas in step 2 based on the updated expansion step length.
[0161] 6. Merge the intersection area with the first delivery area and the second delivery area to obtain a first merged area.
[0162] 7. Determine a plurality of vertices in the first merged area that are located on the boundary of the first delivery area or on the boundary of the second delivery area.
[0163] 8. Connect the multiple vertices in sequence to generate a concave hull area corresponding to the first merged area.
[0164] 9. Merge the concave area with the first delivery area and the second delivery area to obtain a second merged area.
[0165] 10. Obtain the third, fourth, and fifth delivery areas.
[0166] The third delivery area is defined as the delivery area whose minimum distance to the first delivery area is less than the distance threshold. The fourth delivery area is defined as the delivery area whose minimum distance to the second delivery area is less than the distance threshold. The fifth delivery area is defined as the delivery area whose minimum distance to both the first and second delivery areas is less than the distance threshold.
[0167] 11. Obtain the intersection area 1 between the second merge area and the third delivery area, the intersection area 2 between the second merge area and the fourth delivery area, and the intersection area 3 between the second merge area and the fifth delivery area.
[0168] 12. Eliminate intersection area 1, intersection area 2, and intersection area 3 from the second merged area to obtain a third merged area.
[0169] The third merged area is a merged area obtained by merging the first delivery area and the second delivery area.
[0170] This map area merging method is applied to the scenario of merging the currently divided delivery areas in the field of item distribution. It can help the item distribution platform to reasonably divide the delivery areas. When there are changes in delivery capacity or merchants, the delivery areas can be updated in a timely manner to ensure that the items in the delivery area are delivered in a timely and effective manner, avoid item distribution disputes, and improve item distribution efficiency.
[0171] Figure 16 This is a structural diagram of a map area merging device provided in an embodiment of the present application. Figure 16 The device includes: an external expansion module 1601, a middle determination module 1602 and a merging module 1603.
[0172] An expansion module 1601 is configured to perform expansion processing based on a first map area and a second map area, wherein a minimum distance between the first map area and the second map area is less than a distance threshold;
[0173] A determination module 1602 is configured to determine an intersection area between an expanded area of the first map area and an expanded area of the second map area;
[0174] The merging module 1603 is configured to merge the intersection area with the first map area and the second map area when the intersection area is connected to the first map area and the second map area.
[0175] In one possible implementation, see Figure 17 The expansion module 1601 is further used to continue the expansion processing based on the first map area and the second map area when the intersection area is not connected with the first map area and the second map area, until the intersection area of the expansion area of the first map area and the expansion area of the second map area is connected with the first map area and the second map area.
[0176] In another possible implementation, see Figure 17 , the expansion module 1601 includes:
[0177] The first expansion unit 16011 is configured to expand the first map area and the second map area using a first expansion step size.
[0178] In another possible implementation, see Figure 17 , the device further comprises:
[0179] The step-length expansion module 1604 is configured to double the first outward expansion step length to obtain a second outward expansion step length when the intersection area is not connected to the first map area and the second map area;
[0180] The expansion module 1601 is further configured to expand the first map area and the second map area using a second expansion step until the intersection of the expanded area of the first map area and the expanded area of the second map area is connected to the first map area and the second map area.
[0181] In another possible implementation, see Figure 17 , the device further comprises:
[0182] Region acquisition module 1605 is configured to acquire a first merged region and a second merged region when the intersection region is not connected to the first map region and the second map region, wherein the first merged region is the map region formed by merging the first map region with the extended region of the first map region, and the second merged region is the map region formed by merging the second map region with the extended region of the second map region;
[0183] The expansion module 1601 is further configured to continue expanding the first merged area and the second merged area using the first expansion step size until the intersection of the expanded area of the first map area obtained after multiple expansion processes and the expanded area of the second map area obtained after multiple expansion processes is connected to the first map area and the second map area.
[0184] In another possible implementation, see Figure 17 , the expansion module 1601 includes:
[0185] The region acquisition unit 16012 is used to acquire an outward expansion unit region having a target size;
[0186] The second expansion unit 16013 is used to expand the first map area and the second map area based on the expansion unit area.
[0187] In another possible implementation, see Figure 17 , the device further comprises:
[0188] The concave hull processing module 1606 is configured to perform concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area to obtain a concave hull area.
[0189] In another possible implementation, see Figure 17 The concave hull processing module 1606 includes:
[0190] A vertex determination unit 16061 is configured to determine, in the merged map area, a plurality of vertices located on a boundary of the first map area or on a boundary of the second map area;
[0191] The concave hull processing unit 16062 is used to connect multiple vertices in sequence to generate a concave hull area.
[0192] In another possible implementation, see Figure 17 The concave hull processing module 1606 further includes:
[0193] The concave hull merging unit 16063 is used to merge the first map area, the second map area and the concave hull area.
[0194] In another possible implementation, see Figure 17 , the device further comprises:
[0195] A map area acquisition module 1607 is configured to acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than a distance threshold;
[0196] The elimination module 1608 is configured to eliminate the intersection area between the merged area and the third map area from the merged area.
[0197] In another possible implementation, see Figure 17 , the device further comprises:
[0198] A map area acquisition module 1607 is configured to acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than a distance threshold;
[0199] The expansion module 1601 is further configured to perform expansion processing based on the third map area;
[0200] The elimination module 1608 is configured to eliminate, from the merged area, a map area that does not belong to the first map area or the second map area in an intersection area between the merged area and the expanded area of the third map area.
[0201] It should be noted that the map area merging device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when merging geographic areas. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the map area merging device provided in the above embodiment and the map area merging method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0202] Figure 18The following is a block diagram of a terminal 1800 according to an exemplary embodiment of the present application. Terminal 1800 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. Terminal 1800 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other similar names.
[0203] Typically, the terminal 1800 includes a processor 1801 and a memory 1802 .
[0204] The processor 1801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0205] Memory 1802 may include one or more computer-readable storage media, which may be non-transitory. Memory 1802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1802 is used to store at least one instruction, which is executed by processor 1801 to implement the map area merging method provided in the method embodiment of the present application.
[0206] In some embodiments, terminal 1800 may optionally include a peripheral device interface 1803 and at least one peripheral device. The processor 1801, memory 1802, and peripheral device interface 1803 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1803 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 1804, a touchscreen display 1805, a camera 1806, an audio circuit 1807, a positioning component 1808, and a power supply 1809.
[0207] The peripheral device interface 1803 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1801 and the memory 1802. In some embodiments, the processor 1801, the memory 1802, and the peripheral device interface 1803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1801, the memory 1802, and the peripheral device interface 1803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0208] The RF circuit 1804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 1804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 1804 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1804 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0209] The display screen 1805 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1805 is a touch screen display, the display screen 1805 also has the ability to collect touch signals on the surface or above the surface of the display screen 1805. The touch signal can be input as a control signal to the processor 1801 for processing. At this time, the display screen 1805 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1805, which is set on the front panel of the terminal 1800; in other embodiments, there can be at least two display screens 1805, which are respectively set on different surfaces of the terminal 1800 or in a folding design; in still other embodiments, the display screen 1805 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal 1800. Even more, the display screen 1805 can be set as a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1805 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0210] The camera assembly 1806 is used to capture images or videos. Optionally, the camera assembly 1806 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1806 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0211] The audio circuit 1807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 1801 for processing, or input into the radio frequency circuit 1804 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 1800. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 1801 or the radio frequency circuit 1804 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 1807 may also include a headphone jack.
[0212] Positioning component 1808 is used to locate the current geographic location of terminal 1800 to implement navigation or LBS (Location Based Service). Positioning component 1808 can be based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Greninja system, or the European Union's Galileo system.
[0213] Power supply 1809 is used to power various components in terminal 1800. Power supply 1809 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1809 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0214] In some embodiments, the terminal 1800 further includes one or more sensors 1810 , including but not limited to: an acceleration sensor 1811 , a gyroscope sensor 1812 , a pressure sensor 1813 , a fingerprint sensor 1814 , an optical sensor 1815 , and a proximity sensor 1816 .
[0215] The accelerometer 1811 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal 1800. For example, the accelerometer 1811 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 1801 can control the touch screen display 1805 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 1811. The accelerometer 1811 can also be used to collect game or user motion data.
[0216] The gyroscope sensor 1812 can detect the orientation and rotation angle of the terminal 1800. It can work in conjunction with the accelerometer 1811 to collect the user's 3D movements on the terminal 1800. Based on the data collected by the gyroscope sensor 1812, the processor 1801 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0217] The pressure sensor 1813 can be located on the side frame of the terminal 1800 and / or below the touchscreen display 1805. When located on the side frame of the terminal 1800, the pressure sensor 1813 can detect the user's gripping signal on the terminal 1800. The processor 1801 then performs left-hand or right-hand identification or shortcut operations based on the gripping signal collected by the pressure sensor 1813. When the pressure sensor 1813 is located below the touchscreen display 1805, the processor 1801 controls the operable controls on the UI based on the user's pressure on the touchscreen display 1805. Operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0218] The fingerprint sensor 1814 is used to collect the user's fingerprint. The processor 1801 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 1814, or the fingerprint sensor 1814 identifies the user's identity based on the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 1801 authorizes the user to perform relevant sensitive operations, such as unlocking the screen, viewing encrypted information, downloading software, transferring resources, and changing settings. The fingerprint sensor 1814 can be set on the front, back, or side of the terminal 1800. When a physical button or manufacturer logo is provided on the terminal 1800, the fingerprint sensor 1814 can be integrated with the physical button or manufacturer logo.
[0219] Optical sensor 1815 is used to detect ambient light intensity. In one embodiment, processor 1801 can control the display brightness of touchscreen display 1805 based on the ambient light intensity detected by optical sensor 1815. Specifically, when the ambient light intensity is high, the display brightness of touchscreen display 1805 is increased; when the ambient light intensity is low, the display brightness of touchscreen display 1805 is decreased. In another embodiment, processor 1801 can also dynamically adjust the capture parameters of camera assembly 1806 based on the ambient light intensity detected by optical sensor 1815.
[0220] Proximity sensor 1816, also known as a distance sensor, is typically located on the front panel of terminal 1800. Proximity sensor 1816 is used to detect the distance between the user and the front of terminal 1800. In one embodiment, when proximity sensor 1816 detects that the distance between the user and the front of terminal 1800 is gradually decreasing, processor 1801 controls touchscreen display 1805 to switch from the screen-on state to the screen-off state. When proximity sensor 1816 detects that the distance between the user and the front of terminal 1800 is gradually increasing, processor 1801 controls touchscreen display 1805 to switch from the screen-off state to the screen-on state.
[0221] Those skilled in the art will understand that Figure 18 The structure shown in the figure does not constitute a limitation on the terminal 1800, and the terminal 1800 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0222] Figure 19 1 is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1900 may vary significantly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPUs) 1901 and one or more memories 1902. The memories 1902 store at least one instruction, which is loaded and executed by the processor 1901 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0223] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory device containing instructions. The instructions are executable by a processor in an electronic device to implement the map region merging method described in the above embodiment. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0224] In an exemplary embodiment, a computer program is further provided. The computer program includes at least one program code, and the program code is loaded and executed by a processor to implement the map area merging method in the above embodiment.
[0225] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0226] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A map area merging method, characterized in that: The method comprises: Performing expansion processing based on the first map area and the second map area, where the minimum distance between the first map area and the second map area is less than a distance threshold; Determine an intersection area of an expanded area of the first map area and an expanded area of the second map area; If the intersection area is not connected to the first map area and the second map area, continue expanding based on the first map area and the second map area until the intersection area of the expanded area of the first map area and the expanded area of the second map area is connected to the first map area and the second map area; When the intersection area is connected to the first map area and the second map area, merging the intersection area with the first map area and the second map area, and setting corresponding delivery capacity for the merged delivery area; Acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than the distance threshold; Performing expansion processing based on the third map area; From the merged area, a map area that does not belong to the first map area or the second map area in an intersection area between the merged area and the expanded area of the third map area is removed.
2. The method according to claim 1, characterized in that The expansion processing based on the first map area and the second map area includes: The first map area and the second map area are expanded using a first expansion step size.
3. The method according to claim 2, characterized in that After determining the intersection area of the expanded area of the first map area and the expanded area of the second map area, the method further includes: When the intersection area is not connected to the first map area and the second map area, doubling the first outward expansion step length to obtain a second outward expansion step length; The first map area and the second map area are expanded using the second expansion step until an intersection of the expanded area of the first map area and the expanded area of the second map area is connected to the first map area and the second map area.
4. The method according to claim 2, characterized in that After determining the intersection area of the expanded area of the first map area and the expanded area of the second map area, the method further includes: When the intersection area is not connected to the first map area and the second map area, obtaining a first merged area and a second merged area, where the first merged area is a map area formed by merging the first map area with an expanded area of the first map area, and the second merged area is a map area formed by merging the second map area with an expanded area of the second map area; Continue to use the first expansion step size to expand the first merged area and the second merged area until the intersection area of the expanded area of the first map area obtained after multiple expansion processes and the expanded area of the second map area obtained after multiple expansion processes are connected to the first map area and the second map area.
5. The method according to claim 1, wherein The expansion processing based on the first map area and the second map area includes: Obtaining an outward expansion unit region having a target size; The first map area and the second map area are expanded using the expansion unit area as a unit.
6. The method according to claim 1, characterized in that In the case where the intersection area is connected to the first map area and the second map area, after merging the intersection area with the first map area and the second map area, the method further includes: A concave hull process is performed on the intersection area and the map area obtained by merging the first map area and the second map area to obtain a concave hull area.
7. The method according to claim 6, characterized in that The step of performing concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area to obtain a concave hull area includes: Determine, in the merged map area, a plurality of vertices located on a boundary of the first map area or on a boundary of the second map area; The multiple vertices are connected in sequence to generate the concave hull area.
8. The method according to claim 6, characterized in that After performing concave hull processing on the map area obtained by merging the intersection area with the first map area and the second map area to obtain a concave hull area, the method further includes: The first map area, the second map area and the concave hull area are merged.
9. The method according to claim 1, characterized in that In the case where the intersection area is connected to the first map area and the second map area, after merging the intersection area with the first map area and the second map area, the method further includes: Acquire a third map area, wherein a minimum distance between the third map area and at least one of the first map area and the second map area is less than the distance threshold; From the merged area, an intersection area between the merged area and the third map area is removed.
10. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories, wherein at least one instruction is stored in the one or more memories, and the at least one instruction is loaded and executed by the one or more processors to implement the operations performed by the map area merging method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the operation performed by the map area merging method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method for segmenting vasa sanguinea retinae image
CN106651846A
Image area cutting method and device, storage medium and electronic device
CN110349082A
Vehicle delivery area determination method and device, server and storage medium
CN111626588A