Navigation method and device based on live-action picture, computer equipment and storage medium
By updating the navigation guide sequence in real time and displaying only the steering path point information, the problem of navigation time and guidance through the wall in real-life map navigation is solved, improving navigation efficiency and real-timeness.
Patent Information
- Application Number
- CN202310684507.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2024-12-10
Smart Images

Figure CN119104076A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a navigation method, device, computer equipment, storage medium and computer program product based on real scene images. Background Art
[0002] With the development of navigation technology, electronic maps have been increasingly widely used in various industries. Among them, real-life maps are simulations of the real world. Navigation through real-life maps can provide more intuitive real-life guidance.
[0003] In the related art, navigation through real-life maps requires detection of traversable road areas to determine navigation routes. Detection of traversable road areas involves a large amount of image processing and complex calculations, which results in a longer time and lower efficiency in real-life map navigation. Summary of the invention
[0004] Based on this, it is necessary to provide a navigation method, device, computer equipment, computer-readable storage medium and computer program product based on real-scene images to address the above-mentioned technical problems, which can avoid the phenomenon of navigation guidance going through walls at turning points without performing a large amount of image processing and complex calculations on the real-scene images, thereby improving the efficiency of navigation based on real-scene images.
[0005] In a first aspect, the present application provides a navigation method based on a real scene. The method comprises:
[0006] In a set of path points, a target path point is obtained based on a position point at which a moving object is located; a guidance sequence is updated based on the target path point to obtain an updated guidance sequence; when a turning path point is included in the updated guidance sequence, a turning navigation guidance is displayed in a real scene screen displaying a first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, a second navigation guidance is displayed in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0007] In a second aspect, the present application also provides a navigation device based on a real scene. The device comprises:
[0008] A target path point acquisition module is used to acquire a target path point in a path point set based on a position point where a moving object is located;
[0009] A guidance sequence updating module, used to update the guidance sequence based on the target path point to obtain an updated guidance sequence;
[0010] A first navigation guidance display module is used to display the turning navigation guidance according to the position and angle information of the turning path point in the real scene screen displaying the first navigation guidance when the turning path point is included in the updated guidance sequence; the first navigation guidance is the navigation guidance displayed at the path point between the turning path point and the position point;
[0011] The second navigation guidance display module is used to display the second navigation guidance in the real scene according to the position and angle information of the path point after the turn in the updated guidance sequence when the moving object moves to a position near the turning path point.
[0012] In some embodiments, the navigation device based on the real-scene picture also includes: an initial navigation module, which is used to select path points in the path point set whose distances from the position points of the moving object meet the distance conditions as a guidance sequence; in the navigation page of the mini-program, the initial real-scene picture is displayed; in the initial real-scene picture, navigation instructions are displayed based on the position and angle information of the path points in the guidance sequence.
[0013] In some embodiments, the initial navigation module includes: a navigation guidance display unit, which is used to use the path points between the turning path point and the position point and the turning path point as guidance points when the guidance sequence includes a turning path point, and display the navigation guidance in the initial real scene according to the position and angle information of the guidance point in the initial real scene; when the guidance sequence does not include a turning path point, in the initial real scene, the navigation guidance is directly displayed according to the position and angle information of the path points in the guidance sequence.
[0014] In some embodiments, the initial navigation module further includes: a navigation guidance removal unit, which is used to remove the navigation guidance corresponding to the path point reached by the moving object along the travel direction from the initial real scene picture to obtain a real scene picture displaying the first navigation guidance.
[0015] In some embodiments, the guidance sequence update module is specifically used to remove the path points reached by the moving object along the direction of travel in the guidance sequence; and add the target path points to the guidance sequence after removal to obtain an updated guidance sequence.
[0016] In some embodiments, the first navigation guidance display module is specifically used to display the turning navigation guidance according to the position and angle information of the turning path point in the real scene screen displaying the first navigation guidance when the updated guidance sequence includes the turning path point and the first navigation guidance does not include the turning navigation guidance corresponding to the turning path point;
[0017] In some embodiments, the first navigation guidance display module further includes: a position point updating unit, which is used to detect motion information of the moving object in the moving direction; and update the position point of the moving object based on the motion information.
[0018] In some embodiments, the navigation device based on the real scene also includes: a path point set determination module, which is used to send a data request carrying an initial position and a target position to a server; receive path planning data returned by the server in response to the data request; the path planning data is obtained by the server based on the initial position and the target position; the path planning data is parsed to obtain point string data; path points are extracted from the point string data, and a path point set is generated based on the obtained path points.
[0019] In some embodiments, the path point set determination module includes: a first point string data determination unit, used to convert path planning data into at least two path segments; the path segments include a set of coordinate points sorted according to the direction of travel of the moving object; in the coordinate point set, the intersection coordinate points between adjacent path segments are extracted; based on the intersection coordinate points, the direction vectors corresponding to the adjacent path segments are determined; when the angle between the direction vectors corresponding to the adjacent path segments meets the turning condition, the intersection coordinate point is determined as a turning path point; the other coordinate points in the coordinate point set are determined as non-turning path points; wherein, the turning path points and non-turning path points belong to point string data.
[0020] In some embodiments, the path point set determination module includes a second point string data determination unit, which is used to obtain pre-configured turning path points in the path planning data; and use other path points in the path planning data as non-turning path points; wherein, turning path points and non-turning path points belong to point string data.
[0021] In some embodiments, the path point set determination module includes: an interpolation unit, used to convert point string data into a three-dimensional point vector set in a three-dimensional scene; performing equidistant interpolation processing on the three-dimensional point vector set to obtain a target three-dimensional point vector set; the path point set determination module includes: a sampling unit, used to sample the target three-dimensional point vector set at a preset interval to obtain sampled path points; and generating a path point set based on the sampled path points.
[0022] In some embodiments, the first navigation guidance display module includes: an angle information determination unit, used to use a path point adjacent to the turning path point and in the direction of travel of the moving object as a reference path point; determine a direction vector pointing from the turning path point to the reference path point; and determine the angle information of the turning path point based on the direction vector.
[0023] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0024] In a set of path points, a target path point is obtained based on a position point at which a moving object is located; a guidance sequence is updated based on the target path point to obtain an updated guidance sequence; when a turning path point is included in the updated guidance sequence, a turning navigation guidance is displayed in a real scene screen displaying a first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, a second navigation guidance is displayed in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0025] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0026] In a set of path points, a target path point is obtained based on a position point at which a moving object is located; a guidance sequence is updated based on the target path point to obtain an updated guidance sequence; when a turning path point is included in the updated guidance sequence, a turning navigation guidance is displayed in a real scene screen displaying a first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, a second navigation guidance is displayed in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0027] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0028] In a set of path points, a target path point is obtained based on a position point at which a moving object is located; a guidance sequence is updated based on the target path point to obtain an updated guidance sequence; when a turning path point is included in the updated guidance sequence, a turning navigation guidance is displayed in a real scene screen displaying a first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, a second navigation guidance is displayed in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0029] The above-mentioned navigation method, device, computer equipment, storage medium and computer program product based on the real-life picture obtain the target path point in the path point set according to the real-time position point of the moving object, and update the guidance sequence in real time through the target path point to obtain the updated guidance sequence. When the updated guidance sequence includes a turning path point, the turning navigation guidance corresponding to the turning path point is displayed in the real-life picture displaying the first navigation guidance. When the moving object moves to a position near the turning path point, the second navigation guidance corresponding to the path point after the turn is displayed in the real-life picture; that is, when the moving object has not moved to a position near the turning path point, the first navigation guidance and the turning navigation guidance are displayed in the real-life picture, and the second navigation guidance is not displayed, thereby avoiding the phenomenon that the second navigation guidance penetrates the wall in visual effect. When the moving object moves to a position near the turning path point, That is, when the moving object is about to turn, the second navigation guidance corresponding to the path point after the turn is displayed in the real-scene picture. Since the moving object is about to turn when it reaches the vicinity of the turning path point, the second navigation guidance does not penetrate the wall in terms of visual effect, thereby improving the navigation effect based on the real-scene picture. The embodiment of the present application does not require a large amount of image processing and complex calculations on the real-scene picture, occupies less hardware resources, reduces the time consumption of navigation based on the real-scene picture, and improves the efficiency of navigation based on the real-scene picture. In addition, as the guidance sequence is updated with the real-time position point of the moving object, the navigation guidance corresponding to the path point in the updated guidance sequence is displayed in the real-scene picture, rather than displaying the navigation guidance corresponding to all the path points in the path point set, so that less data is required to display the navigation guidance each time, thereby improving the real-time performance of the navigation guidance display and making navigation based on the real-scene picture smoother. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A diagram of an application environment of a navigation method based on a real scene in one embodiment;
[0031] Figure 2 is a flowchart of a navigation method based on a real scene in one embodiment;
[0032] Figure 3 A schematic diagram of determining angle information in one embodiment;
[0033] Figure 4 A schematic diagram of displaying navigation guidance according to the positional relationship between a position point and a turning path point in an embodiment;
[0034] Figure 5 A schematic diagram of displaying navigation guidance according to the positional relationship between the position point and the turning path point in another embodiment;
[0035] Figure 6 A schematic diagram of a wall penetration phenomenon in the navigation guidance of a path point after turning in the related art;
[0036] Figure 7 A schematic diagram of determining angle information in an embodiment of a navigation guide of a path point after turning without a wall penetration phenomenon;
[0037] Figure 8 A schematic diagram of path planning data in one embodiment;
[0038] Fig. 9 A schematic diagram of determining a turning path point in one embodiment;
[0039] Fig.10 A schematic diagram of determining a turning path point in another embodiment;
[0040] Fig.11 In one embodiment, the path planning data is processed to obtain a path point set schematic diagram;
[0041] Fig.12 A schematic diagram of removing the path points reached by the moving object from the guidance sequence and adding the target path points in one embodiment;
[0042] Fig.13 is a schematic diagram of a navigation method based on a real scene image used for navigation in an indoor scene through a mini program in an embodiment;
[0043] Fig.14 is a flowchart of a navigation method based on a real scene in another embodiment;
[0044] Fig.15 is a structural block diagram of a navigation device based on a real scene picture in one embodiment;
[0045] Fig.16 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] The real-scene image-based navigation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Navigation based on the real scene can be performed by the terminal 102, or the terminal 102 and the server 104 can be performed in collaboration.
[0048] Taking the navigation of the real scene screen executed by the terminal 102 as an example, the terminal 102 can obtain the target path point in the path point set based on the position point of the moving object; the terminal 102 can update the guidance sequence based on the target path point to obtain an updated guidance sequence; when the updated guidance sequence includes a turning path point, the terminal 102 can display the turning navigation guidance in the real scene screen displaying the first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is the navigation guidance displayed at the path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, the terminal 102 displays the second navigation guidance in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0049] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an IoT device, and a portable wearable device. The IoT device may be a smart speaker, a smart TV, a smart air conditioner, and a smart vehicle-mounted device, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc.
[0050] The server 104 may be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP).
[0051] In addition, server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0052] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus) or a network or other communication connection methods, which are not limited in this application.
[0053] In some embodiments, Figure 2 As shown, a navigation method based on a real scene is provided. Figure 1 , or by Figure 1 The server and terminal in the method are executed in cooperation with each other. Figure 1The following steps are used as an example to illustrate the terminal execution in:
[0054] Step 202: In the path point set, a target path point is obtained based on the position point of the moving object.
[0055] Among them, the waypoint set includes multiple waypoints on the navigation path, the navigation path is the path from the initial position in the scene to the target position, and the multiple waypoints can be waypoints evenly distributed along the navigation path according to the direction of travel; the scene is the scene where the moving object is located, which can be an indoor scene or an outdoor scene.
[0056] In some embodiments, the path point set includes multiple path points with respective corresponding sequence identifiers, which are used to reflect the travel order of the path points. For example, the path point set includes the following path points sorted according to the travel direction: path point d1, path point d2, path point d3, path point d4, path point d5, path point d6, path point d7 and path point d8, wherein the sequence identifier of path point d1 is 1, the sequence identifier of path point d2 is 2, ..., and the sequence identifier of path point d8 is 8.
[0057] Among them, the position point can reflect the real-time position of the moving object in the scene; as the moving object moves in the scene, the position of the moving object at different times may be different, and the position point of the moving object can be determined according to the real-time position of the moving object.
[0058] In some embodiments, the target path point is a path point in the path point set that satisfies the guidance selection condition with the position point of the moving object; the guidance selection condition may be that the distance between the target path point and the position point belongs to a preset distance interval. Specifically, the terminal obtains the position point of the moving object in real time, and obtains the target path point whose distance from the position point belongs to the preset distance interval according to the direction of travel among the path points included in the path point set. The preset distance interval can be set according to actual conditions. For example, the preset distance interval can be [2 meters, 2.5 meters]; the embodiment of the present application does not limit the specific value of the preset distance interval.
[0059] When the guidance selection condition is that the distance between the target path point and the position point belongs to a preset distance interval, the number of the target path points may be one or at least two.
[0060] Exemplarily, the path point set includes path point d1, path point d2, path point d3, path point d4, path point d5, path point d6, path point d7 and path point d8 sorted according to the direction of travel. When the distance between the position point and path point d3 belongs to a preset distance interval, path point d3 is determined to be the target path point.
[0061] In some embodiments, the guidance selection condition may also be that the number of path points between the target path point and the position point is a preset number. Specifically, the terminal obtains the position point of the moving object in real time, and obtains the path points that meet the number condition with the position point according to the direction of travel among the path points included in the path point set. The preset number can be set according to actual conditions. For example, the preset number can be 3 or 4. The specific value of the preset number is not limited in the embodiment of the present application.
[0062] When the guidance selection condition is that the number of path points between the target path point and the position point is a preset number, the number of the target path point may be one.
[0063] Exemplarily, the path point set includes the following path points sorted according to the direction of travel: path point d1, path point d2, path point d3, path point d4, path point d5, path point d6, path point d7 and path point d8; assuming that the position point is between path point d1 and path point d2, and the preset number is 3, then path point d5 is determined to be the target path point, that is, there are 3 path points between the target path point and the position point.
[0064] Step S204: update the guidance sequence based on the target path point to obtain an updated guidance sequence.
[0065] The guidance sequence is a guidance sequence determined before acquiring the target path point.
[0066] In some embodiments, the guidance sequence is generated based on a previous target path point, where the previous target path point refers to a target path point determined by the terminal based on the position point of the moving object before step 202, and in the path point set, based on the direction of travel, the previous target path point is before the target path point determined in step 202.
[0067] Exemplarily, the waypoint set includes the following, sorted according to the direction of travel: waypoint d1, waypoint d2, waypoint d3, waypoint d4, waypoint d5, waypoint d6, waypoint d7 and waypoint d8; the previous target waypoint is waypoint d4, and the target waypoint determined in step 202 is waypoint d5; in this example, the guidance sequence X1 is obtained by updating the guidance sequence X0 that does not include the waypoint d4 based on the waypoint d4, and the updated guidance sequence X2 is obtained by updating the guidance sequence X1 based on the waypoint d5.
[0068] In some embodiments, the guidance sequence may also be the guidance sequence obtained for the first time after starting navigation based on the real scene. For example, before step 202, the terminal obtains each path point that meets the distance condition based on the real-time position point of the moving object as the guidance sequence, and the distance between the distance condition and the position point is less than the preset distance.
[0069] Exemplarily, the path point set includes the following path point d1, path point d2, path point d3, path point d4, path point d5, path point d6, path point d7 and path point d8, sorted according to the direction of travel. After the terminal starts navigation based on the real-life scene, the first acquired guidance sequence Y1 includes: path point d1, path point d2, path point d3 and path point d4, wherein the distance between path point d1 to path point d4 and the position point is less than a preset distance. When the moving object moves along the direction of travel, the target path point is obtained as path point d5 based on the real-time position point of the moving object. The guidance sequence Y1 is updated through the target path point (path point d5) to obtain the updated guidance sequence Y2.
[0070] In some embodiments, the terminal adds the target path point to the guidance sequence to obtain an updated guidance sequence.
[0071] In some embodiments, step 204 includes: in the guidance sequence, removing the path points reached by the moving object along the direction of travel; and adding the target path points to the guidance sequence after removal to obtain an updated guidance sequence.
[0072] The path point reached by the moving object moving along the traveling direction refers to a path point whose position information is the same as the position information corresponding to the position point of the moving object.
[0073] In some embodiments, the terminal obtains the position point of the moving object in real time. When the target path point is obtained based on the real-time position point of the moving object, the position point of the moving object will also reach the path point in the guidance sequence. The terminal will remove the path point in the guidance sequence and add the target path point to the guidance sequence from which the path point has been removed to obtain an updated guidance sequence.
[0074] Exemplarily, the guidance sequence Y1 includes: path point d1, path point d2, path point d3 and path point d4. When the moving object moves along the traveling direction, the target path point is obtained as path point d5 based on the real-time position point of the moving object. At the same time, the real-time position point of the moving object has reached the path point d1 in the guidance sequence Y1. The path point d1 in the guidance sequence Y1 is removed, and the path point d5 is added to the guidance sequence to obtain the updated guidance sequence Y2. The updated guidance sequence Y2 includes: path point d2, path point d3, path point d4 and path point d5.
[0075] The above example is only an example of updating the guidance sequence. In actual applications, the number of target path points obtained can be at least two, and the number of path points reached by the moving object along the direction of travel can also be at least two. Then, the at least two path points reached by the moving object along the direction of travel can be eliminated; the at least two target path points obtained are added to the guidance sequence after elimination to obtain an updated guidance sequence.
[0076] In the above embodiment, according to the real-time position points of the moving object moving along the direction of travel, the path points reached by the moving object in the guidance sequence are eliminated, and the target path points are added to the guidance sequence, so that the guidance sequence is updated in real time with the real-time position points of the moving object, so as to display real-time navigation guidance based on the real-time updated guidance sequence, thereby improving the display effect of the navigation guidance.
[0077] Step 206, when the updated guidance sequence includes a turning path point, in the real scene screen displaying the first navigation guidance, the turning navigation guidance is displayed according to the position and angle information of the turning path point; the first navigation guidance is the navigation guidance displayed at the path point between the turning path point and the position point.
[0078] Among them, the turning path point is a path point used to indicate a change in the direction of travel. The travel direction from the path point before the turning path point to the turning path point is different from the travel direction from the turning path point to the path point after the turning path point. For example, the travel direction from the path point before the turning path point to the turning path point is due north, and the travel direction from the turning path point to the path point after the turning path point is due west, that is, at the turning path point, the travel direction changes from due north to due west.
[0079] The real-scene picture is a picture of the scene where the moving object is located. In actual application, the terminal turns on the camera, captures the real-scene picture of the scene where the moving object is located through the camera, and displays the real-scene picture.
[0080] There may be multiple first navigation instructions, and the multiple first navigation instructions respectively correspond to multiple path points in the instruction sequence. It should be noted that the multiple first navigation instructions may be first navigation instructions corresponding to some path points in the instruction sequence.
[0081] Among them, the position of the waypoint is the position of the waypoint in the real scene; the position of the waypoint in the real scene can be determined according to the position of the waypoint in the three-dimensional scene, and the three-dimensional scene is obtained by three-dimensional mapping of the scene where the moving object is located; in actual applications, the waypoint in the guidance sequence can be the coordinates of the waypoint in the three-dimensional scene, and the position of the waypoint in the real scene is the same as the position of the waypoint in the three-dimensional scene, that is, the position of the waypoint is determined according to the coordinates of the waypoint in the three-dimensional scene.
[0082] The angle information of the waypoint is used to reflect the direction of travel indicated by the navigation guidance corresponding to the waypoint. In practical applications, the angle information can be determined based on the coordinate axes of the coordinate system of the three-dimensional scene. For example, the angle information can be the angle between the indicated direction of the waypoint and the first coordinate axis of the coordinate system of the three-dimensional scene; the first coordinate axis can be the Z axis of the coordinate system of the three-dimensional scene.
[0083] In some embodiments, the navigation guidance corresponding to the waypoint can be an arrow, and the angle information of the waypoint is used to determine the direction of the arrow of the navigation guidance; for example, when the navigation path is an arc, the arrow direction of the navigation guidance corresponding to each waypoint is used to indicate the progress along the navigation path of the arc; based on the angle information of the waypoint, the direction of the arrow of the navigation guidance is determined, and the angle information can be the angle between the arrow direction and the first coordinate axis of the three-dimensional scene.
[0084] Among them, the first navigation guidance includes navigation guidance corresponding to the path points between the turning path point and the position point. Exemplarily, the updated guidance sequence includes: path point d2, path point d3, path point d4 and path point d5, wherein path point d5 is the turning path point, and then the first navigation guidance includes guidance corresponding to each of the path point d2, path point d3 and path point d4.
[0085] In some embodiments, when the updated guidance sequence includes a turning waypoint, the terminal determines the position and angle information of the turning waypoint, and turns the navigation guidance according to the position and angle information of the turning waypoint in the real scene displaying the first navigation guidance.
[0086] In some embodiments, step 206 includes: when the updated guidance sequence includes a turning path point, and the first navigation guidance does not include a turning navigation guidance corresponding to the turning path point, in the real-scene picture displaying the first navigation guidance, the turning navigation guidance is displayed according to the position and angle information of the turning path point; the navigation method based on the real-scene picture also includes: detecting the motion information of the moving object in the direction of travel; and updating the position point of the moving object based on the motion information.
[0087] Among them, the first navigation guidance does not include the turning navigation guidance corresponding to the turning path point, which means that the updated guidance sequence includes the turning path point, but the turning navigation guidance has not yet been displayed in the real scene, that is, the target path point is the turning path point in the updated guidance sequence.
[0088] In some embodiments, when the turning waypoint is a newly added target waypoint in the updated guidance sequence, and the turning waypoint has not yet been drawn in the real scene, the terminal determines the position of the turning waypoint in the real scene based on the position of the turning waypoint in the three-dimensional scene. The terminal determines the angle information of the turning waypoint and displays the turning navigation guidance in the real scene.
[0089] In some embodiments, the moving object is in motion. After the turning navigation instructions are displayed in the real-life image, the terminal continuously detects the motion information of the moving object in the direction of travel. The motion information can reflect the position information of the moving object. The terminal obtains the real-time position information of the moving object and updates the real-time position point of the moving object according to the real-time position information.
[0090] In some embodiments, the terminal may also obtain the currently displayed real-scene picture frame at a preset interval, and send the real-scene picture frame to the server. The server determines the position information of the moving object based on the real-scene picture frame, and feeds back the position information to the terminal. The terminal updates the position point of the moving object based on the position information.
[0091] It is understandable that after the terminal updates the position point of the moving object, it can obtain the target path point based on the updated position point and update the guidance sequence, and display the navigation guidance corresponding to the target path point in the real scene.
[0092] In the above embodiment, when the updated guidance sequence includes a turning path point, and the first navigation guidance does not include a turning navigation guidance corresponding to the turning path point, the turning navigation guidance is displayed based on the position and angle information of the turning path point, and then the navigation guidance from the position point of the moving object to the turning path point is displayed in the real scene, so that the moving object can determine the direction of travel for the next section based on the turning navigation guidance.
[0093] In some embodiments, the navigation method based on the real scene also includes: taking a path point adjacent to the turning path point and in the direction of travel of the moving object as a reference path point; determining a direction vector pointing from the turning path point to the reference path point; and determining the angle information of the turning path point based on the direction vector.
[0094] Among them, the reference path point is the path point that is located after the turning path point in the direction of travel; when the updated guidance sequence includes the path point that is located after the turning path point, the terminal obtains the reference path point from the updated guidance sequence, and when the updated guidance sequence does not include the path point that is located after the turning path point, the terminal obtains the reference path point from the path point set.
[0095] In some embodiments, the terminal determines the direction vector from the turning path point to the reference path point based on the coordinates of the turning path point in the three-dimensional scene and the coordinates of the reference path point in the three-dimensional scene. Alternatively, the terminal obtains the origin of the three-dimensional scene, determines a first direction vector from the origin to the reference path point, determines a second direction vector from the origin to the turning path point, and uses the difference vector between the first direction vector and the second direction vector as the direction vector from the turning path point to the turning path point.
[0096] The terminal can use the angle between the direction vector of the turning path point pointing to the reference path point and the first coordinate axis of the three-dimensional scene as the angle information of the turning path point; wherein, the first coordinate axis is the arrow direction of the default guidance. By determining the angle between the direction vector and the first coordinate axis, the angle between the arrow direction of the default guidance and the arrow direction of the turning navigation guidance can be obtained. The arrow direction of the default guidance can be rotated according to the angle information to obtain the arrow direction of the turning navigation guidance.
[0097] For example, Figure 3 As shown, the reference path point K1 is the path point after the turning path point K2. The angle information of the turning path point K2 is the angle between the direction vector v1 of the turning path point K2 pointing to the reference path point K1 and the first coordinate axis (Z axis). The arrow direction of the default guidance u1 is rotated according to the angle information to obtain the arrow direction of the turning navigation guidance u2 corresponding to the turning path point K2.
[0098] In the above embodiment, the direction vector of the turning path point pointing to the reference path point is determined, and the angle information of the turning path point is determined based on the direction vector. The angle information of the turning path point can be used to determine the direction of the arrow of the turning navigation guidance, and then the direction from the turning path point to the reference path point can be determined through the displayed turning navigation guidance, thereby improving the navigation guidance effect.
[0099] Step 208: When the moving object moves to a position near the turning path point, the second navigation guidance is displayed in the real scene according to the position and angle information of the turning path point in the updated guidance sequence.
[0100] For ease of description, the waypoint after turning is recorded as the waypoint after turning; the waypoint after turning is the waypoint in the update guidance sequence, which is arranged after the turning waypoint according to the direction of travel.
[0101] In some embodiments, when the updated guidance sequence includes a turning path point, the post-turn path point includes all path points after the turning path point in the updated guidance sequence; when the updated guidance sequence includes at least two turning path points, the post-turn path point includes all path points between the first turning path point and the second turning path point in the updated guidance sequence, as well as the second turning path point.
[0102] Exemplarily, the updated guidance sequence includes: path point d2, path point d3, path point d4 and path point d5, that is, the path point d2 is closest to the position of the moving object. When the path point d2 is a navigation path point and the updated guidance sequence includes a turning path point d2, the path points after the turning include: path point d3, path point d4 and path point d5; when the path point d2 is a navigation path point and the updated guidance sequence also includes a second turning path point d4, the path points after the turning include: path point d3 and path point d4.
[0103] The second navigation guidance includes the navigation guidance corresponding to the path point after the turn.
[0104] In some embodiments, when there is no waypoint between the position point and the turning waypoint in the updated waypoint sequence, that is, the turning waypoint is the waypoint ranked first in the updated waypoint sequence, it can be determined that the moving object has moved to a position near the turning waypoint; when the moving object moves to a position near the turning waypoint, it means that the moving object is about to turn, and the second navigation guidance corresponding to the waypoint after the turn can be displayed on the real scene.
[0105] For each path point after turning, the terminal obtains the path point after the turning, determines the angle information of the path point after turning based on the direction vector pointing to the path point after turning, obtains the position of the path point after turning in the real scene, and displays the second navigation guidance in the real scene based on the position and angle information of the path point after turning.
[0106] For example, Figure 4 As shown, when the updated guidance sequence includes a turning path point, the position point 401 of the moving object is not near the turning path point, and the first navigation guidance 402 does not include the navigation guidance corresponding to the turning path point, the terminal displays the turning navigation guidance 403 in the real scene according to the position and angle information of the turning path point; as shown Figure 5 As shown, when the position point 501 of the moving object is near the turning path point, the terminal displays the second navigation guide 503 corresponding to the turning path point in the real scene according to the position and angle information of the turning path point. At this time, the real scene includes the turning navigation guide 502 and the second navigation guide 503.
[0107] In the related art, when the navigation instructions corresponding to all the path points after the turning path point are directly displayed without distinguishing whether the moving object moves to the turning path point, when the real scene corresponding to the turning path point is a wall, the navigation instructions of the path points after the turning may be displayed in the wall, that is, the navigation instructions pass through the wall; Figure 6 As shown, the navigation guidance 601 of the waypoint after the turn has a visual penetration phenomenon of the wall, and the navigation indication effect is poor.
[0108] In the embodiment of the present application, when the moving object does not move to the vicinity of the turning path point, the second navigation guidance corresponding to the path point after the turning path point is not displayed. When the moving object moves to the vicinity of the turning path point, the second navigation guidance corresponding to the path point after the turning path point is displayed. When the real scene near the turning path point is a wall, the navigation guidance is visually prevented from penetrating the wall. Figure 7 As shown, when the moving object does not move to the vicinity of the turning path point, the second navigation guidance corresponding to the path point after the turning path point is not displayed, thereby avoiding the phenomenon of the navigation guidance passing through the wall in terms of visual effect, and improving the navigation indication effect.
[0109] In the related art, the terminal performs a large amount of image processing on the real scene to identify architectural elements such as walls and roads in the real scene, and then detects the passable area, and displays the navigation instructions in the passable area to avoid the phenomenon of navigation instructions passing through walls at turning points. However, this method involves a large amount of image processing and complex calculations, occupies a large amount of hardware resources of the terminal, and the navigation based on the real scene is time-consuming and inefficient.
[0110] The above-mentioned navigation method, device, computer equipment, storage medium and computer program product based on the real-life picture obtain the target path point in the path point set according to the real-time position point of the moving object, and update the guidance sequence in real time through the target path point to obtain the updated guidance sequence. When the updated guidance sequence includes a turning path point, the turning navigation guidance corresponding to the turning path point is displayed in the real-life picture displaying the first navigation guidance. When the moving object moves to a position near the turning path point, the second navigation guidance corresponding to the path point after the turn is displayed in the real-life picture; that is, when the moving object has not moved to a position near the turning path point, the first navigation guidance and the turning navigation guidance are displayed in the real-life picture, and the second navigation guidance is not displayed, thereby avoiding the phenomenon that the second navigation guidance penetrates the wall in visual effect. When the moving object moves to a position near the turning path point, That is, when the moving object is about to turn, the second navigation guidance corresponding to the path point after the turn is displayed in the real-scene picture. Since the moving object is about to turn when it reaches the vicinity of the turning path point, the second navigation guidance does not penetrate the wall in terms of visual effect, thereby improving the navigation effect based on the real-scene picture. The embodiment of the present application does not require a large amount of image processing and complex calculations on the real-scene picture, occupies less hardware resources, reduces the time consumption of navigation based on the real-scene picture, and improves the efficiency of navigation based on the real-scene picture. In addition, as the guidance sequence is updated with the real-time position point of the moving object, the navigation guidance corresponding to the path point in the updated guidance sequence is displayed in the real-scene picture, rather than displaying the navigation guidance corresponding to all the path points in the path point set, so that less data is required to display the navigation guidance each time, thereby improving the real-time performance of the navigation guidance display and making navigation based on the real-scene picture smoother.
[0111] In some embodiments, in a path point set, before obtaining a target path point based on the position of a moving object, the navigation method based on a real-life scene further includes: sending a data request carrying an initial position and a target position to a server; receiving path planning data returned by the server in response to the data request; the path planning data is obtained by the server based on the initial position and the target position; parsing the path planning data to obtain point string data; extracting path points from the point string data, and generating a path point set based on the obtained path points.
[0112] The server may be a server for path planning. The data request carries an initial position and a target position, and the initial position may be the position where the moving object is located when triggering the real-view navigation.
[0113] In some embodiments, the terminal responds to a trigger operation on a real-scene navigation control, displays a real-scene image, obtains an initial position of the moving object and a target position to be reached by the moving object, and sends a data request carrying the initial position and the target position to the server.
[0114] The terminal displays the real scene in response to the trigger operation of the real scene navigation control. The terminal may turn on the camera of the terminal in response to the trigger operation of the real scene navigation control, and use the camera to capture and display the real scene where the moving object is currently located.
[0115] In some embodiments, the navigation page displaying the real scene includes a first input control and a second input control, and obtaining the initial position and the target position may be that the terminal obtains the initial position in the first input control and obtains the target position in the second input control.
[0116] The initial position in the first input control can be the initial position filled in by the moving object in the first input control; it can also be the initial position selected by the moving object in the real-life map of the scene where it is located, and the selected initial position is filled in the first input control; it can also be that the terminal obtains the initial real-life picture frame currently displayed, sends the initial real-life picture frame to the server, and the server determines the initial position of the moving object based on the initial real-life picture frame and the real-life map of the scene where the moving object is located, returns the initial position to the terminal, and the terminal fills the initial position in the first input control. Among them, the real-life map is obtained by pre-mapping the scene where the moving object is located, and the real-life map is sent to the server, so that the server can realize positioning and path planning based on the real-life map.
[0117] The target position in the second input control can be the target position filled in by the moving object in the second input control; it can also be the target position selected by the moving object in the real-life map of the scene in which it is located, and the terminal fills the selected target position in the second input control.
[0118] The path planning data is data used to indicate the movement from the initial position in the environment where the moving object is located to the target position. The point string data includes multiple path points in geographic coordinates, which are path points on the navigation path from the initial position to the target position in the geographic coordinate system; the geographic coordinate system may be a GCJ02 coordinate system; the GCJ02 coordinate system is an encrypted coordinate system.
[0119] The waypoint set includes a plurality of waypoints in the coordinate system of the three-dimensional scene, and the plurality of waypoints are waypoints on a navigation path from an initial position to a target position in the coordinate system of the three-dimensional scene.
[0120] In some embodiments, the terminal sends a data request to the server, the server obtains the initial position and target position carried in the data request, determines the path planning data based on the initial position and target position in the real-life map of the environment where the moving object is located, and the server returns the path planning data to the terminal.
[0121] In some embodiments, the terminal parses the path planning data to obtain point string data in a geographic coordinate system. The terminal converts the point string data in the geographic coordinate system into path points in a coordinate system of a three-dimensional scene, performs equidistant interpolation processing on the path points in the coordinate system of the three-dimensional scene to add new path points, and generates a path point set based on the path points in the coordinate system of the three-dimensional scene obtained by the conversion and the newly added path points. Through equidistant interpolation processing, the path point set includes path points that are equally spaced and evenly distributed on the navigation path.
[0122] In the above embodiment, the path planning data from the initial position to the target position is obtained through the server, the path points are determined according to the path planning data, and a path point set is generated according to the determined path points, so as to subsequently obtain the target path points from the path point set and update the guidance sequence.
[0123] In some embodiments, path planning data is parsed to obtain point string data, including: converting the path planning data into at least two path segments; the path segments include a set of coordinate points sorted according to the direction of travel of the moving object; in the coordinate point set, extracting the intersection coordinate points between adjacent path segments; based on the intersection coordinate points, determining the direction vectors corresponding to the adjacent path segments; when the angle between the direction vectors corresponding to the adjacent path segments meets the turning condition, determining the intersection coordinate point as a turning path point; determining other coordinate points in the coordinate point set as non-turning path points; wherein, the turning path points and non-turning path points belong to the point string data.
[0124] The path planning data includes route step data and coordinate points sorted according to the direction of travel. The terminal divides the coordinate points into path segments according to the route step data. The path segments include a coordinate point set composed of the coordinate points belonging to the path segments.
[0125] In some embodiments, the terminal parses the path planning data to obtain the coordinate point arranged in the first place and the compressed coordinate point arranged after the coordinate point, decompresses the compressed coordinate point according to the forward differential decompression method to obtain the coordinate point arranged after the coordinate point, and then obtains the coordinate points on the navigation path.
[0126] Each coordinate point obtained by analysis is a coordinate point under geographic coordinates, and each coordinate point can be represented by longitude and latitude. The longitude and latitude of each coordinate point have their own corresponding subscripts. The route step data is a subscript interval. Based on the route step data, the coordinate points belonging to the same subscript interval can be divided into a coordinate point set corresponding to the same path segment.
[0127] For example, in the path planning data, the coordinate points are sorted according to the travel direction. Figure 8As shown, for example, the longitude subscript of coordinate 1 is 0, and the latitude subscript is 1; the longitude subscript of coordinate 2 is 2, and the latitude subscript is 3; assuming that the subscript interval included in the route steps is [6, 11], it means that the coordinate points corresponding to coordinates 4, 5, and 6 belong to the same path segment.
[0128] In some embodiments, adjacent path segments include adjacent first path segments and second path segments, and the terminal extracts the intersection coordinate point of the first path segment and the second path segment, and the intersection coordinate point belongs to the adjacent first path segment and the second path segment at the same time; the direction vectors corresponding to the adjacent path segments include the direction vector corresponding to the first path segment and the direction vector corresponding to the second path segment, wherein the direction vector corresponding to the first path segment may be a direction vector between the intersection coordinate point and the adjacent coordinate point in the first path segment, with the same direction as the travel direction, and the direction vector corresponding to the second path segment may be a direction vector between the intersection coordinate point and the adjacent coordinate point in the second path segment, with the same direction as the travel direction.
[0129] In some embodiments, the angles between the direction vectors corresponding to adjacent path segments satisfy the turning condition, which may be a first angle between the direction vector corresponding to the first path segment and the north direction, and a difference between the second angle between the direction vector corresponding to the second path segment and the north direction belonging to the angle interval.
[0130] In practical applications, the angle interval can be set according to actual needs. For example, the angle interval can be [45°, 180°] or [90°, 180°]. The embodiment of the present application does not limit the specific range of the angle interval.
[0131] For example, Fig. 9 As shown, the intersection coordinate point n1 is the coordinate point where the first path segment L1 and the second path segment L2 intersect. The direction vector V1 corresponding to the first path segment L1 and the direction vector V2 corresponding to the second path segment L2 are determined according to the direction of travel. The first angle between the direction vector V1 and the north direction is 0°, and the second angle between the direction vector V2 and the north direction is 30°. Therefore, the difference between the first angle and the second angle is 30°. When the angle interval is [45°, 180°], the difference between the first angle and the second angle does not belong to the angle interval, and therefore the intersection coordinate point n1 is not a turning path point.
[0132] For example, Fig.10As shown, the intersection coordinate point n2 is the coordinate point where the first path segment L3 and the second path segment L4 intersect. The direction vector V3 corresponding to the first path segment L3 and the direction vector V4 corresponding to the second path segment L4 are determined according to the direction of travel. The first angle between the direction vector V3 and the north direction is 0°, and the second angle between the direction vector V3 and the north direction is 90°. Therefore, the difference between the first angle and the second angle is 90°. When the angle interval is [45°, 180°], the difference between the first angle and the second angle belongs to the angle interval, and therefore the intersection coordinate point n2 is a turning path point.
[0133] In some embodiments, the terminal determines whether the intersecting coordinate points between adjacent path segments are turning path points based on the above process. After determining the turning path points, the coordinate points included in the path segments, except for the turning path points, are treated as non-turning path points. The point string data includes turning path points and non-turning path points in the geographic coordinate system.
[0134] In the above embodiment, the path planning data is converted into at least two path segments, and the direction vectors corresponding to the adjacent path segments are determined based on the intersection coordinate points between the adjacent path segments. The turning path points are determined according to the angle between the direction vectors and the turning conditions. The turning path points and non-turning path points are extracted from the coordinate points included in the path segments, thereby improving the accuracy of the turning path points.
[0135] In some embodiments, the path planning data is parsed to obtain point string data, including: obtaining pre-configured turning path points in the path planning data; using other path points in the path planning data as non-turning path points; wherein the turning path points and non-turning path points belong to the point string data.
[0136] In some embodiments, the server determines the path planning data based on the initial position, the target position and the real-life map, and the server includes a turning coordinate point set of the real-life map, and the turning coordinate point set includes multiple turning coordinate points; the server compares the path points included in the path planning data with the multiple turning coordinate points respectively to determine the turning path points in the path planning data, wherein the distance between the turning path points and the turning coordinate points is less than a distance threshold; the distance threshold can be determined according to actual needs, and the embodiment of the present application does not limit the specific value of the distance threshold.
[0137] After the server determines the turning path point in the path planning data, it adds a turning mark to the turning path point and sends the path planning data with the turning mark added to the server; the terminal obtains the path planning data, obtains the turning path point configured with the turning mark from the path planning data, and uses the other path points in the path planning data as non-turning path points to obtain point string data including the turning path points and non-turning path points in the geographic coordinate system.
[0138] In the above embodiment, the path planning data obtained by the terminal includes pre-configured turning path points, so that the terminal can directly obtain turning path points and non-turning path points without the need for a large amount of data processing on the path planning data, thereby improving the efficiency of obtaining a set of path points.
[0139] In some embodiments, before extracting path points from point string data, the navigation method based on the real scene also includes: converting the point string data into a three-dimensional point vector set in a three-dimensional scene; performing equidistant interpolation processing on the three-dimensional point vector set to obtain a target three-dimensional point vector set; extracting path points from the point string data, and generating a path point set based on the obtained path points, including: sampling in the target three-dimensional point vector set at a preset interval to obtain sampled path points; generating a path point set based on the sampled path points.
[0140] The three-dimensional point vector set includes multiple three-dimensional point vectors. The three-dimensional point vector is a vector represented by values on three coordinate axes of the coordinate system of the three-dimensional scene. The three-dimensional point vector can represent the position of a point in the three-dimensional scene.
[0141] The point string data includes path points under geographic coordinates. The positions of the path points in the point string data in the real geographic space can be represented by longitude and latitude, and the point string data can be converted into a set of three-dimensional point vectors in a three-dimensional scene. Then, the positions of the path points in the three-dimensional scene can be represented by the coordinate system of the three-dimensional scene. The turning path points and non-turning path points included in the point string data are converted into turning path points and non-turning path points in the coordinate system of the three-dimensional scene.
[0142] Since the path points obtained based on the path planning data may not be coordinate points with uniform spacing, the multiple three-dimensional point vectors included in the three-dimensional point vector set may not be three-dimensional point vectors with uniform spacing. In some embodiments, the terminal can determine the minimum spacing between the multiple three-dimensional point vectors, interpolate the three-dimensional point vector set according to the minimum spacing, and obtain a target three-dimensional point vector set in which the spacing between any two three-dimensional point vectors is the minimum spacing.
[0143] In some embodiments, the terminal can interpolate the three-dimensional point vector set according to the interpolation spacing to obtain a target three-dimensional point vector set in which the spacing between any two three-dimensional point vectors is the interpolation spacing, wherein the interpolation spacing can be set according to actual needs, for example, the interpolation spacing can be set to 0.5 meters. The embodiment of the present application does not limit the specific value of the interpolation spacing.
[0144] In some embodiments, the target three-dimensional point vector set includes multiple target three-dimensional point vectors; after obtaining the target three-dimensional point vector set, the target three-dimensional point vector set is sampled according to a preset interval, and the sampled target three-dimensional point vectors are used as sampled path points. In order to make the path point set include all turning path points, a path point set can be generated based on the sampled path points and turning path points.
[0145] The preset interval can be represented by a preset spacing, for example, sampling the target three-dimensional point vector set according to the preset spacing. The preset spacing can be set according to actual needs, and the preset spacing can be greater than the interpolation spacing; the preset spacing can be set according to actual needs. For example, the preset spacing can be 2 meters. The embodiment of the present application does not limit the specific value of the preset spacing.
[0146] The preset interval can also be represented by a preset number of target three-dimensional point vectors. For example, one target three-dimensional point vector is sampled every preset number of target three-dimensional point vectors. The preset number can be set according to actual needs. For example, the preset number can be 4, that is, sampling is performed every 4 target three-dimensional point vectors. The embodiment of the present application does not limit the specific value of the preset interval.
[0147] In some embodiments, for ease of explanation, the turning path point closest to the initial position is recorded as the first turning path point, and the turning path point closest to the target position is recorded as the second turning path point, that is, the first turning path point is the first turning path point in the navigation path, and the second turning path point is the last turning path point in the navigation path; performing equidistant interpolation processing on the three-dimensional point vector set to obtain a target three-dimensional point vector set can include: performing equidistant interpolation processing on each three-dimensional point vector between the initial position and the three-dimensional point vector corresponding to the first turning path point, performing equidistant interpolation processing on each three-dimensional point vector between the three-dimensional point vectors corresponding to two adjacent turning path points, and performing equidistant interpolation processing on each three-dimensional point vector between the three-dimensional point vector corresponding to the second turning path point and the target position to obtain a target three-dimensional point vector set.
[0148] In the target three-dimensional point vector set, sampling according to a preset interval to obtain sampled path points may include: sampling according to a preset interval in each target three-dimensional point vector between the initial position and the three-dimensional point vector corresponding to the first turning path point, sampling according to a preset interval in each target three-dimensional point vector between the three-dimensional point vectors corresponding to two adjacent turning path points, and sampling according to a preset interval in each target three-dimensional point vector between the three-dimensional point vector corresponding to the second turning path point and the target position to obtain sampled path points.
[0149] Generating a path point set based on sampled path points, including: generating a path point set based on sampled path points and each turning path point, so that the path point set includes all turning path points in the coordinate system of the three-dimensional scene, and the spacing between each path point in the path point set is the same.
[0150] For example, Fig.11 As shown, the process of the terminal processing the path planning data to obtain a path point set includes: determining the path segment according to the path planning data, the path segment includes a coordinate point set in a geographic coordinate system, the coordinate points in the coordinate point set can be represented by longitude and latitude, determining point string data according to the coordinate point set, the point string data includes turning path points and non-turning path points in geographic coordinates; converting the point string data into a three-dimensional point vector set in the coordinate system of the three-dimensional scene, performing equidistant interpolation processing on the three-dimensional point vector set to obtain a target three-dimensional point vector set, sampling the target three-dimensional point vector set at a preset interval, and obtaining a path point set according to the sampled path points.
[0151] In the above embodiment, the point string data in the geographic coordinate system is converted into a three-dimensional point vector set in a three-dimensional scene, the three-dimensional point vector set is equidistantly interpolated, and then the equidistant target three-dimensional point vector set is sampled according to a preset interval, and a path point set is generated based on the sampled path points, so that the path point set includes evenly distributed path points, and then evenly distributed navigation guidance can be displayed in the real scene according to the path point set, thereby improving the display effect of the navigation guidance.
[0152] In some embodiments, a navigation method based on a real-scene picture is applied to a mini-program. In a set of waypoints, before obtaining a target waypoint based on the position point of a moving object, the navigation method based on the real-scene picture also includes: in the set of waypoints, selecting waypoints whose distances from the position point of the moving object satisfy a distance condition as a guidance sequence; in the navigation page of the mini-program, displaying an initial real-scene picture; in the initial real-scene picture, displaying navigation guidance based on the position and angle information of the waypoints in the guidance sequence.
[0153] Among them, the mini program is a mini program that can be navigated based on the real scene. The mini program can be run through the parent application, such as selecting a page through the mini program of the parent application and running the mini program. In actual applications, the parent application can be an instant messaging application.
[0154] The distance condition may be that the distance between the moving object and the position point is less than a preset distance. For example, the path point set includes: path point d1, path point d2, path point d3, path point d4, path point d5, path point d6, path point d7 and path point d8. Assuming that the distance between path point d1, path point d2, path point d3 and path point d4 and the moving object is less than a preset distance, the guidance sequence includes path point d1, path point d2, path point d3 and path point d4.
[0155] In some embodiments, the terminal runs the mini-program through the parent application, calls the terminal's camera through the mini-program, captures the initial real-scene image through the camera, and displays the initial real-scene image in the navigation page of the mini-program; the terminal selects a path point in the path point set whose distance from the position point of the moving object is less than a preset distance, obtains a guidance sequence, determines the angle information of each path point in the guidance sequence, and displays the navigation guidance in the initial real-scene image displayed by the mini-program based on the position and angle information of each path point.
[0156] In some embodiments, the terminal can determine the angle information of each path point in the guidance sequence in turn; for a path point in the guidance sequence, obtain the next path point arranged after the path point, and determine the angle information of the path point based on the direction vector pointing from the path point to its next path point.
[0157] It should be noted that the guidance sequence may be the guidance sequence determined for the first time after the terminal runs the mini-program. For example, the guidance sequence may be the guidance sequence obtained by selecting path points that meet the distance conditions from the path point set for the first time after the terminal obtains the path point set. Furthermore, the position point of the moving object may be the position point corresponding to the initial position.
[0158] In some embodiments, when the terminal starts real-life navigation through a mini-program, the three-dimensional scene can be initialized through threejs. The coordinate system of the three-dimensional scene is consistent with the VIO coordinate system of the mini-program, and the terminal determines the mapping relationship between the coordinate system of the three-dimensional scene and the geographic coordinate system.
[0159] Among them, Threejs is an easy-to-use and lightweight 3D library based on the webGL package. WebGL (WebGraphics Library) is a 3D drawing protocol suitable for drawing three-dimensional graphics in lightweight applications such as mini-programs. VIO (visual-inertial odometry) is a method of building maps by integrating cameras and state sensors. The VIO coordinate system can be established in the camera coordinate system, such as a three-dimensional coordinate system with the camera's focus center as the origin and the optical axis as the Z axis (the first coordinate axis).
[0160] In the above embodiment, the initial real scene is displayed by a small program for navigation based on the real scene, and the navigation instructions corresponding to the path points in the guidance sequence are displayed in the initial real scene. There is no need to download an application dedicated to real scene navigation. The small program is run through the parent application, and then the real scene is navigated through the small program. This makes the navigation of the real scene not limited to use in the application, thereby improving the convenience of real scene navigation.
[0161] In some embodiments, in the initial real-scene picture, navigation instructions are displayed based on the position and angle information of the waypoints in the guidance sequence, including: when the guidance sequence includes a turning waypoint, the waypoint between the turning waypoint and the position point is used as the guidance point, and in the initial real-scene picture, navigation instructions are displayed based on the position and angle information of the guidance point; when the guidance sequence does not include a turning waypoint, in the initial real-scene picture, navigation instructions are directly displayed based on the position and angle information of the waypoints in the guidance sequence.
[0162] Among them, when the guidance sequence includes turning path points, the guidance points include each path point and the turning path point between the position point and the turning path point. Exemplarily, the guidance sequence includes: path point d1, path point d2, path point d3, path point d4 and path point d5. When path point d4 is a turning path point, that is, when the guidance sequence includes turning path points, the guidance points include: path point d1, path point d2, path point d3 and path point d4.
[0163] In some embodiments, when the guidance sequence includes turning path points, the terminal determines the guidance points in the guidance point sequence, and the guidance points include each path point and turning path point between the position point and the turning path point. The terminal determines the angle information of the guidance points in turn, and displays the navigation guidance in the initial real-life scene displayed by the mini-program based on the position and angle information of the guidance points.
[0164] In some embodiments, when the guidance sequence does not include a turning path point, the terminal determines the angle information corresponding to each path point in the guidance sequence in turn, and displays the navigation guidance in the initial real-scene screen displayed by the mini-program based on the position and angle information corresponding to each path point.
[0165] In the above embodiment, when the guidance sequence includes a turning path point, the navigation guidance corresponding to the path point after the turning path point is not displayed in the initial real scene. When the real scene near the turning path point is a wall, the navigation guidance is visually avoided from penetrating the wall, thereby improving the navigation indication effect.
[0166] In some embodiments, the navigation method based on the real scene also includes: removing the navigation instructions corresponding to the path points reached by the moving object along the travel direction from the initial real scene, so as to obtain the real scene displaying the first navigation instructions.
[0167] In some embodiments, when a moving object moves along the direction of travel, the terminal obtains the real-time position of the moving object, and then determines the real-time position point of the moving object. When the real-time position point of the moving object is the same as the position of a path point in the guidance sequence, the navigation guidance corresponding to the path point is removed from the initial real-scene image, and a real-scene image displaying the first navigation guidance is obtained; the navigation guidance corresponding to the path point, that is, the navigation guidance corresponding to the path point reached by the moving object moving along the direction of travel.
[0168] For example, Fig.12 As shown, the guidance sequence 1202 determined according to the position point 1201 of the moving object includes: path point d1, path point d2, path point d3 and path point d4. When the guidance sequence does not include a turning path point, the navigation guidance corresponding to the path point d1, path point d2, path point d3 and path point d4 are displayed in the real scene. When the position point 1201 of the moving object moves to the path point d1, the navigation guidance corresponding to the path point d1 is removed from the real scene. At the same time, the path point d1 in the guidance sequence is eliminated, and the target path point d5 is added to the guidance sequence to obtain an updated guidance sequence 1203, and the navigation guidance corresponding to the target path point d5 is displayed in the real scene.
[0169] In the above embodiment, when the real-time position of the moving object reaches a path point in the guidance sequence, the navigation guidance corresponding to the path point in the initial real-scene image is removed, so that the navigation guidance displayed in the real-scene image is updated along with the real-time position of the moving object. By removing the navigation guidance corresponding to the path point that has been reached, the amount of data used to display the navigation guidance is reduced, thereby improving the real-time performance of the navigation guidance display and making navigation based on the real-scene image smoother.
[0170] In some embodiments, the navigation method based on the real scene can be used to navigate in an indoor scene through a mini program; Fig.13 As shown, the terminal runs the mini program, responds to the trigger operation of the real-scene navigation control in the main page of the mini program, starts the navigation based on the real-scene picture, calls the camera of the terminal, shoots the real-scene picture of the indoor scene where the moving object is located through the camera, and displays the real-scene picture in the navigation page of the mini program;
[0171] The terminal obtains the position point of the moving object, and determines whether it is the first positioning according to the position point. If it is the first positioning, the terminal initiates a data request to the server, obtains the path planning data, and determines the path point set according to the path planning data. The path point set includes turning path points and non-turning path points;
[0172] The terminal obtains the path points that meet the distance condition in the path point set as the guidance sequence according to the position point of the moving object, and loads the path points included in the guidance sequence into the model pool. The guidance sequence includes: path point d1, path point d2 and path point d3. The guidance sequence does not include the turning path point. Based on the data in the model pool, the navigation guidance corresponding to the path point d1, path point d2 and path point d3 is displayed in the real scene displayed by the mini program.
[0173] If the current location is not the first time, the terminal updates the real-time position of the moving object, obtains the target path point based on the position point, updates the guidance sequence through the target path point, and obtains an updated guidance sequence; determines whether the position of the moving object has reached the vicinity of the turning path point. When the position of the moving object has not reached the vicinity of the turning path point, the turning path point in the updated guidance sequence and the navigation guidance corresponding to the path point before the turning path point are displayed in the real-life picture displayed by the mini-program based on the position point; when the position of the moving object reaches the vicinity of the turning path point, the navigation guidance corresponding to the path point after the turning path point is displayed in the real-life picture displayed by the mini-program based on the position point.
[0174] Specifically, when the position point of the moving object reaches the path point d1, the navigation instructions corresponding to the path point d1 are removed from the initial real scene screen, and a real scene screen displaying the first navigation instructions is obtained. At the same time, the terminal obtains the target path point d3 in the path point set according to the position point of the moving object, updates the instruction sequence according to the target path point, and updates the instruction sequence in the model pool by updating the instruction sequence; when the target path point is not a turning path point, the navigation instructions corresponding to the target path point d4 are displayed in the real scene screen based on the data in the model pool; at this time, the real scene screen displays: the navigation instructions corresponding to the path point d2, the path point d3 and the path point d4 respectively.
[0175] The terminal updates the real-time position of the moving object. When the position of the moving object reaches the path point d2, the navigation guidance corresponding to the path point d2 is removed from the initial real scene. At the same time, the terminal obtains the target path point d5 in the path point set according to the position of the moving object, and updates the guidance sequence according to the target path point. When the target path point d5 is a turning path point, the navigation guidance corresponding to the target path point d5 is displayed in the real scene. At this time, the real scene displays: the navigation guidance corresponding to the path point d3, the path point d4 and the path point d5.
[0176] The terminal updates the real-time position of the moving object. When the position of the moving object reaches the path point d3, the navigation guidance corresponding to the path point d3 is removed from the initial real scene. At the same time, the terminal obtains the target path point d6 in the path point set according to the position of the moving object, and updates the guidance sequence according to the target path point. Since the moving object has not moved to the vicinity of the turning path point d5, the navigation guidance corresponding to the path point d6 is not displayed in the real scene. At this time, the real scene displays: the navigation guidance corresponding to the path point d4 and the path point d5 respectively.
[0177] The terminal updates the real-time position of the moving object. When the position of the moving object reaches the path point d4, the navigation instructions corresponding to the path point d4 are removed from the initial real scene. At the same time, the terminal obtains the target path point d7 in the path point set according to the position of the moving object, and updates the instruction sequence according to the target path point. Since the moving object has not yet moved to the vicinity of the turning path point d5, the navigation instructions corresponding to the path point d7 are not displayed in the real scene. At this time, the navigation instructions corresponding to each path point d5 are displayed in the real scene.
[0178] The terminal updates the real-time position of the moving object. When the position of the moving object reaches the path point d5, the navigation guidance corresponding to the path point d5 is removed from the initial real scene. At the same time, the terminal obtains the target path point d8 in the path point set according to the position of the moving object, and updates the guidance sequence according to the target path point. Since the moving object has moved to the vicinity of the turning path point d5, the navigation guidance corresponding to the path point after the turning path point d5 in the updated guidance sequence is displayed in the real scene. At this time, the navigation guidance corresponding to the path point d6, the path point d7 and the path point d8 are displayed in the real scene.
[0179] In some embodiments, Fig.14 As shown, the navigation method based on the real scene includes:
[0180] Step 1401, sending a data request carrying an initial position and a target position to a server; receiving path planning data returned by the server in response to the data request; the path planning data is obtained by the server based on the initial position and the target position;
[0181] Step 1402A, converting the path planning data into at least two path segments; the path segments include a set of coordinate points sorted according to the direction of travel of the moving object; in the set of coordinate points, extracting the intersection coordinate points between adjacent path segments; based on the intersection coordinate points, determining the direction vectors corresponding to the adjacent path segments; when the angle between the direction vectors corresponding to the adjacent path segments meets the turning condition, determining the intersection coordinate point as a turning path point; determining the other coordinate points in the set of coordinate points as non-turning path points; wherein the turning path point and the non-turning path point belong to point string data;
[0182] Step 1402B, obtaining a pre-configured turning path point in the path planning data; using other path points in the path planning data as non-turning path points; wherein the turning path points and the non-turning path points belong to point string data;
[0183] Step 1403, converting the point string data into a three-dimensional point vector set in a three-dimensional scene; performing equidistant interpolation processing on the three-dimensional point vector set to obtain a target three-dimensional point vector set, sampling the target three-dimensional point vector set at a preset interval to obtain sampled path points; generating a path point set based on the sampled path points;
[0184] Step 1404, selecting from the path point set the path points whose distances from the position point where the moving object is located satisfying the distance condition as the guidance sequence, and displaying the initial real scene image in the navigation page of the mini program;
[0185] Step 1405: when the guidance sequence includes a turning path point, the path point between the turning path point and the position point and the turning path point are used as guidance points, and navigation guidance is displayed in the initial real scene according to the position and angle information of the guidance point; when the guidance sequence does not include a turning path point, the navigation guidance is directly displayed in the initial real scene according to the position and angle information of the path point in the guidance sequence;
[0186] Step 1406, removing the navigation guidance corresponding to the path point reached by the moving object along the traveling direction from the initial real scene image, and obtaining a real scene image showing the first navigation guidance;
[0187] Step 1407, in the path point set, obtain the target path point based on the position point where the moving object is located; in the guidance sequence, remove the path point reached by the moving object along the moving direction; add the target path point to the guidance sequence after removal, and obtain an updated guidance sequence;
[0188] Step 1408A, when the updated guidance sequence includes a turning waypoint and the first navigation guidance does not include a turning navigation guidance corresponding to the turning waypoint, in the real scene screen displaying the first navigation guidance, the turning navigation guidance is displayed according to the position and angle information of the turning waypoint;
[0189] Step 1408B, when the moving object moves to a position near the turning path point, the second navigation guidance is displayed in the real scene according to the position and angle information of the turning path point in the updated guidance sequence.
[0190] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0191] The above-mentioned navigation method, device, computer equipment, storage medium and computer program product based on the real-life picture obtain the target path point in the path point set according to the real-time position point of the moving object, and update the guidance sequence in real time through the target path point to obtain the updated guidance sequence. When the updated guidance sequence includes a turning path point, the turning navigation guidance corresponding to the turning path point is displayed in the real-life picture displaying the first navigation guidance. When the moving object moves to a position near the turning path point, the second navigation guidance corresponding to the path point after the turn is displayed in the real-life picture; that is, when the moving object has not moved to a position near the turning path point, the first navigation guidance and the turning navigation guidance are displayed in the real-life picture, and the second navigation guidance is not displayed, thereby avoiding the phenomenon that the second navigation guidance penetrates the wall in visual effect. When the moving object moves to a position near the turning path point, That is, when the moving object is about to turn, the second navigation guidance corresponding to the path point after the turn is displayed in the real-scene picture. Since the moving object is about to turn when it reaches the vicinity of the turning path point, the second navigation guidance does not penetrate the wall in terms of visual effect, thereby improving the navigation effect based on the real-scene picture. The embodiment of the present application does not require a large amount of image processing and complex calculations on the real-scene picture, occupies less hardware resources, reduces the time consumption of navigation based on the real-scene picture, and improves the efficiency of navigation based on the real-scene picture. In addition, as the guidance sequence is updated with the real-time position point of the moving object, the navigation guidance corresponding to the path point in the updated guidance sequence is displayed in the real-scene picture, rather than displaying the navigation guidance corresponding to all the path points in the path point set, so that less data is required to display the navigation guidance each time, thereby improving the real-time performance of the navigation guidance display and making navigation based on the real-scene picture smoother.
[0192] Based on the same inventive concept, the embodiment of the present application also provides a navigation device based on a real scene image for implementing the navigation method based on a real scene image involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the navigation device based on a real scene image provided below can refer to the limitations of the navigation method based on a real scene image above, and will not be repeated here.
[0193] In one embodiment, Fig.15 As shown, a navigation device based on a real scene is provided, comprising: a target path point acquisition module 1501, a guidance sequence update module 1502, a first navigation guidance display module 1503 and a second navigation guidance display module 1504, wherein:
[0194] The target path point acquisition module 1501 is used to acquire the target path point in the path point set based on the position point where the moving object is located;
[0195] A guidance sequence updating module 1502, configured to update the guidance sequence based on the target path point to obtain an updated guidance sequence;
[0196] The first navigation guidance display module 1503 is used to display the turning navigation guidance according to the position and angle information of the turning path point in the real scene screen displaying the first navigation guidance when the turning path point is included in the updated guidance sequence; the first navigation guidance is the navigation guidance displayed at the path point between the turning path point and the position point;
[0197] The second navigation guidance display module 1504 is used to display the second navigation guidance in the real scene according to the position and angle information of the path point after the turn in the updated guidance sequence when the moving object moves to a position near the turning path point.
[0198] In some embodiments, the navigation device based on the real-scene picture also includes: an initial navigation module, which is used to select path points in the path point set whose distances from the position points of the moving object meet the distance conditions as a guidance sequence; in the navigation page of the mini-program, the initial real-scene picture is displayed; in the initial real-scene picture, navigation instructions are displayed based on the position and angle information of the path points in the guidance sequence.
[0199] In some embodiments, the initial navigation module includes: a navigation guidance display unit, which is used to use the path points between the turning path point and the position point and the turning path point as guidance points when the guidance sequence includes a turning path point, and display the navigation guidance in the initial real scene according to the position and angle information of the guidance point in the initial real scene; when the guidance sequence does not include a turning path point, in the initial real scene, the navigation guidance is directly displayed according to the position and angle information of the path points in the guidance sequence.
[0200] In some embodiments, the initial navigation module further includes: a navigation guidance removal unit, which is used to remove the navigation guidance corresponding to the path point reached by the moving object along the travel direction from the initial real scene picture to obtain a real scene picture displaying the first navigation guidance.
[0201] In some embodiments, the guidance sequence update module 1502 is specifically used to remove the path points reached by the moving object along the direction of travel in the guidance sequence; and add the target path points to the guidance sequence after removal to obtain an updated guidance sequence.
[0202] In some embodiments, the first navigation guidance display module 1503 is specifically used to display the turning navigation guidance according to the position and angle information of the turning path point in the real scene screen displaying the first navigation guidance when the updated guidance sequence includes a turning path point and the first navigation guidance does not include the turning navigation guidance corresponding to the turning path point;
[0203] In some embodiments, the first navigation guidance display module 1503 further includes: a position point updating unit, which is used to detect motion information of the moving object in the moving direction; and update the position point of the moving object based on the motion information.
[0204] In some embodiments, the navigation device based on the real scene also includes: a path point set determination module, which is used to send a data request carrying an initial position and a target position to a server; receive path planning data returned by the server in response to the data request; the path planning data is obtained by the server based on the initial position and the target position; the path planning data is parsed to obtain point string data; path points are extracted from the point string data, and a path point set is generated based on the obtained path points.
[0205] In some embodiments, the path point set determination module includes: a first point string data determination unit, used to convert path planning data into at least two path segments; the path segments include a set of coordinate points sorted according to the direction of travel of the moving object; in the coordinate point set, the intersection coordinate points between adjacent path segments are extracted; based on the intersection coordinate points, the direction vectors corresponding to the adjacent path segments are determined; when the angle between the direction vectors corresponding to the adjacent path segments meets the turning condition, the intersection coordinate point is determined as a turning path point; the other coordinate points in the coordinate point set are determined as non-turning path points; wherein, the turning path points and non-turning path points belong to point string data.
[0206] In some embodiments, the path point set determination module includes a second point string data determination unit, which is used to obtain pre-configured turning path points in the path planning data; and use other path points in the path planning data as non-turning path points; wherein, turning path points and non-turning path points belong to point string data.
[0207] In some embodiments, the path point set determination module includes: an interpolation unit, used to convert point string data into a three-dimensional point vector set in a three-dimensional scene; performing equidistant interpolation processing on the three-dimensional point vector set to obtain a target three-dimensional point vector set; the path point set determination module includes: a sampling unit, used to sample the target three-dimensional point vector set at a preset interval to obtain sampled path points; and generating a path point set based on the sampled path points.
[0208] In some embodiments, the first navigation guidance display module 1503 includes: an angle information determination unit, used to use a path point adjacent to the turning path point and in the direction of travel of the moving object as a reference path point; determine a direction vector pointing from the turning path point to the reference path point; and determine the angle information of the turning path point based on the direction vector.
[0209] Each module in the above-mentioned navigation device based on real scene images can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0210] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.16 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a navigation method based on a real scene is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0211] Those skilled in the art will understand that Fig.16 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0212] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0213] In a set of path points, a target path point is obtained based on a position point at which a moving object is located; a guidance sequence is updated based on the target path point to obtain an updated guidance sequence; when a turning path point is included in the updated guidance sequence, a turning navigation guidance is displayed in a real scene screen displaying a first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, a second navigation guidance is displayed in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0214] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0215] In a set of path points, a target path point is obtained based on a position point at which a moving object is located; a guidance sequence is updated based on the target path point to obtain an updated guidance sequence; when a turning path point is included in the updated guidance sequence, a turning navigation guidance is displayed in a real scene screen displaying a first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, a second navigation guidance is displayed in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0216] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0217] In a set of path points, a target path point is obtained based on a position point at which a moving object is located; a guidance sequence is updated based on the target path point to obtain an updated guidance sequence; when a turning path point is included in the updated guidance sequence, a turning navigation guidance is displayed in a real scene screen displaying a first navigation guidance according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; when the moving object moves to a position near the turning path point, a second navigation guidance is displayed in the real scene screen according to the position and angle information of the path point after the turn in the updated guidance sequence.
[0218] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0219] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0220] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0221] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A navigation method based on real scene, characterized in that: The method comprises: In the path point set, a target path point is obtained based on the position point of the moving object; Updating the guidance sequence based on the target path point to obtain an updated guidance sequence; When the updated guidance sequence includes a turning path point, in the real scene screen displaying the first navigation guidance, the turning navigation guidance is displayed according to the position and angle information of the turning path point; the first navigation guidance is a navigation guidance displayed at a path point between the turning path point and the position point; When the moving object moves to a position near the turning path point, the second navigation guidance is displayed in the real scene according to the position and angle information of the turning path point in the updated guidance sequence.
2. The method according to claim 1, characterized in that: The method is applied to a mini-program; before acquiring a target path point based on a position point of a moving object in a path point set, the method further comprises: In the path point set, a path point whose distance from the position point of the moving object satisfies a distance condition is selected as the guidance sequence; In the navigation page of the mini-program, an initial real scene is displayed; In the initial real scene picture, navigation guidance is displayed according to the position and angle information of the waypoints in the guidance sequence.
3. The method according to claim 2, characterized in that The step of displaying navigation guidance in the initial real scene according to the position and angle information of the path points in the guidance sequence includes: When the guidance sequence includes the turning path point, taking the path point between the turning path point and the position point and the turning path point as the guidance point, and displaying the navigation guidance in the initial real scene according to the position and angle information of the guidance point; When the guidance sequence does not include the turning path point, the navigation guidance is directly displayed in the initial real scene according to the position and angle information of the path point in the guidance sequence.
4. The method according to claim 3, characterized in that The method further comprises: The navigation guidance corresponding to the path point reached by the moving object along the traveling direction is removed from the initial real scene picture to obtain a real scene picture showing the first navigation guidance.
5. The method according to claim 1, characterized in that The updating of the guidance sequence based on the target path point to obtain an updated guidance sequence includes: In the guidance sequence, the path points reached by the moving object along the traveling direction are eliminated; The target path point is added to the removed guidance sequence to obtain an updated guidance sequence.
6. The method according to claim 1, characterized in that When the updated guidance sequence includes a turning path point, displaying the turning navigation guidance according to the position and angle information of the turning path point in the real scene screen displaying the first navigation guidance includes: When the updated guidance sequence includes a turning path point, and the first navigation guidance does not include a turning navigation guidance corresponding to the turning path point, in the real scene screen displaying the first navigation guidance, the turning navigation guidance is displayed according to the position and angle information of the turning path point; The method further comprises: detecting motion information of the moving object in a moving direction; The position point of the moving object is updated based on the motion information.
7. The method according to claim 1, characterized in that Before acquiring the target path point in the path point set based on the position point where the moving object is located, the method further includes: Send a data request with the initial location and target location to the server; Receiving path planning data returned by the server in response to the data request; the path planning data is obtained by the server based on the initial position and the target position; Parsing the path planning data to obtain point string data; Path points are extracted from the point string data, and a path point set is generated based on the obtained path points.
8. The method according to claim 7, characterized in that The step of parsing the path planning data to obtain point string data includes: Converting the path planning data into at least two path segments; the path segments include a set of coordinate points sorted according to the moving direction of the moving object; Extracting the intersection coordinate points between adjacent path line segments from the coordinate point set; Based on the intersection coordinate points, determining direction vectors corresponding to the adjacent path segments respectively; When the angles between the direction vectors corresponding to the adjacent path segments respectively meet the turning condition, the intersection coordinate point is determined as the turning path point; The other coordinate points in the coordinate point set are determined as non-turning path points; wherein the turning path points and the non-turning path points belong to the point string data.
9. The method according to claim 7, characterized in that: The step of parsing the path planning data to obtain point string data includes: Acquiring a preconfigured turning path point in the path planning data; The other path points in the path planning data are used as non-turning path points; wherein the turning path points and the non-turning path points belong to the point string data.
10. The method according to claim 7, characterized in that Before extracting the path points from the point string data, the method further includes: Converting the point string data into a three-dimensional point vector set in a three-dimensional scene; Performing isometric interpolation processing on the three-dimensional point vector set to obtain a target three-dimensional point vector set; The extracting path points from the point string data and generating a path point set based on the obtained path points includes: In the target three-dimensional point vector set, sampling is performed at a preset interval to obtain sampled path points; A waypoint set is generated based on the sampled waypoints.
11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: taking a path point adjacent to the turning path point and in the traveling direction of the moving object as a reference path point; Determine a direction vector from the turning path point to the reference path point; The angle information of the turning path point is determined according to the direction vector.
12. A navigation device based on real scene, characterized in that: The device comprises: A target path point acquisition module is used to acquire a target path point in a path point set based on a position point where a moving object is located; A guidance sequence updating module, used to update the guidance sequence based on the target path point to obtain an updated guidance sequence; A first navigation guide display module, used for displaying a turn navigation guide according to the position and angle information of the turn path point in a real scene screen displaying the first navigation guide when the turn path point is included in the updated guide sequence; the first navigation guide is a navigation guide displayed at a path point between the turn path point and the position point; The second navigation guidance display module is used to display the second navigation guidance in the real scene according to the position and angle information of the path point after the turn in the updated guidance sequence when the moving object moves to a position near the turning path point.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
