Point position aggregation method and device, electronic equipment and storage medium

By obtaining map layer encoding and accuracy, establishing a two-dimensional coordinate system, determining the latitude and longitude range, and taking out the target point collection from the map database, it solves the problems of complex and low efficiency of map point aggregation in the existing technology, and achieves high efficiency and accuracy point aggregation to ensure user experience.

CN118964508APending Publication Date: 2024-11-15CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411155251.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing map point aggregation method is complex and inefficient, resulting in slow aggregation speed and the aggregated points drift away, which cannot meet user needs.

Method used

By obtaining map layer encoding and accuracy, establishing a two-dimensional coordinate system, determining the latitude and longitude range, taking out the target point collection from the map database, and storing the point aggregation table to improve aggregation efficiency and accuracy.

Benefits of technology

It improves the efficiency and accuracy of point aggregation, reduces CPU consumption, ensures that points do not float away when users zoom, and meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964508A_ABST
    Figure CN118964508A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a point location aggregation method and device, electronic equipment and a storage medium, and belongs to the technical field of maps. The method comprises the following steps: acquiring a first layer code and first layer precision; acquiring a first point location according to the first layer code; taking the first point as a central point, and establishing a two-dimensional coordinate system according to the first layer precision; determining the longitude and latitude of a left upper corner point location and the longitude and latitude of a right lower corner point location of the two-dimensional coordinate system, and determining a current longitude and latitude maximum value and a current longitude and latitude minimum value according to the longitude and latitude of the left upper corner point location and the longitude and latitude of the right lower corner point location; extracting a first target point position set from a map database according to the current longitude and latitude maximum value and the current longitude and latitude minimum value; and storing the first layer code, the first code, the first longitude and latitude information and the first target point position set into a point position aggregation table. According to the embodiment of the invention, the point aggregation efficiency can be improved, the point aggregation accuracy is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of map technology, and in particular to a point aggregation method and device, an electronic device and a storage medium. Background Art

[0002] In the related art, most of the map point aggregation methods are relatively complex or the map point aggregation speed is slow and cannot meet user needs.

[0003] The traditional map fixed grid multi-point centroid aggregation method is complex, and there will be a lot of redundant empty operations that consume CPU resources. In addition, the aggregated points are relatively scattered, and the points are not the actual longitude and latitude of the device. When users zoom in and out on the map, it is easy to find the points. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a point aggregation method and device, an electronic device and a storage medium, aiming to improve the efficiency and accuracy of point aggregation.

[0005] To achieve the above object, an embodiment of the present application provides a point aggregation method, which includes the following steps:

[0006] Obtaining a first layer code and a first layer precision, where the first layer precision adopts map precision;

[0007] Acquire a first point according to the first layer code, where the first point includes a first code and first longitude and latitude information;

[0008] Taking the first point as the center point, establishing a two-dimensional coordinate system according to the first layer accuracy;

[0009] Determine the latitude and longitude of the upper left corner point and the latitude and longitude of the lower right corner point of the two-dimensional coordinate system, and determine the current maximum longitude and longitude and the current minimum longitude and longitude according to the latitude and longitude of the upper left corner point and the latitude and longitude of the lower right corner point;

[0010] Retrieving a first target point set from the map database according to the current maximum latitude and longitude and the current minimum latitude and longitude;

[0011] The first layer code, the first code, the first longitude and latitude information and the first target point set are stored in a point aggregation table.

[0012] In some embodiments, determining the longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system includes:

[0013] The longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system are determined according to the first longitude and latitude information and the first layer accuracy.

[0014] In some embodiments, the first longitude and latitude information includes a first latitude, and determining the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system according to the first longitude and latitude information and the first layer accuracy includes:

[0015] Calculate a first longitude angle according to the first latitude and the first layer accuracy, where the first longitude angle represents a longitude offset;

[0016] Calculating a first latitude angle according to the first layer precision, where the first latitude angle represents a latitude offset;

[0017] The longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system are determined according to the first longitude angle, the first latitude angle and the first longitude and latitude information.

[0018] In some embodiments, obtaining a first point according to the first layer code includes:

[0019] Determine whether there is data in the point aggregation table;

[0020] If data exists in the point aggregation table, taking out the first point from the point aggregation table according to the first layer code;

[0021] If there is no data in the point aggregation table, the first point is retrieved from the map database according to the first layer code.

[0022] In some embodiments, the method further comprises:

[0023] Define the layer code and first layer precision and record them in the preset dictionary table.

