CN111506689B - Electronic map rendering method and device based on artificial intelligence and electronic equipment - Google Patents
Electronic map rendering method and device based on artificial intelligence and electronic equipment Download PDFInfo
- Publication number
- CN111506689B CN111506689B CN202010285113.6A CN202010285113A CN111506689B CN 111506689 B CN111506689 B CN 111506689B CN 202010285113 A CN202010285113 A CN 202010285113A CN 111506689 B CN111506689 B CN 111506689B
- Authority
- CN
- China
- Prior art keywords
- rendering
- electronic map
- geographic
- level
- sample
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/26—Visual data mining; Browsing structured data
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Remote Sensing (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides an electronic map rendering method, an electronic map rendering device, electronic equipment and a computer-readable storage medium based on artificial intelligence; the method comprises the following steps: performing prediction processing based on a feature vector of a geographic element in an electronic map to determine a rendering level associated with the geographic element among a plurality of rendering levels of the electronic map; grading the geographic elements related to the same rendering level in the electronic map according to the corresponding feature vectors to obtain rendering grades; fusing the rendering scores of the geographic elements with the rendering levels associated with the geographic elements to obtain rendering weights; sequentially rendering the geographic elements related to the hierarchy to be rendered according to the descending order of the rendering weight; wherein the level to be rendered is a rendering level of the plurality of rendering levels that matches a current scale of the electronic map. By the method and the device, the rendering efficiency and precision of the electronic map can be improved.
Description
Technical Field
The present invention relates to artificial intelligence and map technologies, and in particular, to an electronic map rendering method and apparatus based on artificial intelligence, an electronic device, and a computer-readable storage medium.
Background
Artificial Intelligence (AI) is a theory, method and technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence.
The electronic map is an important application of artificial intelligence, and as the number of geographic elements in the real world is very large and the distribution is very dense, when the geographic elements are rendered into the electronic map, part of the geographic elements need to be selected for rendering. In the solutions provided by the related art, a scoring formula is usually set with attributes of geographic elements as variables, and each geographic element is calculated according to the scoring formula, so that the finally presented geographic element is determined according to the score of each geographic element. However, the scoring formula cannot be applied to all the geographic elements, so that the geographic elements rendered in the electronic map are unreasonable, and the map guiding capability is poor.
Disclosure of Invention
The embodiment of the invention provides an electronic map rendering method and device based on artificial intelligence, electronic equipment and a computer readable storage medium, which can improve the rendering efficiency and precision of an electronic map so as to enhance the guiding capability of the electronic map.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides an electronic map rendering method based on artificial intelligence, which comprises the following steps:
performing prediction processing based on a feature vector of a geographic element in an electronic map to determine a rendering level associated with the geographic element among a plurality of rendering levels of the electronic map;
grading the geographic elements related to the same rendering level in the electronic map according to the corresponding feature vectors to obtain rendering grades;
fusing the rendering scores of the geographic elements with the rendering levels associated with the geographic elements to obtain rendering weights;
sequentially rendering the geographic elements related to the hierarchy to be rendered according to the descending order of the rendering weight;
wherein the level to be rendered is a rendering level of the plurality of rendering levels that matches a current scale of the electronic map.
The embodiment of the invention provides an electronic map rendering method based on artificial intelligence, which comprises the following steps:
responding to the viewing operation of the electronic map, and loading the electronic map interface;
sequentially rendering the geographic elements related to the hierarchy to be rendered in the electronic map interface according to the descending order of the rendering weight of each geographic element in the electronic map;
the rendering weight is obtained by fusing the rendering level and the rendering score of the geographic element; the level to be rendered is a rendering level matched with the current scale of the electronic map in a plurality of rendering levels of the electronic map; and the rendering level and the rendering score of each geographic element in the electronic map are obtained based on artificial intelligence model prediction.
The embodiment of the invention provides an electronic map rendering device based on artificial intelligence, which comprises:
the prediction module is used for performing prediction processing on the basis of a feature vector of a geographic element in an electronic map so as to determine a rendering level associated with the geographic element in a plurality of rendering levels of the electronic map;
the scoring module is used for scoring the geographic elements related to the same rendering level in the electronic map according to the corresponding feature vectors to obtain rendering scores;
the fusion module is used for fusing the rendering scores of the geographic elements with the rendering levels associated with the geographic elements to obtain rendering weights;
the rendering module is used for sequentially rendering the geographic elements related to the hierarchy to be rendered according to the descending order of the rendering weight;
wherein the level to be rendered is a rendering level of the plurality of rendering levels that matches a current scale of the electronic map.
The embodiment of the invention provides an electronic map rendering device based on artificial intelligence, which comprises:
the loading module is used for responding to the viewing operation of the electronic map and loading the electronic map interface;
the in-interface rendering module is used for sequentially rendering the geographic elements related to the hierarchy to be rendered in the electronic map interface according to the descending order of the rendering weight of each geographic element in the electronic map;
the rendering weight is obtained by fusing the rendering level and the rendering score of the geographic element; the level to be rendered is a rendering level matched with the current scale of the electronic map in a plurality of rendering levels of the electronic map; and the rendering level and the rendering score of each geographic element in the electronic map are obtained based on artificial intelligence model prediction.
An embodiment of the present invention provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the electronic map rendering method based on artificial intelligence provided by the embodiment of the invention when the executable instructions stored in the memory are executed.
The embodiment of the invention provides a computer-readable storage medium, which stores executable instructions and is used for causing a processor to execute the executable instructions so as to realize the electronic map rendering method based on artificial intelligence provided by the embodiment of the invention.
The embodiment of the invention has the following beneficial effects:
the method comprises the steps of firstly conducting prediction processing on feature vectors of geographic elements to obtain rendering levels associated with the geographic elements, then conducting grading processing on the geographic elements associated with the same rendering levels according to the feature vectors to obtain rendering scores of the geographic elements, finally integrating the rendering levels and the rendering scores into rendering weights, and determining the geographic elements finally rendered into the electronic map according to the rendering weights.
Drawings
FIG. 1 is an alternative architecture diagram of an electronic map rendering system based on artificial intelligence provided by an embodiment of the present invention;
FIG. 2A is a schematic diagram of an alternative architecture of a server according to an embodiment of the present invention;
fig. 2B is an alternative architecture diagram of a terminal device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative architecture of an electronic map rendering apparatus based on artificial intelligence according to an embodiment of the present invention;
FIG. 4A is a schematic flow chart of an alternative method for rendering an electronic map based on artificial intelligence according to an embodiment of the present invention;
FIG. 4B is a schematic flow chart of an alternative method for rendering an electronic map based on artificial intelligence according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of an alternative method for rendering an electronic map based on artificial intelligence according to an embodiment of the present invention;
FIG. 6 is an alternative architectural diagram of electronic map rendering provided by embodiments of the present invention;
FIG. 7 is an alternative schematic diagram of model training provided by embodiments of the present invention;
FIG. 8 is an alternative schematic diagram of data filtering provided by embodiments of the present invention;
FIG. 9A is an alternative schematic diagram of a rendered electronic map provided by an embodiment of the present invention;
FIG. 9B is an alternative schematic diagram of a rendered electronic map provided by an embodiment of the present invention;
fig. 9C is an alternative schematic diagram of the rendered electronic map according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. In addition, "a plurality" referred to in the following description means at least two.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order or importance, but rather "first \ second \ third" may, where permissible, be interchanged in a particular order or sequence so that embodiments of the invention described herein may be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) An electronic map: maps are stored and referred to digitally using computer technology for carrying visual objects of geographic elements in the real world (e.g., icons of geographic elements).
2) Geographic elements: reflecting geographic objects in the real world, geographic elements such as points of Interest (POI) that can be abstracted as points, such as a school, a building, or a restaurant, etc.
3) Rendering: visualization techniques that present geographic elements into an electronic map.
4) Loss function: the difference between the predicted and actual results for the metric model is typically targeted at minimizing the loss value of the loss function in the optimization process of the model.
5) Overfitting: the method refers to the phenomenon that in the machine learning process, the fitting prediction result of a model to a training set is very good, but the fitting prediction effect is poor when a test set or a real application is carried out, and generally the model is too complex.
6) And (3) multi-classification: there are multiple object classes in the classification task representing machine learning, with each sample having one and only one corresponding object class.
7) Gradient Boosting Tree (GBDT), Gradient Boosting Decision Tree: in machine learning, an iterative decision tree algorithm is composed of a plurality of decision trees, and prediction results of all the trees are accumulated to serve as a final prediction result.
8) eXtreme Gradient boost (XGBoost, eXtreme Gradient Boosting): the GBDT model training method is an implementation of engineering optimization of a GBDT algorithm in machine learning, is a machine learning algorithm toolkit, and can train GBDT models applied to different scenes by setting tasks and parameters.
9) Softmax function: also known as normalized exponential function, a k-dimensional vector z of arbitrary real numbers can be converted into another k-dimensional vector σ (z) such that each element in σ (z) ranges between 0 and 1, and the sum of all elements is 1.
Due to the large number of geographic elements in the real world, when rendering the geographic elements into the electronic map, a part of the geographic elements needs to be selected for rendering. The related art mainly provides the following three ways to select geographical elements:
1) based on a pairwise comparison. And sequentially calculating the good-bad relationship between each geographic element and all other geographic elements, for example, if N geographic elements exist in a set needing to be judged, obtaining a relation matrix with the size of N multiplied by N according to a pairwise comparison method, and when meeting the geographic elements with conflict at rendering positions, determining the final rendered geographic elements according to the relation matrix. However, this method is computationally expensive, the memory space consumption is high, and in addition, for a set of geographical elements to be determined, a cyclic goodness relationship (for example, a > B, B > C and C > a exist at the same time) may occur, and then additional means are needed to determine the final rendered geographical elements.
2) Based on the manner of scoring. And setting a scoring formula by taking the attribute of the geographic element as a variable, and calculating each geographic element according to the formula to obtain a global score list. And for at least two geographic elements with conflicting rendering positions, determining the final rendered geographic element according to the scores of the at least two geographic elements. However, the rendering effect of this method completely depends on the scoring formula, once the formula is determined, the score is calculated strictly according to the formula, and because the number of the geographic elements is huge, it is almost impossible to formulate a formula suitable for all the geographic elements, and the variation of the formula often brings uncontrollable overall effect.
3) A rule-based approach. The method mainly comprises the steps of assigning a final weight to each geographic element by manually assigning various different rules, sequencing a plurality of geographic elements according to the weights, and finally determining the priority of rendering the geographic elements. However, this method has extremely high requirements on rule makers, requires a large amount of input of professionals, and in order to achieve a good rendering effect, the designed rules tend to become more and more complex, and the maintenance cost thereof also increases gradually.
The embodiment of the invention provides an electronic map rendering method and device based on artificial intelligence, an electronic device and a computer-readable storage medium, which can improve the rendering effect of an electronic map and enhance the guiding capability of the electronic map, and the following describes exemplary application of the electronic device provided by the embodiment of the invention.
Referring to fig. 1, fig. 1 is an alternative architecture diagram of an electronic map rendering system 100 based on artificial intelligence according to an embodiment of the present invention, in order to implement supporting an electronic map rendering application based on artificial intelligence, a terminal device 400 (an exemplary terminal device 400-1 and a terminal device 400-2 are shown) is connected to a server 200 through a network 300, the server 200 is connected to a database 500, and the network 300 may be a wide area network or a local area network, or a combination of both.
In some embodiments, the terminal device 400 may locally perform the artificial intelligence based electronic map rendering method provided by the embodiments of the present invention. Specifically, the terminal device 400 is installed with an electronic map client, and the terminal device 400 loads an electronic map interface in the electronic map client in response to an electronic map viewing operation on the electronic map client, and sequentially renders, in the electronic map interface, the geographic elements associated with a level to be rendered according to a descending order of rendering weights of the geographic elements related to the electronic map, where the level to be rendered is a rendering level matched with a current scale of the electronic map. Here, the terminal device 400 may convert information of a geographic element related to the electronic map into a feature vector with a fixed format in advance, perform a series of processing according to the feature vector to obtain a rendering level and a rendering score associated with the geographic element, and store a rendering weight obtained by fusion, where the information of the geographic element may be obtained by the terminal device 400 online through the network 300, or obtained in advance and stored locally (offline), and the terminal device 400 may perform related processing on the feature vector through a rendering model stored locally. Of course, the terminal device 400 may also calculate the rendering level and the rendering score of the geographic element related to the electronic map in real time when the electronic map viewing operation is obtained, and obtain the rendering weight by fusing. It is worth mentioning that the electronic map viewing operation includes, but is not limited to, an operation of opening the electronic map client and an operation of searching for a map of a place in the electronic map client.
The server 200 may also execute the electronic map rendering method based on artificial intelligence provided in the embodiment of the present invention, specifically, the server 200 obtains information of geographic elements in the electronic map from the database 500, obtains rendering levels and rendering scores associated with the geographic elements after a series of processing, and obtains rendering weights by fusing, where the server 200 may call rendering models stored in the database 500 or a file system to perform related processing on feature vectors. When receiving the electronic map viewing operation sent by the terminal device 400, the server 200 sequentially renders the geographic elements associated with the hierarchy to be rendered according to the descending order of the rendering weights, and sends the rendered electronic map to the terminal device 400, so that the terminal device 400 presents the rendered electronic map in the loaded electronic map interface. Of course, here, the server 200 may also send the determined geographic element that needs to be rendered to the terminal device 400, so that the terminal device 400 locally performs the task of rendering the geographic element to the electronic map.
The terminal device 400 may display various results in the electronic map rendering process, such as a loaded electronic map interface, a rendered electronic map, and the like, in the graphic interface 410 (the graphic interface 410-1 and the graphic interface 410-2 are exemplarily shown). In fig. 1, a rendered electronic map is illustratively shown, including geographic elements A, B and C. The rendered electronic map includes the geographic elements with important surroundings, and has strong guiding capability, and a user of the terminal device 400 can quickly determine the position of the user or select a destination meeting the requirements of the user according to the displayed electronic map.
The following continues to illustrate exemplary applications of the electronic device provided by embodiments of the present invention. The electronic device may be implemented as various types of terminal devices such as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device), and the like, and may also be implemented as a server.
Next, an electronic device will be described as an example of a server. Referring to fig. 2A, fig. 2A is a schematic diagram of an architecture of a server 200 (for example, the server 200 shown in fig. 1) provided by an embodiment of the present invention, where the server 200 shown in fig. 2A includes: at least one processor 210, memory 240, and at least one network interface 220. The various components in server 200 are coupled together by a bus system 230. It is understood that the bus system 230 is used to enable connected communication between these components. The bus system 230 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 230 in fig. 2A.
The Processor 210 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The memory 240 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 240 optionally includes one or more storage devices physically located remote from processor 210.
The memory 240 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile memory may be a Read Only Memory (ROM), and the volatile memory may be a Random Access Memory (RAM). The memory 240 described in connection with embodiments of the present invention is intended to comprise any suitable type of memory.
In some embodiments, memory 240 is capable of storing data, examples of which include programs, modules, and data structures, or subsets or supersets thereof, to support various operations, as exemplified below.
An operating system 241, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a network communication module 242 for communicating to other computing devices via one or more (wired or wireless) network interfaces 220, exemplary network interfaces 220 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), among others.
In some embodiments, the electronic map rendering device based on artificial intelligence provided by the embodiments of the present invention can be implemented in software, and fig. 2A illustrates an electronic map rendering device 243 based on artificial intelligence, which can be software in the form of programs and plug-ins, etc. stored in the memory 240, and includes the following software modules: prediction module 2431, scoring module 2432, fusion module 2433, and rendering module 2434, which are logical and thus can be arbitrarily combined or further split depending on the functionality implemented. The functions of the respective modules will be explained below.
In other embodiments, the electronic map rendering Device based on artificial intelligence provided by the embodiments of the present invention may be implemented in hardware, for example, the electronic map rendering Device based on artificial intelligence provided by the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the electronic map rendering method based on artificial intelligence provided by the embodiments of the present invention, for example, the processor in the form of the hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic elements.
Next, an electronic device will be described as an example of a terminal device. Referring to fig. 2B, fig. 2B is a schematic diagram of an architecture of a terminal device 400 (for example, the terminal device 400-1 and the terminal device 400-2 shown in fig. 1) provided in the embodiment of the present invention, where the terminal device 400 shown in fig. 2B includes: at least one processor 410, memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal device 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable communications among the components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 440 in FIG. 2B.
The Processor 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 450 optionally includes one or more storage devices physically located remote from processor 410.
The memory 450 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile memory may be a Read Only Memory (ROM), and the volatile memory may be a Random Access Memory (RAM). The memory 450 described in embodiments of the invention is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data, examples of which include programs, modules, and data structures, or a subset or superset thereof, to support various operations, as exemplified below.
An operating system 451, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for communicating to other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
a presentation module 453 for enabling presentation of information (e.g., user interfaces for operating peripherals and displaying content and information) via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the electronic map rendering device based on artificial intelligence provided by the embodiments of the present invention can be implemented in software, and fig. 2B illustrates an electronic map rendering device 455 based on artificial intelligence stored in a memory 450, which can be software in the form of programs and plug-ins, and includes the following software modules: a loading module 4551 and an in-interface rendering module 4552, which are logical and thus may be arbitrarily combined or further split depending on the functions implemented. The functions of the respective modules will be explained below.
In other embodiments, the electronic map rendering Device based on artificial intelligence provided by the embodiments of the present invention may be implemented in hardware, for example, the electronic map rendering Device based on artificial intelligence provided by the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the electronic map rendering method based on artificial intelligence provided by the embodiments of the present invention, for example, the processor in the form of the hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic elements.
The electronic map rendering method based on artificial intelligence provided by the embodiment of the present invention may be executed by the server, or may be executed by a terminal device (for example, the terminal device 400-1 and the terminal device 400-2 shown in fig. 1), or may be executed by both the server and the terminal device.
The following describes a process of implementing the artificial intelligence based electronic map rendering method by the embedded artificial intelligence based electronic map rendering device 243 in the electronic device, in conjunction with the exemplary application and structure of the electronic device described above.
Referring to fig. 3 and fig. 4A, fig. 3 is a schematic diagram of an architecture of an electronic map rendering apparatus 243 based on artificial intelligence according to an embodiment of the present invention, which shows a flow of implementing electronic map rendering through a series of modules, and fig. 4A is a schematic diagram of a flow of an electronic map rendering method based on artificial intelligence according to an embodiment of the present invention, and the steps shown in fig. 4A will be described with reference to fig. 3.
In step 101, prediction processing is performed based on a feature vector of a geographic element in an electronic map to determine a rendering level associated with the geographic element among a plurality of rendering levels of the electronic map.
As an example, referring to fig. 3, in the prediction module 2431, the geographic elements that fall within the presentation range of the electronic map are determined, and information of the geographic elements is obtained from a local storage or database and converted into feature vectors in a fixed format. Then, a prediction process is performed based on the feature vector of the geographic element to determine a rendering level associated with the geographic element from a plurality of rendering levels of the electronic map, wherein the prediction process may be performed by a machine learning means, and specific contents are described in detail later. It is worth to be noted that a plurality of rendering levels of the electronic map can be divided according to the actual application scene, each rendering level corresponds to a scale of the electronic map, and the scale is a ratio of the length of a line segment in the electronic map to the actual length of a corresponding line segment in the real world.
In some embodiments, before step 101, further comprising: extracting attribute features and spatial features from the information of the geographic elements; discretizing the attribute features and the spatial features; combining the attribute characteristics and the characteristics which accord with the combination conditions in the spatial characteristics to obtain combined characteristics; and splicing the combined features, the attribute features after discretization and the spatial features into feature vectors of the geographic elements.
Here, the information of the geographic element may include attribute information and spatial information, and after the information of the geographic element is obtained from a local storage or a database, attribute features are extracted from the attribute information, where the attribute features include, but are not limited to, an element type (such as a mall, a hotel, and the like), a popularity, a name length, and a master-slave relationship between the geographic elements; spatial features are extracted from the spatial information, and the spatial features include, but are not limited to, area of the area, markers within the water area, built-up area markers, and density of geographic elements within the grid. In the embodiment of the present invention, in order to facilitate subsequent prediction processing and sorting processing, discretization processing is performed on the attribute features and the spatial features, for example, if the value range of the heat is a continuous value between 0 and 1000, an interval may be taken every 100 intervals, and the original continuous features are converted into discrete features in 10 corresponding interval ranges. For example, if the value 1 indicates that the heat degree falls in the corresponding interval, the value 0 indicates that the heat degree does not fall in the corresponding interval, and the original value of the heat degree is 50, the discretization process is performed to obtain a feature value of the discretization type feature of 1000000000.
In addition, some independent features meeting the combination condition can be combined into a new feature, for example, the village type in the attribute feature of the geographic element and the built-up area mark in the spatial feature can be combined to obtain a new feature of the urban village mark. Wherein, when the geographic element belongs to a village (the value of the village type is 1) and is located in a built-up area (the value of the built-up area mark is 1), the geographic element is determined to belong to a village in the city, that is, the value of the village in the city mark is 1, otherwise, the value of the combined village in the city mark is 0. The combination condition may be set according to an actual application scenario, which is not limited in the embodiment of the present invention.
Finally, the combined features, the attribute features after discretization processing and the spatial features are spliced into feature vectors of geographic elements, and the feature vectors can be input into a machine learning model or processed in other modes. By the method, the effectiveness of feature extraction is improved, and the feature vector contains valuable information corresponding to the geographic elements.
In step 102, the geographic elements associated with the same rendering level in the electronic map are scored according to the corresponding feature vectors, so as to obtain a rendering score.
As an example, referring to fig. 3, in the scoring module 2432, scoring is performed separately for different rendering levels. For example, geographic element A1、A2、……A10Associated with rendering level a, geographic element B1、B2、……B10Associated with rendering level b, then for geographic element A1To A10The feature vector is graded, and the obtained rendering grade can represent A1To A10Order of bits in rendering level a, e.g. A1Has a rendering score higher than A10Then, it represents A1The order (importance) in rendering level a is higher than A10(ii) a For geographic element B1To B10The feature vectors are scored to obtain B1To B10The rendering score of each geographic element.
In step 103, the rendering scores of the geographic elements and the rendering levels associated with the geographic elements are fused to obtain rendering weights.
In the embodiment of the present invention, the rendering level has a higher priority than the rendering score, that is, the rendering score represents the importance of the geographic element in the rendering level, and the rendering level and the rendering score may be merged for rendering. For example, referring to fig. 3, in a fusion module 2433, the rendering score of each geographic element is fused with the rendering level associated with the geographic element, so as to obtain a rendering weight.
In some embodiments, before step 103, further comprising: carrying out equal-scale scaling processing on the rendering scores of the geographic elements according to the set scoring interval to obtain updated rendering scores;
the above-mentioned fusion processing of the rendering score of the geographic element and the rendering hierarchy associated with the geographic element can be implemented in such a manner as to obtain the rendering weight: performing product processing on the rendering level associated with the geographic element and the maximum value of the set scoring interval; and adding the product processing result and the updated rendering score of the geographic element to obtain the rendering weight of the geographic element.
After the geographic elements associated with the same rendering level in the electronic map are subjected to scoring processing according to the corresponding feature vectors, a rendering score of each geographic element associated with the same rendering level in an original scoring interval can be obtained, wherein the original scoring interval is related to a scoring processing mode, for example, determined by a parameter of a ranking model for the scoring processing. For convenience of calculation, after the rendering score of each geographic element is obtained, the rendering scores of the geographic elements are scaled to a uniform set score interval in an equal proportion, and an updated rendering score is obtained. For example, the original score range is 0-3000, the set score range is 0-2000, the rendering score of a geographic element is 1500, and the updated rendering score is 1000 after the scaling processing.
And for each geographic element related to the electronic map, performing multiplication processing on the rendering level associated with each geographic element and the maximum value of the set scoring interval, and adding the multiplication processing result and the updated rendering score of the geographic element to obtain the rendering weight of the geographic element. For example, as illustrated again in the above example, if the rendering level of the geographic element is 5, the rendering level is multiplied by the maximum value 2000 of the set score interval, and the result of the multiplication is summed with the updated rendering score 1000 to obtain the rendering weight 11000. By the method, the orderliness of the calculation of the rendering weight is improved, so that the rendering weight can be effectively combined with the rendering level and the rendering score.
In some embodiments, before step 103, further comprising: acquiring a master-slave relationship between geographic elements in an electronic map; wherein, the master-slave relationship is used for representing that the slave geographic element belongs to the master geographic element; and when the rendering level associated with the master geographic element is smaller than the rendering level associated with the slave geographic element, or the rendering score of the master geographic element is smaller than or equal to the rendering score of the slave geographic element associated to the same rendering level, adjusting the rendering score of the slave geographic element and the associated rendering level so that the rendering weight of the slave geographic element after adjustment processing is smaller than the rendering weight of the master geographic element.
Here, a master-slave relationship may be obtained from the information of the geographic element, where the master-slave relationship is used to indicate that the slave geographic element belongs to the master geographic element, and the master-slave relationship is a one-to-one or one-to-many relationship in spatial logic. For example, if a mall includes a plurality of stores, the mall is a master geographic element, and each store is a slave geographic element belonging to the master geographic element. Generally speaking, the importance degree of the master geographic element should be greater than that of the sub-geographic elements, so when the rendering level associated with the master geographic element is less than that associated with the sub-geographic elements, or the rendering score of the master geographic element is less than or equal to that of the sub-geographic elements associated to the same rendering level, that is, when the rendering weight of the master geographic element is less than or equal to that of the sub-geographic elements, the rendering score of the sub-geographic elements and the associated rendering level are adjusted, so that the rendering weight of the sub-geographic elements after the adjustment processing is less than that of the master geographic element. In addition, when the multiple sub-geographic elements corresponding to the same main geographic element need to be adjusted, because the rendering levels associated with different sub-geographic elements may be different, the rendering scores of the multiple sub-geographic elements may be scaled to a specific interval according to the original rendering weight sequence of the multiple sub-geographic elements, so that the obtained rendering weight sequence of the multiple sub-geographic elements is consistent with the original rendering weight sequence after scaling. By the adjustment processing mode, the relationship between the rendering weight of the main geographic element and the rendering weight of the sub geographic element accords with the master-slave relationship in the real world, and the rationality of the rendering weight is improved.
In some embodiments, before step 103, further comprising: acquiring the name length of the geographic element; when the name length exceeds a length threshold and the rendering level associated with the geographic element exceeds a level threshold, updating the rendering level associated with the geographic element to the level threshold.
In the real world, longer-named geographic elements are generally less important. Therefore, after the rendering weight associated with the geographic element and the rendering score of the geographic element are calculated, the name length of the geographic element is obtained, for example, from the information of the geographic element. When the length of the name exceeds a length threshold and the rendering level associated with the geographic element exceeds a level threshold, the rendering level associated with the geographic element is proved to be unreasonable, and the rendering level associated with the geographic element is updated to the level threshold, wherein the length threshold and the level threshold can be set according to the actual application scene, such as setting the length threshold to 14, and when the rendering level of the electronic map comprises 1, 2 and … … 10, the level threshold can be set to 4. The method adjusts the obviously abnormal rendering level based on the name length, and improves the rationality of the subsequently obtained rendering weight.
In some embodiments, before step 103, the electronic map rendering method further comprises: when the geographic elements in the electronic map are located in the white list, the rendering levels associated with the geographic elements and the rendering scores of the geographic elements are obtained from the white list.
In the embodiment of the present invention, for some special geographic elements, the rendering level and the rendering score corresponding to the special geographic elements need to be manually set in the white list, so as to ensure the absolute accuracy of the subsequent rendering. For example, some landmark buildings have high importance and need rendering preferentially, so that a white list can be artificially set with a high rendering level and a high rendering score corresponding to the landmark buildings. After the geographic elements within the presenting range of the electronic map are determined, whether the geographic elements are located in a white list is judged, if the geographic elements are located in the white list, a rendering level and a rendering score corresponding to the geographic elements in the white list are obtained, and prediction processing and scoring processing do not need to be carried out on the feature vectors of the geographic elements. By the white list setting mode, the rendering levels and the rendering scoring accuracy of certain special geographic elements are effectively guaranteed.
In step 104, sequentially rendering the geographic elements associated to the hierarchy to be rendered according to the descending order of the rendering weights; and the level to be rendered is a rendering level matched with the current scale of the electronic map in the rendering levels.
Here, a rendering level that matches the current scale among the plurality of rendering levels of the electronic map is determined as a level to be rendered. In the case that the scale and the value of the corresponding rendering level are in inverse proportion, matching may refer to a rendering level larger than that of the current scale, for example, the rendering level of the electronic map includes 1, 2, … … 10, the rendering level of the current scale is 6, and the rendering level matched with the current scale includes 7, 8, 9, and 10. Then, the geographic elements associated with the hierarchy to be rendered are determined from the multiple geographic elements located in the electronic map presentation range, and the geographic elements associated with the hierarchy to be rendered are sequentially rendered according to the descending order of the rendering weights determined in step 103, wherein the specific rendering mode is described in detail later. Therefore, the geographic elements rendered into the electronic map are guaranteed to be the geographic elements with higher importance, and a user can conveniently acquire information meeting the self requirement according to the electronic map, for example, searching for a destination in the rendered geographic elements. It should be noted that the electronic map in the embodiment of the present invention may be a static map or a dynamic map, and for the case of a dynamic map, the electronic map may be re-rendered after each change.
In some embodiments, the artificial intelligence based electronic map rendering method further comprises: when the geographic elements associated to the hierarchy to be rendered are rendered in sequence, if the rendered geographic elements exist in the rendering positions of the geographic elements to be rendered, the geographic elements to be rendered are ignored.
When the geographic elements related to the hierarchy to be rendered are rendered in sequence according to the descending order of the rendering weight, if the rendered geographic elements exist in the rendering area of the geographic elements to be rendered, the rendered geographic elements are proved to be more important than the geographic elements to be rendered, and the geographic elements to be rendered are ignored, so that the geographic elements with higher importance can be presented in the electronic map. The rendering area is a peripheral area (including a geographic location) of the geographic location of the geographic element, such as a grid of 1 km × 1 km centered on the geographic location of the geographic element, although the area and the form of the peripheral area are not limited thereto, and may be set according to an actual application scenario, for example, the area of the peripheral area may be set to be adaptively adjusted along with a current scale of the electronic map.
As can be seen from the above exemplary implementation of fig. 4A, in the embodiment of the present invention, a traditional single target is converted into a multi-target calculation manner, that is, a rendering level and a rendering score are sequentially calculated, and a final rendered geographic element is determined according to a rendering weight obtained by fusion, so that a rendering effect of an electronic map is improved, and a guidance capability of the electronic map is enhanced.
In some embodiments, referring to fig. 4B, fig. 4B is an optional flowchart of the electronic map rendering method based on artificial intelligence according to an embodiment of the present invention, and based on fig. 4A, before step 101, in step 201, feature vectors, sample rendering levels, and sample rendering weights of a plurality of sample geographic elements may also be obtained.
In the embodiment of the invention, a rendering hierarchy associated with the geographic element and a rendering score of the geographic element can be obtained by utilizing a multi-layer computing framework, and particularly, a rendering model comprising a layering model and a sequencing model is utilized. In the training stage of the hierarchical model and the sequencing model, firstly, feature vectors, sample rendering levels and sample rendering weights of a plurality of sample geographic elements are obtained, wherein the feature vectors can be obtained by converting information of the sample geographic elements, and the sample rendering weights can be artificially labeled or calculated in a related technology mode, such as a rule-based mode. As for the sample rendering level, a rendering weight range corresponding to each rendering level in the electronic map can be determined, a rendering weight range in which the sample rendering weight falls can be further determined, and the rendering level corresponding to the rendering weight range can be determined as the sample rendering level. In addition, each scale of the electronic map corresponds to one rendering level, so that the electronic map can be sequentially rendered from small to large according to the scale, and the rendering level corresponding to the scale when the sample geographic element is displayed at the beginning is determined as the sample rendering level of the sample geographic element.
In step 202, the feature vectors of the sample geographic elements are predicted through the layered model in the rendering model to obtain rendering levels to be compared, and the layered model is updated according to the sample rendering levels of the sample geographic elements and the rendering levels to be compared.
Here, the hierarchical model may be a multi-classification model based on machine learning, and a plurality of prediction categories of the hierarchical model are a plurality of rendering levels of the electronic map. And performing prediction processing on the feature vectors of the sample geographic elements through the hierarchical model, and determining the output prediction category as a rendering level to be compared. And then, updating the hierarchical model according to the sample rendering level of the sample geographic element and the rendering level to be compared.
In some embodiments, the above-mentioned updating of the hierarchical model according to the sample rendering levels of the sample geographic elements and the rendering levels to be compared may be implemented in such a way that: according to a loss function of the hierarchical model, measuring and processing the difference between a sample rendering level of a sample geographic element and a rendering level to be compared to obtain a first loss value; and performing back propagation in the hierarchical model according to the first loss value, and updating the weight parameters of the hierarchical model in the process of back propagation.
And processing the sample rendering level of the sample geographic element and the rendering level to be compared according to the loss function of the hierarchical model, measuring the difference between the two rendering levels, and obtaining a first loss value. And performing back propagation in the layered model according to the first loss value, and updating the weight parameters of each layer in the layered model along the gradient descending direction in the process of back propagation. The embodiment of the present invention does not limit the type of the loss function, and may be, for example, a cross entropy loss function. And the updating of the layered model is carried out through a mechanism of back propagation, so that the updating effect of the model is improved.
In step 203, constructing a sequencing sample according to the feature vectors of any two sample geographic elements, and determining a sample label of the sequencing sample; the exemplar label is used to represent the magnitude relationship between the exemplar rendering weights of the two exemplar geographic elements.
Here, a sorted sample is constructed according to the feature vectors of any two sample geographic elements, and the sample label of the sorted sample is determined according to the magnitude relation between the sample rendering weights of the two sample geographic elements. For example, when the sample rendering weight of a first sample geographic element is greater than the sample rendering weight of a second sample geographic element, the sample tag of the ordered sample is set to 1; otherwise, the sample label of the sorted sample is set to 0. Of course, the ordered sample may also be constructed here from the feature vectors associated to any two sample geographic elements of the same sample rendering level.
In step 204, the ranking samples are scored through the ranking model in the rendering model, the labels to be compared are determined according to the obtained rendering scores, and the ranking model is updated according to the sample labels of the ranking samples and the labels to be compared.
Here, the ranking model may be a model for performing a ranking task that is built based on machine learning means. The specific way of executing the sorting task through the sorting model is that after the sorting samples are scored through the sorting model, tags to be compared are determined according to the obtained rendering scores, and the tags to be compared represent a sorting result, namely the size relationship between the rendering scores of the two sample geographic elements corresponding to the sorting samples is represented. And then updating the sequencing model according to the sample label of the sequencing sample and the label to be compared.
In some embodiments, the above-mentioned updating of the ranking model according to the sample labels and the labels to be compared of the ranked samples can be implemented in such a way that: according to the loss function of the sequencing model, measuring the difference between the sample label of the sequencing sample and the label to be compared to obtain a second loss value; and performing back propagation in the sequencing model according to the second loss value, and updating the weight parameter of the sequencing model in the process of back propagation.
Likewise, the ordering model may also be updated using a mechanism of back propagation. Specifically, according to the loss function of the ranking model, the difference between the sample label of the ranking sample and the label to be compared is measured to obtain a second loss value. And performing backward propagation in the ranking model according to the obtained second loss value, and updating the weight parameters of each layer of the ranking model along the gradient descending direction in the backward propagation process, wherein the loss function of the ranking model can be a cross entropy loss function or other types of loss functions. By the mode, the effect of updating the model is improved.
In some embodiments, between any of the steps, the electronic map rendering method further comprises: obtaining an area where the sample geographic elements belong to a set planning level; dividing a plurality of sample geographic elements into corresponding sets according to the areas; wherein each set corresponds to a region; filtering the sample geographic elements in the set so as to update the hierarchical model and the sequencing model according to the filtered sample geographic elements in the set; and the updated hierarchical model and the updated ranking model are used for predicting the geographic elements of the region corresponding to the set.
In the real world, different rendering characteristics may exist in different areas of the electronic map, for example, the catering industry in city a is developed, and in the electronic map in city a, the rendering priority of the geographical elements of the catering type is higher, that is, the sample rendering weight is generally larger; in the electronic map of city B, the rendering priority of the park-type geographic element is higher. Therefore, in the embodiment of the invention, the rendering model can be trained separately aiming at different areas. Specifically, the area where the sample geographic element is located and belonging to the set planning level is obtained from the information of the sample geographic element, and the set planning level may be set according to an actual application scenario, such as a county level or a city level. And respectively dividing the sample geographic elements into corresponding sets according to the areas, wherein each set only corresponds to one area with a set planning level. And for each set, filtering the sample geographic elements in the set to filter out the sample geographic elements with special rendering requirements.
And updating the rendering model according to the filtered sample geographic elements in the set, wherein the process of updating the model is not repeated. The process of updating the rendering models according to the different sets is independent from each other, so that for each set, a corresponding rendering model can be obtained, and the rendering model is used for predicting the geographic elements of the area corresponding to the set to obtain a rendering level and a rendering score. By the method, pertinence to different areas is improved, and subsequent rendering effect is enhanced.
In some embodiments, the filtering process for the sample geographic elements in the set described above may be implemented in a manner that: a manner of performing at least one of the following filtering processes: removing sample geographic elements of which the element types conform to the set types from the set; removing sample geographic elements of which the current states accord with the set states from the set; sample geographic elements that are white listed are removed from the set.
The embodiment of the invention provides three filtering treatment modes. The first way is to remove the sample geographic elements whose element types meet the set types, where the set types include but are not limited to public toilets, parking lots, overpasses, and other types with explicit rendering requirements, i.e. the set types that need to be displayed in the electronic map, and the set types may also include traffic types such as bus stations and subway stations. The second way is to remove the sample geographic elements in the set whose current state meets a set state, such as the sample geographic elements having a confidence level below a confidence threshold, or the sample geographic elements being in a shutdown or closed state. The third way is to remove the sample geographic elements in the white list from the set, and the white list may include geographic elements that are city landmarks, and may also include geographic elements with special display forms, such as stadiums with special display forms. According to the actual application scene, at least one of the three manners can be selected to filter the sample geographic elements, and the sample geographic elements with rendering rules not meeting the commonalities of most geographic elements are removed.
In some embodiments, after step 201, further comprising: dividing a data set comprising feature vectors of a plurality of sample geographic elements, sample rendering levels and sample rendering weights into a training set and a verification set; traversing multiple groups of hyper-parameters of the rendering model, updating the rendering model with the traversed hyper-parameters through a training set, and determining model indexes of the updated rendering model through a verification set; and determining the hyper-parameters corresponding to the model indexes meeting the index conditions as optimal hyper-parameters, and updating the rendering model deploying the optimal hyper-parameters according to the data set.
Here, the feature vector, the sample rendering level, and the sample rendering weight of each obtained sample geographic element are used together as a sample, all the obtained samples are added to a data set, and the data set is divided into a training set and a verification set, where the division ratio is not limited in the embodiment of the present invention, for example, the number of samples included in the training set: the validation set includes 7 samples: 3. and then traversing multiple groups of hyper-parameters of the rendering model, wherein the hyper-parameters refer to parameters which are set before the rendering model is trained, such as the iteration number of the rendering model, the number of network layers of the layered model and the like, different from the weight parameters. Deploying the traversed hyper-parameters to an original rendering model, updating weight parameters of the deployed rendering model through a training set, and determining model indexes of the updated rendering model through a verification set, wherein the types of the model indexes include but are not limited to accuracy, recall rate and F1 score, and the F1 score is a harmonic mean of the accuracy and the recall rate. And determining a group of hyper-parameters corresponding to the model indexes meeting the index conditions as optimal hyper-parameters, for example, determining a group of hyper-parameters with the highest model indexes as optimal hyper-parameters. And then deploying the optimal hyper-parameter to the original rendering model, and updating the weight parameter of the deployed rendering model according to the data set. By the method, a group of super-parameters with the best effect can be determined, and the subsequent training effect of the rendering model is convenient to promote.
In fig. 4B, the step 101 shown in fig. 4A may be updated to step 205, and in step 205, the feature vector of the geographic element in the electronic map is subjected to prediction processing through the hierarchical model to determine, from a plurality of rendering levels of the electronic map, a rendering level associated with the geographic element.
For example, referring to fig. 3, in the prediction module 2431, after the update of the rendering model is completed, the feature vector of the geographic element in the electronic map is subjected to prediction processing through the updated hierarchical model, and the rendering level associated with the geographic element is determined according to the prediction result.
In fig. 4B, the step 102 shown in fig. 4A may be updated to step 206, and in step 206, the feature vectors of all the geographic elements associated to the same rendering level are scored through the ranking model, so as to obtain a rendering score of each geographic element associated to the same rendering level.
As an example, referring to fig. 3, in the scoring module 2432, feature vectors of all geographic elements associated to the same rendering level are input into the updated ranking model, and a rendering score obtained by the ranking model in executing the ranking task is obtained.
As can be seen from the above exemplary implementation of fig. 4B in the embodiment of the present invention, the multilayer computing framework in the embodiment of the present invention converts the conventional single-target computing method into a multi-step and multi-target computing method, so that the complexity of the rendering model can be greatly reduced, the generalization capability of the rendering model can be improved, and the flexibility and stability of the rendering model can be greatly improved.
The following describes a process of implementing the artificial intelligence based electronic map rendering method by the embedded artificial intelligence based electronic map rendering apparatus 455 in the electronic device, in conjunction with the exemplary application and structure of the electronic device described above.
Referring to fig. 5, fig. 5 is a schematic flowchart of an electronic map rendering method based on artificial intelligence according to an embodiment of the present invention, and for convenience of understanding, an electronic device is taken as a terminal device for example, and the steps shown in fig. 5 are described in detail.
In step 301, an electronic map interface is loaded in response to an electronic map viewing operation.
Here, the terminal device is installed with an electronic map client in which the terminal device loads an electronic map interface when an electronic map viewing operation is detected. The electronic map viewing operation includes, but is not limited to, an operation of opening an electronic map client and an operation of searching for a map of a place in the electronic map client.
In step 302, sequentially rendering the geographic elements related to the hierarchy to be rendered in the electronic map interface according to the descending order of the rendering weight of each geographic element in the electronic map; the rendering weight is obtained by fusing the rendering level and the rendering score of the geographic element; the level to be rendered is a rendering level matched with the current scale of the electronic map in a plurality of rendering levels of the electronic map; rendering levels and rendering scores of all geographic elements in the electronic map are obtained based on artificial intelligence model prediction.
In a loaded electronic map interface, determining a plurality of geographic elements related to the electronic map and a current scale of the electronic map, and rendering the geographic elements related to a to-be-rendered hierarchy in sequence according to a descending order of rendering weight of each geographic element to obtain a rendered electronic map, wherein the to-be-rendered hierarchy is a rendering hierarchy matched with the current scale of the electronic map, and the matching can mean a rendering hierarchy larger than the corresponding rendering hierarchy of the current scale. It should be noted that the terminal device may predict each geographic element by calling an artificial intelligence model in a file system of a local storage, a database, or a server, to obtain a rendering level and a rendering score of each geographic element, where the prediction process may be performed in advance, and the rendering weight obtained by fusing the rendering level and the rendering score may be stored locally, or may be performed in real time when the electronic map viewing operation is obtained. Additionally, the artificial intelligence model can be the rendering model above.
The electronic map presented in the electronic map interface may be unchanged, i.e. static, after rendering, or may be dynamically changed according to an adjustment operation, which includes, but is not limited to, an operation of adjusting a scale of the electronic map in the electronic map client and an operation of moving the electronic map. For the dynamic change situation, after each electronic map is changed, the rendering of the geographic elements can be performed again according to the rendering weights of the multiple geographic elements related to the changed electronic map, so that the electronic map can be updated in real time.
As can be seen from the above exemplary implementation of fig. 5, in the embodiment of the present invention, the rendering of the geographic elements is performed by integrating the rendering levels and the rendering scores, so that the rendering efficiency and precision are improved, and the guidance capability of the electronic map finally presented in the electronic map interface can be enhanced.
In the following, an exemplary application of the embodiments of the present invention in a practical application scenario will be described. The electronic equipment provided by the embodiment of the invention can be terminal equipment, and the rendering of the electronic map is realized locally by calling the locally stored layering model and the sequencing model; or the electronic map rendering system can be deployed in a cloud server, and remote electronic map rendering is realized by calling the hierarchical model and the sequencing model stored in the file system.
An architecture diagram of electronic map rendering as shown in fig. 6 is provided in the embodiment of the present invention, and relates to a hierarchical model and a ranking model, in fig. 6, a solid arrow represents a model training phase, and a dashed arrow represents a model application phase, for convenience of understanding, the following description is given by way of example in the case of using a geographic element as a POI.
The original data shown in fig. 6 includes spatial coordinate information and structured attribute information of a plurality of POIs, and an object of the embodiment of the present invention is to calculate rendering weight corresponding to each POI according to the original data, and further determine a POI to be rendered preferentially according to the rendering weight when there is a position conflict in rendering a base map, where the base map refers to a map displayed at the bottommost layer in an electronic map, and includes a series of visualizations reflecting geographic elements in the real world, such as a background map, a road, and a POI. The algorithm flow for calculating the rendering weight is described here in the form of steps:
1) original information of the POI is converted into a feature vector with a fixed format through feature engineering, and the adopted mode comprises feature extraction, discretization processing and feature combination.
Feature extraction refers to analyzing existing POI information to obtain valuable features therefrom. The features extracted in the embodiment of the present invention include two types, namely, attribute features and spatial features, the attribute features are extracted from attribute information of the POI, and include a type (corresponding to an element type above) of the POI, a heat degree, a name length, whether a relationship principal point (corresponding to a main geographic element above) exists, a type of the relationship principal point, the heat degree of the relationship principal point, and the like, the spatial features are a set of features extracted by associating the spatial information of the POI and other types of element geographic elements (such as a road, a background surface, and the like), and include an area of an area surface, an internal marker, a built-up area marker, a density of the POI in a grid, and the like, wherein the association extraction corresponds to data association in fig. 6.
The discretization processing is to convert part of continuous features in the extracted features into discrete features, for example, the continuous features such as heat degree and name length are divided according to a specific interval. For example, if the range of the heat value is 0 to 1000, an interval may be set every 100, and the original continuous feature is converted into a discrete feature with 10 corresponding interval ranges, and for a POI, the heat value of the POI necessarily falls into one of the intervals, and then the value corresponding to the interval is recorded as 1, and the values corresponding to the remaining intervals are recorded as 0. For example, if the original value of the heat degree is 50, the feature value of the discretized feature obtained after the discretization process is 1000000000.
The feature combination refers to combining some independent features into a new feature, and the type feature and the mark type can be combined in the embodiment of the present invention, for example, the calculation formula of the feature "village in town" is:
Fcity-village=Fvillage×Fbuilt
i.e. when the POI is of village type (F)village1) and is also located in the built-up area (F)built1), the city village flag F of the POIcity-villageHas a characteristic value of 1, in the remaining cases, Fcity-villageHas a characteristic value of 0. And after the feature extraction, the discretization processing and the feature combination are completed, splicing the obtained features into a feature vector with a fixed format.
It should be noted that, in addition to the above manner of artificially constructing the features, in the embodiment of the present invention, a self-learning manner may be applied to obtain the features of the POI, and one manner is to learn the features of the POI by using a Deep Neural Network (DNN) model, for example, using a Wide & Deep model to extract shallow features and Deep features from the information of the POI at the same time; one method is that for the information of the POI, such as the name and the address, which relates to the text, word embedding processing is carried out based on the word vector technology, and the semantic features are excavated; yet another approach is to mine features on the local geographic space associated with the POI through methods such as convolutional neural network models.
2) Characterizing POIThe vector is input into the hierarchical model, and the rendering level of the POI is calculated through the hierarchical model. In the embodiment of the invention, the target of judging the display importance (rendering weight) of the POI is abstracted into two targets of judging a reasonable rendering level and a rendering score of the POI, wherein the level of the rendering weight can be divided into 10 rendering levels which are 1-10 respectively. And after prediction processing is carried out through the hierarchical model, a rendering hierarchy associated with the POI is obtained, the higher the rendering hierarchy is, the higher the level of the corresponding rendering weight is, the POI associated with the same rendering hierarchy is regarded as the same group in the step, and the level of the rendering weight does not need to be distinguished. For example, there are A, B, C three POIs, and after prediction processing is performed on feature vectors A, B and C by a hierarchical model, the following rendering levels are obtained: levelA=2,LevelB=2,LevelCThen it can be determined that a and B are both lower in rank of rendering weight than C, and a and B have the same rank of rendering weight, at which step a and B are grouped into the same group. Step 2) is equivalent to roughly dividing the rendering weight of the POI.
3) Inputting the feature vectors of the POIs in the same group in the step 2) into a sorting model, and after sorting processing is carried out through the sorting model, obtaining a numerical score corresponding to each POI in the same group, namely a rendering score. The higher the rendering score, the higher the rendering weight of the POI in the associated rendering hierarchy, and for the convenience of subsequent calculation, the rendering scores of the POIs in the same group may be scaled (i.e. normalized) to a set score interval, such as 0-2000. Taking A, B and C as an example in step 2), after the rendering level associated with each of the three POIs is obtained in step 2), it can be determined that a and B belong to the same group and C belongs to the other group. The two groups of data are respectively subjected to sequencing processing of a sequencing model, and the obtained rendering scores are subjected to equal-scale scaling to obtain
ScoreA=212.23,ScoreB=1302.12,ScoreC=143.37
The scaled rendering scores are represented in a group consisting of A and B, with A having a lower rendering weight than B, and C having a lower rendering score than both A and B, but due to LevelCGreater than LevelAAnd LevelBSo C is still weighted higher than a and B. It is worth mentioning that the above LevelARepresents the rendering level of A, ScoreAThe rendering score of a is represented, and so on.
4) And finely adjusting the rendering hierarchy and the rendering score of the POI according to a set rule. Here, strong constraints are formed using some set rules, including but not limited to a main sub-relationship (corresponding to the above main sub-relationship), name length, and white list, so as to avoid logically unreasonable or erroneous rendering levels and rendering scores of POIs. The main sub-relationship rule refers to that for two POIs, if the two POIs have a logical main sub-relationship, after the rendering hierarchy and the rendering score of the two POIs are obtained in step 3), whether the following rules are met is judged:
(Levelparent>Levelchild)||((Levelparent=Levelchild)&&(Scoreparent>Scorechild))
wherein parent refers to the main POI in the main-sub relationship, child refers to the sub-pioi in the main-sub relationship, and one main POI usually corresponds to multiple sub-POIs. And if the main sub-relation rule is not met, adjusting the rendering hierarchy and the rendering score of the sub-POI. The adjustment mode of the comprehensive main and sub-relation rules is as follows:
firstly, determining a rendering weight threshold MaxSubRank of the sub-POI, wherein the calculation formula is MaxSubRank ═ (Level)parent-1)*2000+Scoreparent。
② calculating rendering weight Rank of sub POIchild=Levelchild×2000+ScorechildRendering weight is made to exceed a rendering weight threshold, i.e. Rankchildsub-POIs > MaxSubRank are added to set D.
Thirdly, updating the rendering levels of all the sub POI in the set D into Levelparent-1。
Determining the maximum rendering weight Rank in the rendering weights of all the sub POIs in the set DmaxAnd a minimum rendering weight Rankmin。
Updating the rendering score of each child POI in the set D as follows:
to summarize, the rendered Level of the child POI that does not comply with the primary sub-relationship rule is updated to Levelparent-1 and scaling the rendering scores of the sub-POIs to 2000-Score in order of the calculated rendering weightsparentIn this way, it is ensured that the rendering weights of all the sub-POIs are lower than that of the main POI, and the original rendering weight sequence of the plurality of sub-POIs is maintained.
The name length rule is to determine whether the rendering Level is smaller than a set Level threshold when the name length is larger than the set length threshold, for example, the name length rule may be "if NameLen > 14 the Level ≦ 4", where NameLen is the name length. And if a certain POI does not accord with the name length rule, updating the rendering level of the POI to be 4.
The white list rule refers to that for some special POI, rendering level and rendering score are set artificially to ensure absolute accuracy of rendering weight. For example, for a urban landmark POI, a higher rendering level and rendering score are set artificially to ensure that it can be rendered into the base map.
5) And calculating the final rendering weight, namely a Rank value, of each POI by using a formula Rank which is Level multiplied by 2000+ Score according to the rendering Level and the rendering Score obtained in the previous step.
The algorithm flow involves a hierarchical model and a sequencing model, and the model needs to be trained before application. In a rendering weight calculation mode provided by the related art, a final rendering weight is directly obtained from original data, and a corresponding training method is also single-target training, which has the main problems that in order to obtain a good effect on a training set, high model complexity is often required, so that model overfitting is easily caused, further a good function cannot be achieved on a real application scene, and the calculated rendering weight is inaccurate. In the current application scenario, the number of POIs is quite large, and the available feature dimensions are limited, so in the embodiment of the present invention, two models, namely, a hierarchical model and a ranking model, are trained to respectively correspond to two tasks, namely, hierarchy prediction and ranking, and the overall training process is shown in fig. 7. For ease of understanding, the training flow shown in FIG. 7 is illustrated in the form of steps:
1) and preprocessing POI raw data comprising a plurality of POI information. The method comprises the steps of firstly dividing POI original data into different sets according to cities, enabling each set to correspond to one city, and then filtering data of each set according to set filtering rules to obtain an initial data set. As shown in fig. 8, the first way is to remove POIs whose types conform to the set types from the set, where the set types include but are not limited to types with explicit rendering requirements such as public toilets, parking lots, and overpasses, and may also include traffic types such as bus stations, subway entrances and exits, airports, and train stations. The second way is to remove POIs whose exigencies correspond to the set state in the set, such as POIs whose credibility is below the credibility threshold, and POIs in a shutdown or closed state, wherein the exigencies correspond to the above current state. A third way is to remove POIs in the white list in the set, i.e. remove special points, such as removing POIs of urban landmarks, and also, for example, remove POIs with special display modalities. Because the filtered POI has special rendering requirements, the display strategy can be artificially determined, so that the POI does not need to be put into a data set to participate in model training, and if the POI is put into the data set to participate in model training, the actual effect of the model is influenced.
2) And (5) characteristic engineering. The information of each POI in the data set is converted into a feature vector in a fixed form, and the conversion mode is the same as that in step 1) of the algorithm process, which is not described herein again.
3) And training the layered model. The hierarchical model aims to associate POI to one of ten rendering levels of 1-10, and the higher the rendering level is, the higher the corresponding rendering weight is. In the embodiment of the invention, a multi-classification XGboost model with the prediction category number of 10 can be trained, and the specific method is as follows:
first, a data set for multi-classification is further constructed on the basis of the data sets obtained in step 1) and step 2). After the step 2), the feature vector of the POI is obtained, so that a target label corresponding to the POI is determined here, and the target label corresponds to the above sample rendering level. In the embodiment of the invention, the sample rendering weight of the POI can be calculated according to a rule-based mode provided by the related technology, and the target label corresponding to the POI can be obtained by combining the primary display scale of the POI, wherein the target label is one numerical value of 1-10. The initial display scale is a scale at which base maps are rendered sequentially from small to large according to the scale, and the POI is displayed at the beginning.
And secondly, setting the task of the XGboost model to be multi, namely setting the target of the model to be multi-classification, and taking a softmax function as a classification function.
And thirdly, splitting the data set for multi-classification obtained in the step one into a training set and a verification set, thereby determining the optimal hyper-parameter in a plurality of groups of hyper-parameters of the X GBoost model.
And fourthly, deploying the optimal hyper-parameters to the XGboost model, training the XGboost model through the data set used for multi-classification in the step one, and obtaining a final layered model after convergence.
4) And training a sequencing model. The ranking model aims to perform scoring processing on the feature vectors of the POIs which belong to the same rendering level after being predicted by the layering model, and then the rendering score of each POI in the rendering level is obtained. In the embodiment of the invention, an XGboost model based on a PairWise algorithm can be trained, which specifically comprises the following steps:
on the basis of the data sets obtained in the steps 1) and 2), third-party data and artificial marking data are fused, and a Pairwise data set is further constructed, wherein the Pairwise data set is a POI pair data set, the third-party data and the artificial marking data comprise information of a plurality of POIs (different from the POIs in the original data), and sample rendering weights of the POIs can be obtained according to the information, but the sample rendering levels are not required to be obtained according to the sample rendering weights of the POIs. Specifically, the POI in the Pairwise dataset is doubledTwo are combined to obtain<POI1,POI2>If POI1Sample rendering weight greater than POI2Then will be<POI1,POI2>The target tag of (1); if POI1Sample rendering weight of less than or equal to POI2Then will be<POI1,POI2>Is marked as 0, where the target label corresponds to the sample label above. In addition, there is another method of setting target tags, in which two target tags are set in a pair of POIs, the target tag of the POI with higher sample rendering weight is set to 1, and the target tag of the POI with lower sample rendering weight is set to 0, for example, if<POI1,POI2>Middle POI1Sample rendering weight greater than POI2Then the POI1The object tag of (1) represents a POI2Is marked as 0. Any one of the two label setting modes or other available label setting modes can be selected according to the actual application scene. It should be noted that when two POIs in the Pairwise dataset are combined, completely random combination can be performed, and for a plurality of POIs indicating a sample rendering hierarchy, a plurality of POIs associated with the same sample rendering hierarchy can be combined randomly in pairs.
And secondly, setting the task of the XGboost model as rank, namely setting the model target as sequencing, and calculating the predicted loss value between the label and the target label through a loss function.
And thirdly, splitting the Pairwise data set obtained in the step one into a training set and a verification set, thereby determining the optimal hyper-parameter of the model.
Deploying the optimal hyper-parameters to the XGboost model, training the XGboost model through the Pairwise data set in the step I, and obtaining a final sequencing model after convergence.
It should be noted that, in the embodiment of the present invention, specific types of the hierarchical model and the ranking model are not limited, and besides the XGBoost model, a light Gradient Boosting Machine (LightGBM) model or other models that can achieve the same effect may be used.
After training of the hierarchical model and the ranking model is completed, the hierarchical model and the ranking model can be deployed to a terminal device or a server, and an online service of rendering a base map is provided according to an algorithm flow. The specific process of rendering the base map is as follows:
1) and acquiring information of a plurality of POIs in the base map presentation range.
2) The information of the POI is converted into a feature vector of a fixed format, i.e., a prediction sample as shown in fig. 5.
3) And taking the feature vector of the POI as input, sequentially passing through the layering model and the sequencing model, and calculating a rendering hierarchy associated with the POI and a rendering score of the POI.
4) And fine-tuning the rendering hierarchy and the rendering score of the POI by using the set rule.
5) Using the formula Rank ═ Level × 2000+ Score, a final rendering weight for each POI is calculated, and rendering of the POI is performed according to the rendering weight. It should be noted that, during rendering, the rendering Level corresponding to the current scale of the base map is determined firstscaleAnd screening out rendering levels larger than Level from a plurality of POIsscaleThe POI of (1). And then, sequentially rendering the corresponding POIs to the base map according to the descending order of the rendering weight for the screened POIs, and in the process, if the rendering area of the POI to be rendered has rendered geographic elements, namely the rendering area has conflicts, ignoring the POI to be rendered, so that the more important POI can be guaranteed to be rendered preferentially, and reasonable avoidance is realized.
According to the embodiment of the invention, a machine learning method is used for replacing a traditional pure rule method, the calculation mode of POI rendering weight can be independently learned, and the cost of manual maintenance can be greatly reduced on the premise of not losing the effect; by introducing a multilayer computing frame, the traditional single-target computing method is converted into a multi-step multi-target computing method, so that the complexity of the model can be greatly reduced, the generalization capability of the model can be improved, and the flexibility and the stability of the model can be greatly improved; different from the traditional method that a single model calculation framework only uses one set of characteristics and data, the embodiment of the invention divides the target, combines the hierarchical model and the sequencing model to calculate the rendering weight, and further can use the optimization methods of different characteristics and different data sets to further improve the accuracy of the model.
In order to facilitate understanding of the rendering effect of the embodiment of the present invention, the embodiment of the present invention provides a schematic diagram of a rendered electronic map (base map) as shown in fig. 9A, which may be an electronic map interface obtained after a user located in x city triggers a mobile version of an electronic map Application (APP) on a mobile terminal device, where the electronic map interface shows an electronic map of x city, and the rendered POIs in the electronic map include an a zoo, an a park, a west station of x city and a south station of x city, where the electronic map APP corresponds to an electronic map client above. In addition to this, the current location of the user is also presented in the electronic map.
The embodiment of the present invention further provides a schematic diagram of the rendered electronic map as shown in fig. 9B, which may be an electronic map interface obtained after a user in x city triggers an option of sending a location in an instant messaging APP. Compared with fig. 9A, the current scale of the electronic map in the electronic map interface shown in fig. 9B is smaller, and the rendering levels of the zoo a and the park a in fig. 9A do not exceed the rendering level corresponding to the current scale of fig. 9B, so that neither is presented in the electronic map of fig. 9B. In addition to this, the current location of the user, and POIs near the current location, are also presented in the electronic map of fig. 9B.
The embodiment of the present invention further provides a schematic diagram of the rendered electronic map as shown in fig. 9C, which may be an electronic map interface obtained after a user triggers a webpage version of an electronic map Application (APP) on a terminal device such as a notebook computer and searches for x city. The current scale of the electronic map in fig. 9C is smaller than that in fig. 9A, but larger than that in fig. 9B, the rendering level of the zoo a in fig. 9A exceeds the rendering level corresponding to the current scale in fig. 9C, so that the rendered rendering is presented in the electronic map in fig. 9C; the rendering level of a park in fig. 9A does not exceed the rendering level corresponding to the current scale of fig. 9C, and is therefore not presented in the electronic map of fig. 9C. In addition, since the POI of the traffic type has a requirement of priority display, a higher rendering level and a higher rendering score are set artificially, so that the x city west station and the x city south station are presented in fig. 9A, 9B, and 9C. The POI is rendered by combining the current scale of the electronic map, so that the rendered electronic map is the important POI in the real world, the guiding capability of the electronic map is enhanced, and a user can check and position the electronic map more intuitively.
Continuing with the exemplary structure of the artificial intelligence based electronic map rendering apparatus 243 provided by the embodiment of the present invention implemented as a software module, in some embodiments, as shown in fig. 2A, the software module stored in the artificial intelligence based electronic map rendering apparatus 243 of the memory 240 may include: a prediction module 2431, configured to perform prediction processing based on a feature vector of a geographic element in an electronic map to determine, among multiple rendering levels of the electronic map, a rendering level associated with the geographic element; the scoring module 2432 is configured to perform scoring processing on the geographic elements associated with the same rendering level in the electronic map according to the corresponding feature vectors to obtain rendering scores; the fusion module 2433 is configured to fuse the rendering score of the geographic element with the rendering level associated with the geographic element to obtain a rendering weight; a rendering module 2434, configured to sequentially render the geographic elements associated with the hierarchy to be rendered according to a descending order of the rendering weights; and the level to be rendered is a rendering level matched with the current scale of the electronic map in the rendering levels.
In some embodiments, the artificial intelligence based electronic map rendering device 243 further includes: the scaling module is used for carrying out equal-scale scaling processing on the rendering scores of the geographic elements according to the set scoring interval to obtain updated rendering scores;
a fusion module 2433 further configured to: performing product processing on the rendering level associated with the geographic element and the maximum value of the set scoring interval; and adding the product processing result and the updated rendering score of the geographic element to obtain the rendering weight of the geographic element.
In some embodiments, the artificial intelligence based electronic map rendering device 243 further includes: the relation acquisition module is used for acquiring the master-slave relation between the geographic elements in the electronic map; wherein, the master-slave relationship is used for representing that the slave geographic element belongs to the master geographic element; and the adjusting module is used for adjusting the rendering scores of the slave geographic elements and the associated rendering levels when the rendering level associated with the master geographic element is smaller than the rendering level associated with the slave geographic elements or the rendering score of the master geographic element is smaller than or equal to the rendering score of the slave geographic elements associated to the same rendering level, so that the rendering weight of the slave geographic elements after the adjustment processing is smaller than the rendering weight of the master geographic element.
In some embodiments, the artificial intelligence based electronic map rendering device 243 further includes: the length obtaining module is used for obtaining the name length of the geographic element; and the level updating module is used for updating the rendering level associated with the geographic element to the level threshold when the length of the name exceeds the length threshold and the rendering level associated with the geographic element exceeds the level threshold.
In some embodiments, the artificial intelligence based electronic map rendering device 243 further includes: and the white list acquisition module is used for acquiring the rendering level associated with the geographic element and the rendering score of the geographic element from the white list when the geographic element in the electronic map is positioned in the white list.
In some embodiments, the artificial intelligence based electronic map rendering device 243 further includes: and the ignoring module is used for ignoring the geographic elements to be rendered if the rendered geographic elements exist in the rendering area of the geographic elements to be rendered when the geographic elements associated to the hierarchy to be rendered are rendered in sequence.
In some embodiments, prediction module 2431 is further configured to: performing prediction processing on the feature vector of the geographic element in the electronic map through a layered model in the rendering model so as to determine a rendering level associated with the geographic element in a plurality of rendering levels of the electronic map;
a scoring module 2432 further for: and scoring the feature vectors of all the geographic elements associated to the same rendering level through a sequencing model in the rendering model to obtain a rendering score of each geographic element associated to the same rendering level.
In some embodiments, the artificial intelligence based electronic map rendering device 243 further includes: the sample obtaining module is used for obtaining feature vectors, sample rendering levels and sample rendering weights of a plurality of sample geographic elements; the hierarchical module updating module is used for predicting the characteristic vector of the sample geographic element through the hierarchical model to obtain a rendering level to be compared and updating the hierarchical model according to the sample rendering level of the sample geographic element and the rendering level to be compared; the sequencing sample construction module is used for constructing a sequencing sample according to the characteristic vectors of any two sample geographic elements and determining a sample label of the sequencing sample; the sample label is used for representing the size relation between sample rendering weights of two sample geographic elements; and the sequencing model updating module is used for grading the sequencing samples through the sequencing model, determining labels to be compared according to the obtained rendering grades, and updating the sequencing model according to the sample labels of the sequencing samples and the labels to be compared.
In some embodiments, the hierarchy module updates the module to further: according to a loss function of the hierarchical model, measuring and processing the difference between a sample rendering level of a sample geographic element and a rendering level to be compared to obtain a first loss value; and performing back propagation in the hierarchical model according to the first loss value, and updating the weight parameters of the hierarchical model in the process of back propagation.
In some embodiments, the order model update module is further configured to: according to the loss function of the sequencing model, measuring the difference between the sample label of the sequencing sample and the label to be compared to obtain a second loss value; and performing back propagation in the sequencing model according to the second loss value, and updating the weight parameter of the sequencing model in the process of back propagation.
In some embodiments, the artificial intelligence based electronic map rendering device 243 further includes: the area acquisition module is used for acquiring an area where the sample geographic elements belong and belong to a set planning level; the dividing module is used for dividing the plurality of sample geographic elements into corresponding sets according to the areas; wherein each set corresponds to a region; the filtering module is used for filtering the sample geographic elements in the set so as to update the layering model and the sequencing model according to the filtered sample geographic elements in the set; and the updated hierarchical model and the updated ranking model are used for predicting the geographic elements of the region corresponding to the set.
In some embodiments, the filtering module is further configured to: a manner of performing at least one of the following filtering processes: removing sample geographic elements of which the element types conform to the set types from the set; removing sample geographic elements of which the current states accord with the set states from the set; sample geographic elements that are white listed are removed from the set.
Continuing with the exemplary structure in which the artificial intelligence based electronic map rendering apparatus 455 provided by the embodiments of the present invention is implemented as software modules, in some embodiments, as shown in fig. 2B, the software modules stored in the artificial intelligence based electronic map rendering apparatus 455 of the memory 450 may include: a loading module 4551, configured to load an electronic map interface in response to an electronic map viewing operation; the in-interface rendering module 4552 is configured to sequentially render, in the electronic map interface, the geographic elements associated with the hierarchy to be rendered according to the descending order of the rendering weights of the geographic elements in the electronic map; the rendering weight is obtained by fusing the rendering level and the rendering score of the geographic element; the level to be rendered is a rendering level matched with the current scale of the electronic map in a plurality of rendering levels of the electronic map; rendering levels and rendering scores of all geographic elements in the electronic map are obtained based on artificial intelligence model prediction.
Embodiments of the present invention provide a computer-readable storage medium storing executable instructions, which when executed by a processor, cause the processor to perform a method provided by embodiments of the present invention, for example, an artificial intelligence based electronic map rendering method as shown in fig. 4A or 4B, or an artificial intelligence based electronic map rendering method as shown in fig. 5. Note that the computer includes various computing devices including a terminal device and a server.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (H TML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
In summary, the following technical effects can be achieved by the embodiments of the present invention:
1) the machine learning method replaces the traditional pure rule method, the calculation mode of the geographic element rendering weight can be independently learned, and the cost of manual maintenance can be greatly reduced on the premise of not losing the calculation precision.
2) By introducing a multilayer computing framework, the traditional single-target computing method is converted into a multi-step multi-target computing method, the complexity of a rendering model can be greatly reduced, the generalization capability of the rendering model is improved, the flexibility and the stability of the rendering model can be greatly improved, the obtained rendering weight is more accurate, and the guiding capability of the rendered electronic map is enhanced.
3) By constructing a calculation framework comprising a layering model and a sequencing model, the accuracy of the rendering model can be further improved by using an optimization method of different data sets with different characteristics.
4) By dividing the data set into a training set and a verification set, the hyper-parameters with the best effect can be determined from multiple groups of hyper-parameters of the rendering model, and the model training effect is improved.
5) By setting the main sub-relation rule, the name length rule and the white list rule, the rendering level and the rendering score of the geographic element are finely adjusted, so that the rendering level and the rendering score are more consistent with the actual situation, and the accuracy of the finally obtained rendering weight is further improved.
6) The corresponding rendering models are trained independently aiming at different regions, so that the trained rendering models are more in line with the geographic element rendering characteristics of the corresponding regions, and the pertinence to the different regions is improved.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.
Claims (15)
1. An electronic map rendering method based on artificial intelligence is characterized by comprising the following steps:
performing prediction processing based on a feature vector of a geographic element in an electronic map to determine a rendering level associated with the geographic element among a plurality of rendering levels of the electronic map; wherein different rendering levels correspond to different scales in the electronic map, and the scales are ratios of the length of a line segment in the electronic map to the actual length of a corresponding line segment in the real world;
grading the geographic elements related to the same rendering level in the electronic map according to the corresponding feature vectors to obtain rendering grades; wherein the rendering score characterizes an importance of the geographic element within the associated rendering tier;
fusing the rendering scores of the geographic elements with the rendering levels associated with the geographic elements to obtain rendering weights;
sequentially rendering the geographic elements related to the hierarchy to be rendered according to the descending order of the rendering weight;
wherein the level to be rendered is a rendering level of the plurality of rendering levels that matches a current scale of the electronic map.
2. The electronic map rendering method of claim 1,
before the fusing the rendering score of the geographic element with the rendering level associated with the geographic element to obtain the rendering weight, the method further includes:
carrying out equal-scale scaling processing on the rendering scores of the geographic elements according to a set score interval to obtain updated rendering scores;
the fusing the rendering score of the geographic element with the rendering level associated with the geographic element to obtain the rendering weight includes:
multiplying the rendering level associated with the geographic element by the maximum value of the set scoring interval;
and adding the product processing result and the updated rendering score of the geographic element to obtain the rendering weight of the geographic element.
3. The electronic map rendering method according to claim 1, wherein before fusing the rendering score of the geographic element with the rendering hierarchy associated with the geographic element, the method further comprises:
acquiring a master-slave relationship between geographic elements in the electronic map; wherein the master-slave relationship is used for representing that the slave geographic element belongs to the master geographic element;
when the rendering level associated with the master geographic element is smaller than the rendering level associated with the slave geographic element or the rendering score of the master geographic element is smaller than or equal to the rendering score of the slave geographic element associated to the same rendering level, adjusting the rendering score of the slave geographic element and the associated rendering level to enable the master geographic element to be in a rendering state
The rendering weight of the adjusted slave geographic element is less than the rendering weight of the master geographic element.
4. The electronic map rendering method of claim 1,
before the fusing the rendering score of the geographic element with the rendering level associated with the geographic element to obtain the rendering weight, the method further includes:
acquiring the name length of the geographic element;
when the name length exceeds a length threshold and a rendering level associated with the geographic element exceeds a level threshold, updating the rendering level associated with the geographic element to the level threshold;
the electronic map rendering method further comprises the following steps:
when the geographic elements in the electronic map are in a white list, obtaining rendering levels associated with the geographic elements and rendering scores of the geographic elements from the white list.
5. The electronic map rendering method of any one of claims 1 to 4, further comprising:
when the geographic elements associated with the hierarchy to be rendered are rendered in sequence, if the rendered geographic elements exist in the rendering area of the geographic elements to be rendered, the geographic elements to be rendered are ignored.
6. The electronic map rendering method of any one of claims 1 to 4,
the predicting based on the feature vector of the geographic element in the electronic map to determine the rendering level associated with the geographic element in a plurality of rendering levels of the electronic map comprises:
performing prediction processing on a feature vector of a geographic element in the electronic map through a layered model in a rendering model to determine a rendering level associated with the geographic element in a plurality of rendering levels of the electronic map;
the scoring processing of the geographic elements related to the same rendering level in the electronic map according to the corresponding feature vectors to obtain the rendering score comprises the following steps:
and scoring the feature vectors of all the geographic elements associated to the same rendering level through a sequencing model in the rendering model to obtain a rendering score of each geographic element associated to the same rendering level.
7. The electronic map rendering method of claim 6, further comprising:
obtaining feature vectors, sample rendering levels and sample rendering weights of a plurality of sample geographic elements;
predicting the characteristic vectors of the sample geographic elements through the hierarchical model to obtain rendering levels to be compared, and
updating the hierarchical model according to the sample rendering level of the sample geographic element and the rendering level to be compared;
constructing a sequencing sample according to the feature vectors of any two sample geographic elements, and
determining a sample label for the ordered sample; the sample label is used for representing the size relation between sample rendering weights of two sample geographic elements;
the sequencing samples are graded through the sequencing model, tags to be compared are determined according to the obtained rendering grades, and
and updating the sequencing model according to the sample label of the sequencing sample and the label to be compared.
8. The electronic map rendering method of claim 7,
the updating the hierarchical model according to the sample rendering level of the sample geographic element and the rendering level to be compared comprises:
according to the loss function of the hierarchical model, measuring the difference between the sample rendering level of the sample geographic element and the rendering level to be compared to obtain a first loss value;
carrying out back propagation in the hierarchical model according to the first loss value, and updating a weight parameter of the hierarchical model in the process of back propagation;
the updating the sequencing model according to the sample label of the sequencing sample and the label to be compared comprises the following steps:
according to the loss function of the sequencing model, measuring the difference between the sample label of the sequencing sample and the label to be compared to obtain a second loss value;
and performing back propagation in the sequencing model according to the second loss value, and updating the weight parameter of the sequencing model in the process of back propagation.
9. The electronic map rendering method of claim 7, further comprising:
obtaining an area where the sample geographic element is located and belonging to a set planning level;
respectively dividing the plurality of sample geographic elements into corresponding sets according to the areas; wherein each set corresponds to a region;
filtering the sample geographic elements in the set to
Updating the hierarchical model and the ranking model according to the filtered sample geographic elements in the set;
and the updated hierarchical model and the updated ranking model are used for predicting the geographic elements of the region corresponding to the set.
10. Electronic map rendering method of claim 9, wherein said filtering said sample geographic elements of said set comprises:
a manner of performing at least one of the following filtering processes:
removing the sample geographic elements in the set whose element types conform to a set type;
removing the sample geographic elements in the set whose current states conform to a set state;
removing the sample geographic elements in the white list from the set.
11. An electronic map rendering method based on artificial intelligence is characterized by comprising the following steps:
responding to the viewing operation of the electronic map, and loading an electronic map interface;
sequentially rendering the geographic elements related to the hierarchy to be rendered in the electronic map interface according to the descending order of the rendering weight of each geographic element in the electronic map;
the rendering weight is obtained by fusing the rendering level and the rendering score of the geographic element; the level to be rendered is a rendering level matched with the current scale of the electronic map in a plurality of rendering levels of the electronic map; rendering levels and rendering scores of all geographic elements in the electronic map are obtained based on artificial intelligence model prediction; different rendering levels correspond to different scales in the electronic map, and the scales are ratios of the length of a line segment in the electronic map to the actual length of a corresponding line segment in the real world; the rendering score characterizes an importance of the geographic element within the associated rendering tier.
12. An electronic map rendering apparatus based on artificial intelligence, comprising:
the prediction module is used for performing prediction processing on the basis of a feature vector of a geographic element in an electronic map so as to determine a rendering level associated with the geographic element in a plurality of rendering levels of the electronic map; wherein different rendering levels correspond to different scales in the electronic map, and the scales are ratios of the length of a line segment in the electronic map to the actual length of a corresponding line segment in the real world;
the scoring module is used for scoring the geographic elements related to the same rendering level in the electronic map according to the corresponding feature vectors to obtain rendering scores; wherein the rendering score characterizes an importance of the geographic element within the associated rendering tier;
the fusion module is used for fusing the rendering scores of the geographic elements with the rendering levels associated with the geographic elements to obtain rendering weights;
the rendering module is used for sequentially rendering the geographic elements related to the hierarchy to be rendered according to the descending order of the rendering weight;
wherein the level to be rendered is a rendering level of the plurality of rendering levels that matches a current scale of the electronic map.
13. An electronic map rendering apparatus based on artificial intelligence, comprising:
the loading module is used for responding to the viewing operation of the electronic map and loading the electronic map interface;
the in-interface rendering module is used for sequentially rendering the geographic elements related to the hierarchy to be rendered in the electronic map interface according to the descending order of the rendering weight of each geographic element in the electronic map;
the rendering weight is obtained by fusing the rendering level and the rendering score of the geographic element; the level to be rendered is a rendering level matched with the current scale of the electronic map in a plurality of rendering levels of the electronic map; rendering levels and rendering scores of all geographic elements in the electronic map are obtained based on artificial intelligence model prediction; different rendering levels correspond to different scales in the electronic map, and the scales are ratios of the length of a line segment in the electronic map to the actual length of a corresponding line segment in the real world; the rendering score characterizes an importance of the geographic element within the associated rendering tier.
14. An electronic device, comprising:
a memory for storing executable instructions;
a processor, configured to execute the executable instructions stored in the memory to implement the artificial intelligence based electronic map rendering method according to any one of claims 1 to 10, or the artificial intelligence based electronic map rendering method according to claim 11.
15. A computer-readable storage medium having stored thereon executable instructions for causing a processor to, when executed, implement the artificial intelligence based electronic map rendering method of any one of claims 1 to 10 or the artificial intelligence based electronic map rendering method of claim 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010285113.6A CN111506689B (en) | 2020-04-13 | 2020-04-13 | Electronic map rendering method and device based on artificial intelligence and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010285113.6A CN111506689B (en) | 2020-04-13 | 2020-04-13 | Electronic map rendering method and device based on artificial intelligence and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111506689A CN111506689A (en) | 2020-08-07 |
CN111506689B true CN111506689B (en) | 2022-05-03 |
Family
ID=71875957
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010285113.6A Active CN111506689B (en) | 2020-04-13 | 2020-04-13 | Electronic map rendering method and device based on artificial intelligence and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111506689B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112927357B (en) * | 2021-03-05 | 2022-04-19 | 电子科技大学 | 3D object reconstruction method based on dynamic graph network |
CN113467875A (en) * | 2021-06-29 | 2021-10-01 | 阿波罗智能技术(北京)有限公司 | Training method, prediction method, device, electronic equipment and automatic driving vehicle |
CN117312703A (en) * | 2023-11-08 | 2023-12-29 | 之江实验室 | Map layer data self-adaptive rendering method and device based on Mapbox GL |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104374399A (en) * | 2014-10-31 | 2015-02-25 | 北京搜狗科技发展有限公司 | Method and device for display of navigation information |
CN105701107A (en) * | 2014-11-27 | 2016-06-22 | 高德信息技术有限公司 | Character rendering method of electronic map and character rendering device of electronic map |
US9477649B1 (en) * | 2009-01-05 | 2016-10-25 | Perceptive Pixel, Inc. | Multi-layer telestration on a multi-touch display device |
CN107430627A (en) * | 2015-04-01 | 2017-12-01 | 微软技术许可有限责任公司 | The priority ranking request of map layer |
CN110059151A (en) * | 2019-04-26 | 2019-07-26 | 北京百度网讯科技有限公司 | Map rendering method, map rendering device, map server and storage medium |
CN110647607A (en) * | 2018-12-29 | 2020-01-03 | 北京奇虎科技有限公司 | POI data verification method and device based on picture identification |
CN110928397A (en) * | 2019-11-21 | 2020-03-27 | 腾讯科技(深圳)有限公司 | User interface refreshing method and device, storage medium and electronic device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8803920B2 (en) * | 2011-12-12 | 2014-08-12 | Google Inc. | Pre-fetching map tile data along a route |
US9286021B2 (en) * | 2012-06-22 | 2016-03-15 | Google Inc. | Displaying map layers in order |
RU2678077C2 (en) * | 2017-05-04 | 2019-01-23 | Общество С Ограниченной Ответственностью "Яндекс" | Method for drawing search results on map displayed on electronic device |
-
2020
- 2020-04-13 CN CN202010285113.6A patent/CN111506689B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9477649B1 (en) * | 2009-01-05 | 2016-10-25 | Perceptive Pixel, Inc. | Multi-layer telestration on a multi-touch display device |
CN104374399A (en) * | 2014-10-31 | 2015-02-25 | 北京搜狗科技发展有限公司 | Method and device for display of navigation information |
CN105701107A (en) * | 2014-11-27 | 2016-06-22 | 高德信息技术有限公司 | Character rendering method of electronic map and character rendering device of electronic map |
CN107430627A (en) * | 2015-04-01 | 2017-12-01 | 微软技术许可有限责任公司 | The priority ranking request of map layer |
CN110647607A (en) * | 2018-12-29 | 2020-01-03 | 北京奇虎科技有限公司 | POI data verification method and device based on picture identification |
CN110059151A (en) * | 2019-04-26 | 2019-07-26 | 北京百度网讯科技有限公司 | Map rendering method, map rendering device, map server and storage medium |
CN110928397A (en) * | 2019-11-21 | 2020-03-27 | 腾讯科技(深圳)有限公司 | User interface refreshing method and device, storage medium and electronic device |
Non-Patent Citations (1)
Title |
---|
大数据环境下时空多维数据可视化研究;王瑞松;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160715;I138-1045 * |
Also Published As
Publication number | Publication date |
---|---|
CN111506689A (en) | 2020-08-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111506689B (en) | Electronic map rendering method and device based on artificial intelligence and electronic equipment | |
CN114491773B (en) | Building scheme generation method and device, computer equipment and storage medium | |
CN112329467B (en) | Address recognition method and device, electronic equipment and storage medium | |
Carreno et al. | A cellular automaton approach to spatial electric load forecasting | |
US20210239486A1 (en) | Method and apparatus for predicting destination, electronic device and storage medium | |
CN107679189A (en) | A kind of point of interest update method, device, server and medium | |
Xia et al. | Exploring the effects of partitioned transition rules upon urban growth simulation in a megacity region: A comparative study of cellular automata-based models in the Greater Wuhan Area | |
KR20140015812A (en) | Methodology of gis based automatic schematic diagram creation system for supporting input data generation of 1-dimensional water quality model | |
CN113656647A (en) | Intelligent operation and maintenance oriented engineering archive data management platform, method and system | |
KR20190029264A (en) | Deep learning method deep learning system for categorizing documents | |
CN111143534A (en) | Method and device for extracting brand name based on artificial intelligence and storage medium | |
CN117079148B (en) | Urban functional area identification method, device, equipment and medium | |
CN116167254A (en) | Multidimensional city simulation deduction method and system based on city big data | |
Ma et al. | Research and application of second-hand housing price prediction model based on LSTM | |
Droj | GIS and remote sensing in environmental management | |
CN110781283B (en) | Chain brand word stock generation method and device and electronic equipment | |
Ouyang et al. | MDFF: A method for fine-grained UFZ mapping with multimodal geographic data and deep network | |
Zhang et al. | An improved method for generalisation of point features with consideration of reinforcing relationships | |
CN116911688B (en) | Automatic processing method and system for green building information | |
CN112396268A (en) | Method and device for establishing correction and address selection | |
Atila et al. | Automatic generation of 3D networks in CityGML and design of an intelligent individual evacuation model for building fires within the scope of 3D GIS | |
Wan et al. | Urban Planning and Design Layout Generation Based on Artificial Intelligence | |
Zhang et al. | Inferring socioeconomic environment from built environment characteristics based street view images: An approach of Seq2Seq method | |
US20240111792A1 (en) | Computer Systems and Methods for Identifying Location Entities and Generating a Location Entity Data Taxonomy | |
CN117666382A (en) | Automatic driving simulation test scene data generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40027952 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |