Map data processing method and device, electronic equipment and storage medium

By receiving and converting point aggregation requests from mini-programs, performing coordinate transformation and aggregation, the problem of matching point aggregation with different types of electronic maps is solved, improving the clarity and efficiency of map display.

CN120849522APending Publication Date: 2025-10-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410544770.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

In existing technologies, the point aggregation methods provided by development platforms for mini-programs are difficult to adapt to different types of electronic maps, resulting in low universality.

Method used

By receiving point aggregation requests sent by the electronic map module of the target mini-program, coordinate transformation is performed to obtain the second coordinate data of multiple map points. Based on the second coordinate data, aggregation is performed to generate aggregated point information. Finally, the map is drawn and displayed according to the electronic map type.

Benefits of technology

It achieves point aggregation method adaptation for different types of electronic maps, improves the universality of point aggregation methods, and ensures the clarity and efficiency of map display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849522A_ABST
    Figure CN120849522A_ABST
Patent Text Reader

Abstract

The invention provides a map data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: receiving a point aggregation request sent by an electronic map module of a target applet; performing coordinate conversion on the first coordinate data according to the electronic map type to obtain second coordinate data of a plurality of map points; aggregating the plurality of map points based on the second coordinate data to obtain aggregated point information; drawing a map according to the aggregation point information and the electronic map type to obtain a map picture; and sending the map picture to the electronic map module of the target applet for map display. According to the embodiment of the invention, the universality of the point aggregation method can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of information processing, and in particular to a map data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, an increasing number of platforms support mini-program development. A mini-program is an application that can be used without downloading or installation; users can directly access data within the mini-program, greatly improving access efficiency and reducing memory storage pressure. Mini-program development often relies on a development platform, which provides data and code support for the implementation of functions within the mini-program. In many mini-programs, users need to use electronic maps to view geographical location information. Electronic maps contain a large number of map points in certain areas. If a large number of feature points are loaded and displayed simultaneously on the electronic map, the information presented on the map becomes very cluttered and consumes a lot of system resources. Therefore, point aggregation can be used in electronic maps to represent a large number of map points with a small number of points or markers, making the map display clearer and more concise.

[0003] Development platforms can provide various types of electronic map data for mini-programs to choose from, thus requiring point aggregation methods for different types of electronic maps to enable point aggregation functionality across all map types. However, in related technologies, the point aggregation methods provided by development platforms for mini-programs are difficult to adapt to different types of electronic maps, resulting in low universality. Summary of the Invention

[0004] This disclosure provides a map data processing method, apparatus, electronic device, and storage medium that can improve the universality of point aggregation methods.

[0005] According to one aspect of this disclosure, a map data processing method is provided, comprising:

[0006] Receive a point aggregation request sent by the electronic map module of the target mini-program, wherein the point aggregation request includes the electronic map type and the first coordinate data of multiple map points;

[0007] The first coordinate data is transformed according to the electronic map type to obtain the second coordinate data of the plurality of map points;

[0008] Based on the second coordinate data, the multiple map points are aggregated to obtain aggregate point information, which includes the coordinates of the aggregate point and the descriptive information of the multiple map points.

[0009] A map is drawn based on the aggregation point information and the electronic map type to obtain a map image, which contains aggregation point markers corresponding to the aggregation point information.

[0010] The map image is sent to the electronic map module of the target mini-program for map display.

[0011] According to one aspect of this disclosure, a map data processing apparatus is provided, comprising:

[0012] The first receiving unit is used to receive a point aggregation request sent by the electronic map module of the target mini-program. The point aggregation request includes the electronic map type and the first coordinate data of multiple map points.

[0013] A conversion unit is used to perform coordinate conversion on the first coordinate data according to the electronic map type to obtain the second coordinate data of the plurality of map points;

[0014] An aggregation unit is used to aggregate the plurality of map points based on the second coordinate data to obtain aggregated point information, the aggregated point information including aggregated point coordinates and descriptive information of the plurality of map points;

[0015] The first drawing unit is used to draw a map based on the aggregation point information and the electronic map type to obtain a map image, wherein the map image contains aggregation point markers corresponding to the aggregation point information.

[0016] The first sending unit is used to send the map image to the electronic map module of the target mini-program for map display.

[0017] In one embodiment, the conversion unit is specifically used for:

[0018] Determine the first coordinate system based on the electronic map type;

[0019] Based on the first coordinate system and the preset second coordinate system, the first coordinate data is transformed to obtain the second coordinate data of the plurality of map points.

[0020] In one embodiment, the conversion unit is specifically used for:

[0021] The latitude and longitude data of the plurality of map points are determined based on the first coordinate system and the first coordinate data;

[0022] The second coordinate data of the plurality of map points are determined in a preset second coordinate system based on the latitude and longitude data.

[0023] In one embodiment, the conversion unit is specifically used for:

[0024] A coordinate transformation algorithm is obtained based on the first coordinate system and the preset second coordinate system;

[0025] The coordinate transformation algorithm is used to transform the first coordinate data to obtain the second coordinate data of the plurality of map points.

[0026] In one implementation, the first drawing unit is specifically used for:

[0027] Construct aggregation point markers based on the aggregation point information and the electronic map type;

[0028] Obtain the target map instance;

[0029] Maps are drawn based on the aggregation point markers and the target map instance to obtain a map image.

[0030] In one implementation, the point aggregation request further includes an aggregation tag constructor class name field;

[0031] The first drawing unit is specifically used for:

[0032] When the name field of the aggregate marker construction class is empty, a preset aggregate point marker construction class is obtained based on the electronic map type, and the preset aggregate point marker construction class is used to construct aggregate point markers for the aggregate point information;

[0033] When the name field of the aggregate tag constructor is not empty, the value of the name field of the aggregate tag constructor is determined as the aggregate tag constructor, and the aggregate tag constructor is used to construct an aggregate point tag for the aggregate point information.

[0034] In one implementation, the preset aggregation point marker constructor class includes an aggregation point marker constructor class and an aggregation point marker effect implementation class;

[0035] The first drawing unit is specifically used for:

[0036] Based on the aforementioned electronic map type, obtain the aggregation point construction class and the aggregation point marking effect implementation class;

[0037] The aggregation point constructor class is used to construct an aggregation point instance object based on the aggregation point information;

[0038] Based on the aggregation point marker effect implementation class, the display information of the aggregation point instance object is determined, and the aggregation point marker is generated.

[0039] In one implementation, the first drawing unit is specifically used for:

[0040] Call the map retrieval function;

[0041] When the map retrieval function returns an empty object, the map implementation class is retrieved, and the target map instance is retrieved based on the map implementation class;

[0042] When the map retrieval function returns a non-empty object, the value returned by the map retrieval function is determined as the target map instance.

[0043] In one implementation, the point aggregation request further includes an aggregation algorithm field;

[0044] The aggregation unit is specifically used for:

[0045] Read the aggregation algorithm field; when the aggregation algorithm field is empty, determine the target aggregation algorithm based on the number of the multiple map points and the distribution of the second coordinate data.

[0046] When the aggregation algorithm field is not empty, the target aggregation algorithm is determined based on the value of the aggregation algorithm field.

[0047] The target aggregation algorithm is used to aggregate the multiple map points to obtain aggregated point information.

[0048] In one embodiment, the aggregation unit is specifically used for:

[0049] When the aggregation algorithm field is not empty, obtain the aggregation algorithm mapping table, which stores the mapping relationship between multiple aggregation algorithms and the standard aggregation algorithm;

[0050] Based on the aggregation algorithm mapping table, the standard aggregation algorithm corresponding to the value of the aggregation algorithm field is determined as the target aggregation algorithm.

[0051] In one implementation, the point aggregation request further includes an event detection field;

[0052] The map data processing device further includes:

[0053] The reading unit is used to read the event detection class field. When the event detection class field is empty, a preset event detection class is obtained, and the preset event detection class is used to perform event detection on the aggregation point marker.

[0054] The detection unit is used to perform event detection on the aggregation point marker using the value of the event detection class field when the event detection class field is not empty.

[0055] In one embodiment, the map data processing apparatus further includes:

[0056] The second receiving unit is used to receive a map switching request sent by the electronic map module of the target mini-program, wherein the map switching request includes the type of electronic map to be switched.

[0057] The second drawing unit is used to obtain the original aggregation point information based on the mini-program identifier of the target mini-program, and to draw the map according to the original aggregation point information and the electronic map type to be switched, so as to obtain the switched map screen, which contains the switched aggregation point markers corresponding to the aggregation point information.

[0058] The second sending unit is used to send the switched map screen to the electronic map module of the target mini-program for map display.

[0059] According to one aspect of this disclosure, an electronic device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the map data processing method as described above.

[0060] According to one aspect of this disclosure, a computer-readable storage medium is provided, the storage medium storing a computer program that, when executed by a processor, implements the map data processing method as described above.

[0061] According to one aspect of this disclosure, a computer program product is provided, comprising a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the map data processing method as described above.

[0062] The map data processing method in this embodiment receives a point aggregation request sent by the electronic map module of the target mini-program. The point aggregation request includes an electronic map type and first coordinate data of multiple map points. The first coordinate data is then transformed according to the electronic map type to obtain second coordinate data of the multiple map points. The multiple map points are aggregated based on the second coordinate data to obtain aggregated point information, which includes aggregated point coordinates and descriptive information of the multiple map points. A map is drawn based on the aggregated point information and the electronic map type to obtain a map display, which includes aggregated point markers corresponding to the aggregated point information. The map display is then sent to the electronic map module of the target mini-program for map display.

[0063] Therefore, the map data processing method of this disclosure can convert the first coordinate data of multiple map points into second coordinate data according to the electronic map type, so as to standardize the coordinate data of map points in different electronic map types. The standardized second coordinate data is used to aggregate multiple map points shown in the target mini-program and draw a map, which is then displayed in the target mini-program. Thus, the map data processing method of this disclosure realizes the aggregation of map points from different types of electronic maps used in the mini-program in a standard coordinate form, which can adapt to different types of electronic maps and improve the universality of the point aggregation method.

[0064] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objectives and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0065] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.

[0066] Figure 1 This is a system architecture diagram of the map data processing method according to an embodiment of the present disclosure;

[0067] Figure 2A This is a schematic diagram of an interface applied to an embodiment of the present disclosure in a scenario of zooming in on an electronic map;

[0068] Figure 2B This is another schematic diagram of an interface applied to a scenario where an embodiment of this disclosure is zoomed in on an electronic map;

[0069] Figure 2C This is another schematic diagram of an interface applied to a scenario where an embodiment of this disclosure is zoomed in on an electronic map;

[0070] Figure 3 This is a flowchart of a map data processing method according to an embodiment of the present disclosure;

[0071] Figure 4 This is a schematic diagram illustrating the data connection relationship between a point aggregation component, a mini-program, and an electronic map according to one embodiment of this disclosure;

[0072] Figure 5 This is a schematic diagram of a frame structure for a point aggregation request according to one embodiment of the present disclosure;

[0073] Figure 6 This is another frame structure diagram of a point aggregation request according to one embodiment of the present disclosure;

[0074] Figure 7 This is a schematic diagram of the distribution of map points according to an embodiment of the present disclosure;

[0075] Figure 8 This is a schematic diagram illustrating the application of different aggregation point marker formats to different electronic map types according to one embodiment of the present disclosure;

[0076] Figure 9This is another frame structure diagram of a point aggregation request according to one embodiment of the present disclosure;

[0077] Figure 10 This is another frame structure diagram of a point aggregation request according to one embodiment of the present disclosure;

[0078] Figure 11 This is another frame structure diagram of a point aggregation request according to one embodiment of the present disclosure;

[0079] Figure 12 This is another schematic flowchart of a map data processing method according to an embodiment of the present disclosure;

[0080] Figure 13 This is a schematic diagram of a point aggregation component data structure according to an embodiment of the present disclosure;

[0081] Figure 14 This is a schematic diagram of the structure of a map data processing apparatus according to an embodiment of the present disclosure;

[0082] Figure 15 This is a terminal structure diagram for implementing various methods according to an embodiment of the present disclosure;

[0083] Figure 16 This is a server structure diagram illustrating the implementation of various methods according to an embodiment of the present disclosure. Detailed Implementation

[0084] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this disclosure.

[0085] Before providing a further detailed description of the embodiments of this disclosure, the terms and concepts used in these embodiments are explained, and they are subject to the following interpretations:

[0086] Map point aggregation: Map point aggregation is a technique for displaying large amounts of point data on a map. By merging adjacent points, it reduces visual clutter and improves map readability. Point aggregation is commonly used to display large amounts of point data, such as store locations, sensor data, etc.

[0087] Reference ellipsoid: A mathematical model used to represent the shape and size of the Earth. The reference ellipsoid is typically defined by the following parameters:

[0088] Semi-major axis (a): The largest radius on the ellipsoid, corresponding to the average radius at the Earth's equator;

[0089] The minor axis (b): the radius on the ellipsoid perpendicular to the major axis, corresponding to the average radius at the Earth's poles;

[0090] Flattening (f): A parameter representing the degree of flattening of an ellipsoid, calculated by the formula f = (ab) / a.

[0091] In related technologies, when providing point aggregation functionality for different types of electronic maps in a mini-program, the aggregation methods used differ because different electronic maps represent different coordinate data for the same map point. Therefore, the development platform needs to provide a point aggregation method for each type of electronic map. Developing independent point aggregation functionality for each type of electronic map would increase the system resource consumption of the development platform. Therefore, it is necessary to provide a point aggregation method for the mini-program that can adapt to multiple electronic map types. However, the adaptability and universality of point aggregation methods in related technologies are poor. To address this, this disclosure provides a map data processing method to improve the universality of point aggregation methods.

[0092] System architecture and scenario description of the embodiments disclosed herein

[0093] Figure 1 This is a system architecture diagram for a map data processing method according to an embodiment of the present disclosure. It includes a terminal 140, an Internet 130, a gateway 120, a server 110, etc.

[0094] Terminal 140 can take various forms, including desktop computers, laptops, PDAs (personal digital assistants), mobile phones, in-vehicle terminals, home theater terminals, and dedicated terminals. Furthermore, it can be a single device or a collection of multiple devices. For example, multiple devices can be connected via a local area network, sharing a single display device to work collaboratively, forming a single terminal 140. Terminal 140 can also communicate with the Internet 130 via wired or wireless means to exchange data.

[0095] Server 110 refers to a computer system that can provide certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a single high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a single high-performance computer (e.g., a virtual machine), or a combination of portions of multiple high-performance computers (e.g., virtual machines).

[0096] Gateway 120, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator between two systems using different communication protocols, data formats, languages, or even completely different architectures. It enables network interconnection at the transport layer. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are forwarded to the corresponding server 110 through gateway 120. Messages sent from server 110 to terminal 140 are also forwarded to the corresponding terminal 140 through gateway 120.

[0097] The map data processing method of this disclosure can be implemented entirely on the terminal 140; it can be implemented entirely on the server 110; or it can be implemented partly on the terminal 140 and partly on the server 110.

[0098] The embodiments disclosed herein can be applied in various scenarios, such as Figures 2A-2C The scene shown is an example of zooming in on an electronic map.

[0099] like Figure 2A As shown, when an object uses mini-program 210, if it needs to view an electronic map, the map selection module 211 in mini-program 210 can provide the object with various electronic maps, including electronic map M1, electronic map M2, and electronic map M3. The object can select the map to view based on its usage habits and scenario. Figure 2A In the selection, electronic map M2 was chosen as the target.

[0100] like Figure 2B As shown, the electronic map module 212 in the mini-program 210 can display the map view of the electronic map M2. Within the electronic map module 212, objects can zoom in and out of the map. When zooming in or out, the image information on the map can be adjusted according to the scale. Figure 2B The scale of the electronic map is 200 meters (1 centimeter on the map represents 200 meters in actual distance). At this time, map points a1-a7 and b1-b6 can be displayed on the map screen.

[0101] When an electronic map is zoomed out, the geographical area displayed on the map becomes wider, such as... Figure 2C As shown, the electronic map scale has been adjusted to 500 meters (1 centimeter on the map represents 500 meters in actual distance). To make the map display more concise and clear, nearby map points can be grouped together. For example, [the map can be grouped together]. Figure 2BMap points a1 to a7 are aggregated, and map points b1 to b6 are aggregated. The electronic map module 212 displays a map with a scale of 500 meters, including aggregated point markers A and B.

[0102] When aggregating multiple map points, the map data processing method of this disclosure embodiment can be used to aggregate multiple map points for the electronic map type of electronic map M2. The map data processing method of this disclosure embodiment can also perform point aggregation for other types of electronic maps in map selection module 211. Therefore, the point aggregation method has high applicability to different types of electronic maps.

[0103] General Description of Embodiments in this Disclosure

[0104] According to one embodiment of this disclosure, a map data processing method is provided. The map data processing method provided in this embodiment can be applied to, for example... Figures 2A-2C The example shown is a scene where an electronic map is zoomed in or out. For instance... Figure 3 The diagram shown is a flowchart illustrating a map data processing method provided in this disclosure. This map data processing method may include:

[0105] Step 310: Receive the point aggregation request sent by the electronic map module of the target mini-program.

[0106] In one implementation, the map data processing method provided in this disclosure can be implemented in a point aggregation component. This component can connect to multiple mini-programs to receive and process point aggregation requests from the electronic map modules of the mini-programs. The point aggregation component can acquire data from different types of electronic maps to perform point aggregation based on the specific electronic map type. Figure 4 As shown, the point aggregation component can communicate with multiple mini-programs and also obtain map data from multiple electronic maps.

[0107] The point aggregation request includes the type of electronic map and the first coordinate data of multiple map points. The target mini-program can be any mini-program that mainly deals with various matters and needs to use electronic maps. For example, a coffee shop mini-program can display the location of the coffee shop on an electronic map; a ride-hailing mini-program can display the location and route of a vehicle on an electronic map, etc.

[0108] The electronic map module can be a module within the target mini-program used to display an electronic map. Within the target mini-program, the user can select the map they want to use, and the electronic map module can display the corresponding electronic map based on this selection. After the electronic map module displays the electronic map, when it receives a point aggregation command from the user, it can generate a point aggregation request based on the current map type and the first coordinate data of multiple map points covered in the point aggregation command. The point aggregation command can be generated based on a pre-defined operation by the user to zoom out the electronic map. After zooming out, the map displays a wider geographical area, and nearby map points can be aggregated into a single point for a clearer and cleaner map display. The point aggregation command can also be generated based on a pre-defined operation by the user to aggregate multiple specified map points. When the user needs to aggregate several map points for display, they can manually control the aggregation of multiple map points.

[0109] The structure of the point aggregation request frame sent from the electronic map template of the target mini-program can be represented as follows: Figure 5 This includes electronic map types and first coordinate data for multiple map points.

[0110] Electronic maps can be categorized according to their main content, such as general-purpose electronic maps and specialized electronic maps. General-purpose electronic maps can be maps that cover general geographical features, including both natural and human elements; specialized electronic maps can be tailored to the needs of a specific application area, highlighting one or more thematic elements. For example, hydropower electronic maps highlight geographical elements related to water power, such as rivers, oceans, and hydraulic engineering projects; transportation planning electronic maps highlight geographical elements related to transportation planning, such as road planning, traffic sign placement, and public transportation route planning.

[0111] Electronic maps can also be categorized by map scale. For example, there are large-scale electronic maps with a scale of 1:100,000 or higher, medium-scale electronic maps with a scale between 1:100,000 and 1:1,000,000, and small-scale electronic maps with a scale below 1:1,000,000. Large-scale electronic maps can display detailed geographical information within the mapped area, such as road planning and building layout; medium-scale electronic maps can display relatively coarse geographical information within the mapped area, such as the division of administrative regions and the distribution of rivers; and small-scale electronic maps can display simplified geographical information within the mapped area, such as the division at the national level or geographical features.

[0112] Electronic maps can also be categorized based on the data source providing the map data, such as Platform N1, Platform N2, and Platform N3. Different platforms have their own methods for collecting geographic information and can generate electronic maps based on the collected geographic information. After generating the electronic map, it can be provided to the mini-program development platform for use by the mini-program.

[0113] Different types of electronic maps may use different coordinate representations for map points. These representations can include latitude and longitude coordinates, Cartesian coordinates, spatial rectangular coordinates, polar coordinates, and geodetic coordinates. Latitude and longitude coordinates use the longitude and latitude of a map point to represent its position on the Earth's surface. For a single map point, latitude and longitude coordinates may be represented by different values ​​depending on the reference coordinate system.

[0114] Cartesian coordinates can be derived from a Cartesian coordinate system. Using a point on a map as the center, two mutually perpendicular axes are used as the x-axis and y-axis. The coordinates of the map point are then constructed using its corresponding x and y values. For a given map point, Cartesian coordinates may represent different values ​​depending on the Cartesian coordinate system referenced.

[0115] Spatial rectangular coordinates can be obtained based on a spatial rectangular coordinate system. An x-axis, y-axis, and z-axis are established with a point on Earth as the origin. The coordinates of a map point are then constructed using its corresponding x, y, and z values. For a given map point, the spatial rectangular coordinates may represent different values ​​depending on the spatial rectangular coordinate system referenced.

[0116] Polar coordinates can be obtained based on a polar coordinate system. A polar coordinate system is a coordinate system centered at the origin and with true north as the reference direction. The polar coordinates of a map point are represented by the angle between the distance of the map point from the origin and the true north direction. For a given map point, the polar coordinates may be represented by different values ​​depending on the polar coordinate system referenced.

[0117] Geodetic coordinates are derived from a geodetic coordinate system. A geodetic coordinate system is a coordinate system based on the Earth's ellipsoid, and the geodetic coordinates of a map point are represented using three parameters: geodetic latitude (B), geodetic longitude (L), and geodetic height (H). For a given map point, the geodetic coordinates may be represented by different values ​​depending on the geodetic coordinate system referenced.

[0118] The first coordinate data can be the coordinate data of the map points to be aggregated, obtained based on the coordinate representation of the electronic map type.

[0119] After the target mini-program generates a point aggregation request, it can send the request to the point aggregation component. The point aggregation component can then aggregate map points using subsequent steps 320-350. The point aggregation component can simultaneously receive multiple point aggregation requests from different mini-programs, or it can simultaneously receive multiple point aggregation requests from the same mini-program for various electronic map types.

[0120] Step 320: Perform coordinate transformation on the first coordinate data according to the electronic map type to obtain the second coordinate data of multiple map points.

[0121] Since the representation of the first coordinate data may differ across different electronic map types, the coordinate data can be converted to adapt the point aggregation method to different map types. The second coordinate data can be the standard coordinate representation used by the point aggregation component for point aggregation. For example, if the second coordinate data is represented in Cartesian coordinates, the first coordinate data for electronic map type T1 is latitude and longitude coordinates, while the first coordinate data for electronic map type T2 is polar coordinates. The point aggregation component can convert both latitude / longitude coordinates and polar coordinates to Cartesian coordinates for point aggregation.

[0122] In one implementation, the first coordinate data is transformed according to the electronic map type to obtain second coordinate data for multiple map points, including:

[0123] Determine the first coordinate system based on the type of electronic map;

[0124] Based on the first coordinate system and the preset second coordinate system, the first coordinate data is transformed to obtain the second coordinate data of multiple map points.

[0125] The first coordinate system can be the coordinate system referenced by the electronic map type. Different types of electronic maps may use different coordinate systems as geographic location references.

[0126] Coordinate system types can include geocentric coordinate systems, WGS-84 coordinate systems, GCJ-02 coordinate systems, and BD-09 coordinate systems. For each coordinate system, a specific coordinate format can be used to represent the location information of map points in the corresponding electronic map. For example, the geocentric coordinate system is a coordinate system constructed with the geometric center of the reference ellipsoid as the origin, and coordinates can be represented using geodetic coordinates and spatial rectangular coordinates; the geocentric coordinate system is a spatial rectangular coordinate system established with the Earth's center of mass as the origin, and coordinates can also be represented using geodetic coordinates and spatial rectangular coordinates; in the WGS-84 coordinate system, coordinates are directly represented by latitude and longitude; the GCJ-02 coordinate system is a coordinate system based on the WGS-84 coordinate system with encrypted latitude and longitude coordinates, and coordinates can be represented using latitude and longitude coordinates; the BD-09 coordinate system is obtained by further encrypting latitude and longitude coordinates based on the GCJ-02 coordinate system, and coordinates can also be represented using latitude and longitude coordinates.

[0127] As can be seen from the brief introduction to several types of coordinate systems above, different types of coordinate systems may use the same coordinate representation, but the coordinate values ​​for the same map point may differ. For example, both geocentric and geo-centered coordinate systems can use geodetic coordinates to represent the position of a map point. In geodetic coordinates (B, L, H), geodetic latitude (B) represents the angle between the map point and the equatorial plane, geodetic longitude (L) represents the angle between the map point and the prime meridian, and geodetic height (H) represents the height of the map point relative to the ellipsoid. However, since the geocentric coordinate system is established with the geometric center of the reference ellipsoid as the origin, and the geocentric coordinate system is established with the Earth's center of mass as the origin, the geodetic coordinates for the same map point in different coordinate systems may deviate. For example, the WGS-84, GCJ-02, and BD-09 coordinate systems all use latitude and longitude coordinates to represent the location of map points. However, the GCJ-02 coordinate system is encrypted, and the BD-09 coordinate system is encrypted twice. Therefore, the latitude and longitude coordinates represented by the same map point in these three coordinate systems may have some discrepancies.

[0128] Therefore, even if different electronic map types have the same representation of the first coordinate data, deviations will still exist between the referenced coordinate systems. Thus, when converting the first coordinate data, the first coordinate system corresponding to the electronic map type and the preset second coordinate system can be determined. The second coordinate system is a standard coordinate system that can uniformly convert different electronic map types. Coordinate transformation is performed between the first and second coordinate systems. For example, the first coordinate system corresponding to electronic map type T1 is the geocentric coordinate system; the first coordinate system corresponding to electronic map type T2 is the WGS-84 coordinate system, and the preset second coordinate system is the GCJ-02 coordinate system. During coordinate transformation, geodetic coordinates or spatial rectangular coordinates in the geocentric coordinate system can be converted to latitude and longitude coordinates in the GCJ-02 coordinate system, and latitude and longitude coordinates in the WGS-84 coordinate system can also be converted to latitude and longitude coordinates in the GCJ-02 coordinate system.

[0129] In one implementation, the first coordinate data is transformed based on a first coordinate system and a preset second coordinate system to obtain second coordinate data for multiple map points, including:

[0130] Determine the latitude and longitude data of multiple map points based on the first coordinate system and the first coordinate data;

[0131] The second coordinate data of multiple map points are determined in a preset second coordinate system based on latitude and longitude data.

[0132] For map points, their longitude and latitude on Earth remain consistent regardless of the coordinate system. For example, Mount Everest's coordinates are (86.9 degrees East, 27.9 degrees North). Although different coordinate systems represent Mount Everest's coordinates differently, the actual geographical location of Mount Everest corresponds to its latitude and longitude. Therefore, the latitude and longitude data of map points can be used as intermediate reference data to convert the first coordinate data into the second coordinate data.

[0133] When using latitude and longitude data as intermediate reference data, the latitude and longitude data of multiple map points are first determined based on the first coordinate system and the first coordinate data. For different first coordinate systems, there are corresponding mapping methods from first coordinate data to latitude and longitude data. For example, the first coordinate data corresponding to the WGS-84 coordinate system is directly represented by the latitude and longitude of the map points, so the latitude and longitude data corresponding to the map points can be obtained directly; when the first coordinate data corresponding to the geocentric coordinate system is represented using geodetic coordinates, an online geodetic coordinate conversion tool can be used to convert the geodetic coordinates to latitude and longitude data; the first coordinate data corresponding to the GCJ-02 coordinate system can be decrypted using a preset method to obtain the corresponding latitude and longitude data.

[0134] After obtaining the latitude and longitude data corresponding to the first coordinate data based on the first coordinate system, the latitude and longitude data can be converted into second coordinate data in a preset second coordinate system. For example, if the preset second coordinate system is the GCJ-02 coordinate system, encrypting the latitude and longitude data corresponding to the map point can yield the second coordinate data corresponding to the GCJ-02 coordinate system. The specific encryption process can include: converting the latitude and longitude data into radian expression data; applying a linear transformation formula to encrypt the radian expression data; and converting the encrypted radian expression data back into latitude and longitude expression form to obtain the second coordinate data corresponding to the GCJ-02 coordinate system. As another example, if the preset second coordinate system is the geocentric coordinate system, an online geodetic coordinate conversion tool can be used to convert the latitude and longitude data corresponding to the map point into the corresponding geodetic coordinates, which is the second coordinate data of the map point.

[0135] Using the latitude and longitude data of map points as intermediate reference data to convert the first coordinate data into the second coordinate data ensures that the second coordinate data is obtained based on the latitude and longitude data corresponding to the first coordinate data. The second coordinate data and the latitude and longitude data referenced by the first coordinate data are the same, resulting in high accuracy of coordinate conversion.

[0136] In another implementation, the first coordinate data is transformed based on a first coordinate system and a preset second coordinate system to obtain second coordinate data for multiple map points, including:

[0137] A coordinate transformation algorithm is obtained based on the first coordinate system and a preset second coordinate system;

[0138] The first coordinate data is transformed using a coordinate transformation algorithm to obtain the second coordinate data of multiple map points.

[0139] When converting first coordinate data to second coordinate data, the conversion method is the same as for the first coordinate system and the second coordinate system. For different combinations of first and second coordinate systems, the conversion method can be different. For example, if the first coordinate system is WGS-84 and the second coordinate system is BD-09, converting the first coordinate data in the first coordinate system to the second coordinate data in the second coordinate system can be done by encrypting the first coordinate data twice to obtain the second coordinate data. As another example, if the first coordinate system is a geocentric coordinate system and the second coordinate system is GCJ-02, converting the first coordinate data in the first coordinate system to the second coordinate data in the second coordinate system can be done by converting the first coordinate data to latitude and longitude data and then encrypting it once more to obtain the second coordinate data.

[0140] Therefore, for different combinations of the first and second coordinate systems, specific coordinate transformation algorithms can be used to directly convert the first coordinate data into the second coordinate data. These algorithms can be pre-designed and generated based on the coordinate data transformation process, and can be directly invoked according to the combination of the first and second coordinate systems when coordinate transformation is required.

[0141] After performing coordinate transformation on the first coordinate data of multiple map points using a coordinate transformation algorithm, the transformation result can be verified to ensure the accuracy of the obtained second coordinate data. Therefore, in one embodiment, after performing coordinate transformation on the first coordinate data to obtain the second coordinate data of multiple map points, the process includes:

[0142] A reference map point is determined among multiple map points, and the reference coordinate data of the reference map point is obtained based on the second coordinate system;

[0143] The coordinate transformation accuracy score is obtained based on the coordinate data difference between the reference coordinate data and the second coordinate data corresponding to the reference map point.

[0144] The parameters of the coordinate transformation algorithm are adjusted based on the coordinate transformation accuracy score.

[0145] To verify the transformation results, a reference map point can be determined from among multiple map points. The reference map point can be a point with significant geographical features, such as a specific building or area. Using a point with significant geographical features as the reference map point ensures accurate reference coordinate data is obtained in the second coordinate system. For example, using Mount Everest as a reference coordinate point allows the accurate location of Mount Everest to be obtained in the second coordinate system.

[0146] Calculate the coordinate difference between the reference coordinate data and the transformed second coordinate data, and obtain the transformation accuracy score based on this difference. For example, if the reference coordinate data is (5,2,1) and the second coordinate data is (6,7,9), the coordinate difference can be equal to the absolute value of the difference between the reference and second coordinate data, which is (1,5,8). The transformation accuracy score based on this difference can be equal to the sum of all the values ​​in the coordinate difference, which is 1+5+8=14. When multiple reference map points exist, the coordinate differences corresponding to the multiple reference map points can be summed to obtain the transformation accuracy score.

[0147] If the transformation result is accurate, the transformation accuracy score is low, meaning the difference between the reference coordinate data and the second coordinate data is small. A high transformation accuracy score indicates a large difference between the reference coordinate data and the second coordinate data, suggesting the transformation result is inaccurate. In this case, the coordinate transformation algorithm can be adjusted and the transformation repeated.

[0148] In one implementation, adjusting the parameters of the coordinate transformation algorithm based on the coordinate transformation accuracy score includes: when the coordinate transformation accuracy score is greater than a predetermined threshold, adjusting the parameters of the coordinate transformation algorithm and re-transforming the first coordinate data.