[0024] In some embodiments, the method further comprises:

[0025] Get the first layer code and diagonal coordinates longitude and latitude passed in by the user;

[0026] A two-dimensional coordinate system is established according to the first layer code and the diagonal coordinate longitude and latitude.

[0027] In some embodiments, the method further comprises:

[0028] In response to the first instruction, the first target point set is displayed on the map page.

[0029] In some embodiments, the method further comprises:

[0030] Acquire an electronic fence, wherein the electronic fence includes at least three map points, and the map points include corresponding longitude and latitude information;

[0031] Determine the construction point according to the latitude and longitude information of the map point;

[0032] A two-dimensional coordinate system is constructed according to the construction points, and the two-dimensional coordinate system includes all map points in the electronic fence.

[0033] In some embodiments, the extracting a first target point set from the map database according to the current maximum latitude and longitude and the current minimum latitude and longitude includes:

[0034] Retrieving a set of candidate points from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude;

[0035] It is determined whether a candidate point in the candidate point set is located in the electronic fence, and if so, the target point is added to the first target point set.

[0036] In some embodiments, the method further comprises:

[0037] In response to the second instruction, an electronic fence is set on the map page, wherein the electronic fence adopts an irregular polygon.

[0038] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a point aggregation device, the device comprising:

[0039] A layer acquisition module, used to acquire a first layer code and a first layer precision, wherein the first layer precision adopts a map precision;

[0040] A point acquisition module, used for acquiring a first point according to the first layer code, wherein the first point includes a first code and first longitude and latitude information;

[0041] A coordinate system establishment module, used to establish a two-dimensional coordinate system according to the first layer accuracy by taking the first point as the center point;

[0042] A point determination module, used to determine the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system, and determine the maximum value of the current longitude and latitude and the minimum value of the current longitude and latitude according to the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point;

[0043] A set acquisition module, used for obtaining a first target point set from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude;

[0044] A storage module is used to store the first layer code, the first code, the first longitude and latitude information and the first target point set into a point aggregation table.

[0045] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.

[0046] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0047] The embodiments of the present application include at least the following beneficial effects: the present application provides a point aggregation method and device, an electronic device and a storage medium, the scheme obtains a first layer code and a first layer precision; obtains a first point according to the first layer code; uses the first point as the center point, establishes a two-dimensional coordinate system according to the first layer precision, improves aggregation efficiency and reduces CPU consumption; determines the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system, determines the current maximum longitude and latitude and the current minimum longitude and latitude according to the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point, which is beneficial to improve the accuracy of the target point; retrieves a first target point set from a map database according to the current maximum longitude and latitude and the current minimum longitude and latitude, which is beneficial to improve the efficiency of point aggregation; stores the first layer code, the first code, the first longitude and latitude information and the first target point set in a point aggregation table, the first target point set is an actual map point, and the point will not drift away during user zooming. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of the point aggregation method provided in an embodiment of the present application;

[0049] Figure 2 yes Figure 1 Flow chart of step S104 in FIG.

[0050] Figure 3 yes Figure 1 Flow chart of step S102 in FIG.

[0051] Figure 4 It is a flowchart of the step of obtaining incoming data of the point aggregation method provided in an embodiment of the present application;

[0052] Figure 5 It is a flow chart of the steps of constructing a two-dimensional coordinate system according to an electronic fence in the point aggregation method provided in an embodiment of the present application;

[0053] Figure 6 yes Figure 1 Flow chart of step S105 in FIG.

[0054] Figure 7is a flow chart of the point aggregation method provided in the embodiment of the present application applied to map points;

[0055] Figure 8 is a schematic diagram of a square two-dimensional coordinate system provided in an embodiment of the present application;

[0056] Fig. 9 It is a structural schematic diagram of a point aggregation device provided in an embodiment of the present application;

[0057] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0059] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0060] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0062] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0063] 1) Map point: the latitude and longitude of the customer's device;

[0064] 2) Layers: zoomed maps, maps at different precisions;

[0065] 3) Accuracy: map accuracy, which can be 500 meters, 1000 meters, 2000 meters, etc.

[0066] 4) Irregular polygonal electronic fence: a map range consisting of at least three map points.

[0067] In the related art, most of the map point aggregation methods are relatively complex or the map point aggregation speed is slow and cannot meet user needs.

[0068] The traditional map fixed grid multi-point centroid aggregation method is complex, and there will be a lot of redundant empty operations that consume CPU resources. In addition, the aggregated points are relatively scattered, and the points are not the actual longitude and latitude of the device. When users zoom in and out on the map, it is easy to find the points.

