Positioning picture generation method and apparatus, medium, and product

By combining the device's elevation information and road slope information for road matching, the problem of low positioning accuracy in complex road environments is solved, improving the accuracy and efficiency of navigation applications.

WO2026158029A1PCT designated stage Publication Date: 2026-07-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-01-08
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

In complex road environments, the matching degree between device positioning data and road location information is similar, resulting in low positioning accuracy.

Method used

By acquiring latitude, longitude, and elevation information from the device's positioning data, and combining it with road location and slope information from map data, multiple roads are matched, and the road whose slope and elevation information match is selected as the positioning road.

Benefits of technology

It improves the positioning accuracy of the equipment on the road and enhances the timeliness and human-computer interaction efficiency in navigation applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026071371_30072026_PF_FP_ABST
    Figure CN2026071371_30072026_PF_FP_ABST
Patent Text Reader

Abstract

A positioning picture generation method and apparatus, a medium, and a product. The method comprises: acquiring positioning data of a first device and map data (420), wherein the positioning data comprises longitude and latitude information and elevation information of the first device, and the map data comprises road location information and road slope information of each road; and in response to there being, among the plurality of roads in the map data, at least two roads of which road location information matches the longitude and latitude information, determine, from among the at least two roads, a first road of which road slope information matches the elevation information (440).
Need to check novelty before this filing date? Find Prior Art

Description

Methods, devices, media, and products for generating positioning images

[0001] This application claims priority to Chinese Patent Application No. 202510123343.5, filed on January 26, 2025, entitled "Method, Apparatus, Medium and Product for Generating Positioning Screen", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of map technology, and in particular to a method, apparatus, medium and product for generating location images. Background Technology

[0003] In map applications such as vehicle navigation and location point transmission in social software, it is necessary to obtain the device's location data. When the device is moving on the road, it is also necessary to determine the road corresponding to the device's location point and display the device's location point on the corresponding road on the map.

[0004] In related technologies, the road with the highest matching degree to the positioning data is determined based on the device's positioning data and the road's location information as the road where the device is currently located.

[0005] However, when the device is in a complex road environment such as an elevated road or a ring road, there may be multiple roads whose location information matches the positioning data, and the matching degree is similar. Therefore, the accuracy of determining the road where the device is located is low. Summary of the Invention

[0006] This application provides a method, apparatus, medium, and product for generating a positioning image. The technical solution includes at least the following:

[0007] On the one hand, a method for generating a positioning image is provided, executed by a computer device, the method comprising:

[0008] The system acquires the positioning data of a first device and map data, wherein the positioning data includes the latitude, longitude and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0009] In response to the existence of at least two roads among the plurality of roads whose road location information matches the latitude and longitude information, a first road is determined from the at least two roads, wherein the road slope information of the first road matches the elevation information;

[0010] The first road is used to generate a first display instruction to display a location screen showing the first device's position on the first road.

[0011] In an optional embodiment, obtaining the location data and map data of the first device includes:

[0012] Obtain the location data of the first device;

[0013] The map area where the first device is located is determined based on the latitude and longitude information in the positioning data;

[0014] Obtain the map data corresponding to the map region.

[0015] In an optional embodiment, determining the map area where the first device is located based on the latitude and longitude information in the positioning data includes:

[0016] Using the latitude and longitude information as the dividing center, a rectangular area with a preset side length is defined as the map area where the first device is located.

[0017] On the other hand, a method for generating a positioning image is provided, executed by a computer device, the method comprising:

[0018] The system acquires the positioning data of a first device and map data, wherein the positioning data includes the latitude, longitude and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0019] In response to the matching of the road location information of the third road among the plurality of roads with the latitude and longitude information, and the matching of the road slope information of the third road with the elevation information, a third display instruction is generated based on the third road to display the positioning screen of the first device on the third road.

[0020] On the other hand, a method for generating a positioning image is provided, executed by a computer device, the method comprising:

[0021] The system acquires the positioning data of a first device and map data, wherein the positioning data includes the latitude, longitude and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0022] In response to the existence of at least two roads among the plurality of roads whose road slope information matches the elevation information, a fourth road is determined from the at least two roads, wherein the road location information of the fourth road matches the latitude and longitude information;

[0023] The fourth path is used to generate a fourth display instruction to display the positioning screen of the first device in the fourth path.

[0024] On the other hand, a positioning image generation apparatus is provided, the apparatus comprising:

[0025] The acquisition module is used to acquire the positioning data of the first device and to acquire map data. The positioning data includes the latitude and longitude information and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0026] A determining module is configured to, in response to the existence of at least two roads among the plurality of roads whose road location information matches the latitude and longitude information, determine a first road from the at least two roads, wherein the road slope information of the first road matches the elevation information;

[0027] The first road is used to generate a first display instruction to display a location screen showing the first device's position on the first road.

[0028] In an optional embodiment, the determining module is further configured to acquire first change data of the elevation information within a historical time window, and acquire second change data of the latitude and longitude information within the historical time window; acquire the arctangent values ​​of the first change data and the second change data, and determine the slope data of the first device within the historical time window;

[0029] The determining module is further configured to determine the first road from the at least two roads, wherein the road slope information of the first road matches the slope data.

[0030] In an optional embodiment, the determining module is further configured to perform at least one of the following:

[0031] If the slope data is greater than a first slope threshold, obtain the matching result between the road slope information of the at least two roads and the first slope threshold; in response to the matching result indicating that there is a road with road slope information greater than the first slope threshold, identify the road as the first road;

[0032] If the slope data is less than the second slope threshold, obtain the matching result between the road slope information of the at least two roads and the second slope threshold; in response to the matching result indicating that there is a road with a road slope information less than the second slope threshold, determine the road as the first road, wherein the first slope threshold is greater than or equal to the second slope threshold;

[0033] If the slope data is between the third slope threshold and the fourth slope threshold, obtain the matching results of the road slope information of the at least two roads with the third slope threshold and the fourth slope threshold; in response to the matching result indicating that there is a road whose road slope information is between the third slope threshold and the fourth slope threshold, identify the road as the first road.

[0034] In an optional embodiment, the determining module is further configured to obtain the matching error between the road slope information of the at least two roads and the slope data, wherein the matching error is used to express the degree of difference between the road slope information and the slope data; and to obtain the road with the smallest matching error as the first road.

[0035] In an optional embodiment, the slope data includes at least two segmented slopes, and the road slope information of the k-th road among the at least two roads includes at least two road segmented slopes, where k is a positive integer;

[0036] The determining module is further configured to obtain the absolute matching error between the at least two segment slopes and the at least two road segment slopes; and to obtain the relative matching error between the at least two segment slopes and the at least two road segment slopes; and to fuse the absolute matching error and the relative matching error to obtain the matching error between the k-th road and the slope data;

[0037] Wherein, the absolute matching error is used to express the error in the one-to-one correspondence between the at least two segment slopes and the at least two road segment slopes; the relative matching error is used to express the error between the first difference between the at least two segment slopes and the second difference between the at least two road segment slopes.

[0038] In an optional embodiment, the determining module is further configured to arrange the matching errors corresponding to the at least two roads from smallest to largest; obtain the road slope information corresponding to the first n matching errors respectively, to obtain n road slope information, where n is an integer greater than 1; and if the difference between the matching errors corresponding to the n road slope information meets the difference requirement, select the road corresponding to the road slope information with the smallest matching error as the first road.

[0039] In an optional embodiment, the determining module is further configured to, when the difference between the matching errors corresponding to the n road slope information reaches a first difference degree and the difference between the n road slope information reaches a second difference degree, obtain the road corresponding to the road slope information with the smallest matching error as the first road.

[0040] In an optional embodiment, the determining module is further configured to acquire a first change sequence composed of the elevation information at at least two time points; and to acquire a second change sequence composed of the latitude and longitude information at the at least two time points; wherein the at least two time points are within the historical time window.

[0041] The determining module is further configured to obtain a first elevation difference between the elevation information at the i-th time node and the elevation information at the (i-1)-th time node, where i is a positive integer; obtain a first distance difference between the latitude and longitude information at the i-th time node and the latitude and longitude information at the (i-1)-th time node; obtain the arctangent value of the first elevation difference and the first distance difference to obtain the i-th segment slope; and obtain the average value of the segment slopes corresponding to the at least two time nodes to obtain the slope data of the first device within the historical time window.

[0042] In an optional embodiment, the determining module is further configured to obtain road angle information from the map data, the road angle information being used to express the layout direction of the road in the map;

[0043] The acquisition module is further configured to acquire the movement direction data of the first device in the positioning data;

[0044] The determining module is further configured to determine a first matching probability between the road location information and the latitude and longitude information; and to determine a second matching probability between the road angle information and the movement direction data;

[0045] The determining module is further configured to determine the matching probability between the road and the first device based on the first matching probability and the second matching probability; and to determine the at least two roads that match the road location information with the latitude and longitude information based on the matching probability.

[0046] In an optional embodiment, the determining module is further configured to obtain road angle information corresponding to the at least two roads from the map data, wherein the road angle information is used to express the layout direction of the roads in the map;

[0047] The determining module is further configured to determine a first road from the at least two roads when the difference between the road angle information corresponding to the at least two roads is less than a first difference requirement and the difference between the matching probabilities corresponding to the at least two roads is less than a second difference requirement.

[0048] In an optional embodiment, the determining module is further configured to perform at least one of the following:

[0049] If the difference between the road slope information corresponding to the at least two roads reaches the third difference requirement, the first road whose road slope information matches the elevation information is determined from the at least two roads.

[0050] If the difference between the road slope information corresponding to the at least two roads is less than the third difference requirement, the first road whose road location information matches the latitude and longitude information is determined from the at least two roads.

[0051] In an optional embodiment, the device further includes:

[0052] The backtracking module is used to backtrack the at least two roads in the opposite direction of the first device's movement and by a preset backtracking distance to obtain the backtracking road segments corresponding to the at least two roads respectively;

[0053] The acquisition module is further configured to acquire the average slope of the backtracking segments corresponding to the at least two roads respectively; and to acquire a first average slope and a second average slope that meet the difference requirements from the average slopes of the segments corresponding to the at least two roads respectively.

[0054] The determining module is further configured to determine, when the difference between the first average slope and the second average slope reaches the difference threshold, that the difference between the road slope information corresponding to the at least two roads reaches the third difference requirement.

[0055] In an optional embodiment, the determining module is further configured to use the latitude and longitude information and the elevation information as projection starting points to draw orthographic projection lines onto the at least two roads to obtain orthographic projection points corresponding to the at least two roads respectively; and use the orthographic projection points as data acquisition points to obtain the road slope information corresponding to the at least two roads respectively.

[0056] The acquisition module is further configured to acquire the first road whose road slope information matches the elevation information.

[0057] In an optional embodiment, the determining module is further configured to acquire the positioning data of the first device; determine the map area where the first device is located based on the latitude and longitude information in the positioning data; and acquire the map data corresponding to the map area.

[0058] In an optional embodiment, the determining module is further configured to use the latitude and longitude information as the dividing center and a preset side length to divide a rectangular area as the map area where the first device is located.

[0059] In an optional embodiment, the determining module is further configured to, in response to the existence of a second road among the multiple roads in the map data whose road location information matches the latitude and longitude information, and whose road slope information matches the elevation information, generate a second display instruction based on the second road to display a positioning screen of the first device located on the second road.

[0060] On the other hand, a positioning image generation apparatus is provided, the apparatus comprising:

[0061] The acquisition module is used to acquire the positioning data of the first device and to acquire map data. The positioning data includes the latitude and longitude information and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0062] A generation module is configured to, in response to the matching of the road location information of the third road among the plurality of roads with the latitude and longitude information, and the matching of the road slope information of the third road with the elevation information, generate a third display instruction based on the third road to display the positioning screen of the first device on the third road.

[0063] On the other hand, a positioning image generation apparatus is provided, the apparatus comprising:

[0064] The acquisition module is used to acquire the positioning data of the first device and to acquire map data. The positioning data includes the latitude and longitude information and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0065] A determining module is configured to, in response to the existence of at least two roads among the plurality of roads where the road slope information matches the elevation information, determine a fourth road from the at least two roads, wherein the road location information of the fourth road matches the latitude and longitude information;

[0066] The fourth path is used to generate a fourth display instruction to display the positioning screen of the first device in the fourth path.

[0067] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the positioning screen generation method provided in the above embodiments of this application.

[0068] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored in the storage medium, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method for generating a positioning screen as provided in the embodiments of this application above.

[0069] On the other hand, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to execute the positioning screen generation method provided in the above embodiments of this application.

[0070] The beneficial effects of the technical solutions provided in this application include at least the following:

[0071] When matching the location of the first device on the map, in addition to two-dimensional matching based on latitude and longitude data, a matching process based on elevation information and road slope information is added. The road whose road slope information matches the elevation information is determined as the first road, so that the map screen of the first device on the first road can be displayed, which improves the accuracy of matching the first device with the road it is located on. In navigation application scenarios, it improves the timeliness of switching navigation routes and improves the efficiency of human-computer interaction during the navigation process. Attached Figure Description

[0072] Figure 1 is a schematic diagram of a complex road provided in an exemplary embodiment of this application;

[0073] Figure 2 is a schematic diagram of a ramp and main road provided in an exemplary embodiment of this application;

[0074] Figure 3 is a schematic diagram of the architecture of a map data system provided in an exemplary embodiment of this application;

[0075] Figure 4 is a flowchart of a method for generating a positioning screen provided in an exemplary embodiment of this application;

[0076] Figure 5 is a schematic diagram of the representation of map data provided in an exemplary embodiment of this application;

[0077] Figure 6 is a schematic diagram of road matching probability provided by an exemplary embodiment of this application;

[0078] Figure 7 is a schematic diagram of a positioning screen generation framework provided in an exemplary embodiment of this application;

[0079] Figure 8 is a flowchart of a method for generating a positioning screen provided in another exemplary embodiment of this application;

[0080] Figure 9 is a flowchart of a method for generating a positioning screen provided in another exemplary embodiment of this application;

[0081] Figure 10 is a flowchart of a method for generating a positioning screen provided in another exemplary embodiment of this application;

[0082] Figure 11 is a schematic diagram of path backtracking provided in an exemplary embodiment of this application;

[0083] Figure 12 is a schematic diagram of path backtracking provided by another exemplary embodiment of this application;

[0084] Figure 13 is a schematic diagram of the generation process of the positioning screen provided in an exemplary embodiment of this application;

[0085] Figure 14 is a flowchart of a method for generating a positioning screen provided in another exemplary embodiment of this application;

[0086] Figure 15 is a flowchart of a method for generating a positioning screen provided in another exemplary embodiment of this application;

[0087] Figure 16 is a structural block diagram of a positioning screen generation device provided in an exemplary embodiment of this application;

[0088] Figure 17 is a structural block diagram of a positioning screen generation device provided in another exemplary embodiment of this application;

[0089] Figure 18 is a structural block diagram of a positioning screen generation device provided in another exemplary embodiment of this application;

[0090] Figure 19 is a structural block diagram of a positioning screen generation device provided in another exemplary embodiment of this application;

[0091] Figure 20 is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0092] First, a brief introduction to the terms used in the embodiments of this application will be given.

[0093] Global Navigation Satellite System (GNSS): Also known as a global satellite navigation system, in this embodiment of the application, the device to be positioned acquires its positioning data via GNSS, including latitude, longitude, and elevation information. In some embodiments, before acquiring positioning data via GNSS, the device first obtains user authorization; that is, a prompt message is displayed on the device's interface to indicate the need to acquire positioning data and the specific purpose of acquiring the positioning data. After obtaining user authorization, i.e., after the user performs a confirmation operation on the device's interface, the device's positioning data is acquired via GNSS.

[0094] Map data is data used to describe information such as roads, buildings, traffic lights, and signs. In some embodiments, road-related data in the map data includes at least one of Standard Definition (SD) road data and High Definition (HD) road data. SD mainly records basic road attributes, such as road length, number of lanes, direction, road slope, and topology; HD mainly records road lane line equations / crosspoint coordinates, lane type, road slope, lane speed limit, lane marking type, utility pole coordinates, signpost locations, and camera / traffic light locations. The map data used in this application embodiment can be SD data, HD data, or a combination of SD and HD data; this application embodiment does not limit this.

[0095] Elevation information refers to the vertical height of a point or region relative to a reference surface. In Geographic Information Systems (GIS), surveying, engineering, and scientific research, elevation information is crucial data used to describe the undulations and changes in elevation of terrain. The reference surface can be sea level, in which case elevation information can be represented as altitude information, or it can be the geoid, etc. This application does not limit this specific implementation. In this application, the embodiment of elevation information as altitude information is used as an example for illustration.

[0096] Figure 1 is a schematic diagram of a complex road provided by an exemplary embodiment of this application. As shown in Figure 1, the road environment in which the vehicle travels includes three roads, 110, 120, and 130, which are approximately parallel in direction. During the vehicle's positioning process, due to the inherent accuracy deviation of latitude and longitude information, the roads matched with the latitude and longitude information are also prone to deviation.

[0097] The method provided in this application, based on road matching on a two-dimensional plane, introduces the matching between elevation information and road slope information in map data. In addition to matching the positional relationship between the positioning device and the road in the two-dimensional plane, it adds the matching relationship between road slope and vehicle height changes from the direction perpendicular to the sea level, thereby improving the accuracy of the positioning device and road matching.

[0098] Schematic, Figure 2 is a diagram of a ramp and main road provided in an exemplary embodiment of this application. As shown in Figure 2, the main road 210 and the ramp 220 are relatively parallel, and the height of the main road 210 remains basically constant, while the ramp 220 is in a downhill shape. Therefore, when matching the positioning device with these two roads on a two-dimensional plane, deviations are likely to occur. However, by adding a matching relationship between the elevation information of the positioning device and the road slope, it is possible to effectively distinguish whether the movement trend of the positioning device is to maintain a stable height or to move with a decreasing height. When the movement trend of the positioning device is to maintain a stable height, it indicates that the positioning device is moving on the main road 210; conversely, when the movement trend of the positioning device is to move with a decreasing height, it indicates that the positioning device is moving on the ramp 220.

[0099] Figure 3 is a schematic diagram of the architecture of a map data system provided in an exemplary embodiment of this application. As shown in Figure 3, the map data system includes a positioning device 310 and a server 320.

[0100] The positioning device 310 can be a mobile terminal, such as a mobile phone, tablet, vehicle terminal, smartwatch, virtual reality (VR) device, augmented reality (AR) device, or any other device with positioning capabilities. The positioning device 310 runs a first application, which displays a map and the location of the positioning device 310 within the map.

[0101] To illustrate, taking a navigation scenario where the positioning device 310 performs navigation as an example, a map screen and navigation route are displayed. The positioning device 310 is identified by a positioning point, and the positioning point is displayed on the map screen to indicate the location of the positioning device 310 on the map. In a scenario where the positioning device 310 shares its real-time location with other devices, a map screen is displayed, and the positioning device 310 is identified by a first positioning point, and other positioning devices are identified by a second positioning point. The relative positional relationship between the positioning device 310 and other positioning devices is determined based on the positions of the first and second positioning points on the map.

[0102] The positioning device 310 is connected to the server 320 via a communication network.

[0103] The positioning device 310 is used to send a data acquisition request to the server 320, and the server 320 sends map data to the positioning device 310 according to the data acquisition request.

[0104] In some embodiments, the data acquisition request sent by the positioning device 310 to the server 320 includes the positioning data of the positioning device 310, and the server 320 sends map data of the area where the positioning data is located to the positioning device 310. Optionally, the area where the positioning data is located can be a pre-divided area, such as a pre-divided administrative region; or, the area where the positioning data is located can be an area divided according to a preset size with the positioning data as the center, such as a square area divided with 2km as the side length in the physical world with the positioning data as the center. For example, taking a map-to-physical-world scale of 1:10000, 2km in the physical world corresponds to 20cm on the map. This embodiment does not limit the method of dividing the area where the positioning data is located.

[0105] The positioning device 310 renders and displays a map based on the acquired map data, and renders and displays the positioning point of the positioning device 310 on the map based on the positioning data.

[0106] In this embodiment of the application, the map data also includes road slope information, and the positioning data also includes elevation information of the positioning device 310. Therefore, the matching accuracy between the road in the map and the positioning device 310 is improved based on the elevation information and road slope information, thereby improving the positioning accuracy of the positioning point.

[0107] The method provided in this application embodiment can be executed by the positioning device 310, the server 320, or jointly executed by the positioning device 310 and the server 320 through interaction. This application embodiment does not limit this.

[0108] It is worth noting that the aforementioned servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services.

[0109] In some embodiments, the server described above can also be implemented as a node in a blockchain system.

[0110] It should be noted that all information (including but not limited to image information, user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the location data, map data, etc. involved in this application were obtained with full authorization.

[0111] In some embodiments, taking location data as an example, before acquiring location data, a prompt message is first displayed on the device. This prompt message includes the request to acquire location data and the purpose of acquiring the location data, such as applying the location data to navigation, real-time positioning, or matching the location data with map data. Users can choose to accept or reject the request from the server or the device itself to acquire location data. Location data is collected only if the user chooses to accept the request from the server or the device itself.

[0112] Figure 4 is a flowchart of a method for generating a positioning screen according to an exemplary embodiment of this application. This method is executed by a computer device, and can be executed by a terminal device, a server, or both. Taking the execution of this method by a first device as an example, as shown in Figure 4, the method includes the following steps.

[0113] Step 420: Obtain the location data of the first device and obtain the map data.

[0114] The positioning data includes the latitude, longitude, and elevation information of the first device.

[0115] The first device includes a positioning chip, which is used to obtain the latitude, longitude and elevation information of the first device.

[0116] Taking the Global Positioning System (GPS) as an example, GPS is a satellite navigation system. A receiver (the primary device) uses a positioning chip to receive satellite signals to determine its precise location on Earth. GPS positioning is based on principles such as satellite signal propagation time and geometry. The GPS system consists of multiple satellites (e.g., 24). The satellites orbit at an altitude of approximately 20,200 kilometers, with an orbital period of approximately 12 hours. Each satellite continuously transmits signals containing time and location information; these signals are radio waves that propagate at the speed of light. Using the propagation time, the receiver can calculate the pseudorange from the satellite to the receiver. The pseudorange is the straight-line distance between the satellite and the receiver, but it includes errors such as atmospheric delay and satellite clock bias. Atmospheric delay can be corrected using a pre-trained mathematical model, and satellite clock bias can be corrected using correction parameters transmitted by the satellite. By correcting these errors, the distance between the receiver and the satellite can be obtained, and based on this distance, the receiver's latitude and longitude coordinates on Earth can be determined as latitude and longitude information, as well as its altitude as elevation information.

[0117] In this embodiment, the latitude and longitude coordinates of the first device are obtained as latitude and longitude information, and the altitude of the first device is obtained as elevation information. The positioning data includes, but is not limited to, latitude and longitude information and elevation information. For example, the positioning data also includes timestamp information, speed information, and direction information. The timestamp information is used to record the time when the positioning data was generated, the speed information is used to express the moving speed of the first device, and the direction information is used to express the moving direction of the first device.

[0118] The first device runs a first application, such as a navigation program. If the first application displays a map and needs to display the device's location on the map, then the device's location data needs to be obtained. Alternatively, the first device runs a second application that includes a map function. When the map function is activated, the device's location needs to be displayed on the map, such as an instant messaging program that includes a real-time location sharing function. When this function is activated, the device's location data needs to be obtained. Or, the first device runs a third application, such as a social networking program. When posting social content in the third application, users can choose to include location information. When other users view the social content posted by the first device, they can determine the user's posting location by checking the location information, thus requiring the first device's location data to be obtained.

[0119] In the navigation program, taking the first device as an in-vehicle terminal as an example, by obtaining the positioning relationship between the in-vehicle terminal and the road, the matching status between the vehicle and the navigation route can be determined in a timely manner, and the navigation route can be updated in a timely manner when the vehicle deviates from the navigation route, thereby improving the efficiency of human-computer interaction in the navigation process.

[0120] In the application scenario of sharing real-time location function, by obtaining the positioning relationship between the first device and the road, the road where the first device is located can be determined, thereby sharing the accurate position relationship of the first device on the road with other users, which improves the accuracy of sharing real-time location function.

[0121] In some embodiments, the first device acquires positioning data at preset intervals; or, when the first device is detected to be moving, positioning data is acquired at preset intervals. The movement of the first device is identified by motion sensors, including accelerometers, gyroscopes, etc. When the first device is not moving, it indicates that the positioning data of the first device has not changed, and therefore positioning data is not acquired. Alternatively, the acquisition interval for the positioning data is increased, for example, acquiring positioning data at a 1-second interval when the first device is moving, and at a 5-second interval when the first device is not moving.

[0122] By acquiring positioning data at different acquisition cycles depending on whether the first device is in motion or not, the effectiveness of the acquired positioning data can be effectively improved. This avoids the energy and resource consumption of the first device caused by acquiring positioning data at high frequency when it is stationary, and improves the efficiency and utilization of positioning data acquisition.

[0123] In this embodiment, elevation data from at least two positioning data sets of the first device needs to be continuously acquired to determine the height changes generated during the movement of the first device. When the positioning data is used to statically represent the position of the first device, the acquisition time is extended during the acquisition of positioning data, thereby acquiring positioning data corresponding to multiple periods to obtain continuous positioning data. For example, the positioning data acquired in the aforementioned third application is to attach positioning information to the published information. The attached positioning information is static information, but during the acquisition of positioning data, positioning data from at least two time periods is acquired, thereby determining the slope changes generated during the movement of the first device based on the continuous positioning data.

[0124] Optionally, the application that needs to collect location data requests the location data collected by the positioning chip from the operating system of the first device. Optionally, the application displays a prompt message indicating the application's request to collect location data and the purpose of collecting the location data. When the operating system receives confirmation from the user regarding the prompt message, it grants the application permission to obtain the location data of the first device collected by the positioning chip.

[0125] In some embodiments, the positioning data is acquired based on a positioning chip and sensors in the first device. Schematic, the positioning chip acquires the latitude, longitude, and elevation information of the first device, and the sensors acquire the moving speed and direction of the first device.

[0126] The map data includes road location information and road slope information. Optionally, the map data includes road location information and road slope information for each individual road.

[0127] Road location information is used to express the location of a road in the physical world. The road location mapping on a map includes a first map location, where road elements are displayed, corresponding to the road at the corresponding location in the physical world. In some embodiments, road location information is expressed using latitude and longitude. Optionally, road location information is expressed using the latitude and longitude of road endpoints; that is, a road includes line segments sequentially connected between at least two endpoints. Taking two endpoints as an example, obtaining the first latitude and longitude of the first endpoint and the second latitude and longitude of the second endpoint indicates that the road location lies on the line segment between the first and second latitude and longitudes. Taking more than two endpoints, such as three endpoints, as an example, where the first endpoint, second endpoint, and third endpoint are sequentially connected to obtain the road location, obtaining the first latitude and longitude of the first endpoint, the second latitude and longitude of the second endpoint, and the third latitude and longitude of the third endpoint indicates that the road location includes a first line segment between the first and second latitude and longitudes, and a second line segment between the second and third latitude and longitudes. It is worth noting that the above-described methods of expressing road location information are merely illustrative examples. In some embodiments, road location information can also be expressed through the latitude and longitude of an endpoint, the road direction, and the road length; or, road location information can also be expressed through the latitude and longitude of the road center point, the road direction, and the road length. This embodiment does not limit this.

[0128] Road slope information is used to express the slope of a road relative to the horizontal plane in the physical world. In the physical world, the horizontal plane is perpendicular to the direction of gravity. The direction of the horizontal plane is determined based on the direction of gravity at the road's location, and thus the road's slope relative to the horizontal plane is determined. In some embodiments, road slope information is expressed as an angle. Optionally, when the angle is positive, it indicates that the road is uphill in the corresponding driving direction; similarly, when the angle is negative, it indicates that the road is downhill in the corresponding driving direction. In some embodiments, the corresponding driving direction is a pre-defined parameter for the road.

[0129] In some embodiments, the map data is data pre-collected within the application. This map data is obtained by a data collection vehicle scanning roads and the environment, and converting data based on changes in vehicle height. Illustratively, the data collection vehicle acquires images of road A and its surrounding environment. Furthermore, the slope of road A is determined based on elevation information collected by the vehicle while it is traveling on road A. This elevation information can be obtained through a positioning chip or motion sensors on the vehicle. The data collection process by the vehicle serves as a preparation process for the map data. After the data collection vehicle acquires the map data, manual correction can be used to correct any deviations in the collected data.

[0130] In some embodiments, the methods for obtaining map data include at least one of the following:

[0131] 1. Determine the map area where the first device is located based on the latitude and longitude information of the first device, and obtain the map data corresponding to the map area;

[0132] The roads in the map area are the roads in the map area where the first device is currently located. That is, there is a relationship between the first device and the roads in the map area. If the first device is in the map area and the road is also in the map area, then the first device can move on the road in the map area. For example, if the first device is implemented as a vehicle terminal, then the vehicle corresponding to the first device can drive on the road in the map area.

[0133] The map area can be a pre-defined area, an area defined in real time based on the latitude and longitude information of the first device, or an area defined every time the first device moves a preset distance. Specifically, it includes at least one of the following:

[0134] 1.1 The map area is a pre-divided administrative region, which is illustrative. At least two map areas are pre-divided by street. The street where the first device is currently located is determined based on the latitude and longitude information of the first device, and the map data corresponding to the street is obtained.

[0135] By pre-dividing administrative regions and determining the administrative region where the first device is located, the corresponding map data of the administrative region can be obtained, thus improving the efficiency of map data acquisition.

[0136] 1.2 Using latitude and longitude information as the dividing center, that is, using the latitude and longitude information of the first device as the dividing center, a rectangular area with a preset side length is divided as the map area where the first device is located. Optionally, the map area is a region obtained in real time based on the latitude and longitude information of the first device and a preset size. Illustratively, a rectangular map area is divided with the latitude and longitude information of the first device as the dividing center and a preset side length, and the map information of the rectangular map area is obtained. It is worth noting that the above map area is described using a rectangular map area as an example. In some embodiments, the map area can be a circular area with a preset radius or an area of ​​any other arbitrary shape; this embodiment does not limit this. In some embodiments, there is a scale relationship between the map and the physical world. Taking a scale of 1:10000 as an example, 1 cm on the map corresponds to 100 m in the physical world. Illustratively, a square interface area with a side length of 20 cm on the map corresponds to a square geographical area with a side length of 2 km in the physical world.

[0137] Based on the pre-collected full map data, map data within the map area is obtained as the map data for the first device positioning and matching application.

[0138] By dividing the map area in real time based on the latitude and longitude information of the first device and obtaining the map data corresponding to the map area, it is possible to effectively obtain the map data of the map area related to the first device based on the positioning data of the first device, thus avoiding the problem of data loss caused by the first device being located at the edge of the map area in the pre-divided map area.

[0139] 1.3 Since real-time map area division generates a large amount of data interaction, in some embodiments, the map area is the area divided every time the first device moves a preset distance.

[0140] In some embodiments, the preset distance corresponds to the size of the map area, or in other words, the preset distance conforms to the constraints of the size of the map area. For example, when the map area is a square area centered on the latitude and longitude information of the first device, the preset distance is less than half the side length of the square; when the map area is a circular area centered on the latitude and longitude information of the first device, the preset distance is less than the radius of the circle. For example, if the map area is a square area centered on the latitude and longitude information of the first device with a side length of 20cm, then the preset distance is less than 10cm, corresponding to 1km in the physical world. For instance, if the preset distance is 800m, then when the first device moves 800m, a new square area centered on the latitude and longitude information of the first device is acquired as the updated map area.

[0141] When the first device moves a preset distance, it is usually more likely to be at the boundary of the map area. Based on this, if the first device moves a preset distance, a new map area is divided in real time based on the positioning data of the first device, and the map data of the map area is acquired, which improves the efficiency of map data acquisition and reduces the update frequency of map data.

[0142] 1.4 When the first device moves to a point where the boundary of the i-th map region is less than a preset distance, the (i+1)-th map region is obtained by dividing the map region around the latitude and longitude information of the first device, where i is a positive integer.

[0143] For illustration purposes, the preset distance is 200m, which is also mapped to 2cm on the map at a scale of 1:10000. When the first device moves to any boundary of the i-th map area that is less than 2cm away, the i+1-th map area is obtained by dividing the map area with the current latitude and longitude information of the first device as the center, and this is used as the updated map area.

[0144] When the first device moves to the boundary of the map area, it indicates that there is a high probability that the first device will move away from the current map area. In order to avoid the problem of data loss due to the failure to acquire map data of the new map area when the first device leaves the current map area, a new map area is pre-defined and map data of the new map area is acquired, which improves the efficiency and effectiveness of map data acquisition.

[0145] 2. Obtain the full map data pre-collected in the application.

[0146] In some embodiments, when the area covered by the application is small, the full map data in the application is directly obtained, and the location matching of the first device is completed based on the full map data. Here, the area covered by the application refers to the geographical area corresponding to the map data provided in the application. That is, the geographical area corresponding to the map data that the application itself can provide is limited / small. For example, if the application only provides map data within a preset area, then the full map data is directly obtained.

[0147] When the area covered by the application is small, acquiring the full map data avoids the high-frequency data interaction process caused by repeatedly dividing the map area, reduces the amount of data interaction with the server, and improves data acquisition efficiency.

[0148] Map data includes at least one of standard precision (SD) and high precision (HD) specifications. In this embodiment, map data including SD data is used as an example for illustration. SD data includes road length, number / width of lanes, connectivity between roads, road slope information, road shape point representation, road attributes (elevated roads, ramps, main / auxiliary roads, tunnels, etc.), road classification (expressway, provincial road, rural road, etc.), etc.

[0149] In this embodiment, road slope information is matched with the elevation information of the first device. Figure 5 is a schematic diagram of the map data representation provided in an exemplary embodiment of this application. As shown in Figure 5, the road 510 in the map data is typically abstracted into at least two line segments, each with two endpoints. There may be multiple slope change points on a road, as indicated by the triangle marker 520 in Figure 5, which indicates that the slope value changes before and after this point. The road between two slope change points has a fixed slope value. In some embodiments, after determining the latitude, longitude, and elevation information of the first device, the road is orthographically projected from the positioning point 531 corresponding to the latitude, longitude, and elevation information. The slope value corresponding to the interval where the orthographically projected point 530 falls is the slope value of the first device on this road at the current moment.

[0150] It is worth noting that, in the embodiments of this application, when acquiring location data and map data, location data can be acquired first and then map data, or map data can be acquired first and then location data, or map data and location data can be acquired in parallel. When the map data is implemented as map data of a local area determined by the location data, the location data is acquired first, and then the corresponding map data is acquired based on the location data. The embodiments of this application do not limit the method of data acquisition.

[0151] Step 440: In response to the existence of at least two roads in the map data whose road location information matches latitude and longitude information, determine the first road from the at least two roads, and match the road slope information and elevation information of the first road.

[0152] Optionally, if the location information and latitude and longitude information of at least two roads in the map data match, the first road whose slope information and elevation information match is determined from the at least two roads.

[0153] In some embodiments, road angle information is obtained from map data, or in other words, road location information and road angle information are obtained from map data. Road location information is used to express the location of the road in the physical world, which corresponds to the location of the road on the map; road angle information is used to express the layout direction of the road in the physical world, which corresponds to the layout direction of the road on the map.

[0154] The movement direction data of the first device is obtained from the positioning data. The movement direction data is used to express the movement direction of the first device in the physical world, that is, to express the movement direction of the positioning point of the first device on the map. A first matching probability between road location information and latitude and longitude information is determined, and a second matching probability between road angle information and movement direction data is determined. Based on the first matching probability and the second matching probability, the matching probability between the road and the first device is determined, and at least one road is determined based on the matching probability.

[0155] Optionally, a weighted sum is calculated based on the first matching probability and the second matching probability according to a preset weight to obtain the matching probability between the road and the first device. In some embodiments, the n roads with the highest matching probability are obtained, where n is a positive integer; or, the roads whose matching probability reaches a preset probability threshold are obtained as at least one determined road.

[0156] Optionally, the matching probability between the first device and the road is obtained based on a Hidden Markov Model (HMM). Optionally, the matching probability can be defined by distance and angle, where distance refers to the distance between the latitude and longitude information of the first device and the locations of each road, and angle refers to the angle between the movement direction data of the first device and each road. Specifically, the closer the latitude and longitude information of the first device is to the road, the higher the first matching probability; the farther the latitude and longitude information of the first device is from the road, the lower the first matching probability. Similarly, the larger the angle between the movement direction data of the first device and the road, the lower the second matching probability; the smaller the angle between the movement direction data of the first device and the road, the higher the second matching probability. In some embodiments, the matching probability may also consider the connectivity between roads, and the degree of matching between the angle between connected roads and the angle of change of the latitude and longitude information of the first device.

[0157] In some embodiments, at least one road with a matching probability reaching a probability threshold is obtained; illustratively, at least one road with a matching probability reaching 0.4 is obtained. If no road has a matching probability reaching the probability threshold, it is determined that the first device is not on a road, such as being inside a building or in a parking lot.

[0158] Optionally, after obtaining the matching probability, the Viterbi algorithm is used to obtain the current at least one possible road and the matching probability corresponding to the at least one possible road.

[0159] In some embodiments, when obtaining at least one possible road using the Viterbi algorithm, the coordinate sequence generated by the latitude and longitude information of the first device within a historical time window is obtained. Starting from the starting position of the coordinate sequence, at least one starting road that meets the probability requirement with the latitude and longitude information of the starting position is obtained, and other roads that do not meet the probability requirement are filtered out. The process continues to match the next latitude and longitude information according to the coordinate sequence, filtering out roads that do not meet the probability requirement with the next latitude and longitude information, as well as roads that do not meet the connectivity requirement with the starting road, and continues to match the next latitude and longitude information until the current latitude and longitude information is matched. Roads that do not meet the connectivity requirement with the previously determined roads and roads that do not meet the probability requirement are filtered out, resulting in at least one road that meets the probability requirement with the current latitude and longitude information.

[0160] In some embodiments, the matching result is output through the above matching process, wherein the matching result includes the number of roads that match the latitude and longitude information of the first device, and the matching probability corresponding to the roads that match the latitude and longitude information of the first device.

[0161] Figure 6 is a schematic diagram of road matching probability provided by an exemplary embodiment of this application. As shown in Figure 6, at time t1, based on historical prior information, it is determined that the location point corresponding to the latitude and longitude information of the first device is located on road 610. At this time, only one road matches the latitude and longitude information of the first device, and the matching probability of this road is 1.0. Subsequently, a parallel road fork is encountered. At time t2, the latitude and longitude information is located between two parallel roads. Map matching shows two roads that match the location point corresponding to the first device, of which the matching probability of road 620 is 0.6 and the matching probability of road 610 is 0.4.

[0162] In some embodiments, during the road matching process, the first device caches historical matching information, or the first device sends matching results to the server, and the server records the historical matching information. The historical matching information includes at least the following: 1. Location data within the historical time window, denoted as G = (t, p), where t represents the location time of the location data, and p includes information in at least three dimensions: longitude, latitude, and altitude; 2. Matching results at each time point within the historical time window, denoted as M = (t, link_id, match_p, prob, angle, slope), where t represents the matching time, corresponding to the location time of the location data, link_id represents the road identifier matched at time t, match_p represents the orthographic projection point position obtained at time t based on the orthographic projection of location point p onto the road containing link_id, prob represents the probability of matching the road corresponding to link_id, angle represents the road angle information of the road corresponding to link_id, and slope represents the road slope information obtained at time t based on the orthographic projection of location point p onto the road containing link_id.

[0163] Since elevation information represents the data of the first device in the direction of altitude, it is necessary to first obtain the changes in the elevation information of the first device in the historical time period, and combine it with the changes in the latitude and longitude information of the first device to obtain the slope data of the first device in the historical time period, so as to match the slope data with the road slope information.

[0164] Optionally, first change data of elevation information within a historical time window range and second change data of latitude and longitude information within a historical time window range are obtained, and arctangent value between the first change data and the second change data is obtained. For example, the arctangent value is calculated for the first change data and the second change data, the slope data of the first device within the historical time window range is determined, and the first road whose road slope information matches the slope data is determined from at least two roads.

[0165] Among them, the first change data corresponding to the elevation information is used to express the change in the height of the first device during the movement, and the second change data corresponding to the latitude and longitude information is used to express the change in the movement distance of the first device during the movement. Therefore, according to the calculation principle of the tangent function, the arctangent value is calculated by the ratio of the first change data and the second change data to obtain the slope data, which improves the calculation efficiency and accuracy of the slope data.

[0166] In some embodiments, the road with the highest matching degree between road slope information and slope data is determined from at least two roads as the first road.

[0167] Among them, the slope data of the first device within the historical time window refers to the slope of the first device's movement path within the historical time period.

[0168] In some embodiments, the location data acquisition cycle of the first device is 1 second, that is, the location data of the first device is acquired once every second. The above-mentioned historical time window range is greater than the location data acquisition cycle, such as: the historical time window range is 10 seconds, that is, the location data and matching results acquired in the previous 10 cycles are cached, or the location data and matching results acquired in the previous 10 cycles are cached.

[0169] In some embodiments, the first road is used to generate a first display instruction to display a positioning screen showing the first device located on the first road.

[0170] After determining the first road based on slope matching, the location point of the first device is displayed on the road element corresponding to the first road in the map, which expresses the location result of the first device on the first road.

[0171] In some embodiments, the display position of the positioning point of the first device is the position of the orthographic projection point of the positioning data of the first device on the first road.

[0172] Schematic illustration: A first device runs a first application, such as a navigation program, which displays a map during operation. The device's location is then displayed on a road element of the first road on the map shown in the first application. Alternatively, the first device runs a second application, which includes a first map function. When the first map function is activated, the device's location is displayed on a road element of the first road on the map. For example, an instant messaging program includes a real-time location sharing function; when this function is activated, the device's location is displayed on a road element of the first road on the map. Or, the first device runs a third application, such as a social networking application. When posting social content in the third application, location information can be attached. When other users view the social content posted by the first device, they can determine the user's posting location by checking the location information. When other users view the user's posted location, the posting location is displayed on a road element of the first road on the map.

[0173] In some embodiments, in response to the existence of a second road among multiple roads in the map data whose road location information matches latitude and longitude information, and whose road slope information matches elevation information, a second display instruction is generated based on the second road to display a location screen showing the first device on the second road. That is, if only one second road among multiple roads in the map data has road location information that matches latitude and longitude information, the system determines whether to use the second road as the current location of the first device based on the matching of the road slope information and elevation information.

[0174] In some embodiments, if the location information of only one second road among multiple roads in the map data matches the latitude and longitude information, and in response to the slope information of the second road matching the elevation information, the second road is taken as the road where the first device is currently located.

[0175] If only one of the multiple roads in the map data has a road location information that matches the latitude and longitude information, and the road slope information does not match the elevation information of the second road, then it is determined that the first device is not currently on the road, and the location of the first device is determined from the area outside the road, or the first device positioning fails to output.

[0176] Optionally, the map data includes the building location information of multiple buildings. The target building with the highest matching degree between the building location information and the latitude and longitude information is determined as the building where the first device is located. A display instruction is generated based on the target building to display the positioning screen of the first device in the target building.

[0177] In summary, the method provided in this application, when matching the road where the first device is located on the map, not only performs two-dimensional matching based on latitude and longitude data, but also adds a matching process based on elevation information and road slope information. The road whose road slope information matches the elevation information is determined as the first road, thereby enabling the display of the map screen of the first device on the first road. This improves the accuracy of matching the road where the first device is located, and in navigation application scenarios, it improves the timeliness of switching navigation routes and improves the efficiency of human-computer interaction during the navigation process.

[0178] Figure 7 is a schematic diagram of a positioning screen generation framework provided in an exemplary embodiment of this application. Taking the positioning screen generation method provided in the embodiment of this application applied to an in-vehicle terminal as an example, as shown in Figure 7, the positioning screen generation framework includes the following parts.

[0179] The map data module 710 is used to acquire and cache map data, which includes road location information and road slope information. In some embodiments, the map data module 710 provides local map data for location matching based on vehicle positioning data. The local map data refers to map data of a local area obtained by dividing the vehicle's positioning data according to the latitude and longitude information. The map data of the local area includes data such as roads, buildings, traffic lights, and signs within the local area.

[0180] The vehicle positioning module 720 is used to acquire and cache the vehicle's positioning data, including the vehicle's latitude and longitude information and elevation information. In this embodiment, the vehicle's latitude and longitude information is used to locate the vehicle's position on a two-dimensional plane, and the elevation information is used to determine the vehicle's changes in altitude, thereby matching the changes with the road's slope.

[0181] The map matching module 730 is used to acquire local map data and vehicle positioning data, and match the latitude and longitude information in the vehicle positioning data with the road location information in the local map data to determine at least one road that matches the latitude and longitude information from the local map data.

[0182] In some embodiments, the map matching module 730 is further configured to obtain the vehicle's driving direction data from the vehicle's positioning data, and determine at least one road from the local map data that matches the latitude and longitude information and the driving direction data based on the matching of the driving direction data with the road direction information in the local map data.

[0183] The scene recognition module 740 is used to determine whether there are at least two roads that match the vehicle's positioning data. If there are at least two roads that match the vehicle's positioning data, then the slope scene matching module 750 performs slope matching. If there is only one road that matches the vehicle's positioning data, then the road is directly output as the vehicle's positioning road.

[0184] The slope scene matching module 750 is used to match the vehicle's elevation information and road slope information. The first road whose road slope information matches the elevation information among at least two roads identified by the scene recognition module 740 is used as the vehicle's positioning road.

[0185] In an optional embodiment, the slope scene matching module 750 is used to determine the slope data of the first device during its movement based on the positioning data of the first device during the process of matching road slope information and elevation information, thereby matching the slope data with the road slope information.

[0186] It is worth noting that the structure shown in Figure 7 above is only an illustrative example. In the positioning screen generation framework shown in Figure 7 above, the map matching module 730 can also be implemented as a module parallel to the slope scene matching module 750. That is, the data output by the map data module 710 and the vehicle positioning module 720 is first determined by the scene recognition module 740 to determine whether it belongs to a complex road scene, and then the first road is determined by the map matching module 730 and the slope scene matching module 750 respectively. Alternatively, the order of the map matching module 730 and the slope scene matching module 750 can also be changed. That is, the data output by the map data module 710 and the vehicle positioning module 720 is first matched with the road slope information and elevation information by the slope scene matching module 750, then the scene recognition module 740 identifies whether it belongs to a complex road scene, and finally the first road is determined by the map matching module 730.

[0187] The embodiments of this application do not limit the connection order and connection relationship between the various modules shown in FIG7.

[0188] Figure 8 is a flowchart of a method for generating a positioning screen according to another exemplary embodiment of this application. This method can be executed by a terminal device, by a server, or jointly by both the terminal and the server. Taking the execution of this method by a first device as an example, as shown in Figure 8, step 440 can also be implemented as steps 441 to 443.

[0189] Step 441: In response to the existence of at least two roads among the multiple roads in the map data whose road location information matches latitude and longitude information, first change data of elevation information within the historical time window range and second change data of latitude and longitude information within the historical time window range are obtained.

[0190] In some embodiments, a historical time window refers to a time window of a preset duration preceding the current moment, wherein the window length of the historical time window is preset, such as 10 seconds. Alternatively, in other embodiments, a historical time window refers to a time window that traces back a preset back a distance from the current positioning data of the first device, wherein the number of time nodes in the time window is related to the moving speed of the first device; the faster the moving speed, the fewer the number of time nodes in the historical time window; the slower the moving speed of the first device, the more time nodes in the historical time window. This application does not limit the method for determining the window range of the historical time window.

[0191] In some embodiments, the first device caches positioning data within a historical time window range, and obtains first change data based on the elevation information in the cached positioning data within the historical time window range. The first change data includes at least one of the following data formats: 1. The first change data includes the elevation difference between the i-th elevation information within the historical time window range and the current elevation information, where i is a preset positive integer; 2. The first change data includes a first change sequence composed of at least two elevation information within the historical time window range.

[0192] The height change of the first device during movement is determined directly by calculating the elevation difference, which improves computational efficiency. Determining the height change of the first device during movement by acquiring the first change sequence increases the granularity of slope data determination. Introducing different slope conditions for different road segments improves the accuracy of slope data calculation.

[0193] Similarly, based on the latitude and longitude information in the cached historical time window location data, second change data is obtained. The second change data includes at least one of the following data formats: 1. The second change data includes the distance value between the i-th latitude and longitude information within the historical time window and the current latitude and longitude information; 2. The second change data includes a second change sequence composed of at least two latitude and longitude information within the historical time window. The first and second change data have the same data format.

[0194] In this embodiment, the following example illustrates the process: the first change data includes a first change sequence composed of elevation information at at least two time points, and the second change data includes a second change sequence composed of latitude and longitude information at at least two time points. The process involves obtaining the first change sequence composed of elevation information at at least two time points, and obtaining the second change sequence composed of latitude and longitude information at at least two time points; the at least two time points are within a historical time window.

[0195] The first change data is used to express the change in the height of the first device within the historical time window, that is, the change in the height of the first device within the historical time window, where the change in height refers to the change in the height of the first device relative to the elevation surface; the second change data is used to express the change in the position of the first device within the historical time window, that is, the change in position caused by the movement of the first device within the historical time window.

[0196] Step 442: Calculate the arctangent value for the first and second change data to determine the slope data of the first device within the historical time window.

[0197] Obtain the arctangent value between the first and second changed data.

[0198] Specifically, when the first change data includes the elevation difference between the i-th elevation information and the current elevation information within the historical time window, and the second change data includes the distance between the i-th latitude and longitude information and the current latitude and longitude information within the historical time window, the arctangent value is calculated on the elevation difference and the distance value to obtain the slope data of the first device within the historical time window.

[0199] When the first change data includes a first change sequence consisting of at least two elevation information within a historical time window, and the second change data includes a second change sequence consisting of at least two latitude and longitude information within a historical time window, the following steps are taken: First, obtain the first elevation difference between the elevation information at the i-th time node and the elevation information at the (i-1)-th time node; second, obtain the first distance difference between the latitude and longitude information at the i-th time node and the latitude and longitude information at the (i-1)-th time node; third, obtain the arctangent value of the first elevation difference and the first distance difference, i.e., calculate the arctangent value of the first elevation difference and the first distance difference to obtain the i-th segment slope; fourth, obtain the average value of the segment slope corresponding to at least two time nodes to obtain the slope data of the first device within the historical time window.

[0200] Using segmented slope as the calculation granularity, the segmented slope corresponding to at least two time nodes is calculated, and then the average segmented slope corresponding to at least two time nodes is determined. By incorporating different slope information of different road segments into the segmented slope calculation process, the accuracy of slope data calculation is improved.

[0201] In some embodiments, positioning data of time nodes whose distance from the current positioning latitude and longitude information is within a preset distance range are obtained from the historical time window.

[0202] Location data acquired within a historical time window is converted into slope data, forming a slope sequence within a preset distance range. This slope sequence has a length of L, meaning it contains L slope data points, where L is a positive integer. The slope is then obtained using the arctangent function, by differentiating elevation and latitude / longitude information between two consecutive location data points, as shown in Formula 1 below.

[0203] Formula 1:

[0204] Where arctan represents the arctangent function, G[i].p.alt represents the elevation information of the i-th time node, G[i-1].p.alt represents the elevation information of the (i-1)-th time node, dis(G[i].p, G[i-1].p) represents the distance between the latitude and longitude information of the i-th time node and the latitude and longitude information of the (i-1)-th time node, and gnss_slope[i] represents the segmented slope corresponding to the i-th time node.

[0205] Optionally, the weighted average of the segmented slopes corresponding to at least two time nodes is obtained. The weight of the i-th time node is positively correlated with the first distance difference between the latitude and longitude information of the i-th time node and the latitude and longitude information of the (i-1)-th time node; that is, the larger the first distance difference between the latitude and longitude information of the i-th time node and the (i-1)-th time node, the greater the weight. Illustratively, the formula for calculating the average slope is shown in Formula 2 below:

[0206] Formula 2:

[0207] Where avg_gnss_slope represents the average slope, β i Let represent the weight corresponding to the i-th time node, gnss_slope[i] represent the segment slope corresponding to the i-th time node, and gnss_slope[i+1] represent the segment slope corresponding to the (i+1)-th time node.

[0208] The formula for calculating the weight is shown in Formula 3 below:

[0209] Formula 3:

[0210] Where dis(G[i].p,G[i+1].p) represents the first distance difference between the latitude and longitude information of the i-th time node and the latitude and longitude information of the (i-1)-th time node. This represents the total distance between the latitude and longitude corresponding to the L time points. In other words, it represents the proportion of the segmented distance to the total distance, corresponding to the weight.

[0211] Step 443: Determine the first road from at least two roads, and match the road slope information of the first road with the slope data.

[0212] In some embodiments, since there may be multiple different road slope information on the same road, such as a slope inflection point on the road with different slopes on both sides of the inflection point, in this embodiment, the latitude, longitude and elevation information of the first device are used as the projection starting point to make orthographic projections onto at least two roads to obtain orthographic projection points on at least two roads respectively. Using the orthographic projection points as data acquisition points, the road slope information corresponding to at least two roads is obtained, and the first road whose road slope information matches the elevation information is obtained.

[0213] Optionally, the matching errors between the road slope information of at least two roads and the slope data are obtained, and the road with the smallest matching error is selected as the first road. Selecting the road with the smallest matching error as the first road improves the efficiency of determining the first road.

[0214] Optionally, since the slope data is used to indicate that the road traversed by the first device is any of the slope types of uphill, downhill, or gentle slope, if only one of the at least two roads has a slope type that corresponds to the slope type in the slope data, then the road corresponding to that slope type is directly determined as the first road; if at least two roads have a slope type that corresponds to the slope type in the slope data, then the first road is determined from the at least two roads corresponding to the slope type based on the matching error.

[0215] When matching roads based on slope type, it includes any one or at least one of the following:

[0216] The first method involves obtaining the matching results of the road slope information of at least two roads with the first slope when the slope data is greater than the first slope threshold. In response to the matching result indicating that there is a road with a road slope information greater than the first slope threshold, the road is identified as the first road.

[0217] The first slope threshold is a pre-set slope threshold. Optionally, the first slope threshold is used to indicate the slope threshold corresponding to an uphill road. Illustratively, the first slope threshold is 1.5 degrees, or 2 degrees. Taking 1.5 degrees as an example, 1.5 degrees represents the angle between the ray corresponding to the road's direction of travel and the horizontal plane. Where the slope data is greater than the first slope threshold, the path traversed by the first device is considered an uphill path. Therefore, when at least one of the two roads is an uphill road and its slope information is greater than the first slope threshold, that road is identified as the first road. Optionally, where the first slope threshold and the second slope threshold are different, where the slope data is greater than or equal to the first slope threshold, the path traversed by the first device is considered an uphill path. When at least one of the two roads is an uphill road and its slope information is greater than or equal to the first slope threshold, that road is identified as the first road.

[0218] For illustration, let avg_gnss_slope refer to slope data and slope_th1 refer to the first slope threshold. If avg_gnss_slope ≥ slope_th1, then the path traversed by the first device is represented as uphill. If the slope information of at least two roads satisfies slope ≥ slope_th1, then a unique match is satisfied, and in the map matching results, this road is selected as the first road.

[0219] The second method involves obtaining the matching results of the road slope information of at least two roads with the second slope threshold when the slope data is less than the second slope threshold. In response to the matching result indicating that there is a road with a road slope information less than the second slope threshold, that road is identified as the first road.

[0220] The first slope threshold is greater than or equal to the second slope threshold. In some embodiments, when the first slope threshold and the second slope threshold are different, the first slope threshold and the second slope threshold are opposites of each other.

[0221] The second slope threshold is a pre-set slope threshold. Optionally, the second slope threshold is used to indicate the slope threshold corresponding to a downhill road. Illustratively, the first slope threshold is -1.5 degrees, or -2 degrees. Taking -1.5 degrees as an example, -1.5 degrees represents the angle between the ray corresponding to the road's direction of travel and the horizontal plane. Where the slope data is less than the second slope threshold, indicating that the path traversed by the first device is a downhill path, then when at least one of the two roads is a downhill road and its slope information is less than the second slope threshold, that road is identified as the first road. Optionally, where the first slope threshold and the second slope threshold are different, where the slope data is less than or equal to the second slope threshold, indicating that the path traversed by the first device is a downhill path, and when at least one of the two roads is a downhill road and its slope information is less than or equal to the second slope threshold, that road is identified as the first road.

[0222] For illustration, let avg_gnss_slope refer to slope data and slope_th2 refer to the second slope threshold. When avg_gnss_slope ≤ slope_th2, the path traversed by the first device is represented as downhill. If the slope information of at least two roads satisfies slope ≤ slope_th2, then a unique match is satisfied, and in the map matching results, this road is selected as the first road.

[0223] Taking the first slope threshold and the second slope threshold as opposites as an example, let avg_gnss_slope refer to the slope data and -slope_th1 refer to the second slope threshold. Then, when avg_gnss_slope ≤ -slope_th1, the path taken by the first device is represented as downhill. If the slope information of at least two roads satisfies slope ≤ -slope_th1, then a unique match is satisfied, and in the map matching results, this road is selected as the first road.

[0224] The third method involves obtaining matching results between the road slope information of at least two roads and the third and fourth slope thresholds when the slope data is between the third and fourth slope thresholds. In response to the matching results indicating that there is a road whose road slope information is between the third and fourth slope thresholds, that road is identified as the first road.

[0225] Specifically, when the third slope threshold is equal to the fourth slope threshold, if the slope data is equal to the third slope threshold, then in response to the matching result indicating that there is a road whose road slope information is equal to the third slope threshold, that road is identified as the first road.

[0226] In some embodiments, the third slope threshold is greater than the fourth slope threshold, and the third slope threshold is less than the first slope threshold, while the fourth slope threshold is greater than the second slope threshold. Optionally, the third slope threshold and the fourth slope threshold are opposites of each other.

[0227] The third and fourth slope thresholds are pre-set slope thresholds. Optionally, the third and fourth slope thresholds are used to indicate the slope threshold corresponding to a gentle road. Illustratively, the third slope threshold is 1 degree, and the fourth slope threshold is -1 degree. Where the slope data is less than the third slope threshold but greater than the fourth slope threshold, indicating that the path traversed by the first device is a gentle path, then when at least one of the two roads is a gentle road and its slope information is between the third and fourth slope thresholds, that road is identified as the first road. Optionally, where the slope data is less than or equal to the third slope threshold and greater than or equal to the fourth slope threshold, indicating that the path traversed by the first device is a gentle path, then when at least one of the two roads is a gentle road and its slope information is less than or equal to the third slope threshold or greater than or equal to the fourth slope threshold, that road is identified as the first road.

[0228] For illustration, let avg_gnss_slope represent slope data, slope_th3 represent the third slope threshold, and slope_th4 represent the fourth slope threshold. If slope_th4≤avg_gnss_slope≤slope_th3, then the path traversed by the first device is characterized as gentle. If the slope information of at least two roads satisfies slope_th4≤slope≤slope_th3, then a unique match is satisfied, and this road is selected as the first road in the map matching results.

[0229] Taking the first and second slope thresholds as opposites as an example, let avg_gnss_slope represent slope data, slope_th3 represent the third slope threshold, and -slope_th3 represent the fourth slope threshold. Then, if -slope_th3≤avg_gnss_slope≤slope_th3, the path traversed by the first device is characterized as gentle. If the slope information of at least one of the two roads satisfies -slope_th3≤slope≤slope_th3, then a unique match is satisfied, and this road is selected as the first road in the map matching results.

[0230] By matching at least two roads according to slope type, it is possible to directly use the road as the first road when there is only one road that matches the slope type of the slope data. This avoids recalculating the matching error between the slope data and the road slope information, reduces the amount of calculation, and improves the efficiency of determining the first road.

[0231] In some embodiments, if at least two roads do not meet the above-mentioned slope type matching road conditions, that is, if multiple roads among the at least two roads have slope types that match the slope types corresponding to the slope data, then a matching error is calculated for the at least two roads, and a first road is determined based on the matching error. This can be done by calculating the matching error for the at least two roads, or by calculating the matching error for the multiple roads among the at least two roads that have been determined to have slope type matching; or by directly calculating the matching error for the at least two roads, and determining the first road based on the matching error.

[0232] The method of matching roads by calculating matching errors includes at least the following processes:

[0233] Obtain the matching error between the road slope information of at least two roads and the slope data. The matching error is used to express the degree of difference between the road slope information of at least two roads and the slope data. The road with the smallest matching error is selected as the first road.

[0234] Optionally, the degree of difference between the road slope information and the slope data is calculated. In some embodiments, the slope data includes at least two segmented slopes.

[0235] Similarly, the road gradient information of the k-th road among at least two roads includes at least two road segment gradients, where k is a positive integer. Optionally, the at least two road segment gradients correspond to at least two individual segment gradients.

[0236] Specifically, when obtaining the road segment slopes corresponding to at least two different slope segments, for the i-th slope segment, the positioning data collected by the first device at the i-th time node is obtained. The latitude, longitude, and elevation information from the positioning data are then used as the starting point for orthographic projection onto the k-th road. The orthographic projection point on the k-th road is determined, and its slope information is obtained as the road segment slope corresponding to the i-th slope segment. This process yields the road segment slopes corresponding to at least two different slope segments. The road segment slopes corresponding to at least two different slope segments may be the same, different, or partially the same.

[0237] Obtain the absolute matching error between at least two segment slopes and at least two road segment slopes; and obtain the relative matching error between at least two segment slopes and at least two road segment slopes; fuse the absolute matching error and the relative matching error to obtain the matching error between the k-th road and the slope data.

[0238] The absolute matching error is used to express the error in the one-to-one correspondence between at least two segment slopes and at least two road slopes. The relative matching error is used to express the error between the first difference between at least two segment slopes and the second difference between at least two road segment slopes. Taking the matching errors between data A, data B, data C and data A', data B', data C' as the expression, the absolute matching error is used to express the fusion of the errors between data A and data A', the errors between data B and data B', and the errors between data C and data C'; the relative matching error is used to express the fusion of the first error between the first difference between data A and data B and the second difference between data A' and data B', and the second error between the third difference between data B and data C and the fourth difference between data B' and data C'.

[0239] The absolute matching error and relative matching error will be explained separately based on the above matching errors.

[0240] The absolute matching error is calculated using the following formula (Formula 4):

[0241] Formula 4:

[0242] Where absolute_error represents the absolute error between the k-th road and the slope data, trace[i].slope represents the segmented slope corresponding to the i-th time node, gnss_slope[i] represents the segmented slope of the k-th road corresponding to the i-th time node, and L is the total number of time nodes.

[0243] That is, in the process of calculating the absolute matching error, the square of the difference between the segmented slope and the road segmented slope at the time node within the historical time window is obtained, and the square of the difference between the slopes at at least two time nodes is summed and the square root is taken after dividing by the number of time nodes to obtain the absolute matching error.

[0244] The formula for calculating the relative matching error is shown in Formula 5 below:

[0245] Formula 5:

[0246] Where relative_error represents the relative error between the k-th road and the slope data, trace[i+1].slope represents the segment slope corresponding to the (i+1)-th time node, trace[i].slope represents the segment slope corresponding to the ith time node, gnss_slope[i+1] represents the road segment slope corresponding to the k-th road at the (i+1)-th time node, gnss_slope[i] represents the road segment slope corresponding to the k-th road at the ith time node, and L is the total number of time nodes.

[0247] That is, in the process of calculating the relative matching error, the first difference between the segment slopes of two adjacent time nodes within the historical time window is obtained, as well as the second difference between the road segment slopes of two adjacent time nodes. The third difference between the first and second differences is obtained, and the square of the third difference is obtained. The squares of the third differences corresponding to each node in at least two time nodes are summed, and the square root is taken after dividing the sum by the number of time nodes minus 1 to obtain the relative matching error.

[0248] In some embodiments, after obtaining the absolute matching error and the relative matching error, the absolute matching error and the relative matching error are fused. The fusion method includes at least one of summation, weighted summation, averaging, and weighted averaging. When the fusion method includes weighted summation or weighted averaging, the weights are pre-set values ​​for the absolute matching error and the relative matching error. In addition, the weight values ​​for weighted summation and weighted averaging may be the same as or different from the weight values ​​for weighted averaging.

[0249] Taking the sum of absolute and relative matching errors as an example, that is, the matching error equals the sum of the absolute and relative matching errors. Illustratively, match_error = absolute_error + relative_error, where match_error represents the matching error between the k-th road and the slope data.

[0250] By calculating the matching error and introducing absolute and relative matching errors into it, the difference between at least two roads and the slope data is analyzed from multiple perspectives, which improves the accuracy of determining the first road from at least two roads.

[0251] Optionally, the road with the smallest matching error is selected as the first road.

[0252] In some embodiments, to avoid inaccurate expression of difference information due to small differences in matching errors between at least two roads, in this embodiment, the matching errors corresponding to at least two roads are arranged from smallest to largest, and the road slope information corresponding to the first n matching errors is obtained, resulting in n road slope information, where n is an integer greater than 1. If the differences between the matching errors corresponding to the n road slope information meet the difference requirements, the road with the smallest matching error is selected as the first road.

[0253] In some embodiments, when the difference between the matching errors corresponding to the n road slopes reaches a first difference degree and the difference between the n road slope information reaches a second difference degree, the road corresponding to the road slope information with the smallest matching error is selected as the first road.

[0254] Taking the value of n as 2 as an example, after obtaining the matching error of at least two roads, the at least two roads are sorted in ascending order based on the matching error, and the roads corresponding to the two smallest matching errors are obtained, namely the road corresponding to the first matching error and the road corresponding to the second matching error in the ascending sort result. Here, R[0] represents the result with the smallest match_error, and R[1] represents the result with the second smallest match_error.

[0255] To confirm the reliability of the results, the following judgments are made:

[0256] The function checks whether ABS(R[0].slope–R[1].slope)≥work_th is satisfied. This function is used to determine whether the slope difference between the two links reaches the first difference degree. If it satisfies the condition, the function will proceed to the next step; otherwise, it will exit. ABS() represents the absolute value operation. R[0].slope represents the road slope information corresponding to R[0], R[1].slope represents the road slope information corresponding to R[1], and work_th represents the first difference degree.

[0257] In some embodiments, the road slope information includes at least two road segment slopes. Taking R[0].slope as an example, the road slope information corresponding to R[0] can be the slope value of the orthographic projection point obtained by orthographic projection of the current positioning data of the first device onto the road, or the average value of at least two road segment slopes, or the maximum value of at least two road segment slopes, or the minimum value of at least two road segment slopes, or the road segment slope value that accounts for the largest road length among at least two road segment slopes, or the median value among at least two road segment slopes.

[0258] Determine whether R[1].match_error – R[0].match_error ≥ error_th is satisfied. If not, exit. R[1].match_error represents the matching error corresponding to R[1], R[0].match_error represents the matching error corresponding to R[0], and error_th represents the second difference degree.

[0259] In some embodiments, if any of the above-mentioned confidence level judgment conditions are not met, the road with the highest probability of matching the road location information with the latitude and longitude information is selected as the first road.

[0260] When the above two confidence level judgment conditions are met, the road corresponding to R[0] is the first road.

[0261] By introducing a criterion for reliability, the road corresponding to the minimum matching error is identified as the first road when there is a clear distinction between the minimum matching error and other matching errors. This avoids the problem of low distinction and low accuracy caused by the first road having little difference from other roads from the perspective of slope analysis.

[0262] In summary, the method provided in this embodiment improves the accuracy of determining the first road by calculating the matching error between the road slope information of at least two roads and the slope data, and determining the road with the smallest matching error among the at least two roads as the first road.

[0263] In an optional embodiment, the scene recognition module 740 shown in Figure 7 is used to determine whether there are at least two roads whose location data matches that of the vehicle. If there are at least two roads whose location data matches that of the vehicle, it is determined that the first device is in a complex road environment, and then a first road is matched to the first device based on elevation information and road slope information.

[0264] Complex road environments include at least one of the following situations.

[0265] First, at least two roads have similar angles and matching probabilities.

[0266] Figure 9 is a flowchart of a method for generating a positioning screen according to another exemplary embodiment of this application. This method is executed by a computer device, a terminal device, a server, or both. Taking the execution of this method by a first device as an example, as shown in Figure 9, step 440 can also be implemented to include at least steps 910 to 920.

[0267] Step 910: In response to the existence of at least two roads among multiple roads whose road location information and latitude and longitude information match, obtain the road angle information corresponding to at least two roads from the map data.

[0268] The road angle information is used to express the layout direction of roads on the map. In some embodiments, the road angle information is an angle determined based on a preset reference direction. The road has a travel direction, such as driving direction or walking direction. Rays are constructed according to the travel direction of the road, and the angle between the ray and the reference direction is the road angle information.

[0269] In some embodiments, if road angle information corresponding to a road is pre-obtained in the map data, then after determining at least two roads based on the matching probability, the road angle information corresponding to at least two roads is obtained from the map data.

[0270] Step 920: If the difference between the road angle information corresponding to at least two roads is less than the first difference requirement, and the difference between the matching probabilities corresponding to at least two roads is less than the second difference requirement, determine the first road from the at least two roads.

[0271] The road gradient information and elevation information of the first road are matched.

[0272] When the difference between the road angle information corresponding to at least two roads is less than the first difference requirement, it indicates that there is an approximately parallel or parallel relationship between the at least two roads. This means that the directions of at least two roads are similar to the movement direction of the first device. Therefore, determining the road where the first device is located from at least two roads is highly complex, indicating that the first device is in a complex environment. In some embodiments, the difference between the road angle information corresponding to at least two roads incorporates the difference in travel direction. That is, if the travel directions of the two roads are opposite, the difference between the road angle information corresponding to the two roads will be larger.

[0273] Similarly, when the difference between the matching probabilities corresponding to at least two roads is less than the second difference requirement, it means that the relative positional and directional relationships between at least two roads and the first device are relatively close, resulting in similar matching probabilities. Therefore, the complexity of determining the road where the first device is located from at least two roads is high.

[0274] Optionally, when the difference between the road angle information corresponding to at least two roads reaches the first difference requirement, it indicates that the directional difference between at least two roads is relatively obvious, and the road with the highest matching probability is determined as the first road for positioning matching with the first device; similarly, when the difference between the matching probabilities corresponding to at least two roads reaches the second difference requirement, it indicates that the matching degree between at least two roads and the first device is relatively obvious, and there is a road with a higher matching probability, so the road with the highest matching probability is determined as the first road for positioning matching with the first device.

[0275] Optionally, when determining whether the difference between the road angle information corresponding to at least two roads is less than the first difference requirement, the difference between the road angle information of each pair of the at least two roads is judged. If the difference between the road angle information of any two roads is less than the angle threshold, it is determined that the difference between the road angle information corresponding to at least two roads is less than the first difference requirement.

[0276] Similarly, when determining whether the difference between the matching probabilities corresponding to at least two roads is less than the second difference requirement, the difference between the matching probabilities of each pair of roads in the at least two roads is judged. If the difference between the matching probabilities of any two roads is less than the probability threshold, it is determined that the difference between the matching probabilities corresponding to the at least two roads is less than the second difference requirement.

[0277] Optionally, the difference in road angle information between each pair of at least two roads is judged. If the difference between the road angle information of any two roads is less than an angle threshold, and the difference between the matching probabilities corresponding to the two roads with a difference less than the angle threshold is less than a probability threshold, then the first road that matches the road slope information and elevation information is determined from the at least two roads.

[0278] In this embodiment, firstly, based on the matching results between latitude and longitude information and road location information, it is determined whether there are at least two roads in the matching results at the current time. If there are at least two roads, the parallel relationship and matching probability difference are further judged. If there is one road in the matching results, the road is directly output as the first road that matches the positioning of the first device.

[0279] Determine whether there are at least two roads that are parallel to each other and have similar matching probabilities at the current time. That is, traverse at least two roads and determine whether there are at least two roads whose angle difference is less than the angle threshold angle_th (e.g., 5 degrees, 10 degrees, etc.) and whose matching probability difference is less than the probability threshold prob_th (e.g., 0.2, 0.3, etc.). If so, determine the first road that matches the slope information and elevation information from at least two roads.

[0280] In summary, the method provided in this application embodiment, when at least two roads are determined based on latitude and longitude information and road location information, first makes a preliminary judgment based on the differences in road angle information and matching probability. If the differences in road angle information or matching probability between at least two roads are large, then the road with the highest matching probability is output. This avoids wasting computational resources by matching based on road slope information and elevation information when there are significant differences between at least two roads and the road with the highest matching probability has a high confidence level. This improves road matching efficiency and saves computational resources.

[0281] Second, at least two roads have similar road gradient information.

[0282] Figure 10 is a flowchart of a method for generating a positioning screen according to another exemplary embodiment of this application. This method is executed by a computer device, a terminal device, a server, or both. Taking the execution of this method by a first device as an example, as shown in Figure 10, step 440 can also be implemented to include at least steps 1010 to 1020.

[0283] Step 1010: If at least two roads in the map data have road location information that matches latitude and longitude information, and the difference between the road slope information corresponding to at least two roads meets the third difference requirement, determine the first road from the at least two roads whose road slope information matches the elevation information.

[0284] In some embodiments, at least two roads are traced back in the opposite direction of the movement direction of the first device and by a preset tracing distance to obtain tracing segments corresponding to the at least two roads respectively; the average slope of the tracing segments corresponding to the at least two roads is obtained; a first average slope and a second average slope that meet the difference requirements are obtained from the average slope of the segments corresponding to the at least two roads respectively; if the difference between the first average slope and the second average slope reaches a difference threshold, it is determined that the difference between the road slope information corresponding to the at least two roads reaches a third difference requirement.

[0285] In some embodiments, during the road backtracking process, there may be cases where the path is unique or not. When the path is unique, the path is backtracked along the road until the backtracking distance reaches the preset backtracking distance.

[0286] Schematic, Figure 11 shows a path backtracking diagram provided by an exemplary embodiment of this application. As shown in Figure 11, road 1100 includes multiple road segment points, and the arrows indicate the direction of travel of the road. The current matching point 1101 is the matching point obtained by projecting the positioning data of the first device onto road 1100. The road 1100 is backtracked in the opposite direction of the movement direction of the first device, that is, in the opposite direction of the road's travel direction, until a preset backtracking distance is reached to obtain backtracking point 1102.

[0287] When the path is not unique, i.e., when there is a road fork, the system backtracks along the road. At the road fork location, for the first fork road, it is determined whether the first fork road is in the historical matching set. The historical matching set includes roads whose historical latitude and longitude information and historical road location information are matched by the first device during the historical time window. If the first fork road is in the historical matching set, the system continues to backtrack along the first fork road. For the second fork road, it is determined whether the second fork road is in the historical matching set. If the second fork road is not in the historical matching set, the second fork road is discarded.

[0288] Schematic, Figure 12 illustrates a path backtracking diagram provided by another exemplary embodiment of this application. As shown in Figure 12, road 1200 includes multiple road segment points, and the arrows indicate the direction of travel of the road. The current matching point 1201 is the matching point obtained by projecting the positioning data of the first device onto road 1200. Backtracking road 1200 in the opposite direction of the movement direction of the first device, that is, in the opposite direction of the road's travel direction, there are a first fork road 1203 and a second fork road 1204 at the junction point 1202. Based on the matching situation of the first fork road 1203 and the second fork road 1204 with the historical matching set, the backtracking result is determined. As shown in Figure 12, the first fork road 1203 and the second fork road 1204 are within the historical matching set, so a first backtracking point 1205 is determined on the first fork road 1203, and a second backtracking point 1206 is determined on the second fork road 1204.

[0289] After obtaining the backtracking point, the backtracking segment between the orthogonal projection point on the current road and the backtracking point is obtained. Since a road backtracks to at least one backtracking point, a road corresponds to at least one backtracking segment. There is a correspondence between the backtracking point and the backtracking segment.

[0290] Optionally, the backtracking segment includes positioning data corresponding to multiple historical positioning times. In some embodiments, positioning data in the backtracking segment that indicates the moving speed of the first device is less than a speed threshold is filtered out.

[0291] Obtain the average slope of the backtracked road segments corresponding to at least two roads. From the average slope of the backtracked road segments corresponding to at least two roads, obtain the first average slope with the largest value and the second average slope with the smallest value. If the difference between the first average slope and the second average slope reaches the difference threshold, determine that the difference between the road slope information corresponding to at least two roads reaches the third difference requirement.

[0292] To illustrate, taking the acquisition of n roads using latitude, longitude, and road location information as an example, m backtracking segments are obtained, where m ≥ n, and both m and n are integers greater than 1. The average slope of the corresponding road segments is calculated using the following formula:

[0293] Formula Six:

[0294] Where slope[i] represents the road slope information projected onto the backtracking segment at time node i, and slope[i+1] represents the road slope information projected onto the backtracking segment at time node (i+1). When at least two backtracking segments correspond to a road, the road slope information corresponding to the projected points on the at least two backtracking segments is summed. Here, slope[i] represents the sum of the road slope information projected onto the at least two backtracking segments at time node i, and slope[i+1] represents the sum of the road slope information projected onto the at least two backtracking segments at time node (i+1).

[0295] Where, α i Represents the weight, α i The calculation method is shown in Formula 7 below:

[0296] Formula 7:

[0297] Where trace[i].match_p represents the orthographic projection point A of the i-th time node on the backtrack segment, trace[i+1].match_p represents the orthographic projection point B of the (i+1)-th time node on the backtrack segment, and dis(trace[i].match_p,trace[i+1].match_p) represents the distance between orthographic projection point A and orthographic projection point B.

[0298] This indicates the total length of the backtracking segment.

[0299] In some embodiments, a positive slope indicates an uphill slope, and a negative slope indicates a downhill slope. Optionally, the maximum and minimum values ​​of the slope corresponding to at least two roads are obtained, and it is determined whether the difference between the maximum and minimum values ​​reaches a difference threshold. If it does, it is determined that the difference between the road slope information corresponding to at least two roads meets the third difference requirement.

[0300] It is worth noting that the above embodiments use the maximum and minimum values ​​as examples for illustration. However, intermediate values ​​can also be selected, such as the second largest value and the second smallest value, for the difference threshold judgment. This application embodiment does not limit this.

[0301] Step 1020: If there are at least two roads in the map data whose road location information matches latitude and longitude information, and the difference between the road slope information corresponding to the at least two roads is less than the third difference requirement, determine the first road whose road location information matches latitude and longitude information from the at least two roads.

[0302] If at least two roads in the map data have matching road location information with latitude and longitude information, and the difference between the road slope information corresponding to at least two roads is less than the third difference requirement, then the road whose matching degree between road location information and latitude and longitude information meets the preset requirement is selected as the first road.

[0303] Referring to the description in the above embodiments, if the difference between the road slope information corresponding to at least two roads is less than the difference threshold, it is determined that the slope difference between at least two roads is small. Therefore, when continuing to match roads to the first device based on the road slope information, the road slope information cannot provide a high reference capability. Thus, the road with the highest matching probability is directly obtained from the matching probabilities determined by the latitude and longitude information and the road location information as the first road.

[0304] In summary, the method provided in this application embodiment, when at least two roads are determined based on latitude and longitude information and road location information, firstly determines whether the slope difference between the at least two roads reaches a difference threshold. If the slope difference between the at least two roads is small, then when matching roads to the first device based on road slope information, the road slope information cannot provide a high reference capability, and the road with the highest matching probability is directly output as the first road. This avoids the road slope information calculation process failing to provide accurate positioning results, thereby improving the accuracy of road positioning on the one hand and saving computing resources on the other.

[0305] Figure 13 is a schematic diagram of the generation process of the positioning screen provided in an exemplary embodiment of this application. Taking the application of this method to an in-vehicle navigation system as an example, as shown in Figure 13, the process includes the following steps.

[0306] Step 1301: Obtain location data.

[0307] The system acquires GNSS positioning information from the navigation system. This information can be based on ordinary GNSS positioning, Precise Point Positioning (PPP) positioning, Real-Time Kinematic (RTK) positioning, or fused positioning information (fusion of GNSS positioning points and sensor signals to obtain the final trajectory estimation point). The system then outputs positioning information for the current moment, which includes at least P: vehicle latitude and longitude coordinates and altitude information; T: time of the current positioning point; and V: current vehicle speed information, including speed magnitude and direction.

[0308] Step 1302: Obtain map data.

[0309] The map data includes local map data of a certain range around the vehicle's current location, obtained based on the vehicle's positioning data. This map data includes road length, number / width of lanes, road connectivity, road gradient information, road shape point representation, road attributes (elevated roads, ramps, main / auxiliary roads, tunnels, etc.), and road classification (expressway, provincial road, rural road, etc.).

[0310] In map data, roads are typically represented by multiple line segments, each with two endpoints. There may be multiple gradient change points on this road, and the gradient value of the road changes before and after a gradient change point. The road between two gradient change points has a fixed gradient value. The road is projected onto the location data of the vehicle terminal, and the gradient value corresponding to the interval where the projection point falls is the gradient value of the road at the current moment.

[0311] Step 1303: Based on the matching probability between the latitude and longitude information in the positioning data and the road location information in the map data, determine at least one candidate road.

[0312] Matching probability can be defined by the distance and angle between the GNSS positioning point and each road. The closer the point is to the road, the higher the probability, and the farther the point is from the road, the lower the probability. Similarly, the larger the angle between the movement direction of the GNSS positioning point and the road, the lower the probability, and the smaller the angle, the higher the probability.

[0313] The direction of movement can be the direction corresponding to the vehicle's speed in the positioning data, or it can be the direction obtained by collecting the vehicle's path within a historical time period.

[0314] In some embodiments, the determination of the matching probability may also consider the connectivity between roads, as well as the degree of agreement between the angle of the connected roads and the angle change of the GNSS signal. The closer the angle change is to the road angle, the higher the transition probability, and vice versa. After determining the matching probability, the Viterbi algorithm is used to obtain the current candidate roads and their corresponding matching probabilities.

[0315] This is an illustration, outputting matching results (candidates) per second. candidates.size represents the current number of candidate roads, and candidate[i].prob represents the matching probability of a candidate road.

[0316] Step 1304: Determine whether there are at least two candidate paths.

[0317] Specifically, it checks whether the value of candidates.size is greater than 1. If the value of candidates.size is greater than 1, it means that there are at least two candidate roads. If the value of candidates.size is equal to 1, it means that there is only one candidate road.

[0318] Step 1305: If there is only one candidate road, select that candidate road as the target road to match the first device.

[0319] If there is only one candidate road, the candidate road will be directly used as the target road for the first device to match, and the map screen showing the first device positioned on the target road will be displayed.

[0320] Step 1306: If there are at least two candidate roads, determine whether the difference in road angle or the difference in matching probability between the at least two candidate roads is large.

[0321] If it is determined from step 1304 above that there are at least two candidate roads, then continue to make subsequent judgments on at least two candidate roads.

[0322] In some embodiments, historical matching information is cached while map matching is being completed, including at least the following data:

[0323] 1. GNSS positioning information within a time window, denoted as G = (t, p), where p contains three dimensions: longitude, latitude, and altitude.

[0324] 2. Map matching information at each time point within a time window, denoted as M = (t, link_id, match_p, prob, angle, slope).

[0325] In some embodiments, the difference in matching probabilities between at least two candidate roads is determined based on candidate[i].prob in the matching results output per second (candidates), and the difference in road angles between at least two candidate roads is determined based on angle in the map matching information.

[0326] Step 1307: If there is a large difference in road angle or a large difference in matching probability between at least two candidate roads, the candidate road with the highest matching probability shall be selected as the target road.

[0327] Specifically, a significant difference in road angles between at least two candidate roads indicates a substantial difference between them. The process involves determining whether at least two of the d candidate roads at time t are parallel and have similar probabilities (d > 1). This is achieved by iterating through the d candidate roads and checking if at least two candidate roads have an angle difference less than the angle threshold `angle_th`, and if the difference in their matching probabilities (`prob`) is less than the probability threshold `prob_th`. If such a difference exists, then at least two candidate roads are identified as having a significant difference in road angles or a significant difference in their matching probabilities. The candidate road with the highest matching probability is then selected as the target road.

[0328] Step 1308: If the difference in road angle between at least two candidate roads is small and the difference in matching probability is small, determine whether the difference in road slope information between at least two candidate roads is large.

[0329] In some embodiments, orthographic projection is performed on at least two candidate roads starting from the location corresponding to the positioning data of the vehicle terminal to obtain orthographic projection points on at least two candidate roads. Road slope information of the location of the orthographic projection points on at least two candidate roads is obtained, and it is determined whether the difference between the road slope information of the location of the orthographic projection points meets the difference requirement.

[0330] Step 1309: If the difference in road slope information between at least two candidate roads is small, then the candidate road with the highest matching probability is selected as the target road.

[0331] Determine whether the average slope difference of each candidate road meets the discrimination threshold work_th. Optionally, backtracking is performed on the d candidate roads at a certain distance threshold dis_th. Backtracking is performed based on the current candidate road. If the candidate road has only one upstream, backtracking continues until the set threshold dis_th is reached. If the candidate road has multiple upstreams, each upstream branch is checked to see if it is in the historical matching set. If it is in the historical matching set, backtracking is performed along that branch. If it is not in the historical matching set, the branch is discarded.

[0332] In determining whether the current fork in the road is located in the historical matching set, the link_id of the current fork is searched in the historical matching information M = (t, link_id, match_p, prob, angle, slope). If the link_id is found, it is considered a match; otherwise, it is discarded. m backtracking segments are obtained, where m ≥ d, denoted as (link_id, trace, slope). The same link_id can correspond to multiple traces. The trace is used to identify the matching information (match_p, slope) at a historical moment within the historical time window. The trace is an array where match_p represents the orthogonal projection point of the signal onto the candidate road, and slope represents the slope information corresponding to the projection point. The slope in the trace is the slope information corresponding to the orthogonal projection point on the backtracking segment. The trace length corresponding to each link_id at the same moment is the same (denoted by L). If GNSS positioning points are updated every second, this length represents the number of seconds it takes for the vehicle to travel the dis_th distance. Optionally, stationary or low-speed points are filtered in the backtracking segment data.

[0333] The slope for at least two candidate roads is calculated as a distance-weighted average of the slopes of each matched segment. The maximum and minimum values ​​of all slopes corresponding to all link_ids are taken, and the difference between the maximum and minimum values ​​is calculated as diff_slope = slope_max - slope_min. If diff_slope ≥ work_th, then the slope data generated by the movement of the vehicle terminal is calculated.

[0334] Step 1310: If the road slope information between at least two candidate roads differs significantly, calculate the slope data generated by the movement of the vehicle terminal.

[0335] In some embodiments, the elevation information in the positioning data corresponding to the historical dis_th distance is converted into slope to form a slope sequence within the dis_th distance with a length of L. The conversion method is to use the arctangent function to obtain the average slope avg_gnss_slope generated by the movement of the vehicle terminal through the GNSS elevation difference and distance difference generated by the sequentially arranged GNSS signals.

[0336] Step 1311: Determine whether the slope type of at least two candidate roads uniquely matches the slope type of the slope data.

[0337] The slope type includes at least one of uphill, downhill, and gentle slope. In some embodiments, when the slope data is greater than 2 degrees, it indicates that the road the vehicle travels on is an uphill road; when the slope data is less than -2 degrees, it indicates that the road the vehicle travels on is a downhill road; when the slope data is between -2 degrees and 2 degrees, it indicates that the road the vehicle travels on is a gentle slope.

[0338] Step 1312: If a unique match is found, the candidate road with the unique match is determined as the target road.

[0339] If avg_gnss_slope ≥ slope_th1 (e.g., 1.5 degrees, 2.0 degrees), it means that the path traversed by the vehicle terminal is uphill. If in the previous step, there is one and only one slope that satisfies slope ≥ slope_th1, then a unique match is satisfied. In the map matching results, the candidate road corresponding to that link_id is selected as the target road.

[0340] Similarly, if avg_gnss_slope≤-1.0×slope_th1, it means that the path traversed by the vehicle terminal is downhill. If in the previous step, there is one and only one slope in (link_id, trace, slope) that satisfies slope≤-1.0×slope_th1, then a unique match is satisfied. In the map matching results, the candidate road corresponding to that link_id is selected as the target road.

[0341] If -1.0×slope_th2≤avg_gnss_slope≤slope_th2, it means that the path traversed by the vehicle terminal is flat. If in the previous step, there is one and only one slope in (link_id, trace, slope) that satisfies -1.0×slope_th2≤slope≤slope_th2, then a unique match is satisfied. In the map matching results, the candidate road corresponding to the link_id is selected as the target road.

[0342] Step 1313: If the slope type matching fails or is not unique, determine the matching error between the road slope information of at least two candidate roads and the slope data.

[0343] For the backtracked (link_id, trace, slope) data, calculate the matching error between the road slope information and the slope data. The matching error is divided into two parts: absolute matching error and relative matching error.

[0344] In the process of calculating the absolute matching error, the square of the difference between the segment slope and the road segment slope at the time node within the historical time window is obtained, and the square of the difference between the slopes at at least two time nodes is summed and the square root is taken after dividing by the number of time nodes to obtain the absolute matching error.

[0345] In the process of calculating the relative matching error, the first difference between the segment slopes of two adjacent time nodes within the historical time window is obtained, as well as the second difference between the road segment slopes of two adjacent time nodes. The third difference between the first and second differences is obtained, and the square of the third difference is calculated. The squares of the third differences corresponding to each node in at least two time nodes are summed, and the square root is taken from the value obtained by subtracting 1 from the number of time nodes to obtain the relative matching error.

[0346] In some embodiments, after obtaining the absolute matching error and the relative matching error, the absolute matching error and the relative matching error are fused, wherein the fusion method includes at least one of summation, weighted summation, averaging, and weighted averaging.

[0347] Taking the sum of absolute and relative matching errors as an example, that is, the matching error equals the sum of the absolute and relative matching errors. Illustratively, match_error = absolute_error + relative_error, where match_error represents the matching error between the road slope information and the slope data of the k-th candidate road.

[0348] Step 1314: Determine whether the difference between the matching errors of the n candidate roads with the smallest matching error reaches the first degree of difference, and whether the difference in slope of the n candidate roads reaches the second degree of difference.

[0349] Step 1315: If the difference between the matching errors of the n candidate roads with the smallest matching error reaches the first degree of difference, and the difference in slope of the n candidate roads with the smallest matching error reaches the second degree of difference, then the candidate road with the smallest matching error is taken as the target road.

[0350] Step 1316: If the difference between the matching errors of the n candidate roads with the smallest matching error is less than the first difference degree, or the difference in slope of the n candidate roads with the smallest matching error is less than the second difference degree, output the candidate road with the highest matching probability as the target road.

[0351] After obtaining the matching error, we get the quadruple data R = (link_id, trace, slope, match_error). Based on match_error, we sort the data in ascending order and obtain the two results with the smallest matching error, which are the first and second results in the sorted R array. R[0] represents the result with the smallest match_error, and R[1] represents the result with the second smallest match_error.

[0352] Determine whether ABS(R[0].slope–R[1].slope)≥work_th is satisfied. This is used to determine whether the slope difference between the two links meets the threshold. If it does, proceed to the next condition; otherwise, exit.

[0353] Determine if the condition R[1].match_error – R[0].match_error ≥ error_th is met; if not, exit.

[0354] The above exit process is used to indicate the candidate road with the highest matching probability as the target road.

[0355] Once the above two conditions are met, the road corresponding to R[0].link_id is the current target road. Optionally, the matching result is determined by adjusting the matching probability based on R[0].link_id.

[0356] In the above embodiments, the example given is matching road location information and latitude / longitude information first, followed by matching road slope information and elevation information. In an optional embodiment, after obtaining the positioning data and map data of the first device, road location information and latitude / longitude information, as well as road slope information and elevation information, can also be matched simultaneously; alternatively, road slope information and elevation information can be matched first, followed by matching road location information and latitude / longitude information. This application embodiment does not limit this approach. The two scenarios described above will be explained separately.

[0357] Figure 14 is a flowchart of a method for generating a location screen according to another exemplary embodiment of this application. This method is executed by a computer device, a terminal device, a server, or both. Taking the execution of this method by a first device as an example, as shown in Figure 14, in the case of synchronously matching road location information and latitude and longitude information, as well as road slope information and elevation information, the following step 1420 is included after step 420 above.

[0358] Step 1420: In response to the matching of the road location information of the third road with the latitude and longitude information in the map data, and the matching of the road slope information of the third road with the elevation information, a third display instruction is generated based on the third road to display the positioning screen of the first device on the third road.

[0359] In response to the matching of the road location information and latitude and longitude information of the third road among multiple roads, and the matching of the road slope information and elevation information of the third road, a third display command is generated based on the third road to display the positioning screen of the first device on the third road.

[0360] The location information of multiple roads in the map data is matched with latitude and longitude information to obtain at least one first candidate road whose location information is matched with latitude and longitude information; and the slope information of multiple roads in the map data is matched with elevation information to obtain at least one second candidate road whose location information is matched with latitude and longitude information. A third road is determined from at least one first candidate road and at least one second candidate road.

[0361] In some embodiments, when matching the road location information of multiple roads in map data with latitude and longitude information, the matching probability between the road location information of multiple roads and latitude and longitude information is calculated, and the road with a matching probability that meets the probability requirement is determined as the first candidate road.

[0362] Optionally, the location information and angle information of each of the multiple roads can be obtained from the map data. The location information is used to express the position of the road on the map, and the angle information is used to express the layout direction of the road on the map. The movement direction data of the first device in the positioning data can also be obtained.

[0363] The process involves determining a first matching probability between road location information and latitude / longitude information; and a second matching probability between road angle information and movement direction data; and then determining the matching probability between the road and the first device based on the first and second matching probabilities. It is worth noting that the process of calculating the matching probability can refer to step 440 above, and will not be repeated here.

[0364] In some embodiments, the road with a matching probability reaching a preset probability threshold is selected as the first candidate road; or, the road with the highest matching probability of a preset number is selected as the first candidate road.

[0365] Similarly, when matching the road slope information with the elevation information of multiple roads in the map data, the matching error between the road slope information and the elevation information of each road is calculated, and the roads whose matching error meets the error requirements are selected as the second candidate roads.

[0366] Optionally, first change data of elevation information within a historical time window and second change data of latitude and longitude information within a historical time window are obtained. Arctangent values ​​are calculated for the first change data and the second change data to determine the slope data of the first device within the historical time window, and the matching error between the road slope information of each of the multiple roads and the slope data is determined.

[0367] The system acquires a first change sequence of elevation information at at least two time points within a historical time window; and acquires a second change sequence of latitude and longitude information at at least two time points within a historical time window; acquires a first elevation difference between the elevation information at the i-th time point and the elevation information at the (i-1)-th time point, where i is a positive integer; acquires a first distance difference between the latitude and longitude information at the i-th time point and the latitude and longitude information at the (i-1)-th time point; calculates the arctangent value of the first elevation difference and the first distance difference to obtain the i-th segment slope; and acquires the average of the segment slopes corresponding to at least two time points to obtain the slope data of the first device within the historical time window.

[0368] Determine the matching error between road slope information and slope data. In some embodiments, roads with matching errors less than a preset error threshold are selected as second candidate roads; or, roads with the smallest preset number of matching errors are selected as second candidate roads.

[0369] In some embodiments, the slope data includes at least two segmented slopes, and the road slope information of the k-th road among multiple roads includes road segmented slopes corresponding to the at least two segmented slopes, where k is a positive integer. When determining the matching error between the road slope information and the slope data, the absolute matching error between the at least two segmented slopes and the at least two road segmented slopes is obtained; and the relative matching error between the at least two segmented slopes and the at least two road segmented slopes is obtained; the absolute matching error and the relative matching error are fused to obtain the matching error between the k-th road and the slope data.

[0370] The absolute matching error is used to express the error in the one-to-one correspondence between at least two segment slopes and at least two road segment slopes; the relative matching error is used to express the error between the first difference between at least two segment slopes and the second difference between at least two road segment slopes.

[0371] In some embodiments, if the differences between the matching errors corresponding to multiple road slope information meet the difference requirement, the road whose matching error meets the error requirement is selected as the second candidate road. Optionally, if the differences between the matching errors corresponding to multiple road slope information reach a first difference degree, and the differences between n+ road slope information reach a second difference degree, the road whose matching error meets the error requirement is selected as the second candidate road.

[0372] In some embodiments, after obtaining at least one first candidate road and at least one second candidate road, an overlapping road is selected from the at least one first candidate road and at least one second candidate road as a third road.

[0373] Optionally, if a road belongs to at least one first candidate road and at least one second candidate road, then that road is designated as the third road.

[0374] If at least two roads simultaneously belong to the first and second candidate roads, a third road is determined from these two roads based on their respective matching probabilities and matching errors. For example, the matching probabilities of the at least two roads are converted into probability scores, where a higher matching probability corresponds to a higher probability score. For instance, an 80% matching probability corresponds to a probability score of 8 points, a 78% matching probability corresponds to a probability score of 7.8 points, and so on. The matching errors of the at least two roads are converted into error scores, where a higher matching error corresponds to a lower error score. For instance, the maximum matching error is 100. When the matching error is 20, the corresponding error score is (100-20) / 10, which is 8 points; when the matching error is 70, the corresponding error score is 3 points.

[0375] The path with the highest sum of probability score and error score is selected as the third path. Alternatively, when there are multiple paths with the same and highest probability score and error score, the path with the highest probability score among these multiple paths is selected as the third path; or, the path with the highest error score among these multiple paths is selected as the third path; or, a path is randomly selected from the multiple paths as the third path.

[0376] In this embodiment, the method for determining the matching probability and matching error can be referred to the description in the above embodiments, and will not be repeated here.

[0377] In summary, the method provided in this application, when matching the road where the first device is located on the map, adds a road slope information matching process based on elevation information in parallel with the two-dimensional matching based on latitude and longitude data. According to the elevation information of the first device, a road with matching road slope information and elevation information is matched to the first device as a third road, thereby enabling the display of the map screen of the first device on the third road. This improves the accuracy of matching the road where the first device is located, and in navigation application scenarios, it improves the timeliness of switching navigation routes and improves the human-computer interaction efficiency during the navigation process.

[0378] Figure 15 is a flowchart of a method for generating a positioning screen according to another exemplary embodiment of this application. This method is executed by a computer device, a terminal device, a server, or both. Taking the execution of this method by a first device as an example, as shown in Figure 15, the method first matches road slope information and elevation information, then matches road location information and latitude and longitude information. Following step 420, the method further includes the following step 1520.

[0379] Step 1520: In response to the existence of at least two roads among the multiple roads in the map data whose road slope information and elevation information match, a fourth road is determined from the at least two roads, and the road location information of the fourth road is matched with the latitude and longitude information.

[0380] In response to the existence of at least two roads among multiple roads whose road slope information and elevation information match, a fourth road is determined from the at least two roads, and the road location information of the fourth road is matched with latitude and longitude information.

[0381] The fourth path is used to generate a fourth display instruction to display the positioning screen of the first device in the fourth path.

[0382] In some embodiments, the road slope information of multiple roads in the map data is first matched with the elevation information of the first device to determine at least two roads from the multiple roads.

[0383] Optionally, first change data of elevation information within a historical time window and second change data of latitude and longitude information within a historical time window are obtained. Arctangent values ​​are calculated for the first change data and the second change data to determine the slope data of the first device within the historical time window, and the matching error between the road slope information of each of the multiple roads and the slope data is determined.

[0384] The system acquires a first change sequence of elevation information at at least two time points within a historical time window; and acquires a second change sequence of latitude and longitude information at at least two time points within a historical time window; acquires a first elevation difference between the elevation information at the i-th time point and the elevation information at the (i-1)-th time point, where i is a positive integer; acquires a first distance difference between the latitude and longitude information at the i-th time point and the latitude and longitude information at the (i-1)-th time point; calculates the arctangent value of the first elevation difference and the first distance difference to obtain the i-th segment slope; and acquires the average of the segment slopes corresponding to at least two time points to obtain the slope data of the first device within the historical time window.

[0385] In some embodiments, at least two paths with a matching error less than a preset error threshold are determined; or, at least two paths with a preset number of matching errors are determined.

[0386] The road location information of at least two roads is matched with latitude and longitude information to determine a fourth road from the at least two roads. Optionally, when matching the road location information of each of the at least two roads with latitude and longitude information, the matching probability between the road location information of each of the at least two roads and the latitude and longitude information is calculated, and the road with a matching probability that meets the probability requirement is determined as the fourth road.

[0387] Optionally, obtain the road location information and road angle information of at least two roads from the map data. The road location information is used to express the location of the road in the map, and the road angle information is used to express the layout direction of the road in the map. Obtain the movement direction data of the first device from the positioning data.

[0388] Determine a first matching probability between road location information and latitude and longitude information; and determine a second matching probability between road angle information and movement direction data; and determine the matching probability between at least two roads and the first device based on the first matching probability and the second matching probability.

[0389] In some embodiments, the road with the highest matching probability is designated as the fourth road.

[0390] In this embodiment, the method for determining the matching probability and matching error can be referred to the description in the above embodiments, and will not be repeated here.

[0391] In summary, the method provided in this application, when matching the road where the first device is located on the map, firstly matches at least two roads whose slope information and elevation information match the first device based on the elevation information of the first device, and then performs two-dimensional matching based on latitude and longitude data to determine a fourth road, thereby displaying the map screen of the first device on the fourth road. This improves the accuracy of matching the road where the first device is located, and in navigation application scenarios, it improves the timeliness of switching navigation routes and improves the efficiency of human-computer interaction during the navigation process.

[0392] Figure 16 is a structural block diagram of a positioning screen generation apparatus provided in an exemplary embodiment of this application. As shown in Figure 16, the apparatus includes:

[0393] The acquisition module 1610 is used to acquire the positioning data of the first device and to acquire map data. The positioning data includes the latitude and longitude information and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0394] The determining module 1620 is configured to, in response to the existence of at least two roads among the plurality of roads whose road location information matches the latitude and longitude information, determine a first road from the at least two roads, wherein the road slope information of the first road matches the elevation information; wherein the first road is used to generate a first display instruction to display a positioning screen of the first device located on the first road.

