Route determination method and apparatus
By detecting user deviations and promptly recommending new routes through terminal devices, the problem of electronic devices recommending routes that do not meet user needs is solved, thus improving user experience and power efficiency.
Patent Information
- Application Number
- CN202411914583.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-06-23
AI Technical Summary
In existing technologies, the exercise routes recommended by electronic devices may not meet user needs, resulting in a poor user exercise experience.
The terminal device displays a first route and detects whether the user deviates from the route. If the user deviates, a second route is displayed, ensuring that the lengths of both routes are close to the distance the user needs to move. The device also recommends a new route in a timely manner if the user does not follow the initial route.
It increases the probability that users' travel routes meet their needs, reduces repetitive routes, lowers power consumption, and improves user experience by providing timely route recommendations.
Smart Images

Figure CN122258941A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a route determination method and apparatus. Background Technology
[0002] To meet users' exercise needs, some electronic devices support exercise-related functions. For example, an electronic device can display one or more exercise routes. These routes can be understood as recommended exercise routes provided by the electronic device to the user. The user can select any of these routes and exercise along them. The one or more exercise routes displayed by the electronic device are typically determined based on historical exercise routes. That is, the electronic device can obtain multiple exercise routes used by the user at different historical moments and can determine recommended exercise routes based on these historical routes.
[0003] However, in some scenarios, one or more exercise routes recommended by electronic devices may not meet the user's needs, resulting in a poor exercise experience. Therefore, there is an urgent need to provide a method that increases the probability of recommended exercise routes by electronic devices meeting user needs, thereby improving the user experience. Summary of the Invention
[0004] This application provides a route determination method and apparatus. The terminal device can display a movement route that is close to the user's required movement distance, and can promptly recommend a new movement route to the user when it detects that the user is not moving along the original movement route, thereby increasing the probability of meeting the user's movement needs and improving the user experience.
[0005] In a first aspect, a route determination method is provided, comprising: displaying a first route, the first route including M intersections, the M intersections being intersections of some or all paths in a first range, the first range being related to a first position and / or a first distance, the first route including a first position, and the difference between the length of the first route and the first distance being less than or equal to a first threshold, where M is a positive integer; detecting that after a user passes through Y intersections of the M intersections, the user moves on a first road segment, the first road segment not belonging to the first route; and displaying a second route, the second route including N intersections, the N intersections being intersections of some or all paths in the first range, the N intersections including Y intersections of the first route, the second route including a first road segment, and the difference between the length of the second route and the first distance being less than or equal to the first threshold, where N is a positive integer and Y is a positive integer.
[0006] In one possible implementation, the method can be performed by a terminal device with display functionality.
[0007] In this context, an intersection point can be understood as the point or location where paths or road segments intersect. The first location can be understood as the starting point and / or ending point of the first and second routes. The first distance can be understood as the distance the user needs to travel.
[0008] The route determination method of this application allows the terminal device to recommend a second route when the user does not follow the initially recommended first route. Furthermore, the lengths of both the first and second recommended routes are close to the user's required movement distance (the first distance). This ensures that, on the one hand, the recommended route meets the user's distance requirements; on the other hand, when the user deviates from the initially recommended first route, the terminal device can promptly recommend a new route that meets the user's needs based on their real-time location, increasing the probability of fulfilling the user's movement requirements and improving the user experience.
[0009] Furthermore, since the area where the user moves is typically close to the first position, and / or the length of the user's movement range usually does not exceed the first distance. For example, assuming the user starts moving from the first position and the user's desired movement distance is the first distance, the area where the user moves may not exceed the range enclosed by a circle with the first position as the center and the first distance as the radius. Therefore, the terminal device can recommend a route within a first range determined based on the first position and / or the first distance. In this way, the recommended route not only has a high probability of meeting the user's needs, but also, in the process of determining the first route and the second route, road segments outside the first range do not need to be analyzed and processed, making the power consumption of determining the first route and / or the second route relatively small.
[0010] In some embodiments of the first aspect, the first route and / or the second route are closed routes, wherein the first route does not include repeated road segments, and the second route does not include repeated road segments.
[0011] The phrase "excluding repeated routes" can also be understood as meaning that when a user moves based on the first route and / or the second route, the user can avoid passing through repeated locations or road segments except for the first location.
[0012] In this way, after the user moves along the first route and / or the second route, not only will the actual distance traveled be close to the first distance required by the user, but the user will also not pass through repeated sections during the movement, which will result in a better user experience.
[0013] Furthermore, since the first and / or second routes are closed loops, users can return to the first position after starting their movement. In scenarios where users need to return to their initial position after completing their movement, the ability to return to the first position allows for a shorter distance, thus improving the user experience.
[0014] In some embodiments of the first aspect, the method further includes: acquiring a plurality of routes, the plurality of routes including a first route and a second route, the plurality of routes being a plurality of routes within a first range, and the difference between the length of each of the plurality of routes and a first distance being less than or equal to a first threshold.
[0015] In this context, multiple routes can be understood as routes that meet the user's desired distance for exercise. The first and second routes displayed on the terminal device can be determined from these multiple routes.
[0016] In one possible implementation, the terminal device can acquire multiple routes and determine and display a first route from among them; it can also determine and display a second route from among the multiple routes. The multiple routes can be routes determined by the terminal device or routes acquired from other devices. The other devices could be, for example, the first device.
[0017] In another possible implementation, the terminal device can obtain a first route from other devices (e.g., the first device) and can display the first route; in addition, the terminal device can obtain a second route from other devices (e.g., the first device) and can display the second route.
[0018] In this way, when the terminal device (or other device) determines the second route, there is no need to perform path search again to determine multiple routes, which makes the power consumption of the terminal device (or other device) in determining the second route relatively small.
[0019] In some embodiments of the first aspect, the method further includes: detecting that a user is moving on a second road segment, displaying a first prompt message, wherein multiple routes do not include the second road segment.
[0020] The initial prompt can be displayed in any form, such as a pop-up window or a notification message. This initial prompt can also indicate that the user has deviated from the recommended route or that the recommended route cannot be continued.
[0021] In this way, when it is not possible to recommend new routes to users in a timely manner, a prompt message can be sent to inform the user that no new routes can be displayed at the moment, thus improving the user experience.
[0022] In some embodiments of the first aspect, the method further includes: acquiring multiple intersections between multiple paths within a first range, the multiple paths including runnable paths within the first range and / or map-displayable paths within the first range; and determining multiple routes including some or all of the multiple intersections based on the multiple intersections.
[0023] The multiple intersections can be determined by the terminal device or obtained by the terminal device from other devices. The map may display some or all of the traversable paths, or it may not display all of the traversable paths.
[0024] In this way, multiple routes within a first range can be determined by combining runnable routes and / or map-displayable routes. When determining multiple routes based on runnable routes, the determined routes can be formed from frequently used exercise routes by users or the general public; when determining multiple routes based on map-displayable routes, the determined routes can be routes that can be displayed on the map, making these routes potentially safer. When determining multiple routes based on both runnable and map-displayable routes, the determined routes are more comprehensive, and the probability of subsequently recommending routes that meet the user's needs is higher.
[0025] In some embodiments of the first aspect, the method further includes: obtaining a runnable path from a first device; or, determining a runnable path based on historical motion routes.
[0026] The first device can be, for example, a server, a terminal device, or a cloud device. The historical motion route can be a motion route stored by the terminal device, or a motion route obtained by the terminal device from other devices (such as the first device).
[0027] This makes it easier to determine multiple routes based on the runnable path.
[0028] In some embodiments of the first aspect, determining multiple routes including some or all of the multiple intersections includes: determining multiple road segment vectors based on the multiple intersections, the multiple road segment vectors indicating road segments between adjacent intersections among the multiple intersections, adjacent intersections being two intersections included in any of the multiple paths, and other intersections not being included between adjacent intersections; and determining a set of routes starting from a first position and returning to a first position based on the multiple road segment vectors, the multiple routes belonging to the route set.
[0029] In this context, a road segment vector can be understood as a directional road segment. Each route in the route set can be constructed from one or more road segment vectors that are connected end-to-end. "Connected end-to-end" means that the end point of the previous road segment vector is the starting point of the next road segment vector.
[0030] In this way, a set of routes can be determined using the above method. This set of routes can include multiple closed routes. This facilitates the subsequent identification of multiple routes from the set whose lengths are close to the first distance.
[0031] In some embodiments of the first aspect, the method further includes: determining a first route among a plurality of routes based on one or more of terrain information, security information, or heat information.
[0032] Topographical information may include, but is not limited to, indicating the number of turns and / or elevation differences included in each route. Safety information may indicate, for example, the level of safety for traveling along each route. Popularity information may indicate, for example, the probability of the public choosing each route.
[0033] In this way, the first route that meets the user's needs can be determined by combining the difficulty level (according to the difficulty of the exercise), safety level, or popularity of each route among multiple routes.
[0034] In some embodiments of the first aspect, the method further includes: receiving a second operation from a user, the second operation being for inputting at least one route feature; and determining a first route based on the at least one route feature, the first route being a route among a plurality of routes that matches the at least one route feature.
[0035] At least one route feature can also be understood as user-inputted features or information used to filter exercise routes. At least one route feature may include, for example, difficulty level and / or popularity. This ensures that the first route determined based on at least one route feature has a higher probability of meeting the user's needs.
[0036] In some embodiments of the first aspect, the method further includes: displaying a plurality of routes; displaying a first route, including: displaying the first route based on a first operation by a user, the first operation being for selecting the first route.
[0037] In this way, users can determine multiple routes, and the first route is determined based on the user's input, making it more likely that the first route will meet the user's needs.
[0038] In some embodiments of the first aspect, the center of the first range is the first position.
[0039] For example, the first range can be any shape such as a circle or an orientation.
[0040] In this way, the multiple routes determined within the first range can be routes around the first location, making it more likely to meet the user's needs when recommending routes to the user from multiple routes.
[0041] In some embodiments of the first aspect, the first range is a circle centered at a first position, and the radius of the first range is the ratio of a first distance to a first coefficient.
[0042] In this way, since the radius of the first range is the ratio of the first distance to the first coefficient, a closed curve with a length close to the first distance can usually be determined within the first range. That is, starting from the first position, when the user moves the first distance and returns to the first position, the user's movement route will usually not be outside the first range. Thus, the recommended route not only has a high probability of meeting the user's needs, but also, in the process of determining the first route and the second route, the road segments outside the first range do not need to be analyzed and processed, so that the power consumption of determining the first route and / or the second route can be relatively small.
[0043] In some embodiments of the first aspect, the method further includes: determining at least one route based on a second range, the second range being a circle with a center at a first position and a radius equal to the ratio of a first distance to an initial coefficient; adjusting the initial coefficient to a first coefficient if the number of at least one route is less than or equal to a second threshold, or if the number of at least one route is greater than or equal to a third threshold, and determining a first range based on the first coefficient.
[0044] Here, the initial coefficient can be understood as an initial value, and the initial coefficient can be, for example, a preset value. The first coefficient can be understood as the value obtained after adjusting the initial coefficient.
[0045] It should be understood that in order to recommend a first route and a second route that meet the user's needs, the number of at least one route cannot be too small, for example, it cannot be less than 2. Therefore, when the number of at least one route determined based on the second range is small (less than or equal to the second threshold), the second range can be increased. That is, the first range is determined based on a first coefficient smaller than the initial coefficient, and the first range is larger than the second range, thus allowing more routes to be determined within the first range. Alternatively, if the number of at least one route is too large (greater than or equal to the third threshold), it may be difficult to determine a route that meets the user's needs from at least one route. Therefore, when the number of routes determined based on the second range is large, the second range can be decreased. That is, the first range is determined based on a first coefficient larger than the initial coefficient, and the first range is smaller than the second range, thus allowing fewer routes to be determined within the first range.
[0046] In this way, by adjusting the initial coefficients, the size of the movement range (both the first and second ranges are movement ranges) can be adjusted, thereby adjusting the number of routes determined within the movement range. This allows for recommending routes that meet the user's needs while reducing the difficulty of recommending routes to the user.
[0047] In some embodiments of the first aspect, before displaying the first route, the method further includes: displaying multiple intersections between multiple paths within the first range.
[0048] This allows the process of generating multiple routes and / or the first route to be displayed, resulting in a better visual experience for the user.
[0049] In a second aspect, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store code instructions and the processor is used to execute the code instructions to perform the methods described in the first aspect or any possible implementation thereof.
[0050] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0051] Fourthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation of the first aspect.
[0052] Fifthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation thereof. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.
[0053] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).
[0054] Sixthly, this application provides a route determination apparatus, including modules for performing the methods as described in any possible implementation of the first aspect. For example, the apparatus may include a processing module and a display module, wherein the display module may display a first route; the processing module may detect that a user moves to a second route segment after passing Y intersections; and the display module may also display a second route.
[0055] In a seventh aspect, this application provides a communication system comprising an electronic device and a first device. The electronic device is configured to perform the steps of displaying a first route, displaying a second route, displaying a first prompt message, or displaying multiple intersections in the first aspect or any possible implementation thereof; the first device is configured to perform the step of determining multiple routes in the first aspect or any possible implementation thereof, and the first device is configured to send multiple routes to the electronic device, enabling the electronic device to determine and display the first route and the second route among the multiple routes; the first device may also be configured to send multiple intersections to the electronic device, enabling the electronic device to display multiple intersections. Alternatively, the electronic device is configured to perform the method described in the first aspect or any possible implementation thereof, and the first device is configured to send a runnable path to the electronic device.
[0056] For example, the electronic device may be, for example, terminal device 410 hereinafter, and the first device may be device 420 hereinafter.
[0057] Eighthly, this application provides another communication system, comprising an electronic device, a second device, and a third device. The electronic device is used to perform the steps of displaying a first route, displaying a second route, displaying a first prompt message, or displaying multiple intersections in the first aspect or any possible implementation thereof; the second and third devices are used to perform the step of determining multiple routes, and the second device is also used to perform the step of sending multiple routes to the electronic device. Furthermore, the second device can also be used to send multiple intersections to the electronic device so that the electronic device can display multiple intersections.
[0058] For example, the electronic device may be terminal device 510 as described below, the second device may be terminal device 520 as described below, and the third device may be device 530 as described below.
[0059] It should be understood that the second to eighth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0060] Figure 1 This is a schematic diagram of an interface for displaying a route.
[0061] Figure 2 A schematic diagram of a route determination process;
[0062] Figure 3 This is a schematic diagram illustrating the first application scenario to which the embodiments of this application apply;
[0063] Figure 4This is a schematic diagram illustrating a second application scenario to which the embodiments of this application are applicable;
[0064] Figure 5 This is a schematic diagram illustrating a third application scenario to which the embodiments of this application apply;
[0065] Figure 6 A flowchart illustrating a route determination method provided in an embodiment of this application;
[0066] Figure 7 A schematic diagram illustrating a route display process provided in an embodiment of this application;
[0067] Figure 8 A flowchart illustrating a method for determining multiple routes provided in an embodiment of this application;
[0068] Figure 9 A schematic diagram illustrating the process of determining multiple intersection points provided in this application embodiment;
[0069] Figure 10 This is a schematic diagram illustrating the process of determining multiple path vectors provided in an embodiment of this application;
[0070] Figure 11 A schematic diagram illustrating the process of determining multiple routes provided in this application embodiment;
[0071] Figure 12 A schematic block diagram of the hardware architecture of the electronic device provided in the embodiments of this application;
[0072] Figure 13 A schematic block diagram of the software architecture of an electronic device provided in an embodiment of this application;
[0073] Figure 14 A schematic block diagram of a route determination device provided in an embodiment of this application. Detailed Implementation
[0074] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0075] First, in the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first value and the second value are only used to distinguish different values and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" do not necessarily imply that they are different.
[0076] Second, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the present application should not be construed as more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.
[0077] Third, in the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or its similar expressions refer to any combination of these items, including any combination of single item (s) or plural item (s). For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.
[0078] Fourth, the electronic devices in the embodiments of this application may include handheld devices, vehicle-mounted devices, etc., with image display functions. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving vehicles, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.
[0079] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0080] Furthermore, in this embodiment of the application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
[0081] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.
[0082] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, HarmonyOS, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0083] Currently, to meet users' exercise needs, such as walking, brisk walking, running, or cycling, some terminal devices can provide a variety of exercise-related functions, such as recommending exercise routes. The process of a terminal device recommending exercise routes to a user can be described as follows.
[0084] Suppose that the terminal device receives input operation 1, which can trigger the terminal device to display at least one motion route. For example, input operation 1 can be an input operation on button 1 in a motion application, and button 1 can be used to trigger the terminal device to display at least one motion route.
[0085] In response to input operation 1, the terminal device can display, as shown below. Figure 1 The interface shown in (a) of 1, or the terminal device may display the interface shown in (b) of 1. These two interfaces can be understood as two different interfaces for displaying recommended exercise routes to the user.
[0086] Combination Figure 1 The interface shown in (a) includes multiple exercise routes, such as exercise route 101, exercise route 102, exercise route 103, exercise route 104, and exercise route 105. This interface may also include textual information describing each exercise route, such as the distance between the starting point of each route and the user's current location, or the length of the route. This allows users to select a suitable exercise route based on their needs.
[0087] Combination Figure 1 The interface shown in (b) includes an identifier 106 indicating the user's current location. The interface also includes multiple exercise routes, such as exercise route 107, exercise route 108, exercise route 109, exercise route 110, and exercise route 111. For each exercise route, a corresponding prompt bar can be displayed to show the user information such as the name and length of the route. For example, for exercise route 107, a prompt bar 112 can be displayed around it, showing the name of exercise route 107 as "Around A" and the length of exercise route 107 as "Length in kilometers". This allows the user to select a suitable exercise route based on their needs.
[0088] Understandable. Figure 1 The two interfaces shown in (a) and (b) can recommend different or the same motion routes. Furthermore, these two interfaces can be switched between each other. For example, when the terminal device displays... Figure 1 When the interface shown in (a) is displayed, in response to input operation 2, the terminal device can display as shown in Figure (a). Figure 1 The interface shown in (b) is shown in the diagram; or, as displayed on the terminal device... Figure 1 When the interface shown in (b) is displayed, in response to input operation 3, the terminal device can display as shown in Figure (b). Figure 1 The interface shown in (a) is an example. Alternatively, the two interfaces may not be switchable. This application does not impose any specific limitations on this.
[0089] When the terminal device displays either of the two interfaces mentioned above, based on the user's input operation of selecting one of the movement routes, the terminal device can display that movement route and may choose not to display other movement routes. This allows the user to move along that chosen route.
[0090] For example, on the terminal device display Figure 1 When the interface shown in (a) is displayed, in response to the user's input operation of selecting the motion route 101, the terminal device can display Figure 1The interface shown in (c) is the same as the motion path 101. Alternatively, it can be displayed on the terminal device. Figure 1 When the interface shown in (b) is displayed, in response to the user's input operation of selecting the motion route 107, the terminal device can display... Figure 1 The interface shown in (c) is the same as the motion path 107.
[0091] In some possible implementations, the terminal device recommends at least one motion route (e.g. Figure 1 The movement routes shown in (a) or (b) can be determined based on the user's current location. Furthermore, at least one movement route recommended by the terminal device can be a route from the movement route set 1, and the starting point of each movement route in at least one movement route is no more than a preset distance 1 from the user's current location, such as 3 kilometers. This ensures that the movement routes recommended by the terminal device are close to the user's current location, making it convenient for the user to travel along the movement routes.
[0092] The set of exercise routes 1 can be a set of popular exercise routes, that is, exercise routes that multiple users have used in history. Therefore, based on the above method, the exercise routes recommended by the terminal device are those in the fixed set of exercise routes.
[0093] Since the recommended exercise route may be shorter than the distance the user needs, the user may need to circle around the route multiple times after selecting one of the routes.
[0094] For example, combined Figure 1 In the interface (c), after the user selects exercise route 113, assuming the user's required exercise distance is 5 kilometers, the user may need to circle around exercise route 113 2.5 times. Similarly, after the user selects other recommended exercise routes, they may also need to circle around multiple times. That is, the length of the exercise route recommended by the terminal device may differ significantly from the user's actual required exercise distance. This may cause the user to repeatedly traverse the same route during the exercise, potentially resulting in a poor user experience.
[0095] It is understood that the starting point of the movement route can be a location chosen by the user or a location recommended by the terminal device based on the user's current location. This application does not impose specific limitations on this.
[0096] Therefore, to address the above issues, current solutions involve terminal devices recommending routes based on the user's location and required distance. The length of this route is close to the user's desired distance (e.g., less than a certain threshold). This ensures that after following the recommended route, the actual distance traveled is close to the user's required distance, increasing the probability that the recommended route will meet the user's exercise needs.
[0097] Figure 2 This is a schematic diagram illustrating a method for determining a movement route based on user location and movement distance. Figure 2 As shown in (a), the terminal device determines the start and end points of the nearest road segment based on the user's location.
[0098] The user's location, such as point D, can be the user's current location or a location entered by the user. The nearest road segment can be the road segment closest to point D, such as road segment EF.
[0099] It's understandable that each road segment on the map can be approximated as a line segment, and the terminal device can determine the nearest road segment based on the distance from point D to each line segment. The nearest road segment is the road segment corresponding to the line segment closest to point D.
[0100] The starting and ending points of the shortest road segment can be the two endpoints of the segment, namely point E and point F. The starting point can be point E, and the ending point can be point F; alternatively, the starting point can be point F, and the ending point can be point E. The following description uses point E as the starting point and point F as the ending point as an example.
[0101] like Figure 2 As shown in (b), the terminal device performs a road segment search based on the start and end points of the nearest road segment (segment EF) to find a target route connecting the start point (point E) and the end point (point F). This target route can be as follows: Figure 2 The bolded curve in (b) shows the target route. The target route can be the route that the terminal device finds from point E to point F (or from point F to point E) through heuristic search or other methods.
[0102] The sum of the length of the target route and the length of the nearest segment (segment EF) should be close to the distance the user needs to travel; for example, the difference should be less than a certain threshold. This ensures that when the user travels along the closed route 1 formed by the nearest segment (segment EF) and the target route, the actual distance traveled around the perimeter is close to the distance the user needs to travel. The terminal device can then display the closed route 1.
[0103] Then as Figure 2 As shown in (c), the terminal device can display closed route 1, which is the route formed by the target route and the nearest road segment.
[0104] In some possible scenarios, the closed route 1 displayed by the terminal device may not meet the user's needs. For example, the user may not want to pass through a certain section of the closed route 1. In such cases, based on the user's input to trigger a new route recommendation, the terminal device can recommend a new route in a similar process.
[0105] For example, such as Figure 2 As shown in (d) in the figure, with Figure 2 Similar to the process shown in (b), the terminal device performs a road segment search based on the start and end points of the nearest road segment (segment EF) to find a new target route connecting the start point (point E) and the end point (point F). This new target route can be different from the original target route. However, the sum of the length of the new target route and the length of the nearest road segment (segment EF) can be close to the user's desired travel distance; for example, the difference can be less than a certain threshold. The terminal device then recommends a new route, closed route 2, formed by the nearest road segment and the new target route. The terminal device can then display closed route 2.
[0106] like Figure 2 As shown in (e), the closed route 2 displayed by the terminal device is also the new target route and the route formed by the nearest road segment. That is, the terminal device can trigger a new route recommendation based on user input. For example, in... Figure 2 (c) and Figure 2 Between (d) in the middle, the user may not have moved yet, but instead triggers the terminal device to re-recommend the route through input operations.
[0107] However, whether Figure 1 The route recommendations shown are still... Figure 2 The route recommendation method shown may not provide timely alternative routes to users if they do not follow the displayed (or recommended) routes (route 113, closed route 1, or closed route 2) during their movement. This could result in a poor user experience.
[0108] For example, still combined Figure 2 Suppose that after a user moves on a closed route 2 displayed on the terminal device, the user may deviate from the closed route 2 after moving a certain distance, but the terminal device may not be able to recommend a new route to the user in a timely manner.
[0109] In view of this, this application provides a route determination method, wherein a terminal device displays a first route, which is a movement route recommended by the terminal device to the user, and the difference between the length of the first route and the movement distance required by the user (such as referred to as the first distance) is less than or equal to a first threshold; when the terminal device detects that the user's movement position deviates from the first route, the terminal device may display a second route, the difference between the length of the second route and the movement distance required by the user (such as referred to as the first distance) is less than or equal to the first threshold, and the second route includes the segments of the first route that the user has already traversed.
[0110] In this way, when the terminal device detects that the user has deviated from the displayed first route during exercise, it can promptly display a second route based on the user's current location, thus recommending a new exercise route in a timely manner. This new route also meets the user's desired exercise distance. This allows for real-time route recommendations during exercise, increasing the probability of meeting the user's exercise needs and resulting in a better user experience.
[0111] The following is combined Figures 3 to 11 The technical solutions of this application and how they solve the aforementioned technical problems are described in detail with specific embodiments. The following specific embodiments can be implemented independently or in combination with each other. Identical or similar concepts or processes may not be described again in some embodiments.
[0112] The embodiments shown in this application can be executed by one or more electronic devices. The electronic device can be the electronic device itself, a chip, chip system, or processor supporting the electronic device in implementing the route determination method, or a logic module or software capable of implementing all or part of the functions of the electronic device.
[0113] It should be understood that the specific form and quantity of each device shown in the embodiments of this application are merely examples and should not constitute any limitation on the implementation of the methods provided in this application.
[0114] To facilitate understanding of the embodiments of this application, the application scenarios to which the embodiments of this application are applicable will be described first.
[0115] First application scenario
[0116] Figure 3 This is a schematic diagram illustrating an application scenario 300 to which this application embodiment applies. For example... Figure 3 As shown, scenario 300 includes terminal device 310. Terminal device 310 can generate routes, such as generating a first route and a second route recommended to the user; and terminal device 310 can display the generated routes, such as displaying the first route and the second route.
[0117] In other words, in this application scenario, the route generation and route display can be performed by the same device.
[0118] The second application scenario
[0119] Figure 4 This is a schematic diagram illustrating another application scenario 400 to which the embodiments of this application apply. For example... Figure 4 As shown, scenario 400 includes terminal device 410 and device 420.
[0120] The terminal device 410 can be used to display routes, such as displaying the first and second routes recommended by the user.
[0121] In one possible implementation, device 420 can be used to generate routes, such as generating a first route and / or a second route, and can send the generated first route and / or second route to terminal device 410 so that terminal device 410 can display the first route and / or the second route.
[0122] In another possible implementation, device 410 and terminal device 410 collaboratively generate routes, such as generating a first route and / or a second route. That is, during the route generation process, device 410 executes some algorithms or processes, and terminal device 410 executes other algorithms or processes, so that device 410 and terminal device 410 collaboratively generate routes.
[0123] Among them, device 420 can be a terminal device, such as terminal device 410 being a wearable device (such as a smartwatch), device 420 being a mobile phone or tablet computer, etc.; or, device 420 can also be a server, cloud device, etc., such as terminal device 410 being a wearable device (such as a smartwatch) or mobile phone, device 420 being a cloud device.
[0124] In this application scenario, the computing power requirement for the terminal device 410 is relatively small.
[0125] The third application scenario
[0126] Figure 5 This is a schematic diagram illustrating another application scenario 500 to which the embodiments of this application apply. For example... Figure 5 As shown, scenario 500 includes terminal device 510, terminal device 520, and device 530.
[0127] In one possible implementation, terminal device 510 is used to display routes, such as displaying a first route and a second route; and terminal device 520 and device 530 can collaboratively generate routes, such as a first route and a second route, etc., and terminal device 520 can send the generated first route and second route to terminal device 510.
[0128] Among them, device 530 can be a terminal device, cloud device, or server device. For example, terminal device 510 can be a smart wearable device (such as a smartwatch), terminal device 520 can be a mobile phone, and device 530 can be a cloud device.
[0129] Terminal device 510 and terminal device 520 can establish a connection, such as a Bluetooth connection, to enable communication between them. Terminal device 520 can then send generated routes, such as a first route and / or a second route, to terminal device 510.
[0130] In another possible implementation, terminal device 510 is used to display routes, such as displaying a first route and a second route; and terminal devices 510, 520, and 530 can collaboratively generate routes, such as the first route and the second route. That is, in addition to terminal devices 520 and 530, terminal device 510 can also perform some of the steps and / or processes related to generating the first route and / or the second route.
[0131] In this application scenario, terminal device 510 can be a highly mobile device that is easy for users to carry during movement. However, terminal device 510 may have relatively poor computing power, so terminal device 510 can obtain routes from terminal device 520 with which it has established a connection. During the process of generating routes, terminal device 520 may need to interact with device 530, for example, terminal device 520 may obtain some information used to generate routes from device 530.
[0132] The route determination method of this application will be described below, taking the terminal device as the execution subject as an example.
[0133] Figure 6 This is a flowchart illustrating a route determination method 600 provided in an embodiment of this application. Method 600 is applicable to scenario 300 and can be executed by terminal device 310; method 600 is also applicable to scenario 400 and can be executed by terminal device 410; and method 600 is applicable to scenario 500 and can be executed by terminal device 510. That is, the terminal device executing method 600 is a device used to display the route. Figure 6 As shown, method 600 includes the following steps:
[0134] S601. The terminal device displays a first route, which includes M intersections. The M intersections are intersections of some or all of the paths in a first range. The first range is related to a first position and / or a first distance. The first route includes the first position, and the difference between the length of the first route and the first distance is less than or equal to a first threshold. M is a positive integer.
[0135] The first position can also be understood as the starting point of the user's movement. The first position can be an intersection point between paths, or it can be a non-intersection point. The first position can be determined, for example, in the following way.
[0136] In one possible implementation, the first position can be determined based on user input. For example, the terminal device can display interface 1, which can be the interface of a sports application installed on the terminal device, and interface 1 includes control 1 for inputting a starting position. In response to user input on control 1, such as inputting a starting position, the terminal device can determine the first position. The first position can be the same as the starting position input by the user, or it can be a position close to the starting position input by the user, such as a position within a certain threshold distance.
[0137] In another possible implementation, the first location can be a location determined based on the user's current location. The user's current location can also be understood as the current location of the terminal device. For example, the first location could be the intersection (path) closest to the user's current location.
[0138] In another possible implementation, the first location can be determined based on the starting point of the historical movement route. For example, the terminal device can obtain historical movement routes, such as storing historical movement routes or obtaining them from other devices (e.g., servers, cloud computing), and can combine these with the starting points of the historical movement routes to determine the first location. For instance, the first location can be the closest starting point to the user's current location from the historical movement routes, or it can be the most frequently used starting point from the historical movement routes.
[0139] The first distance can be understood as the distance the user needs to travel, such as 5 kilometers, 10 kilometers, etc. The first distance can be determined in the following way.
[0140] In one possible implementation, the first distance can be determined based on user input. For example, the terminal device can display an interface 2, which can be the interface of a sports application installed on the terminal device, and the interface 2 includes a control 2 for inputting a movement distance; then, in response to the user's input operation on the control 2, such as inputting a movement distance, the terminal device can determine the first distance.
[0141] It should be understood that Interface 2 and Interface 1 can be the same interface, or Interface 2 and Interface 1 can be two separate interfaces. This application does not impose any specific limitations on this.
[0142] In another possible implementation, the first distance can be determined based on historical movement distances. For example, the terminal device can acquire historical movement distances and combine them to determine the first distance. For instance, the first distance can be the average of historical movement distances, or it can be the distance most frequently used in historical movement distances. Historical movement distances can be determined based on historical movement routes; for example, each historical movement route can determine a historical movement distance. The terminal device can then determine the historical movement distance based on historical movement routes, or it can acquire historical movement distances from other devices. Furthermore, the first distance can be determined based on the historical movement distances.
[0143] It should be understood that in this embodiment, the historical movement route can be the historical movement route of the user or the historical movement route of the public (multiple users) at a given moment. Furthermore, the historical movement route can include one or more routes. The historical movement route can also be understood as a movement route over a period of time.
[0144] Furthermore, by combining the first location and / or the first distance, a range in which the user might move can be determined, i.e., the first range. The route recommended by the terminal device (the first route) can then be a route within this first range. The first range may include, for example, multiple paths that intersect each other, forming intersection points. The first route may include M intersection points. The inclusion of M intersection points in the first route can also be understood as the first route covering or passing through M intersection points.
[0145] For example, such as Figure 7 As shown in (a), the first position can be point O, and the first range can be, for example, point O. Figure 7 The area or region circled by the dashed line in the diagram. This area includes multiple points, including point O, which are the intersections of the paths within the first range, i.e., points A to K and point O. The first route can be the route indicated by the bold curve within this area. The M intersections included in the first route can include: points A, B, C, D, E, F, G, H, and O.
[0146] The first threshold can be a preset value, such as 500m, 200m, or 100m. By making the difference between the length of the first route and the first distance less than or equal to the first threshold, the actual distance traveled by the user following the first route is close to the distance the user needs, thus helping to meet the user's requirements.
[0147] S602. After detecting that the user has passed through Y of the M intersections, the user moves on the first segment. The first segment does not belong to the first route. Y is a positive integer.
[0148] Here, Y can be 1, or Y can be greater than 1. The user's movement in the first segment can also be understood as the user's current location being in the first segment.
[0149] For example, combined Figure 7 In case (a), assume the user starts moving from point O, has already passed points O and A, and after passing point A, did not move along road segment AB, but instead moved to road segment AK (road segment AK does not pass through point B). Then the Y intersection points can be understood as points O and A. The first road segment can be understood as road segment AK.
[0150] Since the user did not follow the first route, the terminal device can recommend a new route, namely the second route.
[0151] S603. Display the second route, which includes N intersections. The N intersections are some or all of the intersections of the first range. The N intersections include Y intersections. The second route includes the first road segment, and the difference between the length of the second route and the first distance is less than or equal to the first threshold. N is a positive integer.
[0152] The second route is also one whose length differs from the first distance by a factor less than or equal to the first threshold, meaning it can also meet the user's distance requirements. Furthermore, the second route falls within the first range. Since the first segment is the segment the user is currently on, the second route includes the first segment.
[0153] The N intersections and M intersections can be partially or completely the same. The second route can also include the first location. The N intersections include the Y intersections, meaning the N intersections include the intersections the user has already traversed on the first route; or, it can be understood that the second route includes the segments the user has already traversed on the first route.
[0154] For example, still combined Figure 7 Following (a) in the diagram, assuming the user moves on road segment AK, the second route displayed by the terminal device can be as follows: Figure 7 As shown in (b), the route indicated by the bold curve is the second route. The N intersections included in the second route can include: point A, point K, point B, point C, point D, point H, and point O. Since the user has already passed intersections O and A in the first route, meaning the Y intersections include O and A, the second route includes O and A, which means the second route includes the segment OA that the user has already traversed. Furthermore, the user's current first segment is segment AK, therefore the second route includes segment AK.
[0155] In this way, not only can new exercise routes be promptly promoted to users, but after users complete the exercise according to the second route, the actual distance they exercise is close to the first distance, which helps to meet the users' exercise needs.
[0156] Understandable. Figure 7 For illustrative purposes only, when the terminal device displays a recommended route (first route or second route), the terminal device may or may not display the first range. Furthermore, the first route and / or the second route may or may not be closed routes. For example, if the first route and / or the second route is not a closed route, then the first position can be understood as the starting position and the ending position; that is, the terminal device can determine the first range based on the starting position and the ending position, and recommend a movement route to the user within the first range. This application does not impose specific limitations in this regard.
[0157] The route determination method of this application allows the terminal device to recommend a second route when the user does not follow the recommended first route. The length of the second route is close to the user's required movement distance (the first distance). This enables timely recommendation of movement routes that meet the user's needs based on their real-time location, thus improving the user experience.
[0158] Furthermore, given a first distance and a first position, the area where the user moves is typically closer to the first position, and / or the length of the user's movement range usually does not exceed the first distance. For example, assuming the user starts moving from the first position and the user's desired movement distance is the first distance, the area where the user moves may not exceed the range enclosed by a circle centered at the first position and with the first distance as its radius. Therefore, the terminal device can recommend routes within a first range determined based on the first position and / or the first distance. In this way, the recommended routes not only have a higher probability of meeting the user's needs, but also, in the process of determining the first route and the second route, road segments outside the first range do not need to be analyzed and processed, making the power consumption for determining the first route and / or the second route relatively low.
[0159] As an optional embodiment, the first route and / or the second route are closed routes, wherein the first route does not include repeated road segments, and the second route does not include repeated road segments.
[0160] A closed path can also be understood as a path where the starting and ending points coincide. For example, the first position can be understood as both the starting and ending point of the path.
[0161] Excluding repeated road segments can also be understood as meaning that during the user's movement along the first route and the second route, they will not repeatedly pass through locations or road segments other than the first location. For example, excluding the first location, identical intersections and the same road segments are excluded. For instance, combining... Figure 7 The first route cannot be from point O to point A and then back to point O, because the route includes the repeated segment OA.
[0162] This design ensures that users not only meet their distance requirements when following either the first or second route, but also avoid repetitive route segments, resulting in a better user experience. Furthermore, after completing either route, users can return to their starting point (the first location). Since the first location is typically close to the user's current location, it facilitates easy return for users in scenarios where they need to rejoin their current position after completing their workout.
[0163] As you can understand, the above describes the process of the terminal device displaying the recommended route. Below, the generation process of the first route and / or the second route will be described in detail. Considering scenarios 400 and 500, the device that generates the first route and / or the second route may not be the same device as the device that displays the route (the terminal device in method 600). Therefore, the following description will use device 1 generating the first route and / or the second route as an example.
[0164] Figure 8 This is a flowchart illustrating a route determination method 800 provided in an embodiment of this application. Figure 8 As shown, method 800 includes the following steps:
[0165] S801, Device 1 acquires the first position and the first distance.
[0166] It should be understood that the description of the first position and the first distance can be found in method 600, and will not be repeated here.
[0167] It should also be understood that the first position and the first distance can be determined by device 1. For example, device 1 and the device displaying the route are the same device, or device 1 and the device displaying the route are not the same device. In this case, device 1 can obtain the user's current position from the device displaying the route and determine the first position based on the user's current position. The method for determining the first position and the first distance in method 600 is similar to that of the terminal device, as described above.
[0168] Alternatively, the first position and first distance can be obtained by device 1 from other devices (such as the device displaying the route). For example, if device 1 is device 420 in scene 400, then the first position and first distance can be obtained by device 1 from terminal device 410; or, if device 1 is terminal device 520 or device 530 in scene 500, then the first position and first distance can be obtained by device 1 from terminal device 510. Furthermore, the method for determining the first position and first distance is similar to the method for determining the first position and first distance in method 600, as described above.
[0169] S802, Equipment 1 determines the first range.
[0170] It should be understood that the first range is determined based on the first location and / or the first distance.
[0171] In one possible implementation, the first range is determined based on a first position. For example, the center of the first range can be the first position. For instance, the first range is a square centered at the first position with a length equal to a preset threshold 1. Alternatively, it can be a circle centered at the first position with a radius equal to a preset threshold 2.
[0172] In another possible implementation, the size (or area) of the first range is determined based on a first distance. For example, the first range is the area enclosed (or covered) by a square with a length equal to the first distance; or, the first range is a circle, and the radius or diameter of the circle is determined based on the first distance, for example, the radius or diameter is the ratio of the first distance to a coefficient. Furthermore, in this implementation, the center of the first range could be, for example, the user's current location.
[0173] In another possible implementation, the first range is determined based on a first position and a first distance. For example, the first range is a circle centered at the first position, and the radius of the first range is the ratio of the first distance to a first coefficient. The first coefficient can be a preset value, such as 2 or 3. Alternatively, the first coefficient can be a dynamically adjustable value. See the description below for details.
[0174] S803, Device 1 determines multiple intersections between multiple paths within a first range.
[0175] The multiple paths may include runnable paths within the first range and / or paths that can be displayed on the map.
[0176] It's understandable that a runnable path can be understood as a path where movement can take place. These paths may or may not be displayed on a map. For example, some paths may not be displayed on the map, but users may typically traverse these paths during their movement. Therefore, the paths displayed on the map do not necessarily include runnable paths.
[0177] Furthermore, the runnable path can be determined based on historical movement routes. For example, it can be determined based on the user's historical movement routes or the historical movement routes of the general public. The historical movement routes can be movement routes stored by device 1, or they can be obtained by device 1 from other devices. For example, device 1 is terminal device 410 in scenario 400, and other devices are devices 420; or, device 1 is terminal device 520 in scenario 500, and other devices are devices 530, etc. This allows device 1 to determine the runnable path based on historical movement routes.
[0178] Alternatively, the runnable path may not be determined by device 1, but rather obtained by device 1 from other devices. In this case, before S803, method 800 may also include: device 1 obtaining the runnable path from the first device. For example, device 1 is terminal device 410 in scenario 400, and the first device is device 420; or, device 1 is terminal device 520 in scenario 500, and the first device is device 530, etc. In this case, device 1 does not need to determine the runnable path based on historical movement routes; it only needs to obtain it from the first device.
[0179] Similarly, the map's displayable paths can be stored by device 1. Alternatively, the map's displayable paths can be obtained by device 1 from other devices. The specific method for obtaining runnable paths from other devices is similar to the description above.
[0180] It is understood that the traversable paths and / or map-displayable paths mentioned above can be traversable paths and / or map-displayable paths within the first range; or, they can be traversable paths and / or map-displayable paths within the target area (including the first range). For example, if device 1 can obtain a map, then device 1 can determine map-displayable paths within the first range based on the first range and the map; and / or, device 1 can obtain historical movement routes. Then device 1 can determine traversable paths within the first range based on the first range and historical movement routes. This application does not specifically limit this.
[0181] If device 1 can determine multiple paths within a first range, device 1 can determine multiple intersections formed between the multiple paths.
[0182] For example, such as Figure 9 As shown, Figure 9In (a) of the map, the paths indicated by the bold lines can be understood as runnable paths, and the first range is the area selected by the dashed circle. The intersections formed by these runnable paths within the first range can include points O, A, B, and K. All intersections (multiple intersections between multiple paths) formed by the runnable paths within the first range and the paths that can be displayed on the map can be seen as follows: Figure 9 As shown in (b), the multiple intersection points include: points A to K and point O.
[0183] Optionally, device 1 can first determine the intersection points formed between runnable paths within a first range (and...). Figure 9 (Similar to (a) in the previous example). Furthermore, device 1 can determine multiple intersections formed by the runnable path within the first range and the path that can be displayed on the map (and...). Figure 9 (Similar to (b) in the text).
[0184] Alternatively, device 1 can first determine the intersections formed between the map-displayable paths within a first range. Further, it can determine multiple intersections formed by the runnable paths within the first range and the map-displayable paths (and...). Figure 9 (Similar to (b) in the text).
[0185] Alternatively, device 1 can first determine the map-displayable path and the traversable path, and then determine the multiple intersection points formed by the traversable path and the map-displayable path within the first range (and...). Figure 9 (Similar to (b) in the text).
[0186] It should be understood that device 1 can determine multiple intersections between multiple paths in any order or manner, and this application does not specifically limit this.
[0187] Based on the above embodiments, optionally, device 1 can also display multiple intersection points, or display the generation process of multiple intersection points, for example, first displaying the intersection points formed by runnable paths (the displayed content is consistent with...). Figure 9 (similar to (a) in the example), then display the multiple intersections formed by multiple paths (the displayed content is similar to...). Figure 9 (similar to (b) in the text).
[0188] For example, device 1 can be a device that displays the first route and the second route; that is, device 1 and the terminal device in method 600 can be the same device. For example, device 1 could be terminal device 310 in scenario 300, terminal device 410 in scenario 400, or terminal device 510 in scenario 500, etc. Then device 1 can display the multiple intersection points, and the displayed content is... Figure 9 Similar to (b) in the example. Alternatively, the generation process of these multiple intersection points can be displayed, with the displayed content sequentially corresponding to... Figure 9 (a) and (b) are similar.
[0189] Alternatively, device 1 may not be the device displaying the first and second routes, meaning device 1 is not the same device as the terminal device in method 600. For example, device 1 might be device 420 in scenario 400, and terminal device 410 might be the device displaying the first and second routes; or device 1 might be terminal device 520 or 530 in scenario 500, and terminal device 510 might be the device displaying the first and second routes. In this case, device 1 can send the generated multiple intersection points to the device displaying the first and second routes (the terminal device in method 600), so that the terminal device in method 600 can display these multiple intersection points, and the displayed content will be the same as... Figure 9 Similar to (b) in the above. In this case, the runnable path and / or map-displayable path may be indicated by device 1 to the terminal device in method 600, or the terminal device in method 600 may store the runnable path and / or map-displayable path, or the terminal device in method 600 may obtain the runnable path and / or map-displayable path from other devices besides device 1. This application does not specifically limit this.
[0190] S804, Device 1 determines multiple road segment vectors based on multiple intersections.
[0191] In this context, multiple road segment vectors can be understood as multiple road segments with directionality; that is, each road segment vector can be understood as a road segment pointing from the starting point to the ending point. Specifically, multiple road segment vectors are used to indicate the road segments between adjacent intersections among multiple intersections. Adjacent intersections are two intersections included in any of the multiple paths, and no other intersections are included between adjacent intersections.
[0192] That is, adjacent intersections are connected by a path, and there are no other intersections between adjacent intersections. For example, combining... Figure 9 In (b), points O and A can be understood as adjacent intersections, and points O and A can be understood as a road segment; points A and K can be understood as adjacent intersections, and points A and K can be understood as a road segment; points A and B can be understood as adjacent intersections, and points A and B can be understood as a road segment; however, points O and B are not adjacent intersections, and points O and B are not a road segment, because point A exists in the road segment connecting points O and B.
[0193] It should be understood that multiple road segment vectors can also be called a road segment vector set or a road segment vector list, etc. Device 1 can represent and record these multiple road segment vectors in any form, and this application does not make any specific limitations on this.
[0194] Multiple road segment vectors can be determined, for example, in the following way: For each intersection among multiple paths, device 1 can use that intersection as a starting point to determine all road segment vectors pointing from that intersection to its adjacent intersections. For example, combining... Figure 10 In (a), taking point A as an example, all road segment vectors originating from point A can include road segment vector AO (the road segment from point A to point O), road segment vector AB (the road segment from point A to point B), and road segment vector AK (the road segment from point A to point K). Taking point B as an example, all road segment vectors originating from point B can include road segment vector BA (the road segment from point B to point A), road segment vector BK (the road segment from point B to point K), and road segment vector BC (the road segment from point B to point C).
[0195] In this way, device 1 sequentially traverses each of the multiple intersections, determining the multiple road segment vectors that can be formed from these intersections. Furthermore, these multiple road segment vectors can include all road segment vectors that can be formed from adjacent intersections. For example, for adjacent intersections A and B, a road segment vector AB (the road segment from A to B) can be formed, or a road segment vector BA (the road segment from B to A) can be formed.
[0196] S805. Based on multiple road segment vectors, device 1 determines the set of routes that start from the first position and can return to the first position.
[0197] It should be understood that a set of routes may include multiple closed routes. Furthermore, each of these closed routes includes a first position.
[0198] It should be noted that method 800 is described using the example of device 1 generating a closed route. In some possible implementations, the set of routes generated by device 1, as well as the multiple routes mentioned below, may not be closed routes. This application does not specifically limit this.
[0199] The first position can be one of multiple intersections, such as point O. Device 1 can start from the first position and search for multiple closed routes that can return to the first position based on multiple road segment vectors. Each closed route can be understood as a closed route formed by at least one road segment vector that connects end to end. Furthermore, each closed route does not include duplicate road segments. Excluding duplicate road segments can also be understood as excluding identical intersections other than the first position, and excluding two road segment vectors corresponding to the same road segment. For example, if multiple closed routes include road segment vector AB, then they do not include road segment vector BA; or, if multiple closed routes include road segment vector OA, then they do not include road segment vector AO.
[0200] Alternatively, if the first location is not one of multiple intersections, device 1 can first determine the target intersection adjacent to the first location. The target intersection can be understood as an intersection in the road segment vector where the first location is located. For example, if the first location is on road segment OA, the target intersection could be point O or point A.
[0201] Device 1 can start from the target intersection point and, based on multiple road segment vectors, search for multiple closed routes that can return to the target intersection point. Each closed route must include at least one road segment vector from the road segment vectors of the first location. For example, if the first location is on road segment OA, the target intersection point can be point O or point A, and each closed route must include either road segment vector OA or road segment vector AO. This allows the user to start moving from the first location.
[0202] At multiple intersections Figure 10 In the case of points A to K and point O shown in (b), after device 1 determines multiple road segment vectors, taking the first position (or target intersection) as point O as an example, device 1 can proceed according to... Figure 11 The method shown determines the set of routes (multiple closed routes).
[0203] like Figure 11 As shown, the road segment vectors starting from point O can include road segment vectors OA, OH, OI, and OJ.
[0204] Taking road segment vector OA as an example, to ensure the closed loop is connected end-to-end, device 1 can determine the road segment vectors starting from point A. These road segment vectors starting from point A include: road segment vector AO, road segment vector AB, and road segment vector AK. Since road segment vector AO and road segment vector OA point to the same road segment, road segment vector AO is excluded. Therefore, road segment vector OA can be followed by road segment vectors AB and AK.
[0205] Taking road segment vector AB as an example, device 1 can determine the road segment vectors starting from point B. These road segment vectors starting from point B include: road segment vector BC, road segment vector BA, and road segment vector BK. Since road segment vector BA and road segment vector AB point to the same road segment, road segment vector BA is excluded. Therefore, road segment vector AB can be followed by road segment vectors BK and BC.
[0206] Following road segment vector BK, the road segment vectors originating from point K include road segment vectors KB and KA. Since road segment vector KB and road segment vector BK point to the same road segment, road segment vector KB is excluded. Similarly, since road segment vector KA shares the same intersection point A with a previously determined road segment, road segment vector KA is also excluded. Therefore, connecting road segment vector AB to road segment vector BK cannot form a closed route without repeating road segments. Thus, road segment vector AB can be connected to road segment vector BC.
[0207] Following this logic, starting from point O, a segment vector search is performed sequentially to determine the path. Figure 11 The aforementioned routes 1 to 12 are the 12 closed routes.
[0208] S806, Device 1 determines multiple routes in the route set.
[0209] It can be understood that multiple routes can be some or all of the routes in a route set. Furthermore, multiple routes are those routes in the route set whose length differs from the first distance by a value less than or equal to a first threshold. In other words, multiple routes can be understood as routes that meet the user's needs for exercise distance. The first route and the second route belong to multiple routes.
[0210] For example, device 1 can determine the length of each closed route in the route set, thereby filtering out multiple routes whose lengths differ from a first distance by a first threshold. For instance, device 1 determines the length of each closed route by sequentially adding the lengths of the segment vectors included in each closed route. The length of the segment vector is not a straight-line distance, but rather the actual distance traveled along that segment vector.
[0211] Alternatively, when device 1 is calculating the length of a closed route, if the difference between the sum of the lengths of the segment vectors included in the closed route and the first distance exceeds a first threshold, device 1 can stop calculating the length of the closed route and determine that the closed route does not belong to multiple routes. In this way, the power consumption of device 1 can be relatively small.
[0212] For example, still combined Figure 11 For example, device 1 can determine that among routes 1 to 12, the difference between the length of route 1, route 5, route 4 and route 10 and the first distance is less than or equal to the first threshold, then multiple routes include route 1, route 5, route 4 and route 10.
[0213] It can be understood that Route 1 and Route 5 can be understood as two closed routes with different directions but the same included road segments. Similarly, Route 4 and Route 10 can be understood as two closed routes with different directions but the same included road segments. Therefore, in one case, multiple routes can include Route 1, Route 5, Route 4, and Route 10. These multiple routes can then be understood as multiple routes with different included road segments and / or different directions. Alternatively, these multiple routes can include Route 1 (or Route 5) and Route 4 (or Route 10). These multiple routes can then be understood as multiple routes with different included road segments, meaning that these multiple routes do not have a directional orientation.
[0214] It should be understood that the above explanation uses the example of device 1 determining multiple routes within a first range. In some possible implementations, device 1 may also determine one route within the movement range according to the process shown in method 800, or device 1 may determine multiple routes within the movement range, but the number of routes is small, for example, less than a certain threshold. This means that the movement route recommended to the user based on one route or a small number of routes determined by device 1 within the movement range may not meet the user's needs. Alternatively, in other possible implementations, device 1 may also determine multiple routes within the movement range according to the process shown in method 800, but the number of routes may be large, for example, more than a certain threshold. This means that when recommending a movement route to the user based on a large number of routes determined by device 1 within the movement range, it is necessary to analyze and process the large number of routes, which on the one hand results in higher power consumption; on the other hand, when recommending a route to the user from the large number of routes, multiple routes that meet the requirements may be selected, making it difficult to recommend a route to the user.
[0215] Therefore, in order to ensure that the number of multiple routes determined by device 1 meets the requirements, such as being greater than or equal to threshold 3, and / or less than or equal to threshold 4, device 1 can dynamically adjust the range of motion.
[0216] In one possible implementation, when the first range is a circle centered at the first position with a radius equal to the ratio of a first distance to a coefficient, the device 1 can adjust the range of motion by adjusting the value of the coefficient.
[0217] For example, prior to S802, device 1 may have already determined a second range based on a first location, a first distance, and an initial coefficient, and determined at least one route within the second range in a manner similar to S803 to S806. If the number of at least one route is less than or equal to a second threshold, or the number of at least one route is greater than or equal to a third threshold, the initial coefficient is adjusted to a first coefficient, and the first range is determined based on the first coefficient. Thus, multiple routes can be determined within the first range in a manner similar to S803 to S806.
[0218] The second range is the area or region enclosed by a circle with the first position as the center and the ratio of the first distance to the initial coefficient as the radius.
[0219] It should be understood that when the number of at least one route is greater than or equal to the third threshold, it indicates that the second range may be large, and therefore the first coefficient can be greater than the initial coefficient. That is, device 1 increases the initial coefficient. The step size for increasing the initial coefficient can be a preset value, such as an increase step size of 1 or 2. Then the first coefficient can be the initial coefficient plus the value obtained by this step size. For example, the initial coefficient can be 3, and the first coefficient can be 4, etc.
[0220] When the number of at least one route is less than or equal to a second threshold, indicating that the second range may be small, the first coefficient can be less than the initial coefficient. That is, device 1 reduces the initial coefficient. The step size for reducing the initial coefficient can be a preset value, such as a step size of 1 or 2. Then the first coefficient can be the value obtained by subtracting this step size from the initial coefficient. For example, the initial coefficient can be 3, and the first coefficient can be 2, etc.
[0221] It should be understood that the step sizes for increasing and decreasing the initial coefficients shown above are merely examples, and device 1 can also increase or decrease the initial coefficients in other ways. This application does not impose specific limitations on this.
[0222] Below, we will continue to use device 1 as the execution subject to explain how the first route is determined.
[0223] Method 1: Determine the first route among multiple routes based on one or more of the following: terrain information, security information, or heat information.
[0224] In one possible implementation, device 1 can determine the difficulty level of each of the multiple routes based on terrain information, where the difficulty level represents the ease of movement along that route. Furthermore, a first route can be determined based on the difficulty level of each of the multiple routes.
[0225] Topographic information may include, but is not limited to, information indicating the degree of curvature and / or information indicating elevation differences.
[0226] For example, device 1 can determine the number of corners for each of a plurality of routes. The number of corners for each route can be used to indicate the degree of tortuosity of the route.
[0227] Device 1 can also determine the elevation difference of each route including each segment vector. The elevation difference of each segment vector can be the elevation difference between two adjacent intersections included in the segment vector. Device 1 can calculate the elevation difference of each route based on the elevation difference of each segment vector. The elevation difference of each route can be the average of the elevation differences of each segment vector included in the route, or the elevation difference of each route can also be the sum of the elevation differences of each segment vector included in the route, etc.
[0228] By combining the number of turns and / or the elevation difference of each route across multiple routes, the difficulty level of each route can be determined. The more turns, the more difficult the route; the greater the elevation difference, the more difficult the route.
[0229] For example, device 1 can use a scoring mechanism to determine the difficulty level of each route, with higher scores indicating greater difficulty. For each of the multiple routes, a difficulty score 1 can be determined based on the number of corners and a preset function 1, where preset function 1 represents the relationship between the number of corners and difficulty score 1. Similarly, for each of the multiple routes, a difficulty score 2 can be determined based on the altitude difference and a preset function 2, where preset function 2 represents the relationship between altitude difference and difficulty score 2. When determining difficulty based on the number of corners and altitude difference, the sum of score 1 and score 2 can represent the difficulty level of the route. When determining difficulty based on the number of corners, score 1 can represent the difficulty level of the route. When determining difficulty based on altitude difference, score 2 can represent the difficulty level of the route.
[0230] Furthermore, device 1 can sort the difficulty (e.g., rating) of multiple routes; or, device 1 can divide multiple routes into multiple levels based on the difficulty (e.g., rating) of each route in the multiple routes, such as routes divided into level 1, level 2 and level 3; level 1 indicates the highest difficulty, level 2 indicates the moderate difficulty, and level 3 indicates the lowest difficulty, etc.
[0231] When recommending routes, for example, a route of moderate difficulty can be recommended to the user, and the first route would be the route of moderate difficulty among multiple routes. Alternatively, a first route can be recommended based on user needs. For example, device 1 displays interface 3, which can be, for example, the interface of a sports application. Interface 3 includes control 3, which is used to input the difficulty level. Based on the user's input to control 3, device 1 displays the first route. For example, if the user's input to control 3 triggers the selection of the highest difficulty level, then the first route displayed by device 1 could be the route with the highest difficulty level, etc.
[0232] In one possible implementation, device 1 can determine a first route among multiple routes based on security information. The first route may be, for example, the route with the highest level of security among the multiple routes.
[0233] For example, device 1 can determine the safety level of each route based on one or more of the following factors: traffic volume, pedestrian volume, or accident probability. Device 1 can then recommend the safest route to the user.
[0234] The traffic flow, pedestrian flow, or accident probability for each route can be determined based on the traffic flow, pedestrian flow, or accident probability of each segment included in that route. For example, the traffic flow for each route can be the sum or average of the traffic flow of each segment included in that route. The pedestrian flow for each route can be the sum or average of the pedestrian flow of each segment included in that route. The accident probability for each route can be the sum or average of the accident probabilities of each segment included in that route. Device 1 can store the traffic flow, pedestrian flow, and accident probability of each segment, or it can obtain these data from other devices, such as the cloud.
[0235] Device 1 can determine the traffic flow score for each of the multiple routes, which indicates the amount of traffic; it can also determine the pedestrian flow score for each route, which indicates the amount of pedestrians; and it can also determine the accident probability score for each route, which indicates the probability of an accident. Therefore, the safety level of each route can be determined using the traffic flow score, pedestrian flow score, or accident probability score.
[0236] In one possible implementation, device 1 can determine a first route among multiple routes based on heat information. For example, the first route could be the route with the highest or lowest heat among the multiple routes.
[0237] Popularity information can be understood as representing the probability that each route is likely to be selected by a user. The popularity of each route can be determined based on the popularity of each road segment included in each of the multiple routes.
[0238] For example, device 1 can acquire historical travel routes. The popularity of each road segment can be represented by the number of times or frequency of occurrence of that road segment in the historical travel routes. The popularity of each route among multiple routes can be the sum of the popularity of all road segments included in that route, or the popularity of each route among multiple routes can be the average of the popularity of all road segments included in that route. Alternatively, based on the number of times each road segment appears in the historical travel routes, a popularity score is determined for each road segment; a higher popularity score indicates a higher popularity for that road segment. In this case, the popularity of each route among multiple routes can be the sum of the popularity scores of all road segments included in that route, or the popularity of each route among multiple routes can be the average of the popularity scores of all road segments included in that route.
[0239] Device 1 can, for example, recommend the first route with the highest or lowest popularity to the user.
[0240] In one possible implementation, device 1 may also determine a first route among multiple routes based on several of the following: terrain information, security information, or heat information.
[0241] In this implementation, device 1 combines two or three of the above three methods to determine the first route. For example, based on user input, the first route among multiple routes can be determined based on several factors, including terrain information, safety information, or popularity information. For instance, the user selects a more difficult route and a more popular route based on their input. Device 1 can then determine the difficulty score for each route among the multiple routes, for example, a higher difficulty score; it can also determine the popularity score for each route among the multiple routes, for example, a higher popularity score. Thus, device 1 can determine the total score for each route among the multiple routes (the sum of the difficulty score and the popularity score) and can recommend the first route with the highest total score.
[0242] Method 2: Device 1 receives a second operation from the user, the second operation being used to input at least one route feature; Device 1 determines a first route based on the at least one route feature, the first route being a route among multiple routes that matches at least one route feature.
[0243] Route features can be used to describe the characteristics of a route, such as directionality (clockwise or counterclockwise), difficulty level, popularity, etc. Based on at least one route feature input by the user, a first route matching at least one route feature can be recommended to the user.
[0244] It is understood that method 2 can be combined with method 1 above. For example, when at least one route feature includes the highest popularity, the first route can be the most popular route among multiple routes, and the method by which device 1 determines the most popular route can be referred to the description in method 1.
[0245] If at least one route feature can include clockwise, then the first route can be a clockwise route, for example, combining... Figure 11 If multiple routes include route 1, route 5, route 4 and route 10, then based on at least one route feature including clockwise, the first route can be route 5 or route 10.
[0246] Alternatively, at least one route feature may include the highest difficulty level, in which case the first route may be the route with the highest difficulty level among multiple routes. The method by which device 1 determines the route with the highest difficulty level can be found in the description of method 1.
[0247] Method 3: The terminal device displays multiple routes; based on the user's first operation, the first route is displayed, and the first operation is used to select the first route.
[0248] It should be understood that the terminal device can display an interface with multiple routes, for example, it can be connected to... Figure 1 (a) or Figure 1 Similar to (b) in the example. For the sake of brevity, it will not be shown here again.
[0249] It should be noted that in method 3, the first route can be determined by the device displaying the route (the terminal device in method 600) based on the user's input. Furthermore, multiple routes can be obtained by the terminal device from device 1, or device 1 and the terminal device displaying the routes can be the same device.
[0250] The multiple routes displayed on the terminal device may or may not indicate directions. For example, suppose the multiple routes include... Figure 11 In the case of routes 1, 5, 4, and 10, if the terminal device displays multiple route markers with directions, since route 1 is counter-clockwise, route 5 is clockwise, route 4 is counter-clockwise, and route 10 is clockwise, device 1 can display routes 1, 5, 4, and 10 respectively, and indicate the direction of movement on each route. Alternatively, device 1 can display routes 1 (or 5) and 4 (or 10), without indicating the direction of movement on any of the routes. This application does not impose specific limitations on this.
[0251] The first operation can be to trigger the selection of one of multiple routes, such as a click, double-click, swipe, circle, or voice selection. The terminal device can then display the route selected by the first operation (i.e., the first route).
[0252] It should be understood that the terminal device displays the interface of the first route, for example, which can be compared with... Figure 1 Similar to (c) in the example. For the sake of brevity, it will not be shown here.
[0253] If device 1 determines the first route, and if device 1 is a device for displaying the motion route, such as the terminal device in method 600, then device 1 can display the first route; or, if device 1 is not a device for displaying the motion route, such as not being the terminal device in method 600, then device 1 can send the first route to the terminal device in method 600 so that the terminal device can display the first route.
[0254] The terminal device in method 600 can execute method 600, that is, when the terminal device displays the first route (S601), if it detects that the user is not moving according to the first route (such as S602), the terminal device can display the second route (S603). The second route is one of multiple routes, and the second route is different from the first route.
[0255] In other words, during a user's movement, the terminal device displaying the route can obtain the user's location in real time or periodically, and can determine whether the user's location belongs to the first recommended route. If it does not belong to the user's first route, the terminal device can recommend a second route for the user.
[0256] It is understood that the second route can be a route determined by the terminal device from multiple routes. For example, the terminal device can acquire multiple routes and determine the second route from among them. For instance, the terminal device can determine a route from multiple routes that includes Y intersections and the first route; this route is the second route. Alternatively, the terminal device can determine S routes from multiple routes that include Y intersections and the first route, where S is greater than 1. The terminal device can then determine the second route from the S routes in the same manner as device 1 determined the first route from multiple routes described above. In this way, the terminal device can display the second route.
[0257] Alternatively, the terminal device displaying the route (the terminal device in method 600), upon detecting that the user is not moving along the first route (e.g., S602), may send information indicating Y intersections and the first road segment to device 1, or send information indicating Y intersections and the user's current location to device 1, so that device 1 can determine a second route and send the second route to the terminal device, enabling the terminal device to display the second route.
[0258] In this way, since the second route is also one of multiple routes, when the user does not follow the first route recommended by the terminal device, the second route can be determined from the multiple routes and displayed. This eliminates the need to repeat the process and / or steps in method 800, i.e., the path search step does not need to be performed again, resulting in lower power consumption when determining the second route.
[0259] For example, compared to Figure 2 In the method shown, the route determination method of this application allows the terminal device to recommend new routes to the user based on the user's actual location during movement; furthermore, when recommending routes, the device does not need to perform path search again (e.g., Figure 2 The heuristic search based on points E and F allows for relatively low power consumption of the device.
[0260] Since the second route recommended to the user is also one of multiple routes, and in some scenarios the user's movement location may not belong to multiple routes. For example, method 600 further includes: the terminal device detects that the user is moving on the second route segment, and displays a first prompt message, indicating that the multiple routes do not include the second route segment.
[0261] It should be understood that since the multiple routes determined by device 1 are all closed routes within a first range with a length close to the first distance, if the second segment does not belong to any of these multiple routes, based on the user's position, the terminal device may not be able to recommend a route with a length close to the first distance within the first range, or the user's position may have exceeded the first range. Therefore, the terminal device may display a first prompt message. The first prompt message may, for example, indicate that the user has deviated from the recommended route or that a suitable route cannot be recommended.
[0262] Furthermore, based on the above embodiments, after S602, i.e. after detecting that the user's movement position deviates from the first route, method 600 may further include: the terminal device displays a second prompt message; and S603 may be implemented in the following way: based on the user's third operation on the second prompt message, the second route is displayed.
[0263] The second prompt message can be used to alert the user that they have deviated from the first route, and / or it can be used to request a new route recommendation. The third operation can be any operation that triggers the display of a new route. The terminal device can then display the second route based on the third operation.
[0264] It should be understood that the entities executing the steps and / or processes shown above are merely examples. The following sections, using scenarios 300, 400, and 500, will further illustrate the entities executing these steps and / or processes.
[0265] In a first possible implementation, the route determination method of this application can be applied to scenario 300, in which case the device displaying the route and the device generating the route are the same. Therefore, the terminal device displaying the route in the above method embodiment and device 1 are the same device, both of which can be terminal device 310 in scenario 300.
[0266] In a second possible implementation, the route determination method of this application can be applied to scenario 400, in which case the device displaying the route and the device generating the route may not be the same. Scenario 400 includes terminal device 410 and device 420.
[0267] In possible scenario 1, terminal device 410 can execute method 600, namely the step of displaying the first route and the second route; and device 420 can execute the step of determining the first route and the second route, that is, device 420 determines the first route and sends the first route to terminal device 410 so that terminal device 410 displays the first route; and can obtain information from terminal device 410 for indicating Y intersections and the first road segment, or obtain information for indicating Y intersections and the user's current location, and can determine the second route from multiple routes and indicate the second route to terminal device 410 so that terminal device 410 displays the second route.
[0268] In possible scenario 2, terminal device 410 can execute method 600, namely the step of displaying the first route and the second route; and terminal device 410 and device 420 can collaboratively execute the step of determining the first route and the second route. For example, device 420 can execute the process in method 800, namely, determining multiple routes, and can send the multiple routes to terminal device 410, so that terminal device 410 can determine the first route and the second route based on the multiple routes, thereby displaying the first route and the second route. Alternatively, device 420 and terminal device 410 can collaboratively execute the process in method 800, for example, terminal device 410 executes S801 to S806, but the runnable path is obtained by terminal device 410 from device 420; or, device 410 executes S801 to S803 and indicates multiple intersections to terminal device 410, so that terminal device 410 executes S804 to S806 based on the multiple intersections, and determines and displays the first route and the second route based on the multiple routes.
[0269] It should be understood that in possible scenario 2, terminal device 410 and device 420 are respectively used to perform some steps in determining the first route and the second route. The steps performed by terminal device 410 and device 420 shown above are only examples. In actual application scenarios, the steps performed by terminal device 410 and device 420 may differ from the above examples. For the sake of brevity, they will not be described in detail here.
[0270] In a third possible implementation, the route determination method of this application can be applied to scenario 500, in which case the device displaying the route and the device generating the route may not be the same. Scenario 500 includes terminal device 510, terminal device 520, and device 530.
[0271] In possible scenario 3, terminal device 510 can execute method 600, which is the step of displaying the first route and the second route; and terminal device 520 and device 530 can cooperate to execute the step of determining the first route and the second route, that is, terminal device 520 and device 530 can cooperate to determine the first route, and terminal device 520 can send the first route to terminal device 510 so that terminal device 510 can display the first route; terminal device 520 can also obtain information from terminal device 510 for indicating Y intersections and the first road segment, or obtain information for indicating Y intersections and the user's current location, and can determine the second route from multiple routes and indicate the second route to terminal device 510 so that terminal device 510 can display the second route.
[0272] In possible scenario 4, terminal device 510 can execute method 600, namely the step of displaying the first route and the second route; and terminal devices 510, 520, and 530 can collaboratively execute the step of determining the first route and the second route. For example, terminal devices 520 and 530 can collaboratively execute the process in method 800, namely, determining multiple routes, and terminal device 520 can send multiple routes to terminal device 510 so that terminal device 510 can determine the first route and the second route based on the multiple routes, thereby displaying the first route and the second route. Specifically, terminal device 520 can execute some steps of method 800, and device 530 can execute another part of the process in method 800. For example, terminal device 520 can perform S801 to S806, but the runnable path is obtained by terminal device 520 from device 530; or, device 530 executes S801 to S803 and indicates multiple intersections to terminal device 520 so that terminal device 520 executes S804 to S806 based on multiple intersections.
[0273] It should be understood that the steps performed by terminal devices 510, 520, and 530 in possible scenarios 3 and 4 are merely examples. In actual application scenarios, the steps performed by terminal devices 510, 520, and 530 may differ from the examples above. For the sake of brevity, these will not be elaborated upon here.
[0274] It should be understood that the sequence numbers in the above embodiments do not imply the order of execution. The execution order of each process should be determined by its function and internal logic.
[0275] Furthermore, the user information (including but not limited to user device information, user personal information, user movement routes, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data must comply with the relevant laws, regulations and standards of relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0276] The route determination method of the embodiments of this application has been described above. The apparatus for performing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined and referenced with each other, and the related apparatus provided in the embodiments of this application can perform the steps in the above list sorting method.
[0277] Figure 12 This is a schematic block diagram of the hardware architecture of the electronic device 1200 provided in an embodiment of this application. Figure 12 As shown, the electronic device 1200 may include a processor 1210, an external memory interface 1220, an internal memory 1221, a universal serial bus (USB) interface 1230, a charging management module 1240, a power management module 1241, a battery 1242, an antenna 1, an antenna 2, a mobile communication module 1250, a wireless communication module 1260, an audio module 1270, a sensor module 1280, buttons 1290, an indicator 1292, a camera 1293, and a display screen 1294, etc.
[0278] The audio module 1270 may include, but is not limited to, a speaker, a receiver, a microphone, and a headphone jack. The speaker can be used to play recording prompt tones.
[0279] The sensor module 1280 may include, but is not limited to, one or more of the following sensors: pressure sensor, gyroscope sensor, barometric pressure sensor, magnetic sensor, accelerometer, distance sensor, proximity sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, and bone conduction sensor, etc.
[0280] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 1200. In other embodiments of this application, the electronic device 1200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0281] Processor 1210 may include one or more processing units, such as an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Optionally, processor 1210 may also include memory for storing instructions and data. The different processing units may be independent devices or integrated into one or more processors.
[0282] The wireless communication function of electronic device 1200 can be implemented through antenna 1, antenna 2, mobile communication module 1250, wireless communication module 1260, modem processor, and baseband processor.
[0283] For example, in this embodiment of the application, the processor 1210 can be used to determine a first route and / or a second route. The first route and / or the second route can be displayed on the display screen 1294. Alternatively, the electronic device 1200 can obtain the first route and / or the second route from other devices via wireless communication functions and can display the first route and / or the second route on the display screen 1294.
[0284] Electronic device 1200 implements display functions through a GPU, a display screen 1294, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 1294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 1210 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0285] The display screen 1294 is used to display images, videos, etc., such as displaying a first route and a second route. In some embodiments, the electronic device 1200 may include one or N display screens 1294, where N is a positive integer greater than 1.
[0286] The external memory interface 1220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 1200. The internal memory 1221 can be used to store computer executable program code, which includes instructions.
[0287] In other embodiments of this application, the electronic device 1200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0288] Furthermore, the software system of the electronic device 1200 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered architecture as an example to exemplify the software structure of the electronic device. Figure 13 This is a schematic block diagram of a software structure for an electronic device to which embodiments of this application apply. The layered architecture divides the software system of the electronic device into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, reference is made to… Figure 13 Electronic devices may include: applications, application framework, Android runtime and system libraries, hardware abstraction layer, and kernel.
[0289] It is understood that the software structure division of the electronic device in this application embodiment is just an example. This application embodiment does not limit the hierarchical division method in the software system of the electronic device. The modules in each level in the following embodiments are the modules involved in the embodiments of this application. Each level may also include more or fewer modules than shown in the figure, or combine some modules, or split some modules.
[0290] The application layer can include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. (See also...) Figure 13 The application layer can include motion-related applications. The electronic device 1200 can display the first and second routes through these motion-related applications. It can also display interfaces 1, 2, or 3 mentioned above through these motion-related applications.
[0291] In addition, the application layer may also include other applications such as calls, text messages, music, and Bluetooth. This application does not specifically limit this.
[0292] The application framework layer, also known as the framework (FWK) layer, provides APIs and a programming framework for applications within the application layer. The application framework layer includes some predefined functions. (See reference...) Figure 13 The application framework layer can include a route generation module and a first API, etc.
[0293] For example, when electronic device 1200 is a terminal device for displaying the first route and the second route, and the electronic device is not used to generate routes, the application framework layer may not include a route generation module. In this case, electronic device 1200 can obtain the first route and the second route from other devices, for example, through a first API. The first API can then instruct the obtained first route and the second route to a sports application so that the sports application can display the first route and the second route.
[0294] When the electronic device 1200 is used not only to display the first and second routes, but also to perform part or all of the route generation steps, the electronic device 1200 can generate the first and / or second routes through the route generation module. Alternatively, when the electronic device 1200 needs to determine the first and / or second routes based on data obtained from other devices (such as multiple routes), the route generation module can obtain data (such as multiple routes) from other devices through a first API, and can determine the first and / or second routes based on that data. Furthermore, the route generation module can instruct the determined first and / or second routes to a sports application so that the sports application can display the first and / or second routes.
[0295] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries comprise two parts: one part contains the functionalities that Java calls, and the other part consists of the Android core libraries. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. System libraries can include multiple functional modules. Examples include: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL).
[0296] The system library can include multiple functional modules. For example: a status monitoring service, a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL). The status monitoring service determines the phone's orientation and the physical state of the flexible screen based on monitoring data reported from the kernel layer. The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing library implements 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is the drawing engine for 2D graphics.
[0297] The hardware abstraction layer can contain multiple library modules, such as Bluetooth modules and motor library modules. Electronic devices can load the corresponding library modules to enable the application framework layer to access the device hardware. For example, a Bluetooth module can be used to implement Bluetooth functionality, allowing data transfer with other devices via Bluetooth.
[0298] The kernel layer is the layer between hardware and software. It drives the hardware, enabling it to function. The kernel layer includes at least display drivers, Bluetooth drivers, and motor drivers, but this embodiment does not limit this.
[0299] The display driver can be used to drive the display screen to show the first and second routes, etc. The Bluetooth driver can implement Bluetooth functionality, such as data transfer with other devices via Bluetooth.
[0300] It should be understood that Figure 13 The Bluetooth module and Bluetooth driver shown are merely examples. When the electronic device 1200 needs to interact with other devices, such as obtaining data from other devices via a first route and / or a second route, the interaction can be conducted via any wired or wireless means. This application does not impose any specific limitations on this.
[0301] It should also be understood that Figure 13 For illustrative purposes only, when the electronic device 1200 performs some or all of the steps of generating a route, the route generation module may also be located in other layers such as the hardware abstraction layer. This application does not impose any specific limitations on this.
[0302] Figure 14This illustration shows a schematic diagram of a route determination device 1400 provided in an embodiment of this application. The device 1400 can be a chip system, or an apparatus configured with a chip system to implement the method described in the above-described method embodiments. In this embodiment, the chip system can be composed of chips, or it can include chips and other discrete devices.
[0303] like Figure 14 As shown, the device 1400 may include a processor 1410, which can be used to execute computer programs or instructions in memory to perform the various steps and / or processes corresponding to the terminal device or device 1 in the above method embodiments.
[0304] In one possible implementation, the device 1400 further includes a communication interface 1420. The communication interface 1420 can be used to communicate with other devices via a transmission medium, thereby enabling the device 1400 to communicate with other devices. The communication interface 1420 may be, for example, a transceiver, an input / output interface, pins, a bus, a transceiver circuit, or a device capable of transmitting and receiving functions. The processor 1410 can utilize the communication interface 1420 to input and output data for executing the various steps and / or processes corresponding to the terminal device or device 1 in the above method embodiments.
[0305] In one possible implementation, the device 1400 further includes at least one memory 1430 for storing program instructions and / or data. The memory 1430 is coupled to the processor 1410. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, and can be electrical, mechanical, or other forms, used for information exchange between devices, units, or modules. The processor 1410 may operate in conjunction with the memory 1430. The processor 1410 may execute program instructions stored in the memory 1430.
[0306] Optionally, the memory 1430 may be a memory disposed in the device 1400. Exemplarily, the memory 1430 may be integrated with the processor 1410; or, the memory 1430 may be disposed separately from the processor 1410.
[0307] Alternatively, memory 1430 may be memory outside of device 1400. It may also be memory outside of device 1400.
[0308] It should be understood that the device 1400 may, for example, be used to perform some or all of the steps and / or processes described above for determining the first route and / or the second route. It may also indicate the first route and / or the second route to other devices (such as a display unit or other equipment) for display via the communication interface 1420.
[0309] This application provides another route determination apparatus, which may include a display unit or a processing unit. The processing unit can be used to generate a first route and a second route, and the display unit can be used to display the first route and the second route.
[0310] This application provides a communication system, which can be referred to as [reference needed]. Figure 4 The communication system includes an electronic device and a first device. The electronic device is similar to terminal device 410 and is used to perform steps and / or processes for displaying a first route and a second route. The first device is similar to device 420 and is used to perform steps and / or processes for generating a first route and a second route. Alternatively, the electronic device is used to perform steps and / or processes for displaying a first route and a second route, and the electronic device and the first device are respectively used to perform some steps and / or processes in generating the first route and the second route.
[0311] This application provides another communication system, which can be referred to in the following embodiments. Figure 5 The communication system includes an electronic device, a second device, and a third device. The electronic device is similar to terminal device 510 and is used to perform steps and / or processes for displaying the first route and the second route. The second device is similar to terminal device 520, and the third device is similar to device 530. The second and third devices are used to perform steps and / or processes for generating the first route and the second route. Alternatively, the electronic device is used to perform steps and / or processes for displaying the first route and the second route, and the electronic device, the second device, and the third device are each used to perform some steps and / or processes in generating the first route and the second route.
[0312] This application provides an electronic device, including: a processor and a memory; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, causing the electronic device to perform the above-described method.
[0313] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.
[0314] This application also provides a computer-readable storage medium for storing a computer program for implementing the methods shown in the above-described method embodiments.
[0315] This application also provides a computer program product, which includes a computer program (also referred to as code or instructions) that, when run on a computer, allows the computer to perform the methods shown in the above-described method embodiments.
[0316] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0317] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0318] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0319] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0320] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0321] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to existing technology, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0322] The above description is merely a specific embodiment of this application, but the protection scope of the embodiments of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be included within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.
Claims
1. A route determination method, characterized in that, include: Display a first route, which includes M intersections, the M intersections being some or all of the paths within a first range, the first range being related to a first position and / or a first distance, the first route including the first position, and the difference between the length of the first route and the first distance being less than or equal to a first threshold, where M is a positive integer; After detecting that the user has passed through Y of the M intersections, the user moves to the first road segment, which is not part of the first route; The second route is displayed, which includes N intersections, which are some or all of the intersections of the first range. The N intersections include the Y intersections of the first route. The second route includes the first road segment, and the difference between the length of the second route and the first distance is less than or equal to the first threshold. N is a positive integer and Y is a positive integer.
2. The method according to claim 1, characterized in that, The first route and / or the second route are closed loops. The first route does not include any repeated segments, and the second route does not include any repeated segments.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Multiple routes are obtained, including the first route and the second route. The multiple routes are multiple routes within the first range, and the difference between the length of each of the multiple routes and the first distance is less than or equal to the first threshold.
4. The method according to claim 3, characterized in that, The method further includes: The system detects that the user is moving on the second route segment and displays a first prompt message. The multiple routes do not include the second route segment.
5. The method according to claim 3 or 4, characterized in that, The method further includes: Obtain multiple intersection points between multiple paths within the first range, wherein the multiple paths include runnable paths within the first range and / or map-displayable paths within the first range; Based on the multiple intersections, determine the multiple routes that include some or all of the multiple intersections.
6. The method according to claim 5, characterized in that, The method further includes: The runnable path is obtained from a first device; or, the runnable path is determined based on historical movement routes.
7. The method according to claim 5 or 6, characterized in that, Determining the plurality of routes, including some or all of the plurality of intersections, includes: Based on the multiple intersections, multiple road segment vectors are determined. The multiple road segment vectors are used to indicate the road segments between adjacent intersections among the multiple intersections. The adjacent intersections are two intersections included in any of the multiple paths, and there are no other intersections between the adjacent intersections. Based on the multiple road segment vectors, a set of routes that start from the first location and return to the first location is determined, and the multiple routes belong to the set of routes.
8. The method according to any one of claims 3 to 7, characterized in that, The method further includes: The first route among the plurality of routes is determined based on one or more of the following: terrain information, security information, or heat information.
9. The method according to any one of claims 3 to 8, characterized in that, The method further includes: Receive a second operation from the user, the second operation being used to input at least one route feature; Based on the at least one route feature, the first route is determined, wherein the first route is the route among the plurality of routes that matches the at least one route feature.
10. The method according to any one of claims 3 to 9, characterized in that, The method further includes: Display the multiple routes; The display of the first route includes: Based on the user's first action, the first route is displayed, whereby the first action is used to select the first route.
11. The method according to any one of claims 3 to 10, characterized in that, The center of the first range is the first position.
12. The method according to claim 11, characterized in that, The first range is a circle centered at the first position, and the radius of the first range is the ratio of the first distance to the first coefficient.
13. The method according to claim 12, characterized in that, The method further includes: Based on the second range, at least one route is determined, wherein the second range is a circle whose center is the first position and whose radius is the ratio of the first distance to the initial coefficient; If the number of at least one route is less than or equal to a second threshold, or if the number of at least one route is greater than or equal to a third threshold, the initial coefficient is adjusted to the first coefficient, and the first range is determined based on the first coefficient.
14. The method according to any one of claims 1 to 13, characterized in that, Before displaying the first route, the method further includes: Displays multiple intersections between multiple paths within the first range.
15. A route determination device, characterized in that, Includes a module for performing the method as described in any one of claims 1-14.
16. An electronic device, characterized in that, The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-14.
17. A communication system, characterized in that, The communication system includes the electronic device as described in claim 16 and a first device, such that the electronic device performs the method as described in any one of claims 1-14, and the first device performs the step of sending a runnable path to the electronic device; or, the electronic device performs the method as described in any one of claims 1-4, or any one of claims 8-10, and the first device is configured to perform the step of determining a plurality of routes and sending the plurality of routes to the electronic device; or... The communication system includes the electronic device as described in claim 16, a second device, and a third device, to cause the electronic device to perform the method as described in any one of claims 1-4 or any one of claims 8-10, wherein the second device and the third device are configured to perform the step of determining a plurality of routes, and the second device is further configured to perform the step of sending the plurality of routes to the electronic device.
18. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-14.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-14.
20. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-14.