[0069] In view of this, a point aggregation method, device, equipment and medium are provided in an embodiment of the present application. The scheme obtains a first layer code and a first layer accuracy; obtains a first point according to the first layer code; uses the first point as the center point, and establishes a two-dimensional coordinate system according to the first layer accuracy to improve aggregation efficiency and reduce CPU consumption; determines the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system, and determines the current maximum longitude and latitude and the current minimum longitude and latitude according to the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point, which is beneficial to improving the accuracy of the target point; retrieves the first target point set from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude, which is beneficial to improving the efficiency of point aggregation; stores the first layer code, the first code, the first longitude and latitude information and the first target point set in a point aggregation table, and the first target point set is an actual map point, and the point will not drift away during the user zooming process.

[0070] The point aggregation method provided in the embodiment of the present application relates to the field of map technology. The point aggregation method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in the blockchain network; the software can be an application that implements the point aggregation method, etc., but is not limited to the above forms.

[0071] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0072] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0073] Figure 1 is an optional flow chart of the point aggregation method provided in the embodiment of the present application. Figure 1The method may include but is not limited to steps S101 to S106.

[0074] Step S101, obtaining the first layer code and the first layer precision.

[0075] Specifically, the first layer accuracy adopts map accuracy.

[0076] Optionally, the first layer code and the first layer precision are obtained from a preset dictionary table.

[0077] The present application does not make any specific limitation on the accuracy of the first layer, and it can be flexibly selected in combination with actual detection needs. For example, the accuracy of the first layer can be 500 meters or 1,000 meters.

[0078] In this embodiment, the first layer code and the first layer accuracy are obtained to prepare for the subsequent determination of the first point position and thus point aggregation, which is beneficial to improving data accuracy and real-time performance.

[0079] Step S102: Acquire a first point according to the first layer code.

[0080] Specifically, the first point includes a first code and first longitude and latitude information, the first code is used to mark the first point, and the first longitude and latitude information represents the longitude and latitude information of the first point.

[0081] In some embodiments, the first layer code is used as a query condition to retrieve detailed information of the first point from a map database, including the first code and the first longitude and latitude information.

[0082] The query at the first point supports database query optimization technology. For example, the query at the first point can adopt index optimization, query cache and distributed query, which is conducive to improving query efficiency and response speed.

[0083] In this embodiment, the first point is obtained according to the first layer code, preparing for subsequent point aggregation.

[0084] Step S103, taking the first point as the center point, and establishing a two-dimensional coordinate system according to the accuracy of the first layer;

[0085] Specifically, the two-dimensional coordinate system is the area for point aggregation. The present application does not specifically limit the shape of the two-dimensional coordinate system, and it can be selected according to actual needs. Exemplarily, the shape of the two-dimensional coordinate system can be a square or a rectangle.

[0086] In some embodiments, the two-dimensional coordinate system adopts a square.

[0087] Among them, a square is drawn with the first point as the center point with the first layer accuracy to establish a two-dimensional coordinate system.

[0088] In this embodiment, the first point is taken as the center point, and a two-dimensional coordinate system is established according to the accuracy of the first layer, which is conducive to point aggregation, improves aggregation efficiency and reduces CPU consumption.

[0089] Step S104, determining the longitude and latitude of the upper left corner and the lower right corner of the two-dimensional coordinate system, and determining the maximum value and the minimum value of the current longitude and latitude according to the longitude and latitude of the upper left corner and the lower right corner;

[0090] Specifically, the current maximum longitude and latitude values ​​include the current maximum longitude value and the current maximum latitude value, and the current minimum longitude and longitude values ​​include the current minimum longitude value and the current minimum latitude value.

[0091] In some embodiments, the longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system are calculated based on the first longitude and latitude information and the first layer accuracy.

[0092] Furthermore, the longitude offset and latitude offset are calculated according to the first longitude and latitude information and the first layer accuracy, and the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system are calculated according to the first longitude and longitude information, the longitude offset and the latitude offset.

[0093] Among them, the longitude of the upper left corner point is the smallest and the latitude is the largest (northern boundary); the longitude of the lower right corner point is the largest and the latitude is the smallest. Specifically, the upper left corner point is used to determine the current minimum longitude and the current maximum latitude, and the lower right corner point is used to determine the current maximum longitude and the current minimum latitude.