[0149] A small amount of transformation error is permissible during coordinate transformation. Therefore, if the coordinate transformation accuracy score exceeds a predetermined threshold, the transformation result is considered inaccurate, requiring adjustment of the coordinate transformation algorithm parameters and re-converting the first coordinate data into second coordinate data using the adjusted algorithm. If the coordinate transformation accuracy score is less than or equal to the predetermined threshold, the transformation result is considered accurate, and the resulting second coordinate data of multiple map points can be used for point aggregation.

[0150] Verifying the transformation results after converting the first coordinate data to the second coordinate data can improve the accuracy of the coordinate transformation results. Adjusting the parameters of the coordinate transformation algorithm based on the accuracy score can improve the coordinate transformation capability of the coordinate transformation algorithm.

[0151] Using coordinate transformation algorithms to directly convert the first coordinate data into the second coordinate data has high conversion efficiency.

[0152] Converting first coordinate data into second coordinate data based on the first coordinate system corresponding to the electronic map type and the preset second coordinate system allows for more accurate classification of the first coordinate data by utilizing the type of coordinate system, which helps improve the accuracy of converting first coordinate data into second coordinate data.

[0153] Step 330: Aggregate multiple map points based on the second coordinate data to obtain aggregated point information.

[0154] Aggregation point information includes the coordinates of the aggregation point and descriptive information for multiple map points. The coordinates of the aggregation point can be the coordinates obtained by aggregating multiple map points, and the descriptive information for the multiple map points can include secondary coordinate data, latitude and longitude data, etc., to describe which map points the aggregation point was based on.

[0155] In one implementation, aggregating multiple map points based on second coordinate data to obtain aggregated point information includes: aggregating the second coordinate data of multiple map points using a predetermined aggregation algorithm to obtain aggregated point information.

[0156] A predefined aggregation algorithm can be the default algorithm used to aggregate second coordinate data. For multiple electronic map types, a predefined aggregation algorithm can be used to aggregate the second coordinate data corresponding to multiple map points. There are several options for the predefined aggregation algorithm, such as K-means clustering, direct grid clustering, and grid centroid merging. K-means clustering groups nearby data points according to their distance, dividing them into K categories. Direct grid clustering divides the map into several grids, aggregating map points falling within the corresponding grids at the center point of the smaller grid. Grid centroid merging is similar to direct grid clustering, but after dividing the map points into different grids, it recalculates the centroid of each grid to obtain more accurate cluster centers.

[0157] One predetermined aggregation algorithm is selected from multiple aggregation algorithms to aggregate the second coordinate data. After converting the first coordinate data of multiple map points into second coordinate data, the second coordinate data corresponding to the multiple map points can be input into the predetermined aggregation algorithm to achieve point aggregation of map points.

[0158] Using the default pre-defined aggregation algorithm to aggregate the second coordinate data of multiple map points is highly efficient.

[0159] In another implementation, the point aggregation request also includes an aggregation algorithm field. In this case, the frame structure of the point aggregation request sent by the electronic map module of the target mini-program is as follows: Figure 6 As shown, the point aggregation request includes the electronic map type, the first coordinate data of multiple map points, and the aggregation algorithm. The aggregation algorithm field can be the point aggregation algorithm corresponding to the electronic map type. For some electronic map types, due to the uniqueness of the map scale or geographical features, there may be a strong dependence on the point aggregation algorithm. For example, electronic map type T1 can obtain relatively accurate point aggregation results when using point aggregation algorithm A1, and electronic map type T2 can obtain relatively accurate point aggregation results when using point aggregation algorithm A2. In this case, although the first coordinate data of the map points is converted into second coordinate data, the point aggregation algorithm applied to the second coordinate data can still refer to the point aggregation algorithm originally relied upon by the electronic map type.

[0160] The aggregation algorithm field can also specify the point aggregation algorithm to be used in a single point aggregation task. For example, if the point aggregation task is to aggregate multiple map points that are close to each other into one point, then the specified point aggregation algorithm for this task could be the K-means clustering algorithm. The K-means clustering algorithm considers the distance between map points and clusters closely spaced map points into one class to generate the aggregated point. The aggregation algorithm field can also be left blank.

[0161] Therefore, based on the second coordinate data, multiple map points are aggregated to obtain aggregated point information, including:

[0162] Read the aggregation algorithm field. If the aggregation algorithm field is empty, determine the target aggregation algorithm based on the number of multiple map points and the distribution of the second coordinate data.

[0163] When the aggregation algorithm field is not empty, the target aggregation algorithm is determined based on the value of the aggregation algorithm field.

[0164] Multiple map points are aggregated using a target aggregation algorithm to obtain aggregated point information.

[0165] By reading the aggregation algorithm field, it can be determined whether a specific point aggregation algorithm is specified for this point aggregation task. When the aggregation algorithm field is empty, it indicates that no specific point aggregation algorithm is specified. The point aggregation algorithm used for this point aggregation task can be the default algorithm used to aggregate the second coordinate data, that is, the predetermined aggregation algorithm provided in the aforementioned embodiment; or it can be a target aggregation algorithm determined based on the number of multiple map points and the distribution of the second coordinate data.

[0166] Different point aggregation algorithms may be best suited for different point aggregation scenarios. The differences in these scenarios primarily depend on the number and distribution of the map points to be aggregated. For example, a large number of points with a scattered distribution, a small number with a concentrated distribution, or a large number with a concentrated distribution. K-means clustering is suitable for scenarios where data points need to be divided into multiple fixed-size groups, and the map points within each group are close to each other. Figure 7 As shown, the distances between map points a1-a7 are close, and the distances between map points b1-b6 are close. Therefore, the distribution of the point map clearly divides multiple map points into two categories. The direct grid algorithm is suitable for scenarios with a large number of map points that are widely distributed, and can quickly aggregate a large number of map points. The grid centroid merging algorithm is suitable for scenarios with a large number of points that are relatively concentrated, and can determine more accurate cluster centers for relatively concentrated map points.

[0167] Therefore, when no specific point aggregation algorithm is specified for a point aggregation task, the target aggregation algorithm can be determined from multiple algorithms based on the number of multiple map points and the distribution of the second coordinate data. This enables the adaptive selection of the best algorithm for the point aggregation scenario, which is beneficial to improving the accuracy of point aggregation.

[0168] When the aggregation algorithm field is not empty, it indicates that a specific point aggregation algorithm exists for this point aggregation task. The specified point aggregation algorithm can be an algorithm strongly dependent on the electronic map type, or it can be an algorithm required by the point aggregation task. This has been described in detail in the preceding embodiments and will not be repeated here. Therefore, the value of the aggregation algorithm field can be determined as the target aggregation algorithm.

[0169] In another implementation, when the aggregation algorithm field is not empty, determining the target aggregation algorithm based on the value of the aggregation algorithm field includes:

[0170] When the aggregation algorithm field is not empty, obtain the aggregation algorithm mapping table, which stores the mapping relationship between multiple aggregation algorithms and the standard aggregation algorithm;

[0171] Based on the aggregation algorithm mapping table, the standard aggregation algorithm corresponding to the value of the aggregation algorithm field is determined as the target aggregation algorithm.

[0172] Since the point aggregation algorithm specified in the point aggregation task is for aggregating the first coordinate data, the effect of aggregating the transformed second coordinate data may not be good. Therefore, a target aggregation algorithm that can meet the point aggregation requirements and bring more accurate point aggregation results for the second coordinate data can be obtained based on the value of the aggregation algorithm field.

[0173] The aggregation algorithm mapping table can store the mapping relationship between multiple aggregation algorithms and a standard aggregation algorithm. The standard aggregation algorithm can be obtained by adaptively training various aggregation algorithms for the coordinate type of the second coordinate data. For example, electronic map type T1 uses aggregation algorithm A1 for point aggregation. The first coordinate data corresponding to map points in electronic map type T1 is geodetic coordinates, and aggregation algorithm A1 is trained specifically for geodetic coordinates. When performing point aggregation using the method of this embodiment, it is necessary to uniformly convert various types of coordinate data into latitude and longitude coordinates. After converting geodetic coordinates to latitude and longitude coordinates, aggregation algorithm A1 performs poorly in terms of aggregation effect for latitude and longitude coordinates. To compensate for this problem, aggregation algorithm A1 is specifically trained using latitude and longitude coordinates to obtain aggregation algorithm A2. Aggregation algorithm A2 has the same basic algorithm architecture as aggregation algorithm A1, but the parameters in aggregation algorithm A1 are obtained after adjustment based on geodetic coordinates, while those in aggregation algorithm A2 are obtained after adjustment based on latitude and longitude coordinates. Using aggregation algorithm A2 as the standard aggregation algorithm for aggregation algorithm A1 to perform point aggregation of latitude and longitude coordinates, the aggregation process can not only meet the requirements of point aggregation tasks, but also obtain relatively accurate point aggregation results for latitude and longitude coordinates.

[0174] Adaptive training is performed on each aggregation algorithm for the second coordinate data to obtain a standard aggregation algorithm applicable to the second coordinate data. Each aggregation algorithm is then associated with a standard aggregation algorithm, and an aggregation algorithm mapping table is constructed. When the aggregation algorithm field is not empty, the standard aggregation algorithm corresponding to the value of the aggregation algorithm field can be obtained through the aggregation algorithm mapping table. The standard aggregation algorithm is then determined as the target aggregation algorithm, and point aggregation is performed on the second coordinate data using the target aggregation algorithm.

[0175] By acquiring the standard aggregation algorithm corresponding to each aggregation algorithm and performing point aggregation, we can obtain more accurate point aggregation results for the second coordinate data, and adapt the point aggregation method to the geographical features displayed in electronic map types and the needs of point aggregation tasks. While improving the accuracy of point aggregation, this further enhances the universality of the point aggregation method for different electronic map types.

[0176] After obtaining the target aggregation algorithm, the second coordinate data corresponding to multiple map points can be input into the target aggregation algorithm. The target aggregation algorithm is then used to aggregate the multiple map points to obtain the aggregated point information.

[0177] The target aggregation algorithm is determined by the value passed in the aggregation algorithm field. The point aggregation task selection aggregation algorithm is implemented to make the point aggregation method more adaptable to different electronic map types, which is conducive to improving the accuracy of point aggregation and further improving the universality of the point aggregation method for different types of electronic maps.

[0178] Step 340: Draw a map based on the aggregation point information and the type of electronic map to obtain the map image.

[0179] The map view contains aggregation point markers corresponding to the aggregation point information. After obtaining the aggregation point information, the map view can be drawn based on the map point information so that the electronic map module can display the results of point aggregation. Since the map views of different electronic map types differ, and the map drawing methods also differ, it is necessary to draw the map view based on both the aggregation point information and the electronic map type.