[0395] In an optional embodiment, the determining module 1620 is further configured to acquire first change data of the elevation information within a historical time window, and acquire second change data of the latitude and longitude information within the historical time window; acquire the arctangent values ​​of the first change data and the second change data, and determine the slope data of the first device within the historical time window;

[0396] The determining module 1620 is further configured to determine the first road from the at least two roads, wherein the road slope information of the first road matches the slope data.

[0397] In an optional embodiment, the determining module 1620 is further configured to perform at least one of the following:

[0398] If the slope data is greater than a first slope threshold, obtain the matching result between the road slope information of the at least two roads and the first slope threshold; in response to the matching result indicating that there is a road with road slope information greater than the first slope threshold, identify the road as the first road;

[0399] If the slope data is less than the second slope threshold, obtain the matching result between the road slope information of the at least two roads and the second slope threshold; in response to the matching result indicating that there is a road with a road slope information less than the second slope threshold, determine the road as the first road, wherein the first slope threshold is greater than or equal to the second slope threshold;

[0400] If the slope data is between the third slope threshold and the fourth slope threshold, obtain the matching results of the road slope information of the at least two roads with the third slope threshold and the fourth slope threshold; in response to the matching result indicating that there is a road whose road slope information is between the third slope threshold and the fourth slope threshold, identify the road as the first road.