[0094] In this embodiment, the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system are determined, and the current maximum longitude and latitude and the current minimum longitude and latitude are determined based on the longitude and latitude of the upper left corner point and the latitude and longitude of the lower right corner point. This is conducive to determining the actual map points, and the points will not drift away during the user's zooming process, which is conducive to obtaining the first target point set and improving the accuracy of the target points.

[0095] Step S105, taking out a first target point set from a map database according to the current maximum longitude and latitude and the current minimum longitude and latitude;

[0096] Specifically, the first target point set represents the aggregated point set.

[0097] In some embodiments, the current maximum longitude and latitude and the current minimum longitude and latitude are used as query conditions to extract a first target point set from a map database.

[0098] Optionally, using geospatial indexing technology, for example, such as R-tree or Geohash indexing, is helpful in accelerating range query and data filtering operations.

[0099] In this embodiment, the first target point set is retrieved from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude, which is beneficial to improving the efficiency of point aggregation.

[0100] Step S106: store the first layer code, the first code, the first longitude and latitude information and the first target point set into a point aggregation table.

[0101] Optionally, in response to the first instruction, the first target point set is displayed on the map page. Specifically, the first instruction is used to display the first target point set, and the first instruction can be triggered when the map page is opened or refreshed after the first target point set is retrieved, or the first instruction can be triggered after the user zooms in or out of the map.

[0102] In this embodiment, the first layer code, the first code, the first longitude and latitude information and the first target point set are stored in a point aggregation table, which is conducive to the effective management and organization of map data and prepares for subsequent point aggregation based on the data in the point aggregation table.

[0103] Steps S101 to S106 shown in the embodiment of the present application are as follows: obtaining the first layer code and the first layer accuracy; obtaining the first point according to the first layer code; using the first point as the center point, establishing a two-dimensional coordinate system according to the first layer accuracy, improving aggregation efficiency and reducing CPU consumption; determining the longitude and latitude of the upper left corner point and the lower right corner point of the two-dimensional coordinate system, and determining the current maximum longitude and latitude and the current minimum longitude and latitude according to the longitude and latitude of the upper left corner point and the lower right corner point, which is beneficial to improving the accuracy of the target point; taking the first target point set from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude, which is beneficial to improving the efficiency of point aggregation; storing the first layer code, the first code, the first longitude and latitude information and the first target point set in the point aggregation table, the first target point set is the actual map point, and the point will not drift away during the user zooming process.

[0104] See also Figure 2 In some embodiments, step S104 may include but is not limited to steps S201 to S203:

[0105] Step S201, calculating a first longitude angle according to a first latitude and a first layer accuracy.

[0106] Specifically, the first longitude angle represents a longitude offset.

[0107] In some embodiments, the sine value of the ratio of the layer precision to the diameter of the earth (i.e., the radius of the earth*2) is calculated, the sine value is divided by the cosine value of the first latitude to obtain a first result, and the arc sine value of the first result is calculated to obtain the first longitude radian.

[0108] Furthermore, the first longitude arc is converted into a first longitude angle to obtain the longitude difference in the east-west direction (ie, the longitude change).

[0109] It is understood that when moving the layer precision distance from the first point on the earth, the longitude angles crossed depend on the latitude because the spacing of the longitude lines changes with the latitude. For example, moving a certain distance at the equator will cross more longitude angles, while the same distance near the poles will cross fewer longitude angles.

[0110] In this embodiment, the first longitude angle is calculated according to the first latitude and the first layer accuracy, and the accurate calculation of the geographical location is helpful to obtain the longitude change corresponding to the layer accuracy on the earth's surface.

[0111] Step S202, calculating the first latitude angle according to the layer accuracy.

[0112] Specifically, the first latitude angle represents a latitude offset.

[0113] In some embodiments, the ratio of the layer accuracy to the earth radius is calculated to calculate the first latitude arc corresponding to the layer accuracy.

[0114] Furthermore, the first latitude radian is converted into a first latitude angle to obtain the latitude difference in the north-south direction (ie, the latitude change).

[0115] It can be understood that the latitude line (or latitude line) is a circle parallel to the equator, and its length does not change with the latitude. Therefore, when the first point moves the distance of the layer precision, no matter at which latitude the first point is located, the latitude angle crossed is the same.

[0116] In this embodiment, calculating the first latitude angle according to the layer accuracy is beneficial to obtaining the latitude change corresponding to the layer accuracy on the earth's surface, which is beneficial to improving the accuracy of the point position.

[0117] Step S203, determining the longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system according to the first longitude angle, the first latitude angle and the first longitude and longitude information.

