Point of interest aggregation method and device
Through the biaxial mapping POI point aggregation algorithm, the problem of memory usage and excessive computing volume caused by excessive POI is solved, efficient POI aggregation and display is achieved, and the performance of map services is improved.
Patent Information
- Application Number
- CN202111159701.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2041-09-30
AI Technical Summary
In map-based business, when there are too many POIs, the calculation amount of computing distances increases exponentially, resulting in excessive memory usage and inefficient existing aggregation methods.
The POI point aggregation algorithm with biaxial mapping is used to map POI to the x-axis and y-axis, sort and aggregate respectively, reduce the number of calculations between points and points through center of mass calculation, and cancel the POI that cannot be aggregated during y-axis mapping to ensure that the aggregation is performed only when the threshold condition is met.
It greatly reduces the computing volume between POI points, reduces memory usage, improves aggregation efficiency and system stability, and supports the rapid processing of massive POIs.
Smart Images

Figure CN113901312B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of intelligent search technology, in particular to the field of map technology, and specifically to a method and device for aggregating points of interest. Background Art
[0002] In map-based businesses, it is usually necessary to display different POIs (Point of Interest). When there are too many POIs, dense point overlap and unnecessary rendering will occur. Usually, based on the zoom ratio of the map and the aggregation between POIs, POIs that are closer to each other are merged into one point, which is called POI point aggregation. The usual process of POI aggregation is to first obtain all POIs within the map display range, and then calculate the display distance of all POIs based on the zoom ratio, and aggregate POI points that reach the threshold into one point. Depending on the zoom ratio, the number of POIs in the map display range may be small or large. When the number of POIs is large, the amount of calculation required to calculate the distance between two POIs will increase exponentially, and all POI points need to be loaded at one time, taking up a lot of memory. Summary of the Invention
[0003] The present disclosure provides a method, apparatus, device, storage medium, and computer program product for aggregating points of interest.
[0004] According to a first aspect of the present disclosure, a method for aggregating points of interest is provided, comprising: mapping a set of points of interest to be aggregated to the x-axis to obtain a first set of projection points; aggregating the first set of projection points to obtain at least one first aggregation set and the center point coordinates of each first aggregation set; for each first aggregation set, mapping the points of interest corresponding to the first aggregation set to the y-axis to obtain a second set of projection points of the first aggregation set, and aggregating the second set of projection points to obtain at least one second aggregation set and the center point coordinates of each second aggregation set; for each second aggregation set, the set of points of interest are aggregated and displayed according to the center point coordinates of the second aggregation set and the center point coordinates of the corresponding first aggregation set.
[0005] According to a second aspect of the present disclosure, a point of interest aggregation device is provided, including: a projection unit, configured to map a set of point of interest to be aggregated to the x-axis to obtain a first set of projection points; a first aggregation unit, configured to aggregate the first set of projection points to obtain at least one first aggregation set and the center point coordinates of each first aggregation set; a second aggregation unit, configured to, for each first aggregation set, map the points of interest corresponding to the first aggregation set to the y-axis to obtain a second set of projection points of the first aggregation set, and aggregate the second set of projection points to obtain at least one second aggregation set and the center point coordinates of each second aggregation set; an output unit, configured to aggregate and display the point of interest sets for each second aggregation set according to the center point coordinates of the second aggregation set and the center point coordinates of the corresponding first aggregation set.
[0006] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the first aspect.
[0007] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method according to the first aspect.
[0008] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to the first aspect.
[0009] The methods and devices for POI aggregation provided by the embodiments of the present disclosure utilize a dual-axis mapping POI point aggregation algorithm. By mapping POIs to the x and y axes, sorting them separately, and then calculating the distance between POI points, the number of point-to-point calculations is significantly reduced. Aggregation is performed simultaneously on both the x and y axes to ensure that the final aggregated points are valid. If two POIs meet the x-axis aggregation requirement but cannot be aggregated when mapped on the y-axis, the aggregation is canceled and the points are restored to independent points. This ensures that two POIs can only be aggregated if they meet the threshold conditions simultaneously.
[0010] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0012] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0013] Figure 2 is a flowchart of an embodiment of a method for aggregating points of interest according to the present disclosure;
[0014] Figures 3a-3d is a schematic diagram of an application scenario of the interest point aggregation method according to the present disclosure;
[0015] Figure 4 is a flowchart of another embodiment of the method for aggregating points of interest according to the present disclosure;
[0016] Figure 5 is a schematic structural diagram of an embodiment of a point of interest aggregation device according to the present disclosure;
[0017] Figure 6 It is a schematic diagram of the structure of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0019] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the POI aggregation method or POI aggregation apparatus disclosed herein can be applied.
[0020] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0021] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as map applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0022] Terminal devices 101, 102, and 103 can be hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with display screens and support map browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0023] The server 105 may be a server that provides various services, such as a background map server that supports the maps displayed on the terminal devices 101, 102, and 103. The background map server may analyze and process received data such as POI search requests, and feed back the processing results (e.g., a map that incorporates POI displays) to the terminal device.
[0024] It should be noted that a server can be either hardware or software. When a server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When a server is software, it can be implemented as multiple software programs or software modules (for example, multiple software programs or software modules used to provide distributed services), or as a single software program or software module. This is not specifically limited here. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0025] It should be noted that the POI aggregation method provided in the embodiments of the present disclosure is generally executed by the server 105, and accordingly, the POI aggregation device is generally provided in the server 105. If it is an offline map, the POI aggregation method provided in the embodiments of the present disclosure can be executed by the terminal devices 101, 102, and 103, and accordingly, the POI aggregation device is provided in the terminal devices 101, 102, and 103.
[0026] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0027] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for aggregating points of interest according to the present disclosure. The method for aggregating points of interest includes the following steps:
[0028] Step 201: Map the set of interest points to be aggregated to the x-axis to obtain a first set of projection points.
[0029] In this embodiment, the execution subject of the interest point aggregation method (eg Figure 1 The server shown) can receive a POI search request from a terminal that a user uses to browse a map through a wired connection or a wireless connection, and can search for multiple POIs that meet the user's requirements from the currently displayed map interface. For example, if a user searches for a restaurant through a mobile phone map, a large number of restaurants can be found in the area displayed on the current map, and the current scale cannot display all the icons of these restaurants, so it is necessary to aggregate the location points of these restaurants, that is, the locations of the searched restaurants are the points of interest to be aggregated. The longitude and latitude of the POI can be converted into Mercator coordinates, and then the set of points of interest to be aggregated can be mapped to the x-axis of the Mercator coordinate system to obtain a first projection point set, and the vertical coordinate of each projection point is 0. The naming of the first projection point set and the second projection point set in this article is only to distinguish the projection points on the x-axis from the projection points on the y-axis.
[0030] Step 202: Aggregate the first projection point set to obtain at least one first aggregated set and the coordinates of the center point of each first aggregated set.
[0031] In this embodiment, a common clustering algorithm (e.g., DBSCAN) can be used to cluster the first set of projection points. Each type of projection point constitutes a first clustered set. The coordinates of the cluster center of the multiple projection points in each first clustered set are the coordinates of the center point of the first clustered set. A distance threshold can be set, and points below the distance threshold can be clustered into one class. The distance threshold is negatively correlated with the scale, that is, the larger the scale, the smaller the distance threshold. The distance threshold can also be related to the size of the POI icon; the larger the POI icon, the larger the distance threshold.
[0032] Step 203: For each first aggregation set, map the interest points corresponding to the first aggregation set to the y-axis to obtain the second projection point set of the first aggregation set, and aggregate the second projection point set to obtain at least one second aggregation set and the center point coordinates of each second aggregation set.
[0033] In this embodiment, each first clustered set is composed of the projection points of POIs on the x-axis. Therefore, each first clustered set corresponds to multiple POIs. These POIs can be projected onto the y-axis, so that each first clustered set corresponds to a second projection point set. For each first clustered set, each second projection point set of the first clustered set is clustered (using the same clustering method) to obtain multiple second clustered sets. The cluster center coordinates of each second clustered set are used as the center point coordinates.
[0034] Step 204: for each second aggregated set, aggregate and display the interest point set according to the coordinates of the center point of the second aggregated set and the coordinates of the center point of the corresponding first aggregated set.
[0035] In this embodiment, the resulting aggregated POIs are not only close together on the x-axis, but also on the y-axis. POIs belonging to the same first and second aggregated sets are aggregated and displayed as a single point, with a single icon representing the aggregated POI. If the user adjusts the scale, the points are re-aggregated to create new points. For example, if the map is zoomed in and the scale is increased, the distance threshold decreases, more POIs are aggregated, and each aggregated POI represents fewer POIs.
[0036] The method provided by the above-mentioned embodiment of the present disclosure performs aggregation on both the x-axis and the y-axis simultaneously to ensure that the final aggregation point is a valid aggregation. If two POIs meet the x-axis aggregation requirements but cannot be aggregated when mapped on the y-axis, the aggregation is canceled and the points are restored to independent points. This ensures that two POIs can only be aggregated if the thresholds are met at the same time.
[0037] In some optional implementations of this embodiment, aggregating the first projection point sets to obtain at least one first aggregated set and the coordinates of the center point of each first aggregated set includes:
[0038] Sort the projection points in the first projection point set in ascending order of x-coordinates; select the projection point with the smallest x-coordinate as the reference point, and traverse the first projection point set to perform the following first aggregation step: calculate the distance between the reference point and its adjacent projection point; if the distance is less than a distance threshold, add the reference point and the adjacent projection point to the first temporary set, and use the centroid of the two as the new reference point, and continue performing the above first aggregation step;
[0039] If the distance is greater than or equal to the distance threshold, the first temporary set is stored as the first aggregation set and then cleared, and the coordinates of the reference point are set to the coordinates of the center point of the first aggregation set; if the adjacent projection point is not the last projection point, the adjacent projection point is used as the new reference point, and the above-mentioned first aggregation step is continued; if the adjacent projection point is the last projection point, the traversal is ended, the adjacent projection point is stored as the first aggregation set, and the coordinates of the adjacent projection point are set to the coordinates of the center point of the first aggregation set.
[0040] The first step is to map all POIs to the x-axis and sort them on the x-axis, such as Figure 3a As shown, the order after sorting is ABCDEF.
[0041] In the second step, all POI points are traversed in sequence according to the sorted POI points, and compared with the reference points to see if they need to be aggregated. After aggregation, the reference points are updated. If aggregation is not possible, the traversal continues backward.
[0042] like Figure 3b As shown in the figure, assuming the threshold is 2, first take point A as the reference point, and the distance between B and A is 1. If it is less than 2, they can be aggregated. Then AB is aggregated into a POI point A1, and its position is updated to the centroid of the two POIs. Then A1 is used as the reference point and compared with C to obtain a new aggregation point A2. Then A2 is used as the reference point and compared with D to obtain a new aggregation point A3 (i.e., the center point of a first aggregation set). A3 is the aggregation of the four points ABCD. Because the distance between E and A3 is greater than the threshold 2, E is reselected as the reference point and compared with F. The distance between the two is equal to 2, so they can be aggregated. Then E and F are aggregated into a new POI point E1 (i.e., the center point of another first aggregation set), which contains two POIs EF.
[0043] This method can reduce the amount of calculation between POI points. By sorting first and then calculating, only the distance between each point and the previous point is calculated, which greatly reduces the amount of calculation.
[0044] In some optional implementations of this embodiment, aggregating the second projection point sets to obtain at least one second aggregated set and the coordinates of the center point of each second aggregated set includes:
[0045] Sort the projection points in the second projection point set in ascending order of y coordinates;
[0046] The projection point with the smallest y coordinate is selected as the reference point, and the second projection point set is traversed to perform the following second aggregation step: Calculate the distance between the reference point and its adjacent projection point; If the distance is less than the distance threshold, add the reference point and the adjacent projection point to the second temporary set, and use the centroid of the reference point and the adjacent projection point as the new reference point, and continue the above second aggregation step;
[0047] If the distance is greater than or equal to the distance threshold, the second temporary set is stored as the second aggregation set and then cleared, and the coordinates of the reference point are set to the coordinates of the center point of the second aggregation set; if the adjacent projection point is not the last projection point, the adjacent projection point is used as the new reference point, and the above-mentioned second aggregation step is continued; if the adjacent projection point is the last projection point, the traversal is ended, the adjacent projection point is stored as the second aggregation set, and the coordinates of the adjacent projection point are set to the coordinates of the center point of the second aggregation set.
[0048] The third step is to traverse the aggregated POI points in sequence, and map and sort the original POIs corresponding to the first aggregate set on the y-axis.
[0049] like Figure 3c As shown, first the POI points corresponding to A3 are mapped to the y-axis and sorted, and then aggregated again according to the method in the second step to obtain new aggregation points Y1 and Y2.
[0050] Similarly, E1 is mapped and sorted on the y-axis. Since the distance between E and F on the y-axis is 3, which is greater than 2, they cannot be aggregated, so they are split into original POIs. The final aggregation result is as follows: Figure 3d shown.
[0051] This approach can reduce the amount of computation required to map POIs. By sorting and then calculating, only the distance between each point and the previous one is calculated, significantly reducing the amount of computation. If aggregation is not possible during y-axis mapping, the aggregation is canceled and the points are restored to independent points. This ensures that two POIs can only be aggregated if they both meet the distance threshold.
[0052] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to insert a new point of interest, adding the new point of interest to the first projection point set and the second projection point set after mapping on the x-axis and y-axis respectively; re-aggregating based on the updated first projection point set to obtain at least one first aggregated set and the center point coordinates of each first aggregated set; re-aggregating based on the updated second projection point set to obtain at least one second aggregated set and the center point coordinates of each second aggregated set; for each second aggregated set, aggregating the center point coordinates of the second aggregated set and the center point coordinates of the corresponding first aggregated set to display the point of interest set.
[0053] For incremental POIs, add new POIs after aggregation and repeat steps 1 through 3 to achieve incremental aggregation until all POIs are mapped on the x- and y-axes. This is particularly useful when adding POIs after modifying the search criteria. For example, if the original search criteria was for Chinese restaurants and some POIs were found, and the user changes the search criteria to restaurants, adding more POIs, these POIs can be incrementally aggregated based on the original POI projection points, reducing the computational effort.
[0054] In some optional implementations of this embodiment, the distance threshold is negatively correlated with the scale of the map. The distance threshold can be dynamically adjusted according to the scale, so that the POI is dynamically adjusted when the user zooms in and out of the map, thereby improving the user experience.
[0055] Further references Figure 4 , which shows a process 400 of another embodiment of the interest point aggregation method. The process 400 of the interest point aggregation method includes the following steps:
[0056] Step 401: Obtain the number of interest point sets to be aggregated.
[0057] In this embodiment, the execution subject of the interest point aggregation method (eg Figure 1 The server (shown) can receive a POI search request from a terminal used by a user to browse a map via a wired or wireless connection, and can search for multiple POIs that meet the user's requirements from the currently displayed map interface. For example, if a user searches for restaurants on a mobile phone map, a small number of restaurants may be found within the area currently displayed on the map. However, the current scale cannot display all of these restaurant icons, so the locations of these restaurants need to be aggregated. That is, the locations of the searched restaurants are the points of interest to be aggregated.
[0058] Count the number of POIs found in the area currently displayed on the map.
[0059] Step 402: If the number is greater than the number threshold, the set of interest points to be aggregated is divided into multiple batches.
[0060] In this embodiment, when the number of POIs is less than N, all POIs are loaded at once and the method described in process 200 is executed to complete aggregation in one go, occupying a maximum space of N. When the number of POIs is much greater than N, the POIs are sorted in ascending order by their x-coordinates and then divided into multiple batches, each containing N POIs. The number of POIs in the last batch may be less than N.
[0061] Step 403: Aggregate the points of interest in batches.
[0062] In this embodiment, after each loading of the first N POIs, the method described in process 200 is executed, and then the process is repeated until all POIs are loaded, and the occupied space size is also N. All constants with space complexity N do not increase with the increase of POIs.
[0063] The first step, mapping the x-axis and sorting, has a time complexity of nlog(n). The second step, traversal and aggregation, has a complexity of n. The third step, mapping the y-axis and aggregating, has a complexity of nlog(n). For a large number of POIs, aggregation requires m steps, resulting in a total complexity of mnlog(n). Since n is a constant, the time complexity increases linearly with the number of POIs.
[0064] from Figure 4 It can be seen that Figure 2 Compared with the corresponding embodiment, the process 400 of the point of interest aggregation method in this embodiment reflects the steps of performing aggregation in batches. Therefore, the solution described in this embodiment reduces memory usage and supports incremental aggregation. It can aggregate a portion of points each time and then gradually increase the number of POIs to achieve the aggregation of all POIs. The process only requires a fixed amount of memory and does not increase with the number of POIs. It can significantly reduce memory usage when aggregating a large number of POIs, with memory usage reduced by more than 80%. For large-scale, high-concurrency scenarios, it can significantly improve system stability and response speed.
[0065] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an interest point aggregation device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0066] like Figure 5 As shown, the interest point aggregation device 500 of this embodiment includes: a projection unit 501, a first aggregation unit 502, a second aggregation unit 503, and an output unit 504. The projection unit 501 is configured to map the interest point set to be aggregated onto the x-axis to obtain a first projection point set; the first aggregation unit 502 is configured to aggregate the first projection point set to obtain at least one first aggregation set and the center point coordinates of each first aggregation set; the second aggregation unit 503 is configured to, for each first aggregation set, map the interest points corresponding to the first aggregation set onto the y-axis to obtain a second projection point set of the first aggregation set, and aggregate the second projection point sets to obtain at least one second aggregation set and the center point coordinates of each second aggregation set; the output unit 504 is configured to aggregate and display the interest point set according to the center point coordinates of the second aggregation set and the center point coordinates of the corresponding first aggregation set.
[0067] In this embodiment, the specific processing of the projection unit 501, the first aggregation unit 502, the second aggregation unit 503, and the output unit 504 of the interest point aggregation device 500 can be referred to. Figure 2These correspond to steps 201, 202, 203, and 204 in the embodiment.
[0068] In some optional implementations of this embodiment, the first aggregation unit 502 is further configured to: sort the projection points in the first projection point set in ascending order of x-coordinates; select the projection point with the smallest x-coordinate as the reference point, traverse the first projection point set and perform the following first aggregation step: calculate the distance between the reference point and the adjacent projection point behind it; if the distance is less than the distance threshold, add the reference point and the adjacent projection point to the first temporary set, and use the centroid of the two as the new reference point, and continue to perform the above-mentioned first aggregation step; if the distance is greater than or equal to the distance threshold, store the first temporary set as the first aggregation set and then clear it, and set the coordinates of the reference point to the center point coordinates of the first aggregation set; if the adjacent projection point is not the last projection point, use the adjacent projection point as the new reference point, and continue to perform the above-mentioned first aggregation step; if the adjacent projection point is the last projection point, end the traversal, store the adjacent projection point as the first aggregation set, and set the coordinates of the adjacent projection point to the center point coordinates of the first aggregation set.
[0069] In some optional implementations of this embodiment, the second aggregation unit 503 is further configured to: sort the projection points in the second projection point set in ascending order of y coordinates; select the projection point with the smallest y coordinate as the reference point, traverse the second projection point set and perform the following second aggregation step: calculate the distance between the reference point and the adjacent projection point behind it; if the distance is less than the distance threshold, add the reference point and the adjacent projection point to the second temporary set, and use the centroid of the reference point and the adjacent projection point as the new reference point, and continue to perform the above-mentioned second aggregation step; if the distance is greater than or equal to the distance threshold, store the second temporary set as the second aggregation set and then clear it, and set the coordinates of the reference point to the center point coordinates of the second aggregation set; if the adjacent projection point is not the last projection point, use the adjacent projection point as the new reference point, and continue to perform the above-mentioned second aggregation step; if the adjacent projection point is the last projection point, end the traversal, store the adjacent projection point as the second aggregation set, and set the coordinates of the adjacent projection point to the center point coordinates of the second aggregation set.
[0070] In some optional implementations of this embodiment, the device 500 also includes an updating unit (not shown in the drawings), which is configured to: in response to receiving a request to insert a new point of interest, add the new point of interest to the first projection point set and the second projection point set after mapping on the x-axis and y-axis respectively; re-aggregate based on the updated first projection point set to obtain at least one first aggregation set and the center point coordinates of each first aggregation set; re-aggregate based on the updated second projection point set to obtain at least one second aggregation set and the center point coordinates of each second aggregation set; for each second aggregation set, aggregate the interest point set using the center point coordinates of the second aggregation set and the center point coordinates of the corresponding first aggregation set.
[0071] In some optional implementations of this embodiment, the device 500 also includes a batch processing unit (not shown in the drawings), which is configured to: if the number of interest point sets to be aggregated is greater than a quantity threshold, divide the interest point sets to be aggregated into multiple batches, wherein the number of interest points in each batch is not greater than the quantity threshold; and aggregate the interest points in batches.
[0072] In some optional implementations of this embodiment, the distance threshold is negatively correlated with the scale of the map.
[0073] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0074] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0075] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in process 200 or 400.
[0076] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in process 200 or 400.
[0077] A computer program product includes a computer program, wherein the computer program implements the method described in flow 200 or 400 when executed by a processor.
[0078] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0079] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0080] Various components in device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0081] The computing unit 601 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the point of interest aggregation method. For example, in some embodiments, the point of interest aggregation method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the point of interest aggregation method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the point of interest aggregation method in any other suitable manner (e.g., via firmware).
[0082] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0083] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0084] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0085] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0086] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0087] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0088] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0089] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for aggregating points of interest based on a map, comprising: Map the set of interest points to be aggregated to the x-axis to obtain a first projection point set; Aggregating the first projection point sets to obtain at least one first aggregated set and the coordinates of the center point of each first aggregated set; For each first aggregated set, map the interest points corresponding to the first aggregated set to the y-axis to obtain a second projection point set of the first aggregated set, and aggregate the second projection point set to obtain at least one second aggregated set and the coordinates of the center point of each second aggregated set; For each second aggregated set, the interest point set is aggregated and displayed according to the coordinates of the center point of the second aggregated set and the coordinates of the center point of the corresponding first aggregated set.
2. The method according to claim 1, wherein The aggregating the first projection point sets to obtain at least one first aggregated set and the coordinates of the center point of each first aggregated set includes: Sort the projection points in the first projection point set in ascending order of x-coordinates; The projection point with the smallest x-coordinate is selected as the reference point, and the first projection point set is traversed to perform the following first aggregation step: Calculate the distance between the reference point and its adjacent projection point; If the distance is less than the distance threshold, add the reference point and the adjacent projection point to the first temporary set, and use the centroid of the two as the new reference point, and continue the above first aggregation step; If the distance is greater than or equal to the distance threshold, the first temporary set is stored as the first aggregation set and then cleared, and the coordinates of the reference point are set to the coordinates of the center point of the first aggregation set; if the adjacent projection point is not the last projection point, the adjacent projection point is used as the new reference point, and the above-mentioned first aggregation step is continued; if the adjacent projection point is the last projection point, the traversal is ended, the adjacent projection point is stored as the first aggregation set, and the coordinates of the adjacent projection point are set to the coordinates of the center point of the first aggregation set.
3. The method according to claim 1, wherein The aggregating the second projection point set to obtain at least one second aggregated set and the coordinates of the center point of each second aggregated set includes: Sort the projection points in the second projection point set in ascending order of y coordinates; The projection point with the smallest y coordinate is selected as the reference point, and the second projection point set is traversed to perform the following second aggregation step: calculating the distance between the reference point and its adjacent projection point; if the distance is less than a distance threshold, adding the reference point and the adjacent projection point to the second temporary set, and using the centroid of the reference point and the adjacent projection point as the new reference point, and continuing the second aggregation step; If the distance is greater than or equal to the distance threshold, the second temporary set is stored as the second aggregation set and then cleared, and the coordinates of the reference point are set to the coordinates of the center point of the second aggregation set; if the adjacent projection point is not the last projection point, the adjacent projection point is used as the new reference point, and the above-mentioned second aggregation step is continued; if the adjacent projection point is the last projection point, the traversal is ended, the adjacent projection point is stored as the second aggregation set, and the coordinates of the adjacent projection point are set to the coordinates of the center point of the second aggregation set.
4. The method according to claim 1, wherein The method further comprises: In response to receiving a request to insert a new point of interest, adding the new point of interest to the first projection point set and the second projection point set after mapping the new point of interest on the x-axis and the y-axis respectively; Re-aggregate based on the updated first projection point set to obtain at least one first aggregated set and the coordinates of the center point of each first aggregated set; Re-aggregate based on the updated second projection point set to obtain at least one second aggregated set and the coordinates of the center point of each second aggregated set; For each second aggregated set, the center point coordinates of the second aggregated set and the center point coordinates of the corresponding first aggregated set are aggregated and displayed.
5. The method according to claim 1, wherein The method further comprises: If the number of the set of interest points to be aggregated is greater than a quantity threshold, dividing the set of interest points to be aggregated into multiple batches, wherein the number of interest points in each batch is not greater than the quantity threshold; Aggregate points of interest in batches.
6. The method according to claim 2 or 3, wherein: The distance threshold is negatively correlated with the scale of the map.
7. A map-based point of interest aggregation device, comprising: a projection unit configured to map the set of interest points to be aggregated onto the x-axis to obtain a first set of projection points; a first aggregation unit configured to aggregate the first projection point sets to obtain at least one first aggregated set and the coordinates of a center point of each first aggregated set; The second aggregation unit is configured to, for each first aggregated set, map the interest points corresponding to the first aggregated set to the y-axis to obtain a second projection point set of the first aggregated set, and aggregate the second projection point set to obtain at least one second aggregated set and the coordinates of the center point of each second aggregated set; The output unit is configured to aggregate and display the interest point sets for each second aggregated set according to the center point coordinates of the second aggregated set and the center point coordinates of the corresponding first aggregated set.
8. The device according to claim 7, wherein The first aggregation unit is further configured to: Sort the projection points in the first projection point set in ascending order of x-coordinates; The projection point with the smallest x-coordinate is selected as the reference point, and the first projection point set is traversed to perform the following first aggregation step: Calculate the distance between the reference point and its adjacent projection point; If the distance is less than the distance threshold, add the reference point and the adjacent projection point to the first temporary set, and use the centroid of the two as the new reference point, and continue the above first aggregation step; If the distance is greater than or equal to the distance threshold, the first temporary set is stored as the first aggregation set and then cleared, and the coordinates of the reference point are set to the coordinates of the center point of the first aggregation set; if the adjacent projection point is not the last projection point, the adjacent projection point is used as the new reference point, and the above-mentioned first aggregation step is continued; if the adjacent projection point is the last projection point, the traversal is ended, the adjacent projection point is stored as the first aggregation set, and the coordinates of the adjacent projection point are set to the coordinates of the center point of the first aggregation set.
9. The device according to claim 7, wherein The second aggregation unit is further configured to: Sort the projection points in the second projection point set in ascending order of y coordinates; The projection point with the smallest y coordinate is selected as the reference point, and the second projection point set is traversed to perform the following second aggregation step: calculating the distance between the reference point and its adjacent projection point; if the distance is less than a distance threshold, adding the reference point and the adjacent projection point to the second temporary set, and using the centroid of the reference point and the adjacent projection point as the new reference point, and continuing the second aggregation step; If the distance is greater than or equal to the distance threshold, the second temporary set is stored as the second aggregation set and then cleared, and the coordinates of the reference point are set to the coordinates of the center point of the second aggregation set; if the adjacent projection point is not the last projection point, the adjacent projection point is used as the new reference point, and the above-mentioned second aggregation step is continued; if the adjacent projection point is the last projection point, the traversal is ended, the adjacent projection point is stored as the second aggregation set, and the coordinates of the adjacent projection point are set to the coordinates of the center point of the second aggregation set.
10. The device according to claim 7, wherein The apparatus further includes an updating unit configured to: In response to receiving a request to insert a new point of interest, adding the new point of interest to the first projection point set and the second projection point set after mapping the new point of interest on the x-axis and the y-axis respectively; Re-aggregate based on the updated first projection point set to obtain at least one first aggregated set and the coordinates of the center point of each first aggregated set; Re-aggregate based on the updated second projection point set to obtain at least one second aggregated set and the coordinates of the center point of each second aggregated set; For each second aggregated set, the center point coordinates of the second aggregated set and the center point coordinates of the corresponding first aggregated set are aggregated and displayed.
11. The device according to claim 7, wherein The apparatus further comprises a batch processing unit configured to: If the number of the set of interest points to be aggregated is greater than a quantity threshold, dividing the set of interest points to be aggregated into multiple batches, wherein the number of interest points in each batch is not greater than the quantity threshold; Aggregate points of interest in batches.
12. The device according to claim 8 or 9, wherein The distance threshold is negatively correlated with the scale of the map.
13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Electronic map data loading method and device
CN105574102A
Network space mapping method, visualization method and system
CN111935331A