[0401] In an optional embodiment, the determining module 1620 is further configured to obtain the matching error between the road slope information of the at least two roads and the slope data, wherein the matching error is used to express the degree of difference between the road slope information and the slope data; and to obtain the road with the smallest matching error as the first road.

[0402] In an optional embodiment, the slope data includes at least two segmented slopes, and the road slope information of the k-th road among the at least two roads includes at least two road segmented slopes, where k is a positive integer;

[0403] The determining module 1620 is further configured to obtain the absolute matching error between the at least two segment slopes and the at least two road segment slopes; and to obtain the relative matching error between the at least two segment slopes and the at least two road segment slopes; and to fuse the absolute matching error and the relative matching error to obtain the matching error between the k-th road and the slope data.

[0404] Wherein, the absolute matching error is used to express the error in the one-to-one correspondence between the at least two segment slopes and the at least two road segment slopes; the relative matching error is used to express the error between the first difference between the at least two segment slopes and the second difference between the at least two road segment slopes.

[0405] In an optional embodiment, the determining module 1620 is further configured to arrange the matching errors corresponding to the at least two roads from smallest to largest; obtain the road slope information corresponding to the first n matching errors respectively, to obtain n road slope information, where n is an integer greater than 1; and, if the difference between the matching errors corresponding to the n road slope information meets the difference requirement, select the road corresponding to the road slope information with the smallest matching error as the first road.