[0118] In step S203 of some embodiments, the first latitude is added to the first latitude angle to obtain the latitude of the upper left corner point; the first longitude is subtracted from the first longitude angle to obtain the longitude of the upper left corner point.

[0119] Furthermore, the first latitude is subtracted from the first latitude angle to obtain the latitude of the lower right corner point; the first longitude is added to the first longitude angle to obtain the longitude of the lower right corner point.

[0120] In this embodiment, the longitude and latitude of the upper left corner point and the lower right corner point of the two-dimensional coordinate system are determined according to the first longitude angle, the first latitude angle and the first longitude and longitude information, which is conducive to obtaining the point position on the real earth, preparing for the subsequent retrieval of the first target point set within the range, and is conducive to improving the accuracy of the target point.

[0121] See also Figure 3 In some embodiments, step S102 may include but is not limited to steps S301 to S303:

[0122] Step S301, determine whether there is data in the point aggregation table;

[0123] It can be understood that judging whether there is data in the point aggregation table is helpful to judging whether point aggregation has been executed before the current point aggregation is executed.

[0124] Step S302: if there is data in the point aggregation table, take out the first point from the point aggregation table according to the first layer code;

[0125] In some embodiments, if point aggregation has been performed before the current point aggregation is performed, the first point is taken from the target point set in the point aggregation table according to the first layer code. It is understandable that the first point may include multiple points or only one point.

[0126] In this embodiment, if there is data in the point aggregation table, the first point is taken out from the point aggregation table according to the first layer code, which is conducive to multi-level point aggregation, improves data processing efficiency and accuracy, and improves the visualization effect of the map, making the data display at different zoom levels clearer.

[0127] Step S303: If there is no data in the point aggregation table, the first point is retrieved from the map database according to the first layer code.

[0128] In some embodiments, if point aggregation has not been performed before the current point aggregation is performed, the first point is retrieved from the map database according to the first layer code. It is understandable that the first point may include multiple points or only one point.

[0129] See also Figure 4 In some embodiments, the point aggregation method provided in the embodiment of the present application further includes a step of obtaining incoming data, and the step of obtaining incoming data may include but is not limited to steps S401 to S402:

[0130] Step S401, obtaining the first layer code and diagonal coordinate longitude and latitude input by the user;

[0131] It is understandable that in actual applications, the user zooms in and out of the map and inputs the layer code and the longitude and latitude of the screen diagonal coordinates (ie, the current maximum longitude and latitude and the current minimum longitude and latitude).

[0132] Step S402: establishing a two-dimensional coordinate system according to the first layer code and the diagonal coordinate longitude and latitude.

[0133] In step S402 of some embodiments, a two-dimensional coordinate system is established according to the layer code and the longitude and latitude of the screen diagonal coordinates input by the user.

[0134] Furthermore, the points after aggregation of the layer are queried according to the two-dimensional coordinate system, and the queried points are set and displayed on the map.

[0135] In this embodiment, establishing a two-dimensional coordinate system based on the first layer code and the diagonal coordinate longitude and latitude is conducive to querying and displaying the point set on the map, which is conducive to improving the efficiency of the point set, and is conducive to users intuitively and clearly obtaining the point aggregation results, thereby improving the user experience.

[0136] See also Figure 5 In some embodiments, the point aggregation method provided in the embodiment of the present application further includes the step of constructing a two-dimensional coordinate system according to the electronic fence. The step of constructing a two-dimensional coordinate system according to the electronic fence may include but is not limited to steps S501 to S503:

[0137] Step S501, obtaining the electronic fence.

[0138] Specifically, the electronic fence includes at least three map points, and the map points contain corresponding longitude and latitude information.

[0139] Optionally, the electronic fence may be an irregular polygonal electronic fence.

[0140] In some embodiments, in response to the second instruction, an electronic fence is set on the map page, and the electronic fence adopts an irregular polygon. The second instruction is triggered when the user clicks, selects or double-clicks the control to set the electronic fence, and the second instruction is used to set the electronic fence according to the point selected by the user.

[0141] In this embodiment, the electronic fence is obtained to prepare for the subsequent construction of a two-dimensional coordinate system.

[0142] Step S502, determining the construction point according to the latitude and longitude information of the map point.

[0143] In step S502 of some embodiments, the construction point of the electronic fence is calculated according to the longitude and latitude of the map point given by the electronic fence.