[0180] The aggregation point markers included in the map can be visual representations of aggregation points generated from multiple map points, such as... Figure 2CThe image shows point A and point B. A map view can contain multiple aggregate point markers, each formed by aggregating different map points. Aggregate point markers can be represented in various ways, such as static or dynamic graphics. Different aggregate point markers within the same map view can be represented using different methods. For example, a map view may contain two aggregate point markers, one represented by a circular, red graphic, and the other by a square, green, dynamic, flashing graphic. The representation of aggregate point markers is related to the type of electronic map.

[0181] In one implementation, map drawing is performed based on aggregation point information and electronic map type to obtain a map image, including:

[0182] Construct aggregation point markers based on aggregation point information and electronic map type;

[0183] Obtain the target map instance;

[0184] Maps are drawn based on aggregation point markers and target map instances to obtain a map image.

[0185] When creating a map, the first step is to construct aggregation point markers. Aggregate point markers can be generated based on aggregation point information and the type of electronic map. The aggregation point information can include the location of the aggregation point on the map screen, and based on this information, the specific location where the constructed aggregation point markers will be displayed on the map screen can be determined.

[0186] The display method of aggregation point markers differs across different types of electronic maps. For example... Figure 8 As shown, in electronic map type T1, the aggregation point markers are black circular markers; in electronic map type T2, the aggregation point markers are square markers that display the number of map points participating in the aggregation (e.g., Figure 8 The map shown contains 10 map points participating in the aggregation; in electronic map type T3, the aggregation point markers display the geographic features corresponding to the aggregation points (e.g., Figure 8 (The building forms shown). Therefore, based on the electronic map type, the display information of the aggregation point in the corresponding electronic map type can be determined, which may include: aggregation point icon type, color, numerical form, and aggregation point hierarchical representation form, etc.

[0187] In one implementation, the point aggregation request also includes an aggregation tag constructor class name field. The point aggregation request frame structure can be represented as follows: Figure 9This includes the electronic map type, the first coordinate data of multiple map points, and the name of the aggregate marker constructor class. The aggregate marker constructor class name field is the name of the class corresponding to the electronic map type used for constructing aggregate markers. The class corresponding to the electronic map can be directly accessed through the aggregate marker constructor class name for constructing aggregate markers. The aggregate marker constructor class name field can be empty.

[0188] Therefore, aggregation point markers are constructed based on aggregation point information and electronic map type, including:

[0189] When the name field of the aggregate marker constructor is empty, the preset aggregate point marker constructor is obtained based on the electronic map type, and the preset aggregate point marker constructor is used to construct the aggregate point marker for the aggregate point information;

[0190] When the aggregate tag constructor class name field is not empty, the value of the aggregate tag constructor class name field is determined as the aggregate tag constructor class, and the aggregate tag is constructed based on the aggregate point information using the aggregate tag constructor class.

[0191] By checking if the value passed to the "Aggregate Marker Constructor Class Name" field is empty, it can be determined whether a custom aggregate point constructor class exists for the electronic map type. When the "Aggregate Marker Constructor Class Name" field is empty, the aggregate point marker constructor class cannot be directly obtained through this field. To construct aggregate point markers, a preset aggregate point marker constructor class can be obtained based on the electronic map type.

[0192] The preset aggregation point marker constructor can be a default aggregation point marker constructor for an electronic map type. In one implementation, a preset aggregation point marker constructor corresponding to an electronic map type can be obtained for a predetermined path. After obtaining the preset aggregation point marker constructor, aggregation point markers can be constructed based on the aggregation point information using the preset aggregation point marker constructor.

[0193] In one implementation, the preset aggregation point marker constructor class includes an aggregation point marker constructor class and an aggregation point marker effect implementation class. The aggregation point marker constructor class can be used to construct aggregation point instances. For example, it can add position attributes, visibility attributes, and drag attributes to the aggregation point. The position attribute indicates the marker's position, the visibility attribute indicates whether the aggregation point marker is visible, and the drag attribute indicates whether the aggregation point marker can be controlled to move. The aggregation point marker effect implementation class can add display effects to the aggregation point, such as shape, color, and text.

[0194] Therefore, a preset aggregation point marker construction class is obtained based on the electronic map type, and aggregation point markers are constructed using the preset aggregation point marker construction class for aggregation point information, including:

[0195] Based on electronic map type, a class for constructing aggregation points and a class for implementing aggregation point marking effects are provided.

[0196] Use the aggregation point constructor to construct aggregation point instance objects based on the aggregation point information;

[0197] The class that implements the aggregation point marking effect determines the display information of the aggregation point instance object and generates the aggregation point mark.

[0198] The aggregate point constructor and the aggregate point marker implementation class are also associated with the electronic map type. To obtain the aggregate point constructor and the aggregate point marker implementation class based on the electronic map type, the storage path of the aggregate point constructor and the aggregate point marker implementation class can be obtained based on the electronic map type; the aggregate point constructor and the aggregate point marker implementation class can then be called based on the storage path.

[0199] The storage path for the aggregation point constructor class can be "electronic map type name.model.Marker"; the storage path for the aggregation point marker effect implementation class can be "electronic map type name.model.MarkerOptions". For example, the parameter name corresponding to electronic map type T1 is "Type1". Therefore, the path to obtain the aggregation point constructor class based on electronic map type T1 is "Type1.model.Marker", and the path to obtain the aggregation point marker effect implementation class is "Type1.model.MarkerOptions".

[0200] After obtaining the aggregation point constructor class and the aggregation point marking effect implementation class, aggregation point instance objects can be constructed using the aggregation point constructor class based on the aggregation point information. Specifically, in one implementation, aggregation point instance objects can be constructed using reflection. Constructing aggregation point instance objects using reflection means using the reflection mechanism to create aggregation point instance objects. The reflection mechanism allows aggregation point instance objects to dynamically obtain and manipulate data in the aggregation point constructor class during use, including the name, methods, and properties of the aggregation point constructor class.

[0201] During the construction of an aggregation point instance object, aggregation point attributes can be set based on methods within the aggregation point instance object. For example, the "setPosition" method can be called to set the location attribute of the aggregation point instance object on the electronic map. The location attribute can limit the position where the aggregation point is displayed on the electronic map. Since the aggregation point is constructed based on second coordinate data, the second coordinate data can be converted into latitude and longitude information and used as the location attribute of the aggregation point instance, or the second coordinate data can be converted according to the representation of the first coordinate data and the converted coordinates can be used as the location attribute of the aggregation point instance.

[0202] After constructing the aggregation point instance object, the display information of the aggregation point instance object can be determined based on the aggregation point marker effect implementation class to generate the aggregation point marker. Specifically, in one implementation, reflection can be used to set the display information of the aggregation point instance object.

[0203] By using an aggregation point constructor class and an aggregation point marker effect implementation class to construct aggregation point markers, the creation of aggregation point instances and the setting of aggregation point display information can be separated. Adjusting the attributes of an aggregation point instance does not affect the display information, and vice versa. These two aspects are independent, facilitating subsequent adjustments to the aggregation point marker parameters and improving the operability of the aggregation point markers.

[0204] When the "Aggregate Marker Constructor Class Name" field is not empty, it indicates that a custom aggregate marker constructor class exists for the electronic map type. Therefore, the value of the "Aggregate Marker Constructor Class Name" field can be determined as the aggregate marker constructor class, and aggregate point markers can be constructed based on the aggregate point information using this class.

[0205] In one implementation, when constructing aggregated point markers using an aggregated marker constructor, the aggregated marker constructor can be directly called, and the aggregated point markers can be constructed based on the aggregated point information. In another implementation, when the point aggregation method of this embodiment occurs within a point aggregation component, and the aggregated marker constructor corresponding to the electronic map type is stored in the electronic map, directly calling the aggregated marker constructor may lead to a call error. Therefore, the point aggregation component can connect to the electronic map, and the aggregated point information can be passed through to the aggregated marker constructor using a parameter passing method to complete the construction of the aggregated point markers.

[0206] The method of constructing aggregate point markers based on the parameter passed in the class name field of the aggregate marker construction implements a fast method for obtaining electronic map types to construct aggregate markers, thereby improving the efficiency of aggregate marker construction.

[0207] During the map drawing process, images of the electronic map can also be captured. Therefore, after constructing aggregation point markers, the target map instance can be obtained.

[0208] A target map instance can be a map object containing a base geographic data layer. This base geographic data layer may include information such as terrain, roads, transportation, and buildings. When drawing a map, these base geographic data layers can be accessed by calling the target map instance, and custom geographic data layers can be created and added on top of them. Custom geographic data layers can be custom-created content, such as custom markers, routes, or regions. The purpose of obtaining the target map instance is to draw aggregation point markers on top of the base geographic data layers.

[0209] In one implementation, the target map instance can be obtained by establishing a connection with the electronic map corresponding to the point aggregation request, and then calling the target map instance through the connection.

[0210] However, map instance data is quite large, making data transmission via connection inefficient and prone to data loss during transmission. Therefore, in another implementation, obtaining the target map instance includes:

[0211] Call the map retrieval function;

[0212] When the map retrieval function returns an empty object, retrieve the map implementation class and then retrieve the target map instance based on the map implementation class.

[0213] When the map retrieval function returns a non-empty object, the value returned by the map retrieval function is determined as the target map instance.

[0214] Multiple map instances corresponding to different electronic map types can be stored in the local cache. The map retrieval function can retrieve the target map instance corresponding to a point aggregation request from the local cache. If the map retrieval function returns an empty object, it means that no map instance corresponding to that electronic map type is stored in the local cache. If a map instance cannot be returned, the map implementation class can be retrieved, and the target map instance can be obtained based on the map implementation class.

[0215] A map implementation class can be a class used to present map content, interact with, and control map functionality. A map implementation class can include methods for creating maps, drawing maps, handling map interactions, and managing map data.

[0216] In one implementation, the point aggregation request also includes a map implementation class name field. For example... Figure 10 As shown, the point aggregation request includes the electronic map type, the first coordinate data of multiple map points, and the map implementation class name. The map implementation class name field is used to pass the name of the custom map implementation class of the electronic map.

[0217] In this way, the map implementation class is obtained, including: when the map implementation class name field is empty, the preset map implementation class is obtained; otherwise, the value of the map implementation class name field is determined as the map implementation class.

[0218] When the "Map Implementation Class Name" field is empty, it indicates that a custom map implementation class for the electronic map does not exist. Therefore, the default map implementation class corresponding to the electronic map in the local cache can be retrieved. When the "Map Implementation Class Name" field is not empty, it indicates that a custom map implementation class for the electronic map exists, and this map implementation class can be called.

[0219] After obtaining the map implementation class, you can use reflection to call the instance retrieval method based on the map implementation class to obtain the target map instance.

[0220] When the map retrieval function does not return an empty object, the value returned by the map retrieval function can be used to determine the target map instance.

[0221] Using map retrieval functions to obtain target map instances is highly efficient and avoids the problem of data loss during data transmission.

[0222] After obtaining the aggregation point markers and the target map instance, the map can be drawn based on the aggregation point markers and the target map instance to obtain the map image.

[0223] Since the target map instance can be used to add custom geographic data layers on top of a base geographic data layer, constructed aggregation point markers can be added to the target map instance's base geographic data layer to complete map drawing. Specifically, this can be achieved by using reflection to call the target map instance's marker addition method, passing the aggregation point markers as parameters to the base geographic data layer.

[0224] In the above embodiments, after constructing the aggregation point markers, map drawing is performed based on the aggregation point markers and the target map instance, which ensures that the aggregation point markers can be displayed in the accurate location on the electronic map, which helps to improve the accuracy of map drawing.

[0225] After map drawing, objects may need to execute commands on aggregation point markers to view detailed information. In this case, the aggregation point markers can respond to events promptly. Therefore, in another implementation, the point aggregation request also includes an event detection field. The frame structure of the point aggregation request is as follows: Figure 11 As shown, the point aggregation request includes an electronic map type, multiple map point first coordinate data, and an event detection class.

[0226] The event detection class field takes an event detection class from the electronic map module used to support interaction between objects and the electronic map. In the visualization interface of the electronic map module of the target city sequence, objects can interact with the map, such as clicking, dragging, and zooming. To respond promptly to these interactions, the event detection class can be used to capture and process these events. Each electronic map can have a custom event detection class tailored to its type; multiple electronic maps can use the same event detection class. Therefore, the event detection class can be passed through the event detection class field to detect map interaction events.

[0227] Therefore, after drawing a map based on the aggregation point information and the type of electronic map, and obtaining the map image, the map data processing method provided in this embodiment of the disclosure further includes:

[0228] Read the event detection class field. When the event detection class field is empty, obtain the preset event detection class and use the preset event detection class to perform event detection on the aggregation point marker.

[0229] When the event detection class field is not empty, the value of the event detection class field is used to perform event detection on the aggregation point marker.

[0230] By checking if the event detection class field is empty, it can be determined whether the electronic map has a custom event detection class. When the event detection class field is empty, a preset event detection class can be retrieved. The preset event detection class is universal and can be used for event detection on various electronic maps. Therefore, the preset event detection class can be used to perform event detection on aggregation point markers. When the event detection class field is not empty, the value of the event detection class field can be used to perform event detection on aggregation point markers.

[0231] When using event detection classes to perform event detection on aggregation point markers, event detectors can be added to the aggregation point markers. When a specific event occurs on the aggregation point marker, the event detector can be triggered, and an event handler function can be called based on that event. For example, when an object long-presses an aggregation point marker, in response to the long-press event, the aggregation map point display function can be called to display detailed information about the multiple map points participating in the aggregation. When event detection on the aggregation point marker is no longer needed, the event detector can be removed to stop responding to specific events.

[0232] Therefore, by adding event detection to the aggregation point markers, the aggregation point markers on the map screen can not only visually represent the aggregation result of multiple map points, but also respond to object commands to execute corresponding tasks. For example, in response to an object's long-press command, the aggregation point marker can display detailed information of multiple map points participating in the aggregation; in response to an object's click command, the aggregation point marker can display the aggregation point's own attribute information, and also allows objects to adjust the display format of the aggregation point according to their own display habits. This enhances the operability and flexibility of the electronic map, and also improves the user experience of objects using the electronic map.

[0233] Step 350: Send the map image to the electronic map module of the target mini-program for map display.

[0234] When the point aggregation process in this embodiment of the disclosure occurs in a point aggregation component, the point aggregation component can send the map image to the electronic map module of the target mini-program for map display.

[0235] After the map image is sent to the target mini-program's electronic map module, the target can view the map image through the electronic map module, which includes the aggregate point markers obtained by aggregating multiple map points.

[0236] In one of the aforementioned embodiments, an event detector can be added to the aggregation point markers. Therefore, objects can execute specific events on the aggregation point markers through the visualization interface of the electronic map module.

[0237] In another embodiment, after sending the map image to the electronic map module of the target mini-program for map display, the map data processing method provided in this disclosure further includes:

[0238] Receive a map switching request sent by the electronic map module of the target mini-program. The map switching request includes the type of electronic map to be switched.

[0239] The original aggregation point information is obtained based on the mini-program identifier of the target mini-program. The map is drawn according to the original aggregation point information and the electronic map type to be switched, and the switched map screen is obtained. The switched map screen contains the switched aggregation point markers corresponding to the aggregation point information.

[0240] The switched map view is sent to the target mini-program's electronic map module for map display.

[0241] Within the target mini-program, users can view various electronic maps. After the electronic map module displays the aggregated point map, users can switch to other electronic map types within the module. Switching electronic map types changes the display method of geographic information; aggregated point markers displayed in the original electronic map can also be displayed on the switched electronic map.

[0242] Because of data isolation between different electronic map types, it is not possible to directly transfer aggregation point markers displayed on the original electronic map to the switched electronic map. Therefore, aggregation point markers can be displayed on the new electronic map based on the map switching request. Since different electronic map types can use the same coordinate format for point aggregation using second coordinate data, the original aggregation point information can generate aggregation point markers on either the original electronic map or the electronic map to be switched to.

[0243] Once an aggregation point is completed for a mini-program, the mini-program identifier and the generated aggregation point information can be stored accordingly. The mini-program identifier can be the network address, terminal number, etc., of the mini-program. The stored information of the mini-program identifier and aggregation point information can be cleaned up according to a predetermined time period, for example, automatically deleted after 24 hours. For a given mini-program identifier, new aggregation point information can automatically overwrite the old aggregation point information.

[0244] Upon receiving a map switching request from the electronic map module of the target mini-program, the system can locate the corresponding original aggregation point information in the storage space based on the mini-program's identifier, and then draw the map according to the original aggregation point information and the type of electronic map to be switched, thus obtaining the switched map screen. The map drawing process has been described in detail in the aforementioned embodiments and will not be repeated here.

[0245] The switched map view is sent to the electronic map module of the target mini-program, which can then replace the original map view with the switched map view. The switched map view can display aggregation point markers at the same positions as those in the original map view.

[0246] In response to map switching commands, the system utilizes the original aggregated point information and the type of electronic map to be switched to for map drawing. This eliminates the need for re-aggregating points for the specific electronic map type, directly obtaining the original aggregated point information and drawing the map based on that type. This improves the efficiency of point aggregation when switching maps.

[0247] This disclosure provides a detailed description of embodiments in conjunction with specific application scenarios.

[0248] like Figure 12 The diagram shown is another flowchart illustrating the map data processing method provided in this disclosure. The map data processing method can be executed within a point aggregation component.

[0249] The structure of the point aggregation component can be as follows: Figure 13 As shown, the system comprises a communication layer, a protocol layer, a logic layer, and a rendering layer. The communication layer is used to acquire parameters, specifically receiving parameters from outside the point aggregation component and calling parameters within the component. The protocol layer is used to acquire the data required for point aggregation, specifically coordinate transformation, aggregation algorithm transformation, and configuration caching. The configuration cache stores the acquired parameters and the transformed data. The logic layer is used to execute core construction tasks, specifically point aggregation calculations, aggregation configuration, and the construction of raw event detection. The rendering layer is used for drawing, specifically map drawing and adding event detectors to the map.

[0250] To enable the communication layer to quickly obtain relevant data for point aggregation, the point aggregation component can be configured with multiple parameter interfaces, each used to retrieve specific parameters. Specific interfaces and their descriptions are as follows:

[0251] As shown in Table 1:

[0252]

[0253] Table 1

[0254] As shown in Table 1, each interface has a different function and receives different parameters.

[0255] The “setClusterItemData” interface can be used to receive a list of coordinates of map points that participate in point aggregation;

[0256] The “setClusterAlgorithm” interface can be used to receive the aggregation algorithm type for aggregating map points;

[0257] The “mapType” interface can be used to receive electronic map types, and different electronic map types can be assigned different integer identifiers;

[0258] "setEventListener" can be an event detection interface that defines an event detection class. When performing event detection, events can be received and processed through this interface.

[0259] "setIClusterProxy" can be a point aggregation proxy, specifically used to execute point aggregation logic for electronic maps of different map types;

[0260] "setCustomMapImpl" can be used to pass the map event class name. The map implementation class corresponding to the map implementation class name can be used to implement map functions and interface settings, which encapsulates the functions of map creation, display, interaction, etc.

[0261] "setCustomMarkerImpl" can be used to pass the name of the aggregate marker implementation class. The corresponding aggregate marker implementation class can be used to create and manage markers in electronic maps, which encapsulates functions such as marker creation, style setting, and location setting.

[0262] The “setCustomAddmakerImpl” option can be used to pass the name of the add aggregate marker class. The corresponding add aggregate marker class can be used to add visual markers at specific locations on the electronic map to highlight specific locations or data points.

[0263] The above is a detailed description of the architecture and interface of the point aggregation component that executes map data processing methods. Map data processing methods may include the following steps:

[0264] Step 1201: In response to the point aggregation request from the electronic map module of the target mini-program, obtain the electronic map type and the first coordinate data of multiple aggregated map points.

[0265] The target mini-program can be any mini-program that primarily handles various matters and requires the use of electronic maps. The electronic map module can be a module within the target mini-program used to display the electronic map. Within the target mini-program, the user can select the map they wish to use, and the electronic map module can display the corresponding electronic map based on the user's selection. After the electronic map module displays the electronic map, when it receives a point aggregation instruction from the user, it can generate a point aggregation request based on the current map type and the first coordinate data of the multiple map points covered in the point aggregation instruction.

[0266] Based on point aggregation requests, the communication layer on the point aggregation component can obtain the electronic map type and the first coordinate data of multiple aggregated map points. The electronic map type can be obtained based on the "mapType" interface on the point aggregation component. Different electronic map types can be represented by an integer identifier. For example, the identifier for electronic map type T1 is 1, and the identifier for electronic map type T2 is 2. Electronic map types can also be distinguished according to the data source providing the electronic map data, such as platform N1, platform N2, and platform N3. Different platforms have their own methods for collecting geographic information and can generate electronic maps based on the collected geographic information. After generating the electronic map, it can be provided to the mini-program development platform for use by mini-programs.

[0267] The first coordinate data of multiple aggregated map points can be obtained based on the "setClusterItemData" interface on the point aggregation component.

[0268] Step 1202: Convert the first coordinate data of multiple aggregated map points into second coordinate data according to the electronic map type.

[0269] The first coordinate data obtained by the “setClusterItemData” interface can be represented in various ways depending on the type of electronic map, such as latitude and longitude coordinates, Cartesian coordinates, spatial rectangular coordinates, polar coordinates, and geodetic coordinates.

[0270] In the point aggregation component, the first coordinate data from different electronic map types are aggregated using a standardized coordinate representation. For example, all data is aggregated using latitude and longitude coordinates. Therefore, after receiving the first coordinate data, the point aggregation component needs to convert the first coordinate data into second coordinate data according to the electronic map type and the preset standard coordinate representation.

[0271] Step 1203: Obtain the aggregation algorithm, and use the second coordinate data of multiple aggregated map points as input parameters to execute the aggregation algorithm and obtain map aggregation point information.

[0272] The aggregation algorithm can be retrieved from the configuration cache of the protocol layer in the point aggregation component via the "setClusterAlgorithm" interface. The aggregation algorithm can be used to aggregate points based on the second coordinate data of multiple map points. The point aggregation algorithm used may differ across different electronic maps. However, within the point aggregation component, the default aggregation algorithm can be used for point aggregation for various electronic map types.

[0273] The point aggregation component offers several default aggregation algorithms, such as pixel aggregation and coordinate distance aggregation. Different aggregation algorithms can be selected for different types of electronic maps to achieve more targeted point aggregation.

[0274] After obtaining the aggregation algorithm, the second coordinate data of multiple aggregated map points can be input into the aggregation algorithm for aggregation to obtain map aggregation point information.

[0275] Step 1204: Obtain the coordinates of the aggregation point based on the map aggregation point information, and obtain the aggregation point display information.

[0276] Map aggregation point information can include the location information of the aggregation point and detailed information about multiple map points participating in the aggregation. Therefore, the coordinates of the aggregation point can be directly obtained from the map aggregation point information.

[0277] Aggregate point display information can include aggregate point icon type, icon color, aggregate point number display format, and aggregate point hierarchy. Aggregate point display information can be retrieved from the configuration cache.

[0278] Step 1205: Check if there is a custom aggregate tag implementation class.

[0279] The aggregate marker implementation class is used to create and manage markers on the map, encapsulating functions such as marker creation and style settings. The aggregate marker implementation class can be obtained through the "setCustomMarkerImpl" interface in the communication layer. When the electronic map has a custom aggregate marker implementation class, its name can be passed to the "setCustomMarkerImpl" interface. When the electronic map does not have a custom aggregate marker implementation class, no value is passed.

[0280] Therefore, you can check if a custom aggregate markup implementation class exists by checking if the value of "setCustomMarkerImpl" is empty. If it is empty, it means there is no custom aggregate markup implementation class; if it is not empty, it means there is a custom aggregate markup implementation class.

[0281] Step 1206: Pass the aggregation point parameters to the aggregation tag implementation class and construct the aggregation point tag.

[0282] When a custom aggregation tag implementation class exists, the point aggregation component can access this implementation class and use the `onClusterProxy` method in the corresponding point aggregation proxy (`setIClusterProxy`) to pass the aggregation point parameters to the aggregation tag implementation class. The aggregation point tag is then constructed using the aggregation tag implementation class.

[0283] The onClusterProxy method can be a parameter pass-through method in point cluster proxy.

[0284] Step 1207: Access the aggregation point implementation class and use reflection to construct an aggregation point instance.

[0285] When no custom aggregation marker implementation class exists, the default aggregation point implementation class path within the point aggregation component can be obtained. The default aggregation point implementation class path can be "electronic map type name.model.Marker".

[0286] The aggregation point implementation class can be accessed through the aggregation point implementation classpath. The aggregation point implementation class can be used to construct aggregation point instances. For example, it can be used to add position, visibility, and drag attributes to the aggregation point. For instance, the `setPosition` method can be called to set the position information of the aggregation point instance.

[0287] An aggregate point instance can be constructed based on the aggregate point implementation class using reflection. Constructing an aggregate point instance using reflection refers to creating it using the reflection mechanism. Reflection allows the aggregate point instance to dynamically access and manipulate data within the aggregate point implementation class during use, including the class name, methods, and properties.

[0288] Step 1208: Access the aggregation point display effect class and use reflection to set the display information of the aggregation point.

[0289] After step 1207, you can also obtain the default aggregation point display effect class path, which can be "electronic map type name.model.MarkerOptions".

[0290] The aggregation point display effects class can be accessed through the default classpath. The aggregation point display effects class allows you to add display effects to aggregation points, such as shape, color, and text.

[0291] After constructing an aggregation point instance, reflection can be used to determine the display information of the aggregation point instance object based on the aggregation point display effect class, in order to generate aggregation point markers.

[0292] Step 1209: Obtain a map instance.

[0293] A map instance can be a map object containing a base geographic data layer. This base geographic data layer may include information such as terrain, roads, transportation, and buildings. When drawing a map, these base geographic data layers can be accessed by calling the target map instance, and custom geographic data layers can be created and added on top of them. Custom geographic data layers can be custom-created content, such as custom markers, routes, or regions.

[0294] Map instances can be obtained using the getMap method in the point aggregation agent.

[0295] Step 1210: Does a map instance exist?

[0296] The existence of a map instance can be determined by checking if the `getMap` method returns an empty value. An empty value indicates that the point aggregation component does not contain a proxy-implemented map instance; a non-empty value indicates that the point aggregation component contains a proxy-implemented map instance.

[0297] Step 1211: Obtain the map implementation class and use reflection to obtain the map instance.

[0298] When no map instance exists, the map implementation class name can be obtained through the "setCustomMapImpl" interface of the point aggregation component communication layer, and the map implementation class can be found using the reflection instruction Class.forName(${map implementation class name}).

[0299] The map instance is obtained by calling the getInstance method in the map implementation class using reflection.

[0300] Step 1212: Obtain the marker class, add the constructed aggregation point marker to the map instance, and complete the map drawing.

[0301] After obtaining the map instance, the add marker class can be obtained through the "setCustomAddmakerImpl" interface of the point aggregation component communication layer, and the aggregated point marker constructed in step 1207 or step 1210 can be added to the map instance to complete the map drawing.

[0302] Step 1213: Add an event detector to the aggregation point marker.

[0303] Event detectors are used to react to events occurring on aggregation point markers. Examples include clicking, dragging, and long-pressing aggregation point markers. Event detectors can respond to object commands to perform corresponding tasks. For example, in response to an object's long-press command, the aggregation point marker can display detailed information about multiple map points participating in the aggregation; in response to an object's click command, the aggregation point marker can display the aggregation point's own attribute information, and can also allow the object to adjust the display format of the aggregation point according to its own display preferences.

[0304] Event detectors added to aggregation point markers can be obtained via the "setEventListener" interface on the communication layer of the point aggregation component.

[0305] Step 1214: Send the drawn map to the electronic map module of the target mini-program for display.

[0306] The point aggregation component sends the drawn map to the electronic map module of the target mini-program. The target can view the map through the electronic map module, which includes the aggregation point markers obtained by aggregating multiple map points.

[0307] Description of apparatus and devices according to embodiments of this disclosure

[0308] It is understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this embodiment, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.

[0309] It should be noted that in various specific embodiments of this application, when processing is required based on data related to the characteristics of the target content, such as target content attribute information or attribute information sets, permission or consent from the target content provider will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require obtaining target content attribute information, separate permission or consent from the target content provider will be obtained through pop-ups or redirection to a confirmation page. Only after obtaining the separate permission or consent from the target content provider will the necessary target content-related data for the normal operation of the embodiments of this application be obtained.

[0310] Figure 14 This is a schematic diagram of the structure of a map data processing apparatus 1400 provided in an embodiment of the present disclosure. The map data processing apparatus 1400 includes:

[0311] The first receiving unit 1410 is used to receive a point aggregation request sent by the electronic map module of the target mini-program. The point aggregation request includes the electronic map type and the first coordinate data of multiple map points.

[0312] The conversion unit 1420 is used to perform coordinate transformation on the first coordinate data according to the type of electronic map to obtain the second coordinate data of multiple map points;

[0313] The aggregation unit 1430 is used to aggregate multiple map points based on the second coordinate data to obtain aggregate point information, which includes the coordinates of the aggregate point and descriptive information of multiple map points.

[0314] The first drawing unit 1440 is used to draw a map based on the aggregation point information and the type of electronic map to obtain a map screen, which contains the aggregation point markers corresponding to the aggregation point information.

[0315] The first sending unit 1450 is used to send the map image to the electronic map module of the target mini-program for map display.

[0316] In one embodiment, the conversion unit 1420 is specifically used for:

[0317] Determine the first coordinate system based on the type of electronic map;

[0318] Based on the first coordinate system and the preset second coordinate system, the first coordinate data is transformed to obtain the second coordinate data of multiple map points.

[0319] In one embodiment, the conversion unit 1420 is specifically used for:

[0320] Determine the latitude and longitude data of multiple map points based on the first coordinate system and the first coordinate data;

[0321] The second coordinate data of multiple map points are determined in a preset second coordinate system based on latitude and longitude data.

[0322] In one embodiment, the conversion unit 1420 is specifically used for:

[0323] A coordinate transformation algorithm is obtained based on the first coordinate system and a preset second coordinate system;

[0324] The first coordinate data is transformed using a coordinate transformation algorithm to obtain the second coordinate data of multiple map points.

[0325] In one embodiment, the first drawing unit 1440 is specifically used for:

[0326] Construct aggregation point markers based on aggregation point information and electronic map type;

[0327] Obtain the target map instance;

[0328] Maps are drawn based on aggregation point markers and target map instances to obtain a map image.

[0329] In one implementation, the point aggregation request also includes an aggregation tag constructor class name field;

[0330] The first drawing unit 1440 is specifically used for:

[0331] When the name field of the aggregate marker constructor is empty, the preset aggregate point marker constructor is obtained based on the electronic map type, and the preset aggregate point marker constructor is used to construct the aggregate point marker for the aggregate point information;

[0332] When the aggregate tag constructor class name field is not empty, the value of the aggregate tag constructor class name field is determined as the aggregate tag constructor class, and the aggregate tag is constructed based on the aggregate point information using the aggregate tag constructor class.

[0333] In one implementation, the preset aggregation point marker constructor class includes an aggregation point marker constructor class and an aggregation point marker effect implementation class;

[0334] The first drawing unit 1440 is specifically used for:

[0335] Based on electronic map type, a class for constructing aggregation points and a class for implementing aggregation point marking effects are provided.

[0336] Use the aggregation point constructor to construct aggregation point instance objects based on the aggregation point information;

[0337] The class that implements the aggregation point marking effect determines the display information of the aggregation point instance object and generates the aggregation point mark.

[0338] In one embodiment, the first drawing unit 1440 is specifically used for:

[0339] Call the map retrieval function;

[0340] When the map retrieval function returns an empty object, retrieve the map implementation class and then retrieve the target map instance based on the map implementation class.

[0341] When the map retrieval function returns a non-empty object, the value returned by the map retrieval function is determined as the target map instance.

[0342] In one implementation, the point aggregation request also includes an aggregation algorithm field;

[0343] Aggregation unit 1430 is specifically used for:

[0344] Read the aggregation algorithm field. If the aggregation algorithm field is empty, determine the target aggregation algorithm based on the number of multiple map points and the distribution of the second coordinate data.

[0345] When the aggregation algorithm field is not empty, the target aggregation algorithm is determined based on the value of the aggregation algorithm field.

[0346] Multiple map points are aggregated using a target aggregation algorithm to obtain aggregated point information.

[0347] In one embodiment, the aggregation unit 1430 is specifically used for:

[0348] When the aggregation algorithm field is not empty, obtain the aggregation algorithm mapping table, which stores the mapping relationship between multiple aggregation algorithms and the standard aggregation algorithm;

[0349] Based on the aggregation algorithm mapping table, the standard aggregation algorithm corresponding to the value of the aggregation algorithm field is determined as the target aggregation algorithm.

[0350] In one implementation, the point aggregation request also includes an event detection field;

[0351] The map data processing device 1400 also includes:

[0352] A reading unit (not shown) is used to read the event detection class field. When the event detection class field is empty, a preset event detection class is obtained, and the preset event detection class is used to perform event detection on the aggregation point marker.

[0353] A detection unit (not shown) is used to perform event detection on the aggregation point marker using the value of the event detection class field when the event detection class field is not empty.

[0354] In one embodiment, the map data processing apparatus 1400 further includes:

[0355] The second receiving unit (not shown) is used to receive a map switching request sent by the electronic map module of the target mini-program. The map switching request includes the type of electronic map to be switched.

[0356] The second drawing unit (not shown) is used to obtain the original aggregation point information based on the mini-program identifier of the target mini-program, and to draw the map according to the original aggregation point information and the electronic map type to be switched, so as to obtain the switched map screen. The switched map screen contains the switched aggregation point markers corresponding to the aggregation point information.

[0357] The second sending unit (not shown) is used to send the switched map screen to the electronic map module of the target mini-program for map display.

[0358] Reference Figure 15 , Figure 15 To implement the map data processing method of this embodiment, the terminal 140 includes the following components: a radio frequency (RF) circuit 1510, a memory 1515, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a wireless fidelity (WiFi) module 1570, a processor 1580, and a power supply 1590. Those skilled in the art will understand that... Figure 15 The terminal 140 structure shown does not constitute a limitation on a mobile phone or computer, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0359] The RF circuit 1510 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1580; in addition, it transmits uplink data to the base station.

[0360] The memory 1515 can be used to store software programs and modules, and the processor 1580 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 1515.

[0361] The input unit 1530 can be used to receive input numeric or character information, and to generate key signal inputs related to the settings and function control of the content terminal. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532.

[0362] The display unit 1540 can be used to display input or provided information, as well as various menus of the content terminal. The display unit 1540 may include a display panel 1541.

[0363] Audio circuitry 1560, speaker 1561, and microphone 1562 provide an audio interface.

[0364] In this embodiment, the processor 1580 included in the object terminal 140 can execute the map data processing method of the previous embodiment.

[0365] The target terminal 140 in this disclosure includes, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. This invention can be applied to various scenarios, including but not limited to map data access and navigation systems.

[0366] Figure 16This is a partial structural block diagram of a server 110 for implementing the map data processing method of this disclosure embodiment. The server 110 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 1622 (e.g., one or more processors) and memory 1632, and one or more storage media 1630 (e.g., one or more mass storage devices) for storing application programs 1642 or data 1644. The memory 1632 and storage media 1630 can be temporary or persistent storage. The program stored in the storage media 1630 may include one or more modules (not shown in the figure), each module including a series of instruction operations on the server. Furthermore, the CPU 1622 may be configured to communicate with the storage media 1630 and execute the series of instruction operations in the storage media 1630 on the server.

[0367] Server 110 may also include one or more power supplies 1626, one or more wired or wireless network interfaces 1650, one or more input / output interfaces 1658, and / or one or more operating systems 1641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0368] The central processing unit 1622 in server 110 can be used to execute the map data processing method of the present disclosure embodiments.

[0369] This disclosure also provides a computer-readable storage medium for storing program code for executing the map data processing methods of the foregoing embodiments.

[0370] This disclosure also provides a computer program product comprising a computer program. A processor of a computer device reads and executes the computer program, causing the computer device to perform the map data processing method described above.

[0371] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure and the foregoing drawings are used to distinguish similar terms and are not necessarily used to describe a particular order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this disclosure described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “including,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.

[0372] It should be understood that in this disclosure, "at least one item" refers to one or more items, and "more than one item" refers to two or more items. "And / or" is used to describe the relationship between related content, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related content are in an "or" relationship. "At least one of the following" or similar expressions refer 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 represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0373] It should be understood that in the description of the embodiments of this disclosure, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0374] In this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0375] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

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

[0377] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0378] If the integrated unit is implemented as 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 this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0379] It should also be understood that the various implementation methods provided in this disclosure can be combined arbitrarily to achieve different technical effects.

[0380] The above is a detailed description of the embodiments of this disclosure. However, this disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this disclosure. All such equivalent modifications or substitutions are included within the scope defined by the claims of this disclosure.

Claims

1. A map data processing method, characterized in that, include: Receive a point aggregation request sent by the electronic map module of the target mini-program, wherein the point aggregation request includes the electronic map type and the first coordinate data of multiple map points; The first coordinate data is transformed according to the electronic map type to obtain the second coordinate data of the plurality of map points; Based on the second coordinate data, the multiple map points are aggregated to obtain aggregate point information, which includes the coordinates of the aggregate point and the descriptive information of the multiple map points. A map is drawn based on the aggregation point information and the electronic map type to obtain a map image, which contains aggregation point markers corresponding to the aggregation point information. The map image is sent to the electronic map module of the target mini-program for map display.