[0406] In an optional embodiment, the determining module 1620 is further configured to, when the difference between the matching errors corresponding to the n road slope information reaches a first difference degree and the difference between the n road slope information reaches a second difference degree, obtain the road corresponding to the road slope information with the smallest matching error as the first road.

[0407] In an optional embodiment, the determining module 1620 is further configured to acquire a first change sequence of the elevation information at at least two time points; and to acquire a second change sequence of the latitude and longitude information at the at least two time points; wherein the at least two time points are within the historical time window.

[0408] The determining module 1620 is further configured to obtain a first elevation difference between the elevation information at the i-th time node and the elevation information at the (i-1)-th time node, where i is a positive integer; obtain a first distance difference between the latitude and longitude information at the i-th time node and the latitude and longitude information at the (i-1)-th time node; obtain the arctangent value of the first elevation difference and the first distance difference to obtain the i-th segment slope; and obtain the average value of the segment slopes corresponding to the at least two time nodes to obtain the slope data of the first device within the historical time window.

[0409] In an optional embodiment, the determining module 1620 is further configured to obtain road angle information from the map data, the road angle information being used to express the layout direction of the road in the map;

[0410] The acquisition module 1610 is further configured to acquire the movement direction data of the first device in the positioning data;

[0411] The determining module 1620 is further configured to determine a first matching probability between the road location information and the latitude and longitude information; and to determine a second matching probability between the road angle information and the movement direction data;