[0144] It should be noted that the construction points belong to the boundary points of the electronic fence, and the rectangle of the two-dimensional coordinate system constructed by the construction points can include all the points of the electronic fence.

[0145] It is understandable that the construction points may be two or more than two.

[0146] Step S503, constructing a two-dimensional coordinate system according to the construction points.

[0147] Specifically, the two-dimensional coordinate system includes all map points in the electronic fence.

[0148] In step S503 of some embodiments, a two-dimensional coordinate system including all map points in the electronic fence is constructed according to the construction points.

[0149] In this embodiment, an electronic fence is obtained, a construction point is determined according to the latitude and longitude information of the map point, and a two-dimensional coordinate system is constructed according to the construction point. This prepares for the subsequent acquisition of the first target point set from the two-dimensional coordinate system, which is beneficial to point aggregation from the electronic fence and improves the robustness and usability of the point aggregation method.

[0150] See also Figure 6 In some embodiments, step S502 includes but is not limited to steps S601 to S603:

[0151] Step S601, extracting a set of candidate points from a map database according to the current maximum longitude and latitude and the current minimum longitude and latitude.

[0152] In step S601 of some embodiments, the current maximum longitude and latitude and the current minimum longitude and latitude are determined according to the two-dimensional coordinate system of the electronic fence, and a candidate point set is retrieved from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude.

[0153] It can be understood that the candidate point set within the range is queried according to the longitude and latitude of the construction point of the two-dimensional coordinate system with the maximum range of the electronic fence.

[0154] Step S602: determine whether a candidate point in the candidate point set is located in an electronic fence.

[0155] In step S602 of some embodiments, it is determined whether a candidate point in the candidate point set is located in an electronic fence, and then the candidate point set is screened to obtain a first target point set in the electronic fence area.

[0156] Step S603: if the candidate point is located in the electronic fence, the target point is added to the first target point set.

[0157] In step S603 of some embodiments, the candidate point set is screened to obtain a first target point set in the electronic fence area.

[0158] Figure 7 is an optional flow chart of applying the point aggregation method provided in the embodiment of the present application to map points. Figure 7 The method may include, but is not limited to, the following steps:

[0159] Step 1, initialize the layer.

[0160] In some embodiments, layer codes 20 layers and the first layer precision are defined and recorded in a dictionary table.

[0161] Exemplarily, the layer coding includes 20 layers of coding.

[0162] Step 2: Draw a square with the latitude and longitude of the point as the center and use the layer accuracy to establish a two-dimensional coordinate system.

[0163] Optionally, if the layer code is the first layer code, a point is taken out from the map database according to the layer code (i.e., the first layer code) in a loop, and a square is drawn with the point (i.e., the first point) as the center point to establish a two-dimensional coordinate system with an accuracy (i.e., the first layer accuracy). For example, the accuracy may be 5 kilometers.

[0164] Optionally, if the layer code is not the first layer code, start from the layer code (i.e. the first layer code), loop to take out points from the point aggregation table, use the point (i.e. the first point) as the center point and draw a square with the accuracy (i.e. the first layer accuracy) to establish a two-dimensional coordinate system.

[0165] For example, a schematic diagram of a square two-dimensional coordinate system is as follows: Figure 8 As shown in the figure, the red point indicates the first point and the blue frame indicates the two-dimensional coordinate system.

[0166] It should be noted that a two-dimensional coordinate system can be established based on an irregular polygonal electronic fence. Specifically, two points (i.e., construction points) in the boundary points of the electronic fence are calculated based on the longitude and latitude of the polygonal points given by the electronic fence, and the rectangular two-dimensional coordinate system constructed by the two points can include all the points of the electronic fence.

[0167] For example, the code for establishing a two-dimensional coordinate system based on an irregular polygonal electronic fence is as follows:

[0168]

[0169]

[0170] Wherein, coordinates represents the longitude and latitude of the polygon point given by the electronic fence. For example, the maximum range algorithm of a given electronic fence is implemented as follows:

[0171]

[0172]

[0173] Step 3: determine the maximum and minimum longitude and latitude of the current map range using the longitude and latitude of the upper left corner and the lower right corner of the square, and retrieve the point set contained in the square (i.e., the first target point set) from the map database.

[0174] Exemplarily, the code for determining the latitude and longitude of the upper left corner and the lower right corner of a square is as follows:

[0175]

[0176]

[0177] Optionally, all points (i.e., candidate target points) within the query range are queried based on the longitude and latitude of two points in the two-dimensional coordinate system of the maximum range of the electronic fence. Exemplarily, the code for querying all points (i.e., candidate target points) within the query range is as follows:

