Electronic map display method and device, equipment, medium and product
By calculating and updating the location of point features in the electronic map, conflict problems caused by dense point features are solved, and the readability and data accuracy of the map are improved.
Patent Information
- Application Number
- CN202310814832.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-04
- Publication Date
- 2025-01-07
AI Technical Summary
In electronic maps, when point elements are too dense, point elements can easily be blocked and confused, reducing the readability of the map. When the existing technology is processed through aggregation or screening methods, it may lead to the loss of the positional relationship of point elements, affecting the impact of the impact. The expression effect of the map.
By obtaining the position coordinates and weight values of point features in the electronic map, the repulsive information between each point feature is calculated, and the position of point features is updated based on this information to avoid conflicts and improve the readability of the map.
It effectively avoids point-factor conflicts, retains the relative positional relationship between point-factors, improves the readability of electronic maps, and ensures the accuracy of map data.
Smart Images

Figure CN119271751A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of electronic maps, and in particular to a method, device, equipment, medium and product for displaying an electronic map. Background Art
[0002] With the development of equipment and hardware, the accuracy of map data produced by collection equipment is getting higher and higher, and the collected map data is becoming richer and richer. Not only are the display elements rich, but it can also display specific objects in the real world in the form of point elements, line elements, and surface elements.
[0003] When there are a large number of point features, some of them may be too close to each other. When the point features are visualized, they are easily overlapped or confused with adjacent point features, resulting in reduced electronic map expression effect. In related technologies, an aggregation function is added to merge multiple conflicting point features into one, or a filtering function is added to retain only one of multiple conflicting point features, thereby obtaining the displayed point feature.
[0004] However, the above method will cause the point elements in the electronic map to be missing, which is not conducive to expressing the relative position relationship between the point elements, and the readability of the electronic map is poor. Summary of the invention
[0005] The present application provides a method, device, equipment, medium and product for displaying an electronic map, and the technical solution is as follows.
[0006] According to one aspect of the present application, a method for displaying an electronic map is provided, the method comprising:
[0007] Acquire parameter information of at least two point elements in the electronic map, the parameter information including position coordinates and weight values of the point elements in the electronic map;
[0008] calculating, according to the position coordinates and the weight value, repulsive force information of the first point element on the second point element, the repulsive force information being used to indicate a position conflict relationship between the first point element and the second point element in the electronic map;
[0009] Based on the repulsive force information, the position coordinates of the second point element in the electronic map are updated.
[0010] In some embodiments, the method further comprises: obtaining the number of traversal of the point element in the electronic map;
[0011] When the number of traversals reaches the traversal threshold, the traversal is terminated.
[0012] In some embodiments, the method further comprises: obtaining an average offset distance of the point elements in the electronic map;
[0013] When the average offset distance is less than the displacement threshold, the traversal is terminated.
[0014] In some embodiments, obtaining the offset distance of each of the point elements in the electronic map;
[0015] The offset distances of the various point elements are summed and averaged to obtain the average offset distance.
[0016] According to one aspect of the present application, there is provided a device for displaying an electronic map, the device comprising:
[0017] An acquisition module, used to acquire parameter information of at least two point elements in the electronic map, wherein the parameter information includes position coordinates and weight values of the point elements in the electronic map;
[0018] a calculation module, configured to calculate, according to the position coordinates and the weight value, repulsive force information of the first point element on the second point element, wherein the repulsive force information is used to indicate a position conflict relationship between the first point element and the second point element in the electronic map;
[0019] An updating module is used to update the position coordinates of the second point element in the electronic map based on the repulsive force information.
[0020] According to another aspect of the present application, a computer device is provided, which includes: a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the electronic map display method described above.
[0021] According to another aspect of the present application, a computer storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the electronic map display method as described above.
[0022] According to another aspect of the present application, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes the method for displaying an electronic map as described above.
[0023] The beneficial effects of the technical solution provided by this application include at least:
[0024] By obtaining the position coordinates and weight values of at least two point elements in an electronic map; calculating the repulsive force information of the first point element on the second point element according to the position coordinates and the weight values, and updating the position coordinates of the second point element in the map based on the repulsive force information. The present application avoids the problem of misjudgment of electronic map data by users due to point element conflicts in the map by calculating the repulsive force information between the first point element and the second point element and offsetting the second point element, thereby improving the readability of the electronic map. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a schematic diagram of a method for displaying an electronic map provided by an exemplary embodiment of the present application;
[0027] Figure 2 is a schematic diagram of the architecture of a computer system provided by an exemplary embodiment of the present application;
[0028] Figure 3 is a flow chart of a method for displaying an electronic map provided by an exemplary embodiment of the present application;
[0029] Figure 4 is a flow chart of a method for displaying an electronic map provided by an exemplary embodiment of the present application;
[0030] Figure 5 is a schematic diagram of a position conflict between a single first point element and a second point element provided by an exemplary embodiment of the present application;
[0031] Figure 6 is a schematic diagram of a plurality of first point elements and a second point element having position conflicts provided by an exemplary embodiment of the present application;
[0032] Figure 7 is a block diagram of an electronic map display device provided by an exemplary embodiment of the present application;
[0033] Figure 8 is a structural schematic diagram of a computer device provided by an exemplary embodiment of the present application;
[0034] Fig. 9 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical scheme and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below in conjunction with the accompanying drawings. The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation modes described in the following exemplary embodiments do not represent all implementation modes consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0036] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0037] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
[0038] First, several terms involved in the embodiments of the present application are briefly introduced:
[0039] Point feature: It is a type of geographic information element. Common geographic information elements include point features, line features, surface features, etc. Point features are used to define the discrete locations of geographic features that are too small to be represented by line features or surface features.
[0040] Element conflict: When elements in an electronic map are adjacent to each other, resulting in overlapping or other mutual influences in visual rendering at a certain resolution, it can be considered that there is a conflict between the elements, which needs to be optimized through certain cartographic synthesis methods.
[0041] The present application embodiment provides a schematic diagram of a method for displaying an electronic map, such as Figure 1 As shown, the method can be executed by a computer device, and the computer device can be a terminal or a server.
[0042] Exemplarily, a computer device obtains parameter information of at least two point elements in an electronic map, the parameter information including position coordinates and weight values of the point elements in the electronic map; the computer device calculates repulsion information of the first point element on the second point element based on the position coordinates and the weight values; and the computer device updates the position coordinates of the second point element in the electronic map based on the repulsion information.
[0043] A point element is a type of geographic information element. Point elements are used to define discrete locations of geographic elements that are too small to be represented by line elements or surface elements, such as points of interest (POI) on electronic maps and gas stations on city area maps. In order to express point elements more clearly, in the embodiments of the present application, logos are used instead of displaying point elements. For example, gas stations are represented by gas pump logos, shopping malls are represented by shopping cart logos, and telecommunications companies are represented by mobile phone logos.
[0044] The first point element refers to at least one point element in the electronic map other than the second point element; or, the first point element refers to at least one point element other than the second point element within the scope of action of the second point element; or, the first point element refers to at least one point element other than the second point element within a fixed scope of action.
[0045] The second point feature refers to the point feature currently selected in the traversal; or, the second point feature refers to the point feature currently selected in the traversal and which has a position conflict with the first point feature.
[0046] The scope of action refers to the range that can cause position conflict with the second point element; or, the scope of action refers to the scope of position conflict consideration of the second point element. For example, the scope of action is within a radius of 100 meters with the second point element as the center. When determining the repulsive force information of the first point element on the second point element, only the scope of action with the second point element as the center and a radius of 100 meters is considered.
[0047] Optionally, the shape of the range of action is at least one of circular, square, rectangular, annular, and prismatic, but is not limited thereto, and the embodiments of the present application do not specifically limit this.
[0048] The weight value refers to the importance of the point feature displayed in the electronic map.
[0049] Optionally, the weight value is formulated according to the needs of the actual business scenario. For example, when the point element is a shopping mall, the weight value may be the passenger flow of the shopping mall, and the shopping mall with higher passenger flow has a higher weight value; when the point element is a scenic spot, the weight value may be a quantitative value of the level of the scenic spot, and the higher the level of the scenic spot, the higher the weight value.
[0050] The repulsion information is used to indicate the position conflict relationship between the first point element and the second point element in the electronic map.
[0051] The repulsion information includes the repulsion value and repulsion direction of the first point element on the second point element.
[0052] Optionally, the position conflict includes at least one of overlap between two point elements, a distance value between two point elements being less than a distance threshold, and mutual contact between two point elements, but is not limited thereto and is not specifically limited in the embodiments of the present application.
[0053] Exemplarily, the computer device calculates the average nearest neighbor distance corresponding to each point element based on the position coordinates of each point element in the electronic map; the computer device calculates the repulsive force information of the first point element on the second point element based on the average nearest neighbor distance, the position coordinates and the weight value.
[0054] The average nearest neighbor distance refers to the average value of the sum of the shortest distances between each point feature and its adjacent point features in the electronic map.
[0055] The repulsive force information includes the repulsive force value and the repulsive force direction.
[0056] The repulsion value refers to the degree of position conflict between the first point element and the second point element. The size of the repulsion value determines the offset distance of the second point element. The larger the repulsion value, the greater the distance between the two point elements. The repulsion direction refers to the direction of position conflict between the first point element and the second point element.
[0057] The calculation process of the repulsion value is as follows: the computer device obtains the position distance value between the first point element and the second point element according to the position coordinates corresponding to each of the first point element and the second point element; the computer device normalizes the position distance value by averaging the nearest neighbor distance to obtain the normalized position distance value between the first point element and the second point element; the computer device obtains the repulsion value according to the ratio of the product of the weight value and the square value of the normalized position distance.
[0058] The normalized position distance square value refers to the square of the normalized position distance value.
[0059] The weight value product refers to the product of the weight values corresponding to the first point element and the second point element respectively.
[0060] The position distance value refers to a distance value obtained by performing vector calculation based on the position coordinates corresponding to the first point feature and the second point feature.
[0061] The normalized position distance value refers to the distance value obtained by normalizing the position distance value according to the average nearest neighbor distance.
[0062] The calculation process of the repulsive force direction is as follows: the computer device obtains the repulsive force direction of the first point element on the second point element according to the difference between the position coordinates corresponding to the first point element and the second point element on the X-axis and the Y-axis.
[0063] For example, Figure 1In the downtown map shown in Figure (a), taking the point elements in the circle in the electronic map as an example, the point element marked by the mobile phone is the first point element, representing the communication company 10 in the real world, and the point element marked by the shopping cart is the second point element, representing the shopping mall 20 in the real world. It can be seen from the figure that there is a location conflict between the communication company 10 and the shopping mall 20, that is, there is an overlap between the communication company 10 and the shopping mall 20 in the electronic map. The computer device obtains the location distance value between the communication company 10 and the shopping mall 20 according to the location coordinates corresponding to each of the communication company 10 and the shopping mall 20; the computer device normalizes the location distance value between the communication company 10 and the shopping mall 20 by averaging the nearest neighbor distance to obtain the normalized location distance value between the communication company 10 and the shopping mall 20; the computer device obtains the repulsion value according to the ratio of the product of the weight values corresponding to each of the communication company 10 and the shopping mall 20 to the square of the normalized location distance value. The computer device obtains the repulsion direction of the communication company 10 on the shopping mall 20 according to the difference between the location coordinates corresponding to each of the communication company 10 and the shopping mall 20 on the X-axis and the Y-axis. The computer device updates the location coordinates of the mall 20 according to the repulsive force value of the communication company 10 on the mall 20, and the mall 20 is offset along the repulsive force direction of the communication company 10 on the mall 20, such as Figure 1 As shown in Figure (b), after the shopping mall 20 is offset, the communication company 10 and the shopping mall 20 no longer have a location conflict.
[0064] It should be noted that, in the embodiment of the present application, only one first point element is listed, but the invention is not limited to this. When there are multiple first point elements, the repulsive force values of the multiple first point elements on the second point element are the combined repulsive force values of each first point element on the second point element; and the repulsive force direction is the combined repulsive force direction of each first point element on the second point element.
[0065] It should be noted that the electronic map in the embodiment of the present application can be a real map or an electronic virtual map in a virtual world in a game, that is, the element display method provided by the present application can be applied to the electronic virtual map in the virtual world.
[0066] In summary, the method provided in this embodiment obtains the position coordinates and weight values of at least two point elements in an electronic map; calculates the repulsive force information of the first point element on the second point element according to the position coordinates and the weight values, and updates the position coordinates of the second point element in the map based on the repulsive force information. This application calculates the repulsive force information between the first point element and the second point element, offsets the second point element, avoids the problem of misjudgment of electronic map data by users due to the position conflict of point elements in the map, and improves the readability of the electronic map.
[0067] Figure 2The computer system 100 includes at least one of a first terminal 110 , a server 120 and a second terminal 130 .
[0068] The first terminal 110 has installed and runs an application that supports electronic map display, such as a game application, a navigation application, a metaverse application, etc. The first terminal 110 is a terminal used by a first user.
[0069] In some embodiments, the first terminal 110 may be considered as a first user using the first terminal 110 .
[0070] The first terminal 110 is connected to the server 120 via a wireless network or a wired network.
[0071] The server 120 includes one server, multiple servers, a cloud computing platform, and a virtualization center. Schematically, the server 120 includes a processor 121 and a memory 122, and the memory 122 includes a receiving module 1221, a display module 1222, and a control module 1223. The server 120 is used to provide background services for applications that support electronic map display. Optionally, the server 120 undertakes the main computing work, and the first terminal 110 and the second terminal 130 undertake the secondary computing work; or, the server 120 undertakes the secondary computing work, and the first terminal 110 and the second terminal 130 undertake the main computing work; or, the server 120, the first terminal 110 and the second terminal 130 adopt a distributed computing architecture for collaborative computing.
[0072] An application supporting electronic map display is installed and run on the second terminal 130. The second terminal 130 is a terminal used by a second user.
[0073] In some embodiments, the second terminal 130 may be considered as a second user using the second terminal 130 .
[0074] Optionally, the applications installed on the first terminal 110 and the second terminal 130 are the same, or the applications installed on the two terminals are the same type of applications of different control system platforms. The first terminal 110 may refer to one of a plurality of terminals, and the second terminal 130 may refer to one of a plurality of terminals. This embodiment is only illustrated by the first terminal 110 and the second terminal 130. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device types include but are not limited to: at least one of a smart phone, a tablet computer, an e-book reader, a laptop computer, a desktop computer, a television, an augmented reality (AR) terminal, a virtual reality (VR) terminal, a mixed reality (MR) terminal, an XR terminal, a baffle reality (BR) terminal, a cinematic reality (CR) terminal, and a deceived reality (DR) terminal. The following embodiments are illustrated by taking the terminal including a smart phone as an example.
[0075] Those skilled in the art will appreciate that the number of the above terminals or users may be more or less. For example, the above terminal or user may be only one, or the above terminals or users may be dozens or hundreds, or more. The embodiments of the present application do not limit the number of terminals or users and the device types.
[0076] In addition, the present application does not limit the form of the application, including but not limited to an application (Application, App) installed in a terminal, a mini-program, etc., and can also be in the form of a web page.
[0077] The server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and cloud servers providing basic cloud computing services such as big data and artificial palm image recognition platforms. The server 120 may be a backend server of the above-mentioned application, used to provide backend services for the client of the application.
[0078] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0079] In some embodiments, the above-mentioned server can also be implemented as a node in a blockchain system. Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0080] The terminal and the server 120 may communicate via a network, such as a wired or wireless network.
[0081] Figure 3 is a flowchart of a method for displaying an electronic map provided by an exemplary embodiment of the present application. The method can be executed by a computer device, which can be Figure 2 The method comprises:
[0082] Step 302: Obtain parameter information of at least two point elements in the electronic map.
[0083] Electronic map, also known as digital map, is a map that is stored and viewed digitally using computer technology. The electronic map can be enlarged, reduced or rotated without affecting the display effect.
[0084] Point features are a type of geographic information elements. Point features are used to define the discrete locations of geographic features that are too small to be represented by line features or surface features, such as gas stations, shopping malls, and telecommunications companies in city area maps.
[0085] The situations where geographic features are displayed as point features include, but are not limited to, the following two situations:
[0086] If the outline of a geographic element is not collected during the data collection process of the geographic element, the geographic element is presented as a point element in the electronic map. For example, if the outline of cell A is not collected during the data collection process of the geographic element, but only the location coordinates of cell A are collected, cell A is displayed as only a point element at the location coordinates in the electronic map;
[0087] Taking visualization as a consideration, that is, to make the electronic map more readable, some geographic features are presented as point features. For example, when displaying a shopping mall on a city map, even if the outline of the shopping mall is collected, in order to make the city map more readable, the shopping mall is presented as a point feature.
[0088] Optionally, the point element presentation form includes at least one of a circular point, a square point, a rectangular point, and other shape identifiers, but is not limited thereto and is not specifically limited in the embodiments of the present application.
[0089] The parameter information of a point feature includes the location coordinates and weight value of the point feature in the electronic map.
[0090] The weight value refers to the importance of the point feature displayed in the electronic map.
[0091] Optionally, the weight value is formulated according to the needs of the actual business scenario. For example, when the point element is a shopping mall, the weight value may be the passenger flow of the shopping mall, and the shopping mall with higher passenger flow has a higher weight value; when the point element is a scenic spot, the weight value may be a quantitative value of the level of the scenic spot, and the higher the level of the scenic spot, the higher the weight value.
[0092] Step 304: Calculate the repulsive force information of the first point element on the second point element according to the position coordinates and the weight value.
[0093] The first point element refers to at least one point element in the electronic map other than the second point element; or, the first point element refers to at least one point element other than the second point element within the scope of action of the second point element; or, the first point element refers to at least one point element other than the second point element within a fixed scope of action.
[0094] The second point feature refers to the point feature currently selected in the traversal; or, the second point feature refers to the point feature currently selected in the traversal and which has a position conflict with the first point feature.
[0095] The scope of action refers to the range that can cause a position conflict with the second point element; or, the scope of action refers to the range of position conflict considerations for the second point element. For example, the scope of action δ is set by custom settings, and the value of δ is 100 meters.
[0096] Optionally, the shape of the range of action is at least one of circular, square, rectangular, annular, and prismatic, but is not limited thereto, and the embodiments of the present application do not specifically limit this.
[0097] The repulsion information is used to represent the position conflict relationship between the first point element and the second point element.
[0098] The repulsion information includes the repulsion value and repulsion direction of the first point element on the second point element.
[0099] Optionally, the repulsion value is positively correlated with the product of the weight value between the first point element and the second point element, and the repulsion value is negatively correlated with the square of the distance between the first point element and the second point element.
[0100] The magnitude of the repulsion value determines the offset distance of the point element, and the direction of the repulsion determines the offset direction of the point element. By introducing the weight value of the point element, the point element with a higher weight value has a greater repulsion value on the adjacent point elements, prompting the adjacent point elements to offset away from themselves. At the same time, the size of the offset is related to the size of the repulsion value and its own weight value. The point element with a higher weight value needs a larger repulsion value to produce a larger offset, so that the point elements with higher importance hope to keep their positions unchanged or offset as little as possible, thereby ensuring the completeness of the information of the electronic map and avoiding the loss of information on the electronic map.
[0101] Optionally, the position conflict includes at least one of overlap between two point elements, a distance value between two point elements being less than a distance threshold, and mutual contact between two point elements, but is not limited thereto and is not specifically limited in the embodiments of the present application.
[0102] Step 306: Based on the repulsive force information, update the position coordinates of the second point element in the electronic map.
[0103] Exemplarily, based on the repulsive force information of the first point element on the second point element, the computer device offsets the second point element along the repulsive force direction in the repulsive force information, and updates the position coordinates of the second point element in the electronic map.
[0104] In summary, the method provided in this embodiment obtains the position coordinates and weight values of at least two point elements in an electronic map; calculates the repulsive force information of the first point element on the second point element according to the position coordinates and the weight values, and updates the position coordinates of the second point element in the map based on the repulsive force information. This application calculates the repulsive force information between the first point element and the second point element, offsets the second point element, avoids the problem of misjudgment of electronic map data by users due to the position conflict of point elements in the map, and improves the readability of the electronic map.
[0105] Figure 4is a flowchart of a method for displaying an electronic map provided by an exemplary embodiment of the present application. The method can be executed by a computer device, which can be Figure 2 The method comprises:
[0106] Step 402: Obtain parameter information of at least two point elements in the electronic map.
[0107] Point features are a type of geographic information elements. Point features are used to define the discrete locations of geographic features that are too small to be represented by line features or surface features, such as gas stations, shopping malls, and telecommunications companies in city area maps.
[0108] The parameter information of a point feature includes the location coordinates and weight value of the point feature in the electronic map.
[0109] The weight value refers to the importance of the point feature displayed in the electronic map.
[0110] Optionally, the weight value is formulated according to the needs of the actual business scenario. For example, when the point element is a shopping mall, the weight value may be the passenger flow of the shopping mall, and the shopping mall with higher passenger flow has a higher weight value; when the point element is a scenic spot, the weight value may be a quantitative value of the level of the scenic spot, and the higher the level of the scenic spot, the higher the weight value.
[0111] Step 404: Calculate the repulsive force value of the first point element on the second point element according to the position coordinates and the weight value.
[0112] The first point element refers to at least one point element in the electronic map other than the second point element; or, the first point element refers to at least one point element other than the second point element within the scope of action of the second point element; or, the first point element refers to at least one point element other than the second point element within a fixed scope of action.
[0113] The second point feature refers to the point feature currently selected in the traversal; or, the second point feature refers to the point feature currently selected in the traversal and which has a position conflict with the first point feature.
[0114] The scope of action refers to the range that can cause position conflict to the second point element; or, the scope of action refers to the scope of position conflict consideration of the second point element.
[0115] The repulsion information is used to indicate the position conflict relationship between the first point element and the second point element in the electronic map.
[0116] Optionally, the position conflict includes at least one of overlap between two point elements, a distance value between two point elements being less than a distance threshold, and mutual contact between two point elements, but is not limited thereto and is not specifically limited in the embodiments of the present application.
[0117] Exemplarily, the computer device calculates the average nearest neighbor distance corresponding to each point element based on the position coordinates of each point element in the electronic map; the computer device calculates the repulsive force information of the first point element on the second point element based on the average nearest neighbor distance, the position coordinates and the weight value.
[0118] The average nearest neighbor distance refers to the average value of the sum of the shortest distances between each point feature and its adjacent point features in the electronic map.
[0119] The calculation formula of the average nearest neighbor distance can be expressed as:
[0120]
[0121] Where D is the average nearest neighbor distance, d ij is the position distance value between the i-th point feature and the j-th adjacent point feature, mind ij is the shortest distance between the ith point feature and its jth adjacent point feature, and N is the number of point features in the electronic map.
[0122] The repulsive force information includes the repulsive force value and the repulsive force direction.
[0123] The repulsion value refers to the degree of positional conflict between the first point element and the second point element. The size of the repulsion value determines the offset distance of the second point element. The larger the repulsion value, the greater the distance between the two point elements.
[0124] The calculation process of the repulsion value is as follows: the computer device obtains the position distance value between the first point element and the second point element according to the position coordinates corresponding to each of the first point element and the second point element; the computer device normalizes the position distance value by averaging the nearest neighbor distance to obtain the normalized position distance value between the first point element and the second point element; the computer device obtains the repulsion value according to the ratio of the product of the weight values corresponding to each of the first point element and the second point element and the square of the normalized position distance value.
[0125] The position distance value refers to a distance value obtained by performing vector calculation based on the position coordinates corresponding to the first point feature and the second point feature.
[0126] The normalized position distance value refers to the distance value obtained by normalizing the position distance value according to the average nearest neighbor distance.
[0127] The calculation formula of the repulsion value can be expressed as:
[0128]
[0129] Among them, F ij is the repulsive force value of the i-th point element to the j-th point element, D is the average nearest neighbor distance, d ijis the location distance between the i-th point feature and the j-th point feature, d ij / D is the normalized position distance value, M i is the weight value of the i-th point element, M j is the weight value of the j-th point feature.
[0130] Step 406: Calculate the direction of the repulsive force of the first point element on the second point element according to the position coordinates and the weight value.
[0131] The repulsion information includes a repulsion value and a repulsion direction; the repulsion direction refers to a position conflict direction of the first point element with respect to the second point element.
[0132] The calculation process of the repulsive force direction is as follows: the computer device obtains the repulsive force direction of the first point element on the second point element according to the difference between the position coordinates corresponding to the first point element and the second point element on the X-axis and the Y-axis.
[0133] The calculation formula for the repulsive force direction can be expressed as:
[0134] x ij =x i -x j
[0135] y ij =y i -y j
[0136] Among them, x i is the x coordinate of the ith point element in the electronic map, x j is the x coordinate of the jth point element in the electronic map, x ij is the direction vector between the i-th point element and the j-th point element on the X-axis in the electronic map, y i is the y coordinate of the i-th point feature in the electronic map, y j is the y coordinate of the jth point element in the electronic map, y ij It is the direction vector between the i-th point feature and the j-th point feature on the Y-axis in the electronic map.
[0137] Step 408: Calculate the X-axis offset distance and the Y-axis offset distance of the second point element in the electronic map based on the repulsive force value and the repulsive force direction in the repulsive force information.
[0138] Exemplarily, the computer device calculates the X-axis offset distance and the Y-axis offset distance of the second point element in the electronic map based on the repulsion information; the computer device updates the position coordinates of the second point element in the electronic map according to the X-axis offset distance and the Y-axis offset distance.
[0139] The calculation process of the X-axis offset distance is as follows: the computer device sums the X-axis repulsion values of at least one first point element on the second point element to obtain the X-axis combined repulsion value of at least one first point element in the X-axis direction, where the X-axis repulsion value is obtained by multiplying the repulsion value and the direction vector of the repulsion direction corresponding to the repulsion value in the X-axis direction; the computer device obtains the X-axis offset distance based on the ratio of the X-axis combined repulsion value to the weight value of the second point element.
[0140] Optionally, the computer device traverses the point elements in the electronic map to obtain the average weight value corresponding to the point elements; the computer device normalizes the weight value corresponding to the second point element by the average weight value to obtain the normalized weight value of the second point element; the computer device obtains the X-axis offset distance based on the ratio of the X-axis combined repulsion value to the product of the normalized weight value and the number of at least one first point element.
[0141] The average weight value refers to the average value of the weight values of all point elements in the electronic map, or the average weight value refers to the average value of the weight values of all point elements in a fixed area in the electronic map, or the average weight value refers to the average value of the weight values of all point elements within the range of action of the second point element, or the average weight value refers to the average value of the weight values of all point elements in the central area of the electronic map, or the average weight value refers to the average value of the weight values of all point elements in the edge area of the electronic map.
[0142] The calculation formula of the X-axis offset distance can be expressed as:
[0143]
[0144] Where Δx is the X-axis offset distance, F ij is the repulsive force of the i-th point element on the j-th point element, x ij is the direction vector between the i-th point element and the j-th point element on the X-axis in the electronic map, M i is the weight value of the i-th point element, M avg is the average weight value, is the number of point elements that repel the i-th point element, D is the average nearest neighbor distance, M is j is the weight value of the jth point element, d ij is the location distance between the i-th point feature and the j-th point feature, x i is the x coordinate of the ith point element in the electronic map, x j is the x-coordinate of the j-th point feature in the electronic map.
[0145] The calculation formula of the average weight value can be expressed as:
[0146]
[0147] Among them, M avg is the average weight value, M i is the weight value of the i-th point feature, and N is the number of point features.
[0148] The calculation process of the Y-axis offset distance is as follows: the computer device sums the Y-axis repulsion values of at least one first point element on the second point element to obtain the Y-axis combined repulsion value of at least one first point element in the Y-axis direction; the computer device obtains the Y-axis offset distance based on the ratio of the Y-axis combined repulsion value to the weight value of the second point element.
[0149] The Y-axis repulsion value is obtained by multiplying the repulsion value and the direction vector of the repulsion direction corresponding to the repulsion value in the Y-axis direction.
[0150] Optionally, the computer device traverses the point elements in the electronic map to obtain the average weight value corresponding to the point elements; the computer device normalizes the weight value corresponding to the second point element by the average weight value to obtain the normalized weight value of the second point element; the computer device obtains the Y-axis offset distance based on the ratio of the Y-axis combined repulsion value to the product of the normalized weight value and the number of at least one first point element.
[0151] The calculation formula of the Y-axis offset distance can be expressed as:
[0152]
[0153] Where Δy is the Y-axis offset distance, F ij is the repulsive force of the i-th point element on the j-th point element, y ij is the direction vector between the i-th point element and the j-th point element on the Y axis in the electronic map, M i is the weight value of the i-th point element, M avg is the average weight value, is the number of point elements that repel the i-th point element, D is the average nearest neighbor distance, M is j is the weight value of the jth point feature, d ij is the location distance between the i-th point feature and the j-th point feature, y i is the y coordinate of the i-th point feature in the electronic map, y j is the y coordinate of the jth point feature in the electronic map.
[0154] Step 410: Update the position coordinates of the second point feature in the electronic map according to the X-axis offset distance and the Y-axis offset distance.
[0155] When the X-axis offset distance and the Y-axis offset distance corresponding to the second point element are determined, the computer device updates the position coordinates of the second point element in the electronic map according to the X-axis offset distance and the Y-axis offset distance.
[0156] The formula for updating the position coordinates of the second point feature in the electronic map can be expressed as:
[0157] x i ′ =x i +ηΔx
[0158] u i ′ =y i +yΔy
[0159]
[0160] Among them, Δx is the X-axis offset distance, Δy is the Y-axis offset distance, and η is a custom parameter. For example, η is 0.2, x i is the horizontal coordinate of the second point feature before updating, y i is the ordinate of the second point feature before updating, x i ′ is the horizontal coordinate of the second point feature after update, y i ′ is the updated ordinate of the second point feature, μ i The offset distance of the second point feature.
[0161] For example, Figure 5 The schematic diagram of a single first point element and a second point element having a position conflict is shown. In the city center map shown in the figure, the point element of the gas station logo is the first point element, representing a gas station 501 in the real world, and the point element of the shopping cart logo is the second point element, representing a shopping mall 502 in the real world. Figure 5 As shown in Figure (a), there is a location conflict between the gas station 501 and the shopping mall 502, that is, there is an overlap between the gas station 501 and the shopping mall 502 in the electronic map. The computer device obtains the location distance value between the gas station 501 and the shopping mall 502 according to the location coordinates corresponding to each of the gas station 501 and the shopping mall 502; the computer device normalizes the location distance value between the gas station 501 and the shopping mall 502 by averaging the nearest neighbor distance to obtain the normalized location distance value between the gas station 501 and the shopping mall 502; the computer device obtains the repulsion value according to the ratio of the product of the weight values corresponding to each of the gas station 501 and the shopping mall 502 to the square of the normalized location distance value. The computer device obtains the repulsion direction of the gas station 501 on the shopping mall 502 according to the difference between the location coordinates corresponding to the gas station 501 and the shopping mall 502 on the X-axis and the Y-axis. The computer device offsets the shopping mall 502 along the repulsive force direction of the gas station 501 on the shopping mall 502 according to the repulsive force value of the gas station 501 on the shopping mall 502, thereby updating the position coordinates of the shopping mall 502, such as Figure 5As shown in Figure (b), after the shopping mall 502 is offset, the gas station 501 and the shopping mall 502 no longer have a location conflict.
[0162] For example, Figure 6 The schematic diagram of the location conflict between multiple first point elements and second point elements shown in the figure, in the city center map shown in the figure, the point elements of the mobile phone logo and the gas station logo are both first point elements, representing the gas station 601 and the telecommunications company 603 in the real world, and the point element of the shopping cart logo is the second point element, representing the shopping mall 602 in the real world. Figure 6 As shown in Figure (a), there is a location conflict between the gas station 601, the communication company 603 and the shopping mall 602, that is, there is an overlap between the gas station 601, the communication company 603 and the shopping mall 602 in the electronic map. The computer device calculates the repulsion value and repulsion direction of the gas station 601 on the shopping mall 602 according to the corresponding position coordinates of the gas station 601 and the shopping mall 602. The calculation process can refer to the process in the above figure. Similarly, the computer device calculates the repulsion value and repulsion direction of the communication company 603 on the shopping mall 602 according to the corresponding position coordinates of the communication company 603 and the shopping mall 602. The computer device vector-merges the repulsion value of the gas station 601 on the shopping mall 602 with the repulsion value of the communication company 603 on the shopping mall 602 to obtain the combined repulsion value, and at the same time vector-merges the repulsion direction of the gas station 601 on the shopping mall 602 with the repulsion direction of the communication company 603 on the shopping mall 602 to obtain the combined repulsion direction. The computer device performs an offset according to the combined repulsive force value and the combined repulsive force direction, thereby updating the location coordinates of the shopping mall 602, such as Figure 6 As shown in Figure (b), after the shopping mall 602 is offset, the gas station 601, the telecommunications company 603 and the shopping mall 602 no longer have location conflicts.
[0163] In some embodiments, the computer device obtains the number of traversal times of the point element in the electronic map; when the number of traversal times reaches a traversal threshold, the traversal is terminated.
[0164] Define a custom parameter T, which means the maximum traversal times, for example, T is 10000. After traversing all point features in the electronic map, or after traversing the point features in the specified area of the electronic map, the position coordinates of the point features with position conflicts in the electronic map are updated, and then the current traversal times are increased by one. When the current traversal times are greater than or equal to the maximum traversal times T, the traversal ends.
[0165] In some embodiments, the computer device obtains an average offset distance of point elements in the electronic map; when the average offset distance is less than a displacement threshold, the traversal is terminated.
[0166] Optionally, the computer device obtains the offset distance of each point element in the electronic map; the computer device adds up the offset distances of each point element and calculates the average value to obtain an average offset distance.
[0167] Define a custom parameter ε, which means the average offset distance of the point features. For example, set ε to 0.1 meters. After traversing all the point features in the electronic map, or after traversing the point features in the specified area of the electronic map, count the offset distances of each point feature in the electronic map and calculate the average. When the average offset distance is less than the displacement threshold, end the traversal.
[0168] After the traversal is completed, the updated position coordinates of the second point element in the electronic map are used as the final presentation result of the electronic map.
[0169] In summary, the method provided in this embodiment obtains the position coordinates and weight values of at least two point elements in an electronic map; calculates the repulsive force information of the first point element on the second point element according to the position coordinates and the weight values, and updates the position coordinates of the second point element in the map based on the repulsive force information. This application calculates the repulsive force information between the first point element and the second point element, offsets the second point element, avoids the problem of misjudgment of electronic map data by users due to point element conflicts in the map, and improves the readability of the electronic map.
[0170] The method provided in this embodiment calculates the repulsive force information of the first point element on the second point element based on the calculated average nearest neighbor distance, position coordinates and weight value, and normalizes the position distance value between the first point element and the second point element by using the average nearest neighbor distance, thereby improving the iteration rate, so that point elements with position conflicts in the electronic map can resolve position conflicts more quickly, thereby improving the readability of the electronic map.
[0171] The method provided in this embodiment calculates the X-axis offset distance and the Y-axis offset distance of the second point element in the electronic map according to the position coordinates and weight value of the point element; and updates the position coordinates of the second point element in the electronic map according to the X-axis offset distance and the Y-axis offset distance, and offsets the second point element by the weight value corresponding to the point element, thereby avoiding the problem of misjudgment of electronic map data by users due to point element conflicts in the map, and improving the readability of the electronic map. In addition, in the process of offsetting the point elements, by considering the weight value, the displacement of the point elements with high importance is smaller, thereby avoiding the information loss of the electronic map.
[0172] Exemplarily, an embodiment of the present application provides a method for displaying an electronic map, which may be executed by a computer device, and the computer device may be a terminal or a server.
[0173] When there are a large number of point elements in an electronic map, some of the point elements may be too close to each other, and when the point elements are visualized, they are easily overlapped and confused with adjacent point elements, resulting in reduced map expression effect. To address this problem, the solution provided by the embodiment of the present application is as follows.
[0174] First, for each point feature, obtain its weight value, assuming that there is repulsion between two point features, and the repulsion follows the inverse distance square model, that is, the magnitude of the repulsion is positively correlated with the product of the weights of the two point features and negatively correlated with the square of the distance between the two point features. It is also assumed that the repulsion between point features only exists within the specified distance range threshold.
[0175] Second, after calculating the repulsive information between all pairs of point elements within the specified distance range threshold, for each point element, the resultant force of the external repulsive force is calculated, and combined with the weight of the point element, the displacement of the point element under the repulsive force is realized.
[0176] Third, repeat the above steps until the iteration conditions are met to complete the optimization of point feature conflicts.
[0177] Through the above steps, the point feature conflict problem in the corresponding scenario can be solved in a simple and clear logic.
[0178] For the above steps, the specific implementation method is as follows.
[0179] Data preparation. The computer equipment calculates the repulsion information between point elements through the repulsion model. The input data of the repulsion model is a set of point elements. Each point element has three attributes: x, y, and w, where x and y are the coordinates of the point element on the electronic map, respectively, and w is the weight of the point element. The value of the weight is determined according to the actual business scenario. For example, when the point element is a shopping mall, the weight can be the passenger flow of the shopping mall, which means that the higher the passenger flow, the higher the weight of the shopping mall; when the point element is a scenic spot, the weight can be the quantitative value of the level of the scenic spot, which means that the higher the level of the scenic spot, the higher the weight.
[0180] Calculation process. After obtaining the basic data of the point feature set, perform the following initialization processing: define the model custom parameter T, which means the maximum number of iterations, for example, T = 10000; define the model custom parameter ε, which means the average point feature displacement condition for ending the iteration, for example, ε = 0.1m; define the model custom parameter δ, which means the maximum action distance threshold of the repulsion model, for example, δ = 100m; define the model custom parameter η, which means the displacement rate during displacement, for example, η = 0.2.
[0181] 1) Define the current iteration period t, and initialize t = 1. Calculate the average value M of the weights of all point elements avgThe calculation formula of the average weight value can refer to the formula in step 408, which will not be repeated here.
[0182] 2) For the current set of point features, the average nearest neighbor distance D of the current set of point features is calculated. The meaning of the average nearest neighbor distance D is that for each point feature, the distance between the other point features of the nearest neighbor and the point feature is calculated as the nearest neighbor distance of the point feature. The average of the nearest neighbor distances of all point features is the average nearest neighbor distance D. The calculation method of the average nearest neighbor distance D can be referred to the formula in step 404, which will not be repeated here.
[0183] 3) Traverse the point elements. For point element i, if there is no other point element within the distance threshold δ, skip it and traverse the next point element. Otherwise, collect the repulsion of its neighboring point elements according to the following steps.
[0184] 4) Traverse other point elements j adjacent to point element i within the distance threshold δ, and for point element j, calculate the magnitude of the repulsive force value F of point element j on point element i ij Compared with the general attraction (repulsion) model, the average nearest neighbor distance D is introduced for normalization. The calculation method of the repulsion value can be referred to the formula in step 404, which will not be repeated here.
[0185] 5) Calculate the direction of the repulsive force (x ij ,y ij ), where x i ,y u are the spatial x-coordinate and spatial y-coordinate of point element i, respectively. j ,y j are the spatial x coordinate and the spatial y coordinate of the point element j respectively. The calculation method of the repulsive direction can be referred to the formula in step 406 and will not be repeated here.
[0186] 6) After traversing and collecting the magnitude and direction of the repulsive force exerted on the point element i by other point elements within the range of the distance threshold δ, calculate the displacement that the point element should have in the x-coordinate and y-coordinate directions, where: The number of other point features within the distance threshold δ of the point feature i, M avg is the mean value of all point feature weights. By introducing M avg To M j The repulsion value is calculated by referring to the formula in step 404, which will not be described here.
[0187] 7) Update the spatial position of point element i, that is, the spatial x coordinate and spatial y coordinate, and calculate its spatial displacement distance μ i , displacement distance μ iThe calculation method of can refer to the formula in step 410, which will not be repeated here.
[0188] 8) After traversing all point elements, the positions of all point elements affected by repulsion are updated, and the average displacement distance u of all point elements is counted, and t=t+1 is updated. If the current iteration cycle t is greater than the maximum number of iterations T, or the average displacement distance u of all point elements is less than the average point element displacement condition threshold distance ε for ending the iteration, then exit the iteration, otherwise, return to step 2.
[0189] 9) After the iteration is completed, the updated positions of the current point features are returned as the final result.
[0190] In summary, the method provided in this embodiment solves the spatial conflict between point elements by displacing the point elements, which can retain all the point elements and avoid information loss. At the same time, the displacement of the point elements is generated based on the weight value, which can satisfy the requirement that the point elements with higher importance are displaced smaller, thereby improving the readability of the electronic map.
[0191] Figure 7 A schematic diagram of the structure of an electronic map display device provided by an exemplary embodiment of the present application is shown. The device can be implemented as all or part of a computer device through software, hardware, or a combination of both. The device includes:
[0192] An acquisition module 701 is used to acquire parameter information of at least two point elements in an electronic map, wherein the parameter information includes position coordinates and weight values of the point elements in the electronic map;
[0193] A calculation module 702, configured to calculate repulsive force information of the first point element on the second point element according to the position coordinates and the weight value, wherein the repulsive force information is used to indicate a position conflict relationship between the first point element and the second point element in the electronic map;
[0194] The updating module 703 is used to update the position coordinates of the second point element in the electronic map based on the repulsive force information.
[0195] In some embodiments, the calculation module 702 is used to calculate the average nearest neighbor distance corresponding to the point element based on the position coordinates of each point element in the electronic map, and the average nearest neighbor distance refers to the average value of the sum of the shortest distances between each point element in the electronic map and the adjacent point elements.
[0196] In some embodiments, the calculation module 702 is used to calculate the repulsive force information of the first point element on the second point element according to the average nearest neighbor distance, the position coordinates and the weight value.
[0197] In some embodiments, the repulsion information includes a repulsion value, which refers to the degree of position conflict between the first point element and the second point element; the calculation module 702 is used to obtain the position distance value between the first point element and the second point element according to the position coordinates corresponding to each of the first point element and the second point element; the position distance value is normalized by the average nearest neighbor distance to obtain the normalized position distance value between the first point element and the second point element; the repulsion value is obtained according to the ratio of the weight value product to the normalized position distance square value; wherein the weight value product refers to the product of the weight values corresponding to the first point element and the second point element, and the normalized position distance square value refers to the square of the normalized position distance value.
[0198] In some embodiments, the repulsion information includes a repulsion direction, which refers to the position conflict direction of the first point element with respect to the second point element; the calculation module 702 is used to obtain the repulsion direction of the first point element with respect to the second point element based on the difference between the position coordinates corresponding to the first point element and the second point element on the X-axis and the Y-axis.
[0199] In some embodiments, the calculation module 702 is used to traverse the point elements in the electronic map to obtain the neighbor distance corresponding to each point element, and the neighbor distance refers to the shortest distance between each point element in the electronic map and the adjacent point element.
[0200] In some embodiments, the calculation module 702 is used to sum and average the neighbor distances corresponding to each of the point elements to obtain the average nearest neighbor distance.
[0201] In some embodiments, the calculation module 702 is used to calculate the X-axis offset distance and the Y-axis offset distance of the second point element in the electronic map based on the repulsive force information.
[0202] In some embodiments, the updating module 703 is used to update the position coordinates of the second point element in the electronic map according to the X-axis offset distance and the Y-axis offset distance.
[0203] In some embodiments, the calculation module 702 is used to sum the repulsive value of at least one of the first point elements on the second point element and the repulsive direction corresponding to the repulsive value in the X-axis repulsive value to obtain the X-axis combined repulsive value of at least one of the first point elements in the X-axis direction, and the X-axis repulsive value is obtained by multiplying the repulsive value and the direction vector of the repulsive direction corresponding to the repulsive value in the X-axis direction.
[0204] In some embodiments, the calculation module 702 is used to obtain the X-axis offset distance based on the ratio of the X-axis combined repulsion value to the weight value of the second point element.
[0205] In some embodiments, the calculation module 702 is used to traverse the point elements in the electronic map to obtain the average weight value corresponding to the point elements; normalize the weight value corresponding to the second point element by the average weight value to obtain the normalized weight value of the second point element; and obtain the X-axis offset distance based on the ratio of the X-axis combined repulsion value to the product of the normalized weight value and the number of at least one of the first point elements.
[0206] In some embodiments, the calculation module 702 is used to sum the Y-axis repulsion values of at least one of the first point elements on the second point element to obtain a Y-axis combined repulsion value of at least one of the first point elements in the Y-axis direction, where the Y-axis repulsion value is obtained by multiplying the repulsion value and the direction vector of the repulsion direction corresponding to the repulsion value in the Y-axis direction; based on the ratio of the Y-axis combined repulsion value to the weight value of the second point element, the Y-axis offset distance is obtained.
[0207] In some embodiments, the calculation module 702 is used to obtain the Y-axis offset distance based on the ratio of the Y-axis combined repulsion value to the product of the normalized weight value and the number of at least one of the first point elements.
[0208] In some embodiments, the acquisition module 701 is used to obtain the number of traversal times of the point element in the electronic map.
[0209] In some embodiments, the device further includes a termination module 704, and the termination module 704 is used to terminate the traversal when the number of traversals reaches a traversal threshold.
[0210] In some embodiments, the acquisition module 701 is used to acquire the average offset distance of the point elements in the electronic map.
[0211] In some embodiments, the termination module 704 is used to terminate the traversal when the average offset distance is less than the displacement threshold.
[0212] In some embodiments, the acquisition module 701 is used to acquire the offset distance of each of the point elements in the electronic map.
[0213] In some embodiments, the calculation module 702 is used to add up the offset distances of each of the point elements and calculate the average value to obtain the average offset distance.
[0214] Figure 8The structural block diagram of a computer device 800 shown in an exemplary embodiment of the present application is shown. The computer device can be implemented as the server in the above-mentioned solution of the present application. The image computer device 800 includes a central processing unit (CPU) 801, a system memory 804 including a random access memory (RAM) 802 and a read-only memory (ROM) 803, and a system bus 805 connecting the system memory 804 and the central processing unit 801. The image computer device 800 also includes a large-capacity storage device 806 for storing an operating system 809, an application program 810 and other program modules 811.
[0215] The mass storage device 806 is connected to the central processing unit 801 through a mass storage controller (not shown) connected to the system bus 805. The mass storage device 806 and its associated computer readable medium provide non-volatile storage for the image computer device 800. That is, the mass storage device 806 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0216] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above. The above-mentioned system memory 804 and mass storage device 806 can be collectively referred to as memory.
[0217] According to various embodiments of the present disclosure, the image computer device 800 can also be connected to a remote computer on a network such as the Internet for operation. That is, the image computer device 800 can be connected to a network 808 via a network interface unit 807 connected to the system bus 805, or the network interface unit 807 can be used to connect to other types of networks or remote computer systems (not shown).
[0218] The memory further includes at least one computer program, which is stored in the memory. The central processor 801 implements all or part of the steps in the electronic map display method shown in the above embodiments by executing the at least one program.
[0219] Fig. 9 The block diagram of the structure of a computer device 900 provided by an exemplary embodiment of the present application is shown. The computer device 900 may be a terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV). The computer device 900 may also be called a user device, a portable terminal, or other names.
[0220] Typically, the computer device 900 includes a processor 901 and a memory 902 .
[0221] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0222] The memory 902 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction, which is used to be executed by the processor 901 to implement the display method of the virtual environment screen provided in the embodiment of the present application.
[0223] In some embodiments, the computer device 900 may further include: a peripheral device interface 903 and at least one peripheral device. Specifically, the peripheral device includes: at least one of a radio frequency interface 904, a touch display screen 905, a camera assembly 906, an audio circuit 907 and a power supply 908.
[0224] The peripheral device interface 903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0225] The radio frequency interface 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency interface 904 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency interface 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency interface 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency interface 904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency interface 904 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0226] The touch display screen 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. The touch display screen 905 also has the ability to collect touch signals on the surface or above the surface of the touch display screen 905. The touch signal may be input to the processor 901 as a control signal for processing. The touch display screen 905 is used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the touch display screen 905 may be one, and the front panel of the computer device 900 is set; in other embodiments, the touch display screen 905 may be at least two, which are respectively set on different surfaces of the computer device 900 or are folded; in some embodiments, the touch display screen 905 may be a flexible display screen, which is set on the curved surface or folded surface of the computer device 900. Even, the touch display screen 905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The touch display screen 905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0227] The camera assembly 906 is used to capture images or videos. Optionally, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is used to realize video calls or selfies, and the rear camera is used to realize the shooting of photos or videos. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, and a wide-angle camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, and the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting functions. In some embodiments, the camera assembly 906 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0228] The audio circuit 907 is used to provide an audio interface between the user and the computer device 900. The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing, or input them into the radio frequency interface 904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency interface 904 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 907 may also include a headphone jack.
[0229] The power supply 908 is used to power various components in the computer device 900. The power supply 908 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 908 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0230] In some embodiments, the computer device 900 further includes one or more sensors 909 , including but not limited to: an acceleration sensor 910 , a gyroscope sensor 911 , a pressure sensor 912 , an optical sensor 913 , and a proximity sensor 914 .
[0231] The acceleration sensor 910 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the computer device 900. For example, the acceleration sensor 910 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 901 can control the touch display screen 905 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 910. The acceleration sensor 910 can also be used for collecting game or user motion data.
[0232] The gyro sensor 911 can detect the body direction and rotation angle of the computer device 900, and the gyro sensor 911 can cooperate with the acceleration sensor 910 to collect the user's 3D actions on the computer device 900. The processor 901 can implement the following functions based on the data collected by the gyro sensor 911: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0233] The pressure sensor 912 can be set on the side frame of the computer device 900 and / or the lower layer of the touch display screen 905. When the pressure sensor 912 is set on the side frame of the computer device 900, it can detect the user's grip signal of the computer device 900, and perform left and right hand recognition or shortcut operation according to the grip signal. When the pressure sensor 912 is set on the lower layer of the touch display screen 905, it can control the operability controls on the UI interface according to the user's pressure operation on the touch display screen 905. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0234] The optical sensor 913 is used to collect the ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the touch display screen 905 according to the ambient light intensity collected by the optical sensor 913. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 905 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 913.
[0235] The proximity sensor 914, also called a distance sensor, is usually arranged on the front of the computer device 900. The proximity sensor 914 is used to collect the distance between the user and the front of the computer device 900. In one embodiment, when the proximity sensor 914 detects that the distance between the user and the front of the computer device 900 is gradually decreasing, the processor 901 controls the touch display screen 905 to switch from the screen-on state to the screen-off state; when the proximity sensor 914 detects that the distance between the user and the front of the computer device 900 is gradually increasing, the processor 901 controls the touch display screen 905 to switch from the screen-off state to the screen-on state.
[0236] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the computer device 900, and the computer device 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0237] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the electronic map display method provided by the above-mentioned method embodiments.
[0238] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the electronic map display method provided by the above-mentioned method embodiments.
[0239] An embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes to implement the electronic map display method provided in the above-mentioned method embodiments.
[0240] It will be understood that in the specific implementation of the present application, the data involved, historical data, and data related to user data processing such as portraits related to user identity or characteristics, when the above embodiments of the present application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0241] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0242] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0243] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switching, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for displaying an electronic map, characterized in that: The method comprises: Acquire parameter information of at least two point elements in the electronic map, the parameter information including position coordinates and weight values of the point elements in the electronic map; calculating, according to the position coordinates and the weight value, repulsive force information of the first point element on the second point element, the repulsive force information being used to indicate a position conflict relationship between the first point element and the second point element in the electronic map; Based on the repulsive force information, the position coordinates of the second point element in the electronic map are updated.
2. The method according to claim 1, characterized in that The calculating, according to the position coordinates and the weight value, repulsive force information of the first point element on the second point element includes: According to the position coordinates of each point element in the electronic map, an average nearest neighbor distance corresponding to the point element is calculated, wherein the average nearest neighbor distance refers to the average value of the sum of the shortest distances between each point element in the electronic map and adjacent point elements; The repulsive force information of the first point element on the second point element is calculated according to the average nearest neighbor distance, the position coordinates and the weight value.
3. The method according to claim 2, characterized in that The repulsion information includes a repulsion value, where the repulsion value refers to a degree of positional conflict between the first point element and the second point element; The calculating, according to the average nearest neighbor distance, the position coordinates and the weight value, the repulsive force information of the first point element on the second point element includes: Acquire a position distance value between the first point element and the second point element according to the position coordinates corresponding to the first point element and the second point element respectively; Normalizing the position distance value by using the average nearest neighbor distance to obtain a normalized position distance value between the first point feature and the second point feature; The repulsive force value is obtained according to the ratio of the product of the weight values to the square value of the normalized position distance; The weight value product refers to the product of the weight values corresponding to the first point element and the second point element respectively, and the normalized position distance square value refers to the square of the normalized position distance value.
4. The method according to claim 2, characterized in that: The repulsive force information includes a repulsive force direction, and the repulsive force direction refers to a position conflict direction of the first point element with the second point element; The calculating, according to the average nearest neighbor distance, the position coordinates and the weight value, the repulsive force information of the first point element on the second point element includes: The repulsive direction of the first point element on the second point element is obtained according to the difference between the position coordinates corresponding to the first point element and the second point element on the X axis and the Y axis.
5. The method according to claim 2, characterized in that: The step of calculating the average nearest neighbor distance corresponding to each point element according to the position coordinates of each point element in the electronic map includes: Traversing the point elements in the electronic map to obtain the neighbor distance corresponding to each of the point elements, wherein the neighbor distance refers to the shortest distance between each of the point elements in the electronic map and the adjacent point elements; The neighbor distances corresponding to the point elements are summed and averaged to obtain the average nearest neighbor distance.
6. The method according to any one of claims 1 to 5, characterized in that: The updating the position coordinates of the second point element in the electronic map based on the repulsive force information includes: Based on the repulsive force information, calculating an X-axis offset distance and a Y-axis offset distance of the second point element in the electronic map; The position coordinates of the second point element in the electronic map are updated according to the X-axis offset distance and the Y-axis offset distance.
7. The method according to claim 6, characterized in that The calculating, based on the repulsive force value and the repulsive force direction in the repulsive force information, an X-axis offset distance of the second point element in the electronic map includes: Sum the X-axis repulsion values of at least one of the first point elements on the second point element to obtain an X-axis combined repulsion value of at least one of the first point elements in the X-axis direction, where the X-axis repulsion value is obtained by multiplying the repulsion value and the direction vector of the repulsion direction corresponding to the repulsion value in the X-axis direction; The X-axis offset distance is obtained based on the ratio of the X-axis combined repulsion value to the weight value of the second point element.
8. The method according to claim 7, characterized in that The obtaining the X-axis offset distance based on the ratio of the X-axis combined repulsion value to the weight value of the second point element includes: Traversing the point elements in the electronic map to obtain average weight values corresponding to the point elements; Normalizing the weight value corresponding to the second point element by using the average weight value to obtain a normalized weight value of the second point element; The X-axis offset distance is obtained based on a ratio of the X-axis merging repulsion value to the product of the normalized weight value and the number of at least one of the first point elements.
9. The method according to claim 6, characterized in that The calculating the Y-axis offset distance of the second point element in the electronic map based on the repulsive force value and the repulsive force direction in the repulsive force information includes: Sum the Y-axis repulsion values of at least one of the first point elements on the second point element to obtain a Y-axis combined repulsion value of at least one of the first point elements in the Y-axis direction, where the Y-axis repulsion value is obtained by multiplying the repulsion value and the direction vector of the repulsion direction corresponding to the repulsion value in the Y-axis direction; The Y-axis offset distance is obtained based on the ratio of the Y-axis combined repulsion value to the weight value of the second point element.
10. The method according to claim 9, characterized in that The obtaining the Y-axis offset distance based on the ratio of the Y-axis combined repulsion value to the weight value of the second point element includes: The Y-axis offset distance is obtained based on the ratio of the Y-axis combined repulsion value to the product of the normalized weight value and the number of at least one of the first point elements.
11. An electronic map display device, characterized in that: The device comprises: An acquisition module, used to acquire parameter information of at least two point elements in the electronic map, wherein the parameter information includes position coordinates and weight values of the point elements in the electronic map; a calculation module, configured to calculate, according to the position coordinates and the weight value, repulsive force information of the first point element on the second point element, wherein the repulsive force information is used to indicate a position conflict relationship between the first point element and the second point element in the electronic map; An updating module is used to update the position coordinates of the second point element in the electronic map based on the repulsive force information.
12. A computer device, characterized in that: The computer device comprises: a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the electronic map display method according to any one of claims 1 to 10.
13. A computer storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the electronic map display method according to any one of claims 1 to 10.
Citation Information
Cited By
Point element conflict processing method, system and equipment in map making and medium
CN121505074A