[0412] The determining module 1620 is further configured to determine the matching probability between the road and the first device based on the first matching probability and the second matching probability; and to determine the at least two roads whose road location information matches the latitude and longitude information based on the matching probability.

[0413] In an optional embodiment, the determining module 1620 is further configured to obtain road angle information corresponding to the at least two roads from the map data, wherein the road angle information is used to express the layout direction of the roads in the map;

[0414] The determining module 1620 is further configured to determine the first road from the at least two roads when the difference between the road angle information corresponding to the at least two roads is less than a first difference requirement and the difference between the matching probabilities corresponding to the at least two roads is less than a second difference requirement.

[0415] In an optional embodiment, the determining module 1620 is further configured to perform at least one of the following operations:

[0416] If the difference between the road slope information corresponding to the at least two roads reaches the third difference requirement, the first road whose road slope information matches the elevation information is determined from the at least two roads.

[0417] If the difference between the road slope information corresponding to the at least two roads is less than the third difference requirement, the first road whose road location information matches the latitude and longitude information is determined from the at least two roads.

[0418] In an optional embodiment, as shown in FIG17, the device further includes:

[0419] The backtracking module 1630 is used to backtrack the at least two roads in the opposite direction of the first device's movement direction and a preset backtracking distance to obtain the backtracking road segments corresponding to the at least two roads respectively;