[0178]

[0179] Further, according to the given point and the polygon, it is determined whether the given point in the candidate point set is within the polygonal electronic fence. If so, the point is added to the first target point set. Exemplarily, the judgment code is as follows:

[0180]

[0181]

[0182]

[0183]

[0184] In this embodiment, the rectangle of the two-dimensional coordinate system constructed by two points in the boundary points of the electronic fence is calculated based on the longitude and latitude of the polygonal points given by the electronic fence, and can include two points of all the electronic fence points. The longitude and latitude of the points within the rectangular range are queried based on the maximum and minimum longitude and latitude of the two points, and then the "algorithm for determining whether a given point is within the polygon" is called in a loop, avoiding the need to loop all map points for each electronic fence, thereby improving the calculation capability.

[0185] Step 4: record the layer code, which is exactly the longitude and latitude of the point coordinates and the ID set of other aggregated points.

[0186] Among them, the layer code (i.e. the first layer code), the aggregation point id (i.e. the first code), the aggregation point longitude and latitude (i.e. the first longitude and latitude information), and the id set of the aggregated points (i.e. the first target point set) are recorded in the point aggregation table.

[0187] Further, the layers in the cycle dictionary table (i.e., the preset dictionary table) repeat steps 2 and 3 according to the aggregation point data of the previous layer until the aggregation reaches the 20th layer. It can be understood that the number of cycles is not fixed, and is determined by the number of layers of the layer code in the dictionary table (i.e., the preset dictionary table), which can be 20 layers or 40 layers.

[0188] It can be understood that the client establishes a two-dimensional coordinate system based on the layer code and the longitude and latitude of the screen diagonal coordinates input by the user when zooming the map to query the aggregated points of the layer, and displays the queried point set on the map.

[0189] The embodiment of the present application loops through point data, draws a square with the longitude and latitude of a point as the center point to establish a two-dimensional coordinate system, determines the maximum and minimum longitude and latitude of the current map range with the longitude and latitude of the upper left corner point and the lower right corner point of the square, extracts the point set contained in the square from the map database, records the layer code, aggregated point ID, aggregated point longitude and latitude, and aggregated point ID set to a point aggregation table, greatly improves the point interface query performance for low-precision (such as 100-kilometer accuracy) and high-layer point. Compared with the traditional network centroid algorithm, the map points aggregated by this method will not have the problem of discrete map points when scaling (the reason is that the actual point and the aggregated point may not be at the same point); the points aggregated by this method are actual map points, and the points will not drift away during the user's zooming process. The points will only be derived from the points according to the layer switching, thereby improving the user experience.

[0190] See also Fig. 9 The embodiment of the present application further provides a point aggregation device, which can implement the above-mentioned point aggregation method, and the device includes:

[0191] The layer acquisition module 901 is used to acquire the first layer code and the first layer precision, where the first layer precision adopts the map precision;

[0192] The point acquisition module 902 is used to acquire a first point according to the first layer code, where the first point includes a first code and first longitude and latitude information;

[0193] A coordinate system establishing module 903 is used to establish a two-dimensional coordinate system according to the first layer accuracy by taking the first point as the center point;

[0194] The point determination module 904 is used to determine the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system, and determine the maximum value of the current longitude and latitude and the minimum value of the current longitude and latitude according to the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point;

[0195] A set acquisition module 905 is used to retrieve a first target point set from a map database according to the current maximum longitude and latitude and the current minimum longitude and latitude;

[0196] The storage module 906 is used to store the first layer code, the first code, the first longitude and latitude information and the first target point set into a point aggregation table.

[0197] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0198] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned point aggregation method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.

[0199] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0200] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0201] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0202] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the point aggregation method of the embodiment of this application;

[0203] Input / output interface 1003, used to implement information input and output;

[0204] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0205] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );

[0206] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .

[0207] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned point aggregation method is implemented.

[0208] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0209] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0210] The point aggregation method, point aggregation device, electronic device and storage medium provided in the embodiments of the present application obtain the first layer code and the first layer accuracy; obtain the first point according to the first layer code; use the first point as the center point, establish a two-dimensional coordinate system according to the first layer accuracy, improve aggregation efficiency and reduce CPU consumption; determine the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system, and determine the current maximum longitude and latitude and the current minimum longitude and latitude according to the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point, which is beneficial to improve the accuracy of the target point; retrieve the first target point set from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude, which is beneficial to improve the efficiency of point aggregation; store the first layer code, the first code, the first longitude and latitude information and the first target point set in the point aggregation table, the first target point set is the actual map point, and the point will not drift away during the user zooming.