2. The method according to claim 1, characterized in that, The step of performing coordinate transformation on the first coordinate data according to the electronic map type to obtain the second coordinate data of the plurality of map points includes: Determine the first coordinate system based on the electronic map type; Based on the first coordinate system and the preset second coordinate system, the first coordinate data is transformed to obtain the second coordinate data of the plurality of map points.

3. The method according to claim 2, characterized in that, The step of performing coordinate transformation on the first coordinate data based on the first coordinate system and a preset second coordinate system to obtain the second coordinate data of the plurality of map points includes: The latitude and longitude data of the plurality of map points are determined based on the first coordinate system and the first coordinate data; The second coordinate data of the plurality of map points are determined in a preset second coordinate system based on the latitude and longitude data.

4. The method according to claim 2, characterized in that, The step of performing coordinate transformation on the first coordinate data based on the first coordinate system and a preset second coordinate system to obtain the second coordinate data of the plurality of map points includes: A coordinate transformation algorithm is obtained based on the first coordinate system and the preset second coordinate system; The coordinate transformation algorithm is used to transform the first coordinate data to obtain the second coordinate data of the plurality of map points.

5. The method according to claim 1, characterized in that, The step of drawing a map based on the aggregation point information and the electronic map type to obtain a map image includes: Construct aggregation point markers based on the aggregation point information and the electronic map type; Obtain the target map instance; Maps are drawn based on the aggregation point markers and the target map instance to obtain a map image.

6. The method according to claim 5, characterized in that, The point aggregation request also includes an aggregation marker constructor class name field; The step of constructing aggregation point markers based on the aggregation point information and the electronic map type includes: When the name field of the aggregate marker construction class is empty, a preset aggregate point marker construction class is obtained based on the electronic map type, and the preset aggregate point marker construction class is used to construct aggregate point markers for the aggregate point information; When the name field of the aggregate tag constructor is not empty, the value of the name field of the aggregate tag constructor is determined as the aggregate tag constructor, and the aggregate tag constructor is used to construct an aggregate point tag for the aggregate point information.

7. The method according to claim 6, characterized in that, The preset aggregation point marker constructor class includes an aggregation point marker constructor class and an aggregation point marker effect implementation class; The step of obtaining a preset aggregation point marker construction class based on the electronic map type, and constructing aggregation point markers for the aggregation point information using the preset aggregation point marker construction class, includes: Based on the aforementioned electronic map type, obtain the aggregation point construction class and the aggregation point marking effect implementation class; The aggregation point constructor class is used to construct an aggregation point instance object based on the aggregation point information; Based on the aggregation point marker effect implementation class, the display information of the aggregation point instance object is determined, and the aggregation point marker is generated.

8. The method according to claim 5, characterized in that, The acquisition of the target map instance includes: Call the map retrieval function; When the map retrieval function returns an empty object, the map implementation class is retrieved, and the target map instance is retrieved based on the map implementation class; When the map retrieval function returns a non-empty object, the value returned by the map retrieval function is determined as the target map instance.

9. The method according to claim 1, characterized in that, The point aggregation request also includes an aggregation algorithm field; The aggregation of the multiple map points based on the second coordinate data to obtain aggregated point information includes: Read the aggregation algorithm field; when the aggregation algorithm field is empty, determine the target aggregation algorithm based on the number of the multiple map points and the distribution of the second coordinate data. When the aggregation algorithm field is not empty, the target aggregation algorithm is determined based on the value of the aggregation algorithm field. The target aggregation algorithm is used to aggregate the multiple map points to obtain aggregated point information.

10. The method according to claim 9, characterized in that, When the aggregation algorithm field is not empty, determining the target aggregation algorithm based on the value of the aggregation algorithm field includes: When the aggregation algorithm field is not empty, obtain the aggregation algorithm mapping table, which stores the mapping relationship between multiple aggregation algorithms and the standard aggregation algorithm; Based on the aggregation algorithm mapping table, the standard aggregation algorithm corresponding to the value of the aggregation algorithm field is determined as the target aggregation algorithm.

11. The method according to claim 1, characterized in that, The point aggregation request also includes an event detection class field; After drawing the map based on the aggregation point information and the electronic map type to obtain the map image, the method further includes: Read the event detection class field; when the event detection class field is empty, obtain a preset event detection class and use the preset event detection class to perform event detection on the aggregation point marker. When the event detection class field is not empty, the value of the event detection class field is used to perform event detection on the aggregation point marker.

12. The method according to claim 1, characterized in that, After sending the map image to the electronic map module of the target mini-program for map display, the method further includes: Receive a map switching request sent by the electronic map module of the target mini-program, wherein the map switching request includes the type of electronic map to be switched; Based on the mini-program identifier of the target mini-program, the original aggregation point information is obtained, and the map is drawn according to the original aggregation point information and the electronic map type to be switched, so as to obtain the switched map screen. The switched map screen contains the switched aggregation point markers corresponding to the aggregation point information. The switched map screen is sent to the electronic map module of the target mini-program for map display.

13. A map data processing device, characterized in that, include: The first receiving unit is used to receive a point aggregation request sent by the electronic map module of the target mini-program. The point aggregation request includes the electronic map type and the first coordinate data of multiple map points. A conversion unit is used to perform coordinate conversion on the first coordinate data according to the electronic map type to obtain the second coordinate data of the plurality of map points; An aggregation unit is used to aggregate the plurality of map points based on the second coordinate data to obtain aggregated point information, the aggregated point information including aggregated point coordinates and descriptive information of the plurality of map points; The first drawing unit is used to draw a map based on the aggregation point information and the electronic map type to obtain a map image, wherein the map image contains aggregation point markers corresponding to the aggregation point information. The first sending unit is used to send the map image to the electronic map module of the target mini-program for map display.

14. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the map data processing method according to any one of claims 1 to 12.

15. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the map data processing method according to any one of claims 1 to 12.

16. A computer program product comprising a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the map data processing method according to any one of claims 1 to 12.