[0420] The acquisition module 1610 is further configured to acquire the average slope of the backtracking segments corresponding to the at least two roads respectively; and to acquire a first average slope and a second average slope that meet the difference requirements from the average slope of the segments corresponding to the at least two roads respectively.

[0421] The determining module 1620 is further configured to determine, when the difference between the first average slope and the second average slope reaches the difference threshold, that the difference between the road slope information corresponding to the at least two roads reaches the third difference requirement.

[0422] In an optional embodiment, the determining module 1620 is further configured to use the latitude and longitude information and the elevation information as projection starting points to draw orthographic projection lines to the at least two roads to obtain orthographic projection points corresponding to the at least two roads respectively; and use the orthographic projection points as data acquisition points to obtain the road slope information corresponding to the at least two roads respectively.

[0423] The acquisition module 1610 is further configured to acquire the first road whose road slope information matches the elevation information.

[0424] In an optional embodiment, the acquisition module 1610 is further configured to acquire the positioning data of the first device; determine the map area where the first device is located based on the latitude and longitude information in the positioning data; and acquire the map data corresponding to the map area.

[0425] In an optional embodiment, the acquisition module 1610 is further configured to divide a rectangular area with a preset side length, using the latitude and longitude information as the dividing center, as the map area where the first device is located.

[0426] In an optional embodiment, the determining module 1620 is further configured to, in response to the existence of a second road among the multiple roads in the map data whose road location information matches the latitude and longitude information, and whose road slope information matches the elevation information, generate a second display instruction based on the second road to display a positioning screen of the first device located on the second road.

[0427] In summary, the device provided in this application, when matching the road where the first device is located on the map, adds a matching process based on road slope information based on elevation information to the two-dimensional matching based on latitude and longitude data. According to the elevation information of the first device, it matches the road slope information and elevation information to the first device as the first road, and displays the map screen of the first device on the first road. This improves the accuracy of matching the road where the first device is located, and in navigation application scenarios, it improves the timeliness of switching navigation routes and improves the efficiency of human-computer interaction during the navigation process.

[0428] Figure 18 is a structural block diagram of a positioning screen generation apparatus provided in an exemplary embodiment of this application. As shown in Figure 18, the apparatus includes:

[0429] The acquisition module 1810 is used to acquire the positioning data of the first device and to acquire map data. The positioning data includes the latitude and longitude information and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0430] The generation module 1820 is configured to generate a third display instruction based on the third road in response to the matching of the road location information of the third road with the latitude and longitude information, and the matching of the road slope information of the third road with the elevation information, so as to display the positioning screen of the first device on the third road.

[0431] Figure 19 is a structural block diagram of a positioning screen generation apparatus provided in an exemplary embodiment of this application. As shown in Figure 19, the apparatus includes:

[0432] The acquisition module 1910 is used to acquire the positioning data of the first device and to acquire map data. The positioning data includes the latitude and longitude information and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads.

[0433] The determination module 1920 is configured to determine a fourth road from the at least two roads in response to the existence of at least two roads in the plurality of roads whose road slope information matches the elevation information, wherein the road location information of the fourth road matches the latitude and longitude information;

[0434] The fourth path is used to generate a fourth display instruction to display the positioning screen of the first device in the fourth path.

[0435] This application also provides a computer device including a processor and a memory. The memory stores at least one instruction, which is loaded and executed by the processor to implement the positioning screen generation method provided in the above-described method embodiments. It should be noted that the computer device may be the one shown in Figure 20 below.

[0436] Please refer to Figure 20, which shows a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application. Specifically, the computer device 2000 includes a Central Processing Unit (CPU) 2001, a system memory 2004 including Random Access Memory (RAM) 2002 and Read-Only Memory (ROM) 2003, and a system bus 2005 connecting the system memory 2004 and the CPU 2001. The computer device 2000 also includes a basic input / output system (I / O system) 2006 that facilitates the transfer of information between various devices within the computer, and a mass storage device 2007 for storing the operating system 2013, application programs 2014, and other program modules 2015.

[0437] The basic input / output system 2006 includes a display 2008 for displaying information and an input device 2009, such as a mouse or keyboard, for user input. Both the display 2008 and the input device 2009 are connected to the central processing unit 2001 via an input / output controller 2010 connected to the system bus 2005. The basic input / output system 2006 may also include the input / output controller 2010 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 2010 also provides output to a display screen, printer, or other types of output devices.

[0438] The mass storage device 2007 is connected to the central processing unit 2001 via a mass storage controller (not shown) connected to the system bus 2005. The mass storage device 2007 and its associated computer-readable media provide non-volatile storage for the computer device 2000. That is, the mass storage device 2007 may include computer-readable media (not shown), such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0439] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage media are not limited to the above-mentioned types. The system memory 2004 and mass storage device 2007 described above can be collectively referred to as memory.

[0440] The memory stores one or more programs, which are configured to be executed by one or more central processing units 2001. The one or more programs contain instructions for implementing the above-described method for generating a positioning image or a translation method based on a machine translation model. The central processing unit 2001 executes the one or more programs to implement the method for generating a positioning image or the translation method based on a machine translation model provided in the above-described method embodiments.

[0441] According to various embodiments of this application, the computer device 2000 can also be connected to a remote computer on a network, such as the Internet. That is, the computer device 2000 can be connected to the network 2012 via the network interface unit 2011 connected to the system bus 2005, or the network interface unit 2011 can be used to connect to other types of networks or remote computer systems (not shown).

[0442] This application also provides a computer device, which includes a memory and a processor. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads the at least one instruction, at least one program, code set, or instruction set to implement the above-described method for generating a positioning screen.

[0443] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the above-described method for generating a positioning screen.

[0444] This application also provides a computer program product that, when run on a computer, causes the computer to execute the positioning screen generation method provided in the above-described method embodiments.

Claims

1. A method for generating a positioning image, executed by a computer device, the method comprising: The system acquires the positioning data of a first device and map data, wherein the positioning data includes the latitude, longitude and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads. In response to the existence of at least two roads among the plurality of roads whose road location information matches the latitude and longitude information, a first road is determined from the at least two roads, wherein the road slope information of the first road matches the elevation information; wherein the first road is used to generate a first display instruction to display a positioning screen of the first device on the first road.

2. The method according to claim 1, wherein, Determining the first road from the at least two roads includes: Acquire the first change data of the elevation information within a historical time window, and acquire the second change data of the latitude and longitude information within the historical time window; Obtain the arctangent values ​​of the first change data and the second change data, and determine the slope data of the first device within the historical time window; The first road is determined from the at least two roads, and the road slope information of the first road is matched with the slope data.

3. The method according to claim 1 or 2, wherein, Determining the first road from the at least two roads includes at least one of the following: If the slope data is greater than a first slope threshold, obtain the matching result between the road slope information of the at least two roads and the first slope threshold; in response to the matching result indicating that there is a road with road slope information greater than the first slope threshold, identify the road as the first road; If the slope data is less than the second slope threshold, obtain the matching result between the road slope information of the at least two roads and the second slope threshold; in response to the matching result indicating that there is a road with a road slope information less than the second slope threshold, determine the road as the first road, wherein the first slope threshold is greater than or equal to the second slope threshold; If the slope data is between the third slope threshold and the fourth slope threshold, obtain the matching results of the road slope information of the at least two roads with the third slope threshold and the fourth slope threshold; in response to the matching result indicating that there is a road whose road slope information is between the third slope threshold and the fourth slope threshold, identify the road as the first road.

4. The method according to any one of claims 1 to 3, wherein, Determining the first road from the at least two roads includes: The matching error between the road slope information of the at least two roads and the slope data is obtained, and the matching error is used to express the degree of difference between the road slope information and the slope data; The road with the smallest matching error is selected as the first road.

5. The method according to any one of claims 1 to 4, wherein, The slope data includes at least two segmented slopes, and the road slope information of the kth road in the at least two roads includes at least two road segmented slopes, where k is a positive integer; The step of obtaining the matching error between the road slope information of the at least two roads and the slope data includes: Obtain the absolute matching error between the at least two segment slopes and the at least two road segment slopes; and obtain the relative matching error between the at least two segment slopes and the at least two road segment slopes. By combining the absolute matching error and the relative matching error, the matching error between the k-th road and the slope data is obtained; Wherein, the absolute matching error is used to express the error in the one-to-one correspondence between the at least two segment slopes and the at least two road segment slopes; the relative matching error is used to express the error between the first difference between the at least two segment slopes and the second difference between the at least two road segment slopes.

6. The method according to any one of claims 1 to 5, wherein, The step of obtaining the road with the smallest matching error and using it as the first road includes: Arrange the matching errors corresponding to the at least two roads from smallest to largest; Obtain the road slope information corresponding to the first n matching errors, and get n road slope information, where n is an integer greater than 1; If the differences between the matching errors corresponding to the n road slope information meet the difference requirements, the road with the smallest matching error is selected as the first road.

7. The method according to any one of claims 1 to 6, wherein, The step of selecting the road with the smallest matching error as the first road, provided that the differences between the matching errors corresponding to the n road slope information meet the difference requirements, includes: If the difference between the matching errors corresponding to the n road slope information reaches a first difference degree and the difference between the n road slope information reaches a second difference degree, the road with the road slope information with the smallest matching error is selected as the first road.

8. The method according to any one of claims 1 to 7, wherein, The step of acquiring the first change data of the elevation information within a historical time window and acquiring the second change data of the latitude and longitude information within the historical time window includes: Acquire a first change sequence consisting of the elevation information at at least two time points; and acquire a second change sequence consisting of the latitude and longitude information at the at least two time points; wherein the at least two time points are within the historical time window; The step of obtaining the arctangent values ​​of the first changed data and the second changed data includes: Obtain the first elevation difference between the elevation information at the i-th time node and the elevation information at the (i-1)-th time node, where i is a positive integer; obtain the first distance difference between the latitude and longitude information at the i-th time node and the latitude and longitude information at the (i-1)-th time node; obtain the arctangent value of the first elevation difference and the first distance difference to obtain the i-th segment slope. The average value of the segmented slope corresponding to the at least two time nodes is obtained to obtain the slope data of the first device within the historical time window.

9. The method according to any one of claims 1 to 8, wherein, The method further includes: Obtain road angle information from the map data, the road angle information being used to express the layout direction of the road in the map; obtain the movement direction data of the first device from the positioning data; Determine a first matching probability between the road location information and the latitude and longitude information; and determine a second matching probability between the road angle information and the movement direction data; The matching probability between the road and the first device is determined based on the first matching probability and the second matching probability. Based on the matching probability, at least two roads are determined that match the road location information with the latitude and longitude information.

10. The method according to any one of claims 1 to 9, wherein, Determining the first road from the at least two roads includes: Obtain road angle information corresponding to the at least two roads from the map data, wherein the road angle information is used to express the layout direction of the roads in the map; If the difference between the road angle information corresponding to the at least two roads is less than a first difference requirement, and the difference between the matching probabilities corresponding to the at least two roads is less than a second difference requirement, then the first road is determined from the at least two roads.

11. The method according to any one of claims 1 to 10, wherein, Determining the first road from the at least two roads includes at least one of the following: If the difference between the road slope information corresponding to the at least two roads reaches the third difference requirement, the first road whose road slope information matches the elevation information is determined from the at least two roads. If the difference between the road slope information corresponding to the at least two roads is less than the third difference requirement, the first road whose road location information matches the latitude and longitude information is determined from the at least two roads.

12. The method according to any one of claims 1 to 11, wherein, The method further includes: The at least two roads are traced back in the opposite direction of the first device's movement and by a preset backtracking distance to obtain the backtracking segments corresponding to the at least two roads respectively; Obtain the average slope of the backtracking segments corresponding to the at least two roads respectively; obtain the first average slope and the second average slope that meet the difference requirements from the average slope of the segments corresponding to the at least two roads respectively. If the difference between the first average slope and the second average slope reaches the difference threshold, it is determined that the difference between the road slope information corresponding to the at least two roads reaches the third difference requirement.

13. The method according to any one of claims 1 to 12, wherein, Determining the first road from the at least two roads includes: Using the latitude and longitude information and the elevation information as the projection starting point, orthographic projection lines are drawn onto the at least two roads to obtain the orthographic projection points corresponding to the at least two roads respectively. Using the orthographic projection point as the data acquisition point, obtain the road slope information corresponding to the at least two roads respectively; The first road whose slope information matches the elevation information is obtained.

14. The method according to any one of claims 1 to 8, wherein, The method further includes: In response to the existence of a second road among the multiple roads in the map data whose road location information matches the latitude and longitude information, and whose road slope information matches the elevation information, a second display instruction is generated based on the second road to display the positioning screen of the first device on the second road.

15. A method for generating a positioning image, executed by a computer device, the method comprising: The system acquires the positioning data of a first device and map data, wherein the positioning data includes the latitude, longitude and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads. In response to the matching of the road location information of the third road among the plurality of roads with the latitude and longitude information, and the matching of the road slope information of the third road with the elevation information, a third display instruction is generated based on the third road to display the positioning screen of the first device on the third road.

16. A method for generating a positioning image, executed by a computer device, the method comprising: The system acquires the positioning data of a first device and map data, wherein the positioning data includes the latitude, longitude and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads. In response to the existence of at least two roads among the plurality of roads where the road slope information matches the elevation information, a fourth road is determined from the at least two roads, wherein the road location information of the fourth road matches the latitude and longitude information; wherein the fourth road is used to generate a fourth display instruction to display a positioning screen of the first device being located on the fourth road.

17. A device for generating a positioning image, the device comprising: The acquisition module is used to acquire the positioning data of the first device and to acquire map data. The positioning data includes the latitude and longitude information and elevation information of the first device, and the map data includes the road location information and road slope information of multiple roads. The determination module is configured to, in response to the existence of at least two roads among the plurality of roads whose road location information matches the latitude and longitude information, determine a first road from the at least two roads, wherein the road slope information of the first road matches the elevation information; wherein the first road is used to generate a first display instruction to display a positioning screen of the first device located on the first road.

18. A computer device comprising a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the method for generating a positioning screen as described in any one of claims 1 to 16.

19. A computer-readable storage medium storing at least one instruction, the at least one instruction being loaded and executed by a processor to implement the method for generating a positioning screen as described in any one of claims 1 to 16.

20. A computer program product comprising a computer program or instructions that, when executed by a processor, implement the method for generating a positioning screen as described in any one of claims 1 to 16.