[0211] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0212] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0213] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0214] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0215] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0216] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

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

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

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

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

[0221] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A point aggregation method, It is characterized in that The method comprises the following steps: Obtaining a first layer code and a first layer precision, where the first layer precision adopts map precision; Acquire a first point according to the first layer code, where the first point includes a first code and first longitude and latitude information; Taking the first point as the center point, establishing a two-dimensional coordinate system according to the first layer accuracy; Determine the latitude and longitude of the upper left corner point and the latitude and longitude of the lower right corner point of the two-dimensional coordinate system, and determine the current maximum longitude and longitude and the current minimum longitude and longitude according to the latitude and longitude of the upper left corner point and the latitude and longitude of the lower right corner point; Retrieving a first target point set from the map database according to the current maximum latitude and longitude and the current minimum latitude and longitude; The first layer code, the first code, the first longitude and latitude information and the first target point set are stored in a point aggregation table.

2. The method according to claim 1, It is characterized in that Determining the longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system includes: The longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system are determined according to the first longitude and latitude information and the first layer accuracy.

3. The method according to claim 1, It is characterized in that The first longitude and latitude information includes a first latitude, and determining the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system according to the first longitude and latitude information and the first layer accuracy includes: Calculate a first longitude angle according to the first latitude and the first layer accuracy, where the first longitude angle represents a longitude offset; Calculating a first latitude angle according to the first layer precision, where the first latitude angle represents a latitude offset; The longitude and latitude of the upper left corner point and the longitude and latitude and longitude of the lower right corner point of the two-dimensional coordinate system are determined according to the first longitude angle, the first latitude angle and the first longitude and latitude information.

4. The method according to claim 1, It is characterized in that The acquiring the first point according to the first layer code includes: Determine whether there is data in the point aggregation table; If data exists in the point aggregation table, taking out the first point from the point aggregation table according to the first layer code; If there is no data in the point aggregation table, the first point is retrieved from the map database according to the first layer code.

5. The method according to claim 1, It is characterized in that The method further comprises: Define the layer code and first layer precision and record them in the preset dictionary table.

6. The method according to claim 1, It is characterized in that The method further comprises: Get the first layer code and diagonal coordinates longitude and latitude passed in by the user; A two-dimensional coordinate system is established according to the first layer code and the diagonal coordinate longitude and latitude.

7. The method according to claim 1, It is characterized in that The method further comprises: In response to the first instruction, the first target point set is displayed on the map page.

8. The method according to claim 1, It is characterized in that The method further comprises: Acquire an electronic fence, wherein the electronic fence includes at least three map points, and the map points include corresponding longitude and latitude information; Determine the construction point according to the latitude and longitude information of the map point; A two-dimensional coordinate system is constructed according to the construction points, and the two-dimensional coordinate system includes all map points in the electronic fence.

9. The method according to claim 8, It is characterized in that The extracting the first target point set from the map database according to the current maximum latitude and longitude and the current minimum latitude and longitude includes: Retrieving a set of candidate points from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude; It is determined whether a candidate point in the candidate point set is located in the electronic fence, and if so, the target point is added to the first target point set.

10. The method according to claim 8, It is characterized in that The method further comprises: In response to the second instruction, an electronic fence is set on the map page, wherein the electronic fence adopts an irregular polygon.

11. A point aggregation device, It is characterized in that The device comprises: A layer acquisition module, used to acquire a first layer code and a first layer precision, wherein the first layer precision adopts a map precision; A point acquisition module, used for acquiring a first point according to the first layer code, wherein the first point includes a first code and first longitude and latitude information; A coordinate system establishment module, used to establish a two-dimensional coordinate system according to the first layer accuracy by taking the first point as the center point; A point determination module, used to determine the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point of the two-dimensional coordinate system, and determine the maximum value of the current longitude and latitude and the minimum value of the current longitude and latitude according to the longitude and latitude of the upper left corner point and the longitude and latitude of the lower right corner point; A set acquisition module, used for obtaining a first target point set from the map database according to the current maximum longitude and latitude and the current minimum longitude and latitude; A storage module is used to store the first layer code, the first code, the first longitude and latitude information and the first target point set into a point aggregation table.

12. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 10 when executing the computer program.

13. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • Map point location name generation method and device, equipment and storage medium

    CN119205979A