Track coordinate storage method and wearable device
By storing coordinates of different tracks in the same queue and using indicator information to distinguish them, the problem of resource waste and chaos in track storage during outdoor sports is solved, achieving high efficiency in track management and improved user experience.
Patent Information
- Application Number
- CN202411029903.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2026-01-30
AI Technical Summary
In outdoor sports, existing technologies struggle to effectively store and differentiate coordinates of different movement trajectories, leading to resource waste and confusion.
By storing the coordinates of different trajectories in the same queue and using indicator information to distinguish the coordinates of different trajectories, such as binary numbers or critical point identifiers, the coordinates of different trajectories within the queue can be managed separately.
This avoids resource waste, ensures accurate storage and management of trajectory coordinates, and improves the user experience, especially for users who are prone to getting lost, helping them accurately return to the starting point.
Smart Images

Figure CN121433769A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method for storing trajectory coordinates and a wearable device. Background Technology
[0002] With the fast pace of life, people are increasingly aware of the importance of physical exercise. Outdoor sports (such as outdoor cycling and outdoor running), as activities that bring people closer to nature, are very popular. Furthermore, users can generate their own outdoor exercise tracks using wearable devices (such as watches). For example, when a user wears a watch for outdoor exercise, the watch collects the user's location coordinates in real time and generates an exercise track based on those coordinates. However, the outdoor environment is complex, and a user may have more than one exercise track. How to store the coordinates of these tracks is a problem that needs to be considered. Summary of the Invention
[0003] This application provides a method for storing trajectory coordinates and a wearable device that can store coordinate points of different trajectories in the same queue and can distinguish coordinate points of different trajectories without configuring extra queues, thus avoiding resource waste.
[0004] Firstly, a method for storing trajectory coordinates is provided, which can be applied to wearable devices. For example, the wearable device can be a watch or a wristband. For instance, the wearable device can display a first trajectory, the coordinates of which are stored in a first queue. When the wearable device detects that a user is returning along the original path of the first trajectory, it displays a second trajectory, which is the return trajectory formed when the user returns along the original path of the first trajectory. The coordinates of the second trajectory are stored in the first queue. The first queue includes first indication information used to distinguish the coordinates of the first trajectory from those of the second trajectory.
[0005] In this embodiment, the wearable device can display a first trajectory, such as the trajectory formed by a user moving from point A to point C. If the user wants to return to point A, they can follow the first trajectory from point C back to point A. When the user returns along the original path of the first trajectory, the wearable device can display a second trajectory formed by the user's return along the original path of the first trajectory, so that the user can check whether their return route deviates from the first trajectory. In this way, it can help users return to the starting point, which is a better user experience for those who are prone to getting lost. In addition, the coordinates of the two trajectories (i.e., the first trajectory and the second trajectory) are stored in the same queue (i.e., the first queue). Therefore, the wearable device only needs to maintain one queue, without configuring multiple queues, avoiding resource waste. Moreover, the first queue includes first indication information to distinguish the coordinates of different trajectories, which helps to achieve separate management of the coordinates of different trajectories in the queue and avoid confusion.
[0006] In one possible design, the first indication information includes N first identifiers, each of which is an identifier of the first trajectory. The N first identifiers correspond one-to-one with N coordinate points, which are either all the coordinate points of the first trajectory or the last N coordinate points of the first trajectory, where N is a positive integer.
[0007] In this embodiment, each coordinate point of the first trajectory within the first queue, or among the last N coordinate points, corresponds to a first identifier, which is the identifier of the first trajectory, such as the binary number "1". Therefore, through the first identifier, the wearable device can distinguish the coordinate points of the first trajectory and the second trajectory within the first queue, which helps to achieve separate management of the coordinate points of different trajectories within the queue and avoid confusion.
[0008] In one possible design, the first indication information includes M second identifiers, which are identifiers of the second trajectory. The M second identifiers correspond one-to-one with M coordinate points, which are all the coordinate points of the second trajectory or the first M coordinate points of the second trajectory, where M is a positive integer.
[0009] In this embodiment, each coordinate point of the second trajectory within the first queue, or among the first M coordinate points, corresponds to a second identifier, which is the identifier of the second trajectory, such as the binary number "0". Therefore, through the second identifier, the wearable device can distinguish the coordinate points of the first trajectory and the second trajectory within the first queue, which helps to achieve separate management of the coordinate points of different trajectories within the queue and avoid confusion.
[0010] In one possible design, the first indication information includes P third identifiers, which are critical point identifiers. The P third identifiers correspond one-to-one with P coordinate points, which include P critical coordinate points of the first trajectory and the second trajectory, where P is a positive integer.
[0011] In this embodiment, each coordinate point in the critical coordinate points of the first and second trajectories within the first queue corresponds to a third identifier, which is a critical point identifier, such as the binary number "00". Therefore, through the third identifier, the wearable device can distinguish the coordinate points of different trajectories within the first queue, which helps to achieve separate management of the coordinate points of different trajectories within the queue and avoid confusion.
[0012] In one possible design, the first indication information is a first identifier, which is located between the last coordinate point of the first trajectory and the first coordinate point of the second trajectory.
[0013] In this embodiment, a first identifier can be inserted into the first queue, for example, between the last coordinate point of the first trajectory and the first coordinate point of the second trajectory. Therefore, through the first identifier, the wearable device can distinguish the coordinate points of different trajectories within the first queue, which helps to achieve separate management of the coordinate points of different trajectories within the queue and avoids confusion.
[0014] In one possible design, the method further includes: when the number of coordinate points in the first queue reaches the storage limit of the first queue, the coordinate points in the first queue are reduced, wherein the coordinate points corresponding to the first indication information are prohibited from being completely deleted.
[0015] In this embodiment of the application, if the first queue is full, the wearable device can remove coordinate points from the first queue. As mentioned above, the first indication information can correspond to the coordinate points of the first trajectory, the coordinate points of the second trajectory, or the critical coordinate points. Therefore, if coordinate points are to be removed, it is prohibited to delete all the coordinate points corresponding to the first indication information, so as to ensure that the first indication information is not completely deleted, thereby ensuring that the wearable device can distinguish the coordinate points of different trajectories.
[0016] In one possible design, the method further includes: when the number of coordinate points in the first queue reaches the storage limit of the first queue, the coordinate points in the first queue are reduced, wherein the first indication information prohibits deletion.
[0017] In this embodiment, the first indication information may be a first identifier inserted into the first queue. If the first queue is full, the wearable device may remove coordinate points from the first queue, but is prohibited from deleting the first indication information, so as to ensure that the wearable device can distinguish coordinate points of different trajectories.
[0018] In one possible design, the method further includes: when the number of coordinate points in the first queue reaches the storage limit of the first queue, deleting coordinate points in the first queue; if coordinate points of the first trajectory are deleted, redrawing the first trajectory; if coordinate points of the second trajectory are deleted, redrawing the second trajectory.
[0019] In this embodiment, when the first queue is full, the wearable device can remove coordinate points from the first queue to free up storage space for new coordinate points. These new coordinate points can then be used to continue drawing the trajectory, extending its range. Since coordinate points for different trajectories are stored in the same queue (i.e., the first queue), when the first queue is full, coordinate points for either the first or second trajectory may be removed. If coordinate points for the first trajectory are removed, the first trajectory is redrawn; if coordinate points for the second trajectory are removed, the second trajectory is redrawn. This approach helps to achieve a balanced removal of coordinate points for both trajectories, preventing the removal of coordinate points from only one trajectory from resulting in an overly coarse and imprecise trajectory.
[0020] In one possible design, the reduction of coordinate points in the first queue includes deleting at least one of inflection point coordinates, straight coordinates, and dense coordinates in the first queue.
[0021] In this embodiment of the application, when the first queue is full, the wearable device can delete coordinate points in the first queue, such as deleting inflection point coordinates, straight coordinates or dense coordinates, to free up storage space to continue storing new coordinate points. The new coordinate points can be used to continue drawing the trajectory and realize the extension of the trajectory.
[0022] In one possible design, the method further includes: determining that the return along the first trajectory has stopped and no instruction to end the motion has been received; and displaying a third trajectory, which is a trajectory formed by merging the second trajectory and the first trajectory.
[0023] In this embodiment of the application, if the wearable device determines that the user has stopped returning along the original route but has not ended the exercise, it means that the user may still want to continue exercising but does not want to return along the first trajectory. In this case, the wearable device can merge the first trajectory and the second trajectory into one trajectory. The merged trajectory reflects the user's overall journey and improves the user experience.
[0024] In one possible design, before the second trajectory is merged with the first trajectory to form a third trajectory, the second trajectory and the first trajectory are displayed differently; after the second trajectory is merged with the first trajectory to form a third trajectory, the first trajectory and the second trajectory are displayed in the same way.
[0025] In this embodiment, the two trajectories are displayed differently before merging, but are displayed in the same way after merging, so as to prompt the user that the trajectories have been merged into one trajectory, which helps to improve the user experience.
[0026] In one possible design, displaying the third trajectory includes: canceling the first indication information; and displaying the third trajectory based on all coordinate points in the first queue.
[0027] In this embodiment, since the coordinate points of the first trajectory and the second trajectory are both stored in the first queue, if the first trajectory and the second trajectory are to be merged, the first indication information in the first queue can be canceled. In this way, the wearable device cannot distinguish which coordinate points in the first queue are the coordinate points of the first trajectory and which are the coordinate points of the second trajectory. Therefore, when the wearable device draws the trajectory based on the coordinate points in the first queue, the drawn trajectory is one, thus realizing the merging of the two trajectories.
[0028] In one possible design, the method further includes: when the user returns along the original path of the third trajectory, displaying a fourth trajectory, the fourth trajectory being the return trajectory formed when the user returns along the original path of the third trajectory, the coordinate points of the fourth trajectory being stored in a first queue, the first queue including second indication information, the second indication information being used to distinguish the coordinate points of the fourth trajectory from the coordinate points of the third trajectory.
[0029] In this embodiment, the wearable device merges two tracks into a single track, the third track, allowing the user to return along the same path. While the user is returning along the third track, the wearable device displays a fourth track formed during this process, enabling the user to check if their return route deviates from the third track and helping them return to the starting point. This provides a better user experience for those prone to getting lost. Furthermore, the coordinates of the two tracks (the third and fourth tracks) are stored in the same queue (the first queue), and this first queue includes second indication information to distinguish the coordinates of different tracks. This facilitates separate management of the coordinates of different tracks within the queue, preventing confusion.
[0030] In one possible design, the method further includes: determining to stop returning along the first trajectory and receiving an instruction to end the motion; generating a motion record based on the coordinate points in the first queue, the motion record including the second trajectory and the first trajectory.
[0031] In this embodiment, when the wearable device determines that the user has stopped returning along the first trajectory and ended the exercise, it draws the first trajectory and the second trajectory based on the coordinate points in the first queue to obtain the exercise record. Therefore, the two trajectories in the exercise record after the exercise ends are consistent with the two trajectories before the exercise ends, without any jumps, resulting in a better user experience.
[0032] In one possible design, determining to stop returning along the original path according to the first trajectory includes one or more of the following:
[0033] Received a user operation instructing the user to stop returning along the original path according to the first trajectory;
[0034] It has been confirmed that the user has returned to the starting point;
[0035] Determine that the user has deviated from the first trajectory;
[0036] It is determined that the duration for which the user returns according to the first trajectory has reached the first preset duration.
[0037] It is determined that the distance the user has traveled along the first trajectory has reached the first preset distance.
[0038] In this embodiment, the wearable device stopping its return along the first trajectory can include automatic stopping and manual stopping. Taking manual stopping as an example, the wearable device stops returning along the first trajectory when it receives a user operation instructing it to do so. This manual stopping method allows users to stop returning along the first trajectory when needed, providing a better user experience. Taking automatic stopping as an example, the wearable device automatically stops returning along the first trajectory when it determines that the user has returned to the starting point, or that the user has deviated from the first trajectory, or that the user's return duration has reached a first preset duration, or that the distance the user has moved during the return process has reached a first preset distance. This automatic stopping method eliminates the need for manual user operation, improving convenience and making it more intelligent.
[0039] In one possible design, receiving a user operation to instruct the user to stop returning along the first trajectory includes: when a first call-up condition is met, displaying a first button, the first button being used to trigger the stop of returning along the first trajectory; and receiving a user operation on the first button.
[0040] In this embodiment, the user can trigger a first button to stop the return along the first trajectory. To avoid obscuring the interface, the first button can be hidden; however, it can be activated when a first activation condition is met, thus improving the user experience.
[0041] In one possible design, determining that the first call-out condition is met includes one or more of the following:
[0042] A first call-up operation for activating the first button has been received;
[0043] It is determined that the distance between the user and the starting point of the first trajectory is less than a second preset distance.
[0044] Determine that the user has deviated from the first trajectory.
[0045] It is determined that the duration for which the user follows the first trajectory has reached or is about to reach the second preset duration.
[0046] It is determined that the distance the user has traveled along the first trajectory has reached or is about to reach the third preset distance.
[0047] In this embodiment, the user can trigger a first button to stop returning along the first trajectory. To avoid obscuring the interface, the first button can be hidden, but can be activated when a first activation condition is met. The activation of the first button can include both automatic and manual activation. For example, in manual activation, the wearable device activates the first button when it receives a first activation operation. This manual activation method allows the user to activate the first button whenever needed, providing a better user experience. In automatic activation, the wearable device automatically activates the first button when it determines that the user is about to return to the starting point, or that the user has deviated from the first trajectory, or that the duration of the user's return along the first trajectory has reached or is about to reach a second preset duration, or that the distance the user has traveled along the first trajectory has reached or is about to reach a third preset distance. This automatic activation method eliminates the need for manual operation, improving convenience and making it more intelligent.
[0048] In one possible design, detecting that the user is returning along the original path using the first trajectory includes one or more of the following:
[0049] Received a user operation instructing the user to return along the original path following the first trajectory;
[0050] It is determined that the user turns back at the end of the first trajectory and the turning distance is greater than the fourth preset distance;
[0051] Determine the user's historical endpoint on the first trajectory and return via the same route;
[0052] Determine if the user's exercise duration reaches the third preset duration;
[0053] The user's movement distance has reached the fifth preset distance.
[0054] In this embodiment, the wearable device has a function to return along the original path of a first trajectory. This function can be automatically activated or manually activated. Taking manual activation as an example, when the wearable device receives a user operation instructing it to return along the original path of the first trajectory, it activates the function, thus returning along the original path. This manual activation method allows users to return along the original path whenever needed, providing a better user experience. Taking automatic activation as an example, the wearable device automatically activates the function to return along the original path when it determines that the user has turned back at the end of the first trajectory and the turning distance is greater than a fourth preset distance, or when it determines that the user has historically returned along the original path from the end of the first trajectory, or when it determines that the user's movement duration has reached a third preset duration, or when it determines that the user's movement distance has reached a fifth preset distance. This automatic activation method eliminates the need for manual operation by the user, improving convenience and making it more intelligent.
[0055] In one possible design, receiving a user operation to instruct a return along the original path of the first trajectory includes: when a second call-up condition is met, displaying a second button, the second button being used to trigger a return along the original path of the first trajectory; and receiving a user operation on the second button.
[0056] In this embodiment, the user can trigger the second button to return along the original path of the first trajectory. To avoid obscuring the interface, the second button can be hidden; it can be activated when the second activation condition is met, thus improving the user experience.
[0057] In one possible design, determining that the second call-out condition is met includes one or more of the following:
[0058] A second call-up operation for activating the second button has been received;
[0059] Determine that the user turns around at the end of the first trajectory;
[0060] It is determined that the user turns back at the end of the first trajectory and the turning distance is greater than the sixth preset distance;
[0061] It is determined that the user has historically returned to the end point of the first trajectory, and the distance between the user's current position and the end point is less than a seventh preset distance;
[0062] Determine if the user's exercise duration has reached or is about to reach the fourth preset duration;
[0063] Determine if the user's movement distance has reached or is about to reach the eighth preset distance.
[0064] In this embodiment, the user can trigger a second button to return along the original path of the first trajectory. To avoid obscuring the interface, the second button can be hidden, but can be activated when a second activation condition is met. The activation of the second button can include both automatic and manual activation. For example, in manual activation, the wearable device activates the second button when it receives a second activation operation. This manual activation method allows the user to activate the second button whenever needed, providing a better user experience. In automatic activation, the wearable device automatically activates the second button when it determines that the user turns around at the end of the first trajectory, or when the user turns around at the end of the first trajectory and the turning distance is greater than a sixth preset distance, or when the user has historically returned along the original path from the end of the first trajectory and is about to reach that end, or when the user's exercise duration reaches or is about to reach a fourth preset duration, or when the user's movement distance reaches or is about to reach an eighth preset distance. This automatic activation method eliminates the need for manual operation, improving convenience and making it more intelligent.
[0065] In one possible design, the wearable device is a watch or a wristband. It is understood that the wearable device can also be other types of devices. For example, wearable devices can include wrist-worn devices, head-worn devices, and clothing devices. Wrist-worn devices can include, for example, watches, wristbands, gloves, wristbands, bracelets, rings, etc. Head-worn devices can include, for example, glasses, helmets, headphones, earplugs, etc. Clothing devices can include, for example, clothing, boots, buttons, etc.
[0066] Secondly, a wearable device is also provided, including:
[0067] Processor, memory, and one or more programs;
[0068] The one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the processor, cause the wearable device to perform the method provided in the first aspect above.
[0069] Thirdly, a wearable device is also provided, including modules / units for performing the methods corresponding to any of the designs in the first aspect above. These modules / units can be implemented in hardware or by executing corresponding software in hardware.
[0070] Fourthly, a computer-readable storage medium is also provided for storing a computer program that, when run on a computer, causes the computer to perform the method provided in the first aspect above.
[0071] Fifthly, a computer program product is also provided, comprising a computer program that, when run on a computer, causes the computer to perform the method provided in the first aspect above.
[0072] In a sixth aspect, a chip is also provided, which is coupled to a memory in an electronic device for calling a computer program stored in the memory and executing the technical solution provided in the first aspect of the embodiments of this application. In the embodiments of this application, "coupling" means that two components are directly or indirectly combined with each other.
[0073] In a seventh aspect, a chip system is also provided, the chip system including a processing circuit and a storage medium, the storage medium storing instructions; when the instructions are executed by the processing circuit, the method provided in the first aspect above is implemented.
[0074] For the technical effects that can be achieved in the second to seventh aspects mentioned above, please refer to the description of the technical effects that can be achieved by the corresponding design scheme in the first aspect mentioned above. This application will not repeat them here. Attached Figure Description
[0075] Figure 1 A schematic diagram of a GUI for a wearable device provided in an embodiment of this application;
[0076] Figure 2 A schematic diagram of a trajectory drawn by a wearable device according to an embodiment of this application;
[0077] Figure 3 A schematic diagram illustrating a first solution provided in an embodiment of this application;
[0078] Figure 4 A schematic diagram of queue compression provided in an embodiment of this application;
[0079] Figures 5A to 5C Another schematic diagram of the first solution provided in an embodiment of this application;
[0080] Figure 6 A schematic diagram of a second solution provided in an embodiment of this application;
[0081] Figures 7A to 7C A schematic diagram of the first instruction information provided in an embodiment of this application;
[0082] Figure 8 Another schematic diagram of a second solution provided in an embodiment of this application;
[0083] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0084] Figure 10This is a schematic diagram of another structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0085] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.
[0086] The embodiments of this application involve at least one, including one or more; where "multiple" means two or more. Furthermore, it should be understood that in the description of this specification, terms such as "first," "second," and "third" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order. For example, "first trajectory" and "second trajectory" do not represent the degree of importance of the two or their order, but are merely for descriptive distinction. In the embodiments of this application, "and / or" merely describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0087] The directional terms mentioned in the embodiments of this application, such as "up", "down", "left", "right", "inner", and "outer", are only for reference to the directions in the accompanying drawings. Therefore, the directional terms used are for better and clearer explanation and understanding of the embodiments of this application, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0088] References to "one embodiment," "in some examples," or "some embodiments" as described in the embodiments of this application mean that one or more embodiments of this specification include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in some examples," "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0089] The technical solutions provided in this application can be applied to electronic devices. Optionally, the electronic device can be a mobile terminal. For example, a mobile terminal can be a mobile phone, tablet computer, laptop computer, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), or other portable devices; or it can be a wearable device; or it can be an in-vehicle device, which can be mounted on various means of transportation such as bicycles, motorcycles, cars, trains, electric vehicles, helicopters, airplanes, and ships; or it can be a virtual reality (VR) device, augmented reality (AR) device, mixed reality (MR) device, etc. In short, this application does not limit the specific type of terminal. Taking a wearable device as an example, wearable devices can include wrist-worn devices, head-worn devices, clothing devices, etc. Wrist-worn devices can include, for example, watches, bracelets, gloves, wristbands, necklaces, rings, etc. Head-mounted devices may include, for example, glasses, helmets, headphones, earplugs, etc. Clothing devices may include, for example, clothing, boots, buttons, etc. For ease of understanding, this article mainly uses wearable devices as an example for explanation. In the embodiments of this application, the wearable device includes a positioning module for determining the current location coordinates of the wearable device. Optionally, the positioning module may be a Global Positioning System (GPS), a BeiDou Navigation Satellite System (BDS), or other positioning systems; this embodiment of the application does not limit this. The positioning module can determine the current location coordinates of the wearable device in real time. The term "real time" can be understood as "periodic," and the period may be 1 second, 2 seconds, 3 seconds, 5 seconds, etc., with no specific duration limit.
[0090] The following uses wearable devices as an example, and watches as an example, to illustrate the technical solutions provided in the embodiments of this application.
[0091] In this embodiment, the watch has a trajectory drawing function. For example, the watch can collect the user's location coordinates in real time and draw a movement trajectory based on the location coordinates. Optionally, the trajectory drawing function can be integrated into an application in the watch. The application can be a system application or a third-party application, without limitation. For example, the application can be a fitness application in the watch. Continuing with the fitness application as an example, the fitness application can include various sports (also called sports modes), such as rope skipping, running on a track, outdoor sports, etc. The trajectory drawing function can be integrated into one or more sports in the fitness application, such as running on a track, outdoor sports, etc. It is understood that, in one possible implementation, in order to save power consumption, the trajectory drawing function is generally turned off, and the trajectory drawing function is activated when the watch receives an operation to indicate entering the one or more running programs.
[0092] The following text continues with an example of a workout app to illustrate one way to activate the watch's trajectory drawing function. For example, as... Figure 1 (a) in the image is a schematic diagram of the watch's home screen. The screen includes icons for various applications, including a workout app. When the watch receives a response to the workout app icon, it can display something like this: Figure 1 The interface in (b) can include various sports activities, such as rope skipping, running, and outdoor sports. After receiving an action for the outdoor sports option, the watch can display something like... Figure 1 The interface shown in (c) includes information such as exercise duration, current heart rate, and calories burned. One possible scenario is that the watch displays... Figure 1 Simultaneously with the interface shown in (c), the background trajectory drawing function starts, which means it begins collecting the user's location coordinates in real time and drawing a trajectory based on the user's location coordinates. Another possible scenario is that the watch displays... Figure 1 When the user's location is displayed in (c) of the interface, the background starts collecting the user's location in real time, but has not yet started drawing the trajectory. When the user's location is detected to have moved, the trajectory will start to be drawn.
[0093] In this embodiment of the application, the user can view the trajectory drawn by the watch. For example, using Figure 1 For example, in (c), when the watch receives a trigger operation (e.g., a left / right swipe on the screen), it can display something like this. Figure 2 The interface shown in (a) is used to display the user's movement trajectory. Optionally, the interface may include a map (not shown), and the movement trajectory may be displayed on top of the map. It should be understood that the movement trajectory is drawn in real time, that is, it changes in real time as the user's position moves. For example, Figure 2In (a), the movement trajectory is from point A to point B, meaning the user moved from point A to point B. If the user continues moving, for example, from point B to point C, the watch can display as follows: Figure 2 The interface in (b) shows the trajectory from point A to point C. For ease of understanding, the following text will... Figure 2 The trajectory from point A to point C in (b) is called the first trajectory.
[0094] Figure 2 In step (c), the user moves from point A to point C. In practical applications, there might be a situation where the user is not familiar with routes and is prone to getting lost. After moving from point A to point C, they might not be able to return to point A based solely on memory. To solve this problem, in this embodiment, the watch has a trajectory return function, which can help the user return to the starting point along the same route. Therefore, after the user moves to point C, they can activate the trajectory return function on the watch.
[0095] Optionally, there are several ways to enable the watch to return to its original location, including but not limited to the following two.
[0096] The first method involves automatically activating the home track return. For example, the watch automatically activates the home track return when a first condition is met. This first condition may include at least one of the following:
[0097] (a) The user turns around at point C and the turning distance is greater than the preset distance L1. The preset distance L1 can be, for example, 10 meters, 20 meters, etc.
[0098] (b) Historically, the user has returned via the same route from point C. For example, the watch can store the user's historical movement trajectory. Suppose the user historically moved from point A to point C and then returned to point A via the same route from point C. Based on the historical records, the watch can determine that the user is likely to turn back at point C and can automatically activate the trajectory return function.
[0099] (c) The first exercise duration reaches the first preset duration. The first exercise duration can be set by the user. The first exercise duration can be the one-way time of the outbound journey or the total time of the outbound and return journeys. If the first exercise duration is the one-way time of the outbound journey, such as 1 hour, the watch starts timing from point A, and automatically activates the track return function when 1 hour has elapsed. If the first exercise duration is the total time of the outbound and return journey, such as 1 hour, the watch starts timing from point A, and automatically activates the track return function when 30 minutes have elapsed.
[0100] (d) The first movement distance reaches the preset distance L2. The first movement distance can be set by the user. The first movement distance can be the one-way distance of the outbound journey or the total distance of the outbound and return journeys. If the first movement distance is the one-way distance of the outbound journey, for example, 5 kilometers, the watch starts recording from point A, and automatically activates the track return function when it reaches 5 kilometers. If the first movement distance is the total distance of the outbound and return journeys, for example, 5 kilometers, the watch starts recording from point A, and automatically activates the track return function when it reaches 2.5 kilometers.
[0101] Optionally, before the watch automatically activates the track return function, it can output a prompt message to ask the user whether to activate the track return function. If the watch receives a confirmation from the user, it will activate the track return function.
[0102] The second method is to manually activate the track return feature. For example, the watch provides a primary entry point; when the watch receives an operation targeting this primary entry point, track return is activated. This primary entry point could be, for example, a primary button, referred to below as the "track return" button. Optionally, the primary button can have multiple display methods.
[0103] (1) The first button is always present in the interface, such as... Figure 2 The interface in (c) of the document. It should be noted that, although... Figure 2 (a) and Figure 2 The first button is not shown in the interface shown in (b), but the first button can also be permanently displayed. Figure 2 (a) and Figure 2 In the interface shown in (b) above. One possible approach is, Figure 1 In (c) of the text, when the watch receives a trigger operation (e.g., a left / right swipe operation within the screen), it displays as shown below. Figure 2 The interface shown in (a) has a "Track Return" button that remains active on the interface.
[0104] (2) The first button is hidden in the interface, such as the interface... Figure 2 (a) or Figure 2 The interface shown in (b) is as follows. In this case, the watch can bring up (i.e., display) the first button. There are two ways to bring up the button: automatic and manual. Taking manual bring-up as an example, the watch displays the first button when it receives the first bring-up operation. For example, Figure 2 In (b) of the above, when the watch receives the first call-out operation, it displays as follows: Figure 2The "Track Return" button is shown in (c). The first activation operation can be of various types, such as a tap at any location on the screen (e.g., the endpoint point C) or other operations. Taking automatic activation as an example, the watch automatically activates the first button when it determines that the second condition is met. Optionally, the second condition may include at least one of the following:
[0105] (a) The user turns around at point C. Turning around means that after moving to point C in a certain direction of travel, the user rotates to the opposite direction of travel.
[0106] (b) The user turns around at point C and the turning distance is greater than the preset distance L3. Condition (b) is different from condition (a). In condition (a), the user turns around but does not move his position, while in condition (b), the user turns around and moves his position.
[0107] (c) Historically, the user has returned via the same route from point C, and the user has now reached or is about to reach point C. For example, if the watch determines based on historical records that the user is very likely to turn back at point C, then when the user reaches or is about to reach point C, the "Trajectory Return" button will be activated. "About to reach point C" can be understood as the distance to point C being less than a preset distance L4.
[0108] (d) The second exercise duration reaches or is about to reach the second preset duration. The second exercise duration can be user-set. The second exercise duration can be the one-way trip duration or the total trip duration (outbound + return). If the second exercise duration is the one-way trip duration (outbound), for example, 1 hour, the watch starts timing from point A. When 1 hour is reached or about to be reached (e.g., 55 minutes), the "Track Return" button is automatically activated. If the second exercise duration is the total trip duration (outbound + return), for example, 1 hour, the watch starts timing from point A. When 30 minutes are reached or about to be reached (e.g., 25 minutes), the "Track Return" button is automatically activated.
[0109] (e) The second travel distance reaches or is about to reach the preset distance L5. The second travel distance can be user-set. The second travel distance can be the one-way distance of the outbound journey or the total distance of the outbound and return journeys. If the second travel distance is the one-way distance of the outbound journey, such as 5 kilometers, the watch starts recording from point A, and when it reaches or is about to reach 5 kilometers (for example, 4.8 kilometers), the "Trajectory Return" button is automatically activated. If the second travel distance is the total distance of the outbound and return journeys, such as 5 kilometers, the watch starts recording from point A, and when it reaches or is about to reach 2.5 kilometers (for example, 2.3 kilometers), the "Trajectory Return" button is automatically activated.
[0110] The following example illustrates how the "Track Return" button can be manually activated. For example, Figure 2 In (b) of the above, when the watch receives the first call-out operation, it displays as follows: Figure 2 The "Track Return" button is shown in (c). Figure 2 In (c) of the code, when the watch receives an operation on the "Return to Home Track" button, it activates the return to home track function. For example, the watch can start the navigation function and use the first track as the planned route to guide the user back to the starting point, point A. For example, the watch can output prompts such as "Turn right in XX meters" or "Turn left in XX meters" (e.g., voice messages) to help the user return to the starting point. Optionally, Figure 2 In (c) of the watch, after the "Return to Home" button is activated, if the button is detected to have been triggered, it can be hidden again. Figure 2 The "Track Return" button in (d) is hidden.
[0111] For ease of description, this article refers to the journey before triggering the "Track Return" button as the outbound journey, such as the journey from point A to point C; and the journey after triggering the "Track Return" button as the return journey, such as the journey from point C to point A. The trajectory corresponding to the outbound journey is called the outbound trajectory, for example, the first trajectory from point A to point C. During the return journey, the watch can collect the user's location coordinates in real time and draw a trajectory based on these coordinates; this trajectory can be called the return trajectory. The return trajectory could be, for example, the second trajectory from point C to point A, which will be described later. It should be understood that the return trajectory is drawn in real time, meaning that it changes in real time as the user's location moves. For example, as... Figure 2 In (d), the return trajectory is the path from point C to point D, meaning the user returns from point C to point D. If the user continues to return, for example, from point D back to point A, the watch can display as follows: Figure 2 The interface shown in (e) depicts the return trajectory from point C to point A. For ease of description, the following text will refer to... Figure 2 The trajectory from point C to point A in (e) is called the second trajectory. The second trajectory can be understood as the return trajectory of the first trajectory. It should be understood that the user's location coordinates collected by the watch during the outward and return journeys are not necessarily exactly the same, so the drawn first and second trajectories may not completely overlap. Figure 2 (e) in the middle.
[0112] In some embodiments, the first trajectory and the second trajectory may be displayed differently. For example, the first trajectory and the second trajectory may have different display styles, which may include color, thickness, and whether they are solid or dashed. For example, the first trajectory may be displayed in a first color, and the second trajectory may be displayed in a second color, where the first color is different from the second color, for example, the first color is orange and the second color is blue. Another example is that the first trajectory is represented by a solid line, and the second trajectory is represented by a dashed line. Yet another example is that the first trajectory is thickened, and the second trajectory is not thickened.
[0113] In this embodiment of the application, after the watch activates trajectory return, it can stop trajectory return. Optionally, there are several ways for the watch to stop trajectory return, including but not limited to the following two.
[0114] The first method involves automatically stopping the trajectory return. For example, the watch can automatically stop trajectory return when it determines that a third condition is met. The third condition may include at least one of the following:
[0115] (a) Confirm that the user has returned to the starting point.
[0116] (b) Determine if the user deviates from the return trajectory.
[0117] (c) The third exercise duration has reached or is about to reach the third preset duration. The third exercise duration can be set by the user. The third exercise duration can be the one-way return trip duration or the total duration of the outbound and return trips. If the third exercise duration is the one-way return trip duration, such as 1 hour, the watch starts timing from point C and automatically stops returning when it reaches or is about to reach 1 hour (e.g., 50 minutes). If the third exercise duration is the total duration of the outbound and return trips, such as 1 hour, and assuming that 30 minutes remain after subtracting the one-way outbound trip duration, the watch starts timing from point C and automatically stops returning when it reaches or is about to reach 30 minutes (e.g., 25 minutes).
[0118] (d) The third travel distance reaches or is about to reach the preset distance L6. The third travel distance can be set by the user. The third travel distance can be the one-way return distance or the total distance of the outbound and return journeys. If the third travel distance is the one-way return distance, for example, 5 kilometers, the watch starts recording from point C, and automatically stops the return journey when it reaches or is about to reach 5 kilometers (for example, 4.8 kilometers). If the third travel distance is the total distance of the outbound and return journeys, for example, 5 kilometers, and assuming that 2.5 kilometers remain after subtracting the one-way outbound distance, then the watch starts recording from point C, and automatically stops the return journey when it reaches or is about to reach 2.5 kilometers (for example, 2.3 kilometers).
[0119] Optionally, before the watch automatically stops the track return function, a prompt message can be output to ask the user whether to stop the track return function. If the user confirms the stop, the track return function will be stopped.
[0120] The second method is to manually stop the track return. For example, the watch provides a second access point; when the watch receives an operation targeting this second access point, it stops the track return. This second access point could be, for example, a second button, referred to below as the "track return" button. Optionally, the second button can have various display methods.
[0121] (1) The second button is always present in the interface, such as... Figure 2 The interface in (f). It should be noted that, although... Figure 2 (d) and Figure 2 The second button is not shown in the interface shown in (e), but the second button can also be permanently displayed. Figure 2 (d) and Figure 2 In the interface shown in (e), one possible approach is... Figure 2 When the watch in (c) receives an operation on the "Return to Home Track" button, it displays as follows: Figure 2 The interface in (d) contains a "Stop Return" button that remains active on the interface.
[0122] (2) The second button is hidden in the interface, such as the interface... Figure 2 (d) or Figure 2 The interface shown in (e) is the second button. In this case, the watch can bring up (i.e., display) the second button. There are two ways to bring it up: automatic and manual. Taking manual bring-up as an example, the watch displays the second button when it receives a second bring-up operation. For example, Figure 2 In section (e), when the watch receives the second call-out operation, it displays as follows: Figure 2 The button shown in (f) is the "Stop Return" button. The second activation operation can be of various types, such as a tap at any location on the screen (e.g., the return destination, point A) or other operations. Optionally, the second activation operation can be the same as or different from the first activation operation described above. Taking automatic activation as an example, the watch can automatically activate the second button when it determines that the fourth condition is met. Optionally, the fourth condition may include at least one of the following:
[0123] (a) Determine if the user has returned to the starting point or is about to reach the starting point. For example, the distance between the user and the starting point is less than the preset distance L7.
[0124] (b) Determine if the user deviates from the return trajectory.
[0125] (c) The fourth exercise duration has reached or is about to reach the fourth preset duration. The fourth exercise duration can be set by the user. The fourth exercise duration can be the one-way return trip duration or the total duration of the outbound and return trips. If the fourth exercise duration is the one-way return trip duration, such as 1 hour, the watch starts timing from point C. When 1 hour has been reached or is about to be reached (e.g., 50 minutes), the "Stop Return" button is automatically activated. If the fourth exercise duration is the total duration of the outbound and return trips, such as 1 hour, assuming that 30 minutes remain after subtracting the one-way outbound trip duration, the watch starts timing from point C. When 30 minutes have been reached or is about to be reached (e.g., 25 minutes), the "Stop Return" button is automatically activated.
[0126] (d) The fourth travel distance reaches or is about to reach the preset distance L8. The fourth travel distance can be set by the user. The fourth travel distance can be the one-way return distance or the total distance of the outbound and return journeys. If the fourth travel distance is the one-way return distance, such as 5 kilometers, the watch starts recording from point C. When it reaches or is about to reach 5 kilometers (e.g., 4.8 kilometers), the "Stop Return" button is automatically activated. If the fourth travel distance is the total distance of the outbound and return journeys, such as 5 kilometers, and assuming that 2.5 kilometers remain after subtracting the one-way outbound distance, the watch starts recording from point C. When it reaches or is about to reach 2.5 kilometers (e.g., 2.3 kilometers), the "Stop Return" button is automatically activated.
[0127] The following example illustrates how the "Stop Return" button can be manually activated. For instance, Figure 2 In section (e), when the watch receives the second call-out operation, it displays as follows: Figure 2 The button shown in (f) is the "Stop Return" button. Figure 2 In step (f), when the watch receives an operation on the "Stop Return" button, it stops the route return. For example, the watch can end navigation. Optionally, Figure 2 After the watch in (f) brings up the "Trajectory Return" button, if the button is detected to be triggered, the button can be hidden again.
[0128] In this embodiment, after the watch stops and returns to its starting point, it can generate an exercise record (also known as a workout record). The watch can generate the exercise record in two ways: automatically and manually. For example, in automatic mode, the watch automatically generates an exercise record when it determines that it has returned to the starting point or has remained there for a preset duration. In manual mode, the watch generates an exercise record when it receives an operation indicating the end of the exercise. For instance, the operation indicating the end of the exercise could be a "End Exercise" button... Figure 2(Not shown in the image) The button can be located in any position and is not limited. One possible scenario is... Figure 2 In step (f), when the watch receives an operation on the "Stop Return" button, navigation ends. Then, when the watch receives an operation on the "End Activity" button, an activity log is generated. After generating the activity log, the watch can display the log as shown below. Figure 2 The interface in section (g) includes exercise duration, distance, calories burned, and exercise trajectory, which includes the outbound and return trajectories. The following explanation primarily uses manually generated exercise records as an example; that is, stopping the return trip and ending the exercise require two separate operations.
[0129] exist Figure 2 In the scenario shown, the user moves from point A to point C and then returns from point C to point A. During this process, the watch draws two tracks: the outbound track (track 1) and the return track (track 2). Additionally, when the watch generates the activity record, it also draws one more track. Figure 2 The trajectory shown in (g) of the interface (this trajectory includes the outbound trajectory and the return trajectory). Therefore, in Figure 2 In the scenario shown, the watch draws a total of three tracks. The first track is the outbound track, the second track is the return track, and the third track is the motion track drawn when the motion record is generated, which includes the outbound and return tracks.
[0130] It should be understood that the three trajectories mentioned above are all drawn based on the user's location coordinates. For example, the outbound trajectory is drawn based on the location coordinates collected by the watch during the outbound journey (referred to as outbound coordinate points); the return trajectory is drawn based on the location coordinates collected by the watch during the return journey (referred to as return coordinate points); and the trajectory in the activity record is drawn based on the outbound coordinate points and the return coordinate points. In this embodiment of the application, after the watch collects the location coordinates, it can first store the location coordinates, and then draw the trajectory based on the stored location coordinates. The following will describe the process of storing the location coordinates and the process of drawing the trajectory (including the three trajectories mentioned above) based on the stored location coordinates.
[0131] In this application embodiment, the location coordinate storage scheme can include two types, namely the first scheme and the second scheme described below. Different storage schemes result in different trajectory drawing methods for the watch, which will be explained separately below.
[0132] Option 1
[0133] In this scheme, the outbound and return coordinate points are stored using different methods. For example, the outbound and return coordinate points are stored in different queues. Figure 3In (a), the watch includes a outbound queue and a return queue. The outbound queue stores outbound coordinate points. The return queue stores return coordinate points. Therefore, the watch draws the outbound trajectory based on the coordinate points in the outbound queue and the return trajectory based on the coordinate points in the return queue. Furthermore, as... Figure 3 In (a) above, the watch also includes a recording queue for storing outbound and return coordinate points. The watch can then draw the trajectory of the motion record based on the coordinate points in the recording queue, as described above. Figure 2 The trajectory shown in (g) of the interface. That is to say, in the first scheme, the outbound trajectory, the return trajectory, and the trajectory in the motion record correspond to three different queues.
[0134] In some embodiments, the outbound queue, return queue, and record queue can reside in different caches. For example, the outbound queue is located in cache 1, the return queue in cache 2, and the record queue in cache 3. Cache 1, cache 2, and cache 3 can be different cache regions in the watch's memory. Optionally, the three queues can have the same or different lengths. The length of a queue can be described by the maximum number of coordinate points that can be stored in the queue. For example, the three queues have the same length and each has 100 coordinate points, meaning that the storage limit for each of the three queues is 100 coordinate points.
[0135] by Figure 3 Taking (a) as an example, at this time, the outbound queue, return queue, and record queue are all empty. One possible situation is that the watch has just started the trajectory drawing function and has not yet drawn a trajectory; for example, the watch displays something like this. Figure 3 The interface shown in (b) does not yet display the trajectory. During the outbound journey, the watch collects the user's location coordinates in real time. Each time a coordinate point is collected, it is stored in the outbound queue, and then the outbound trajectory is drawn based on the coordinate points in the queue. For example, when the watch collects the first coordinate point, it stores it in the outbound queue and then draws the first coordinate point, i.e., the starting point (e.g., point A). Afterward, when the watch collects the second coordinate point, it stores it in the outbound queue and then draws the trajectory based on the two coordinate points in the queue. In other words, the trajectory is redrawn every time a new coordinate point is added to the outbound queue, and so on. Figure 3 In step (c), the watch collects the 100th coordinate point and stores it in the outbound queue. Then, it draws a trajectory based on the 100 coordinate points in the outbound queue, as shown below. Figure 3In section (d), the trajectory is from point A to point B, and this trajectory includes 100 coordinate points. It should be noted that during the above process, for each coordinate point entered into the outbound queue, the same coordinate point also enters the recording queue. In other words, for each coordinate point collected by the watch, it stores that coordinate point in both the outbound queue and the recording queue. Therefore, Figure 2 In (c), the record queue also includes 100 coordinate points, and these 100 coordinate points are exactly the same as the 100 coordinate points in the outbound queue.
[0136] Since the storage limit of the outbound queue is 100 coordinate points, Figure 2 In step (c), if the watch acquires new coordinate points, the coordinate points in the outgoing queue need to be compressed (e.g., reduced) to make room for storing the new coordinate points. For example, as... Figure 3 In step (e), the watch collects the 101st coordinate point. Since the outbound queue is full, the watch can compress the coordinate points in the outbound queue to make room for storing the 101st coordinate point. The compression method will be explained later. After compression, the 101st point enters the outbound queue. The watch draws a trajectory based on the coordinate points in the outbound queue, as shown below. Figure 3 In (f), the trajectory is from point A to point X. It should be noted that because the outbound queue is compressed, the number of coordinate points in the outbound queue is kept to 100. Figure 3 In (f), the coordinates of the trajectory from point A to point X are still 100. It should be understood that... Figure 3 The trajectory in (f) (i.e., the trajectory from A to X) and Figure 3 The trajectories in (d) (i.e., the trajectory from A to B) are different. For example, the trajectory from A to X is longer than the trajectory from A to B because... Figure 3 In example (f), the user moved forward one coordinate point (i.e., the 101st coordinate point), but both trajectories have the same number of coordinate points, 100. It should be noted that... Figure 3 In step (e), the 101st coordinate point enters both the outbound queue and the recording queue. Since the recording queue is full, the watch will compress it (e.g., by removing coordinate points) to free up storage space for the 101st coordinate point. In other words, the number of coordinate points in the recording queue remains at 100. The compression methods for the recording queue and the outbound queue may be the same (e.g., the same number of coordinate points are removed from both queues) or different (e.g., different numbers of coordinate points are removed from both queues), and are not limited to these methods.
[0137] Assuming the watch collects a total of 200 coordinate points during the outward journey, the processing method for coordinate points 102 to 200 is the same as that for coordinate point 101. Taking coordinate point 200 as an example... Figure 3 In point (g), the 200th point enters the outbound queue. The watch draws a trajectory based on the coordinates of the points in the outbound queue, such as... Figure 3 In the (h) section, the trajectory is from point A to point C. It should be noted that since the number of coordinate points in the outbound queue remains at 100, therefore... Figure 3 In (h), the coordinates of the trajectory from A to C are still 100. It should be noted that... Figure 3 In (g), coordinates from the 102nd to the 200th enter the outbound queue and also enter the record queue. The principle is the same, so I will not repeat it.
[0138] It should be noted that in the above embodiments, the outbound trajectory is redrawn every time a coordinate point enters the outbound queue. In other embodiments, when the outbound queue is not full, it is not necessary to redraw the outbound trajectory every time a coordinate point enters. For example, if the first coordinate point enters, the first coordinate point is drawn; if the second coordinate point enters, only the second coordinate point is drawn, without repeating the first coordinate point. When the outbound queue is full, since the outbound queue needs to be compressed, the outbound trajectory can be redrawn every time a coordinate point enters. For example, after the 101st coordinate point enters, the outbound trajectory is drawn based on all coordinate points in the outbound queue; after the 102nd coordinate point enters, the outbound trajectory is drawn again based on all coordinate points in the outbound queue.
[0139] Figure 3 In step (h), if the watch receives an operation on the "Return Track" button, it begins to collect the coordinates of the user's return journey in real time and draws the return trajectory based on these coordinates. For example, during the return journey, the watch collects the user's location coordinates in real time. Each time a coordinate point is collected, it is stored in the return queue, and then the return trajectory is drawn based on the coordinates in the return queue. It should be noted that the principle of drawing the return trajectory is the same as that of drawing the outbound trajectory; that is, the return trajectory is redrawn every time a new coordinate point is added. For example, as... Figure 3 In step (i), the watch collects the 100th coordinate point and stores it in the return queue. Then, it draws a trajectory based on the 100 coordinate points in the return queue, as shown below. Figure 3 In the equation (j), the trajectory is from point C to point D, and this trajectory includes 100 coordinate points. It should be noted that... Figure 3In (i), for each coordinate point entered in the return queue, the same coordinate point is also entered in the recording queue. It should be understood that since the recording queue is full (because it already stores many outbound coordinate points), the watch can compress the coordinate points in the recording queue (e.g., remove coordinate points) to make room for storing return coordinate points. That is, at this point, the recording queue includes both outbound and return coordinate points.
[0140] Since the return queue has a storage limit of 100 coordinate points, Figure 2 In step (i), if the watch collects new coordinate points, the coordinate points in the return queue need to be compressed (e.g., reduced) to make room for storing the new coordinate points. For example, as... Figure 3 In the context of point (k), the watch collects the 101st coordinate point. Since the return queue is full, the watch can compress the coordinate points in the return queue to make room for storing the 101st coordinate point. The compression method will be explained later. After compression, the 101st point enters the return queue, and then the watch draws a trajectory based on the coordinate points in the return queue, as shown below. Figure 3 In (l), the trajectory is from point C to point Y. It should be noted that because the return queue is compressed (e.g., coordinate points are reduced), the number of coordinate points in the return queue remains at 100. Figure 3 In (l), the coordinates of the return trajectory from point C to point Y are still 100. It should be understood that... Figure 3 The return trajectory (i.e., the trajectory from C to Y) in (l) and Figure 3 The return trajectories (i.e., the trajectories from C to D) in (j) are different. For example, the return trajectory from C to Y is longer than the return trajectory from C to D because... Figure 3 In (l), the user has moved forward one coordinate point, namely the 101st coordinate point. Furthermore, in one possible scenario, Figure 3 In the return trajectory of (l), the trajectory before point Y has had one coordinate point deleted, so the trajectory before point Y is the same as... Figure 3 The trajectory from C to D in (j) may differ. In summary, both trajectories (i.e., the trajectory from C to Y and the trajectory from C to D) have the same number of coordinate points: 100. It should be noted that... Figure 3 In (k), the 101st coordinate point enters the outbound queue and also enters the record queue. The principle is the same and will not be repeated.
[0141] Assuming the watch collects a total of 200 coordinate points during the return trip, the processing method for coordinate points 102 to 200 is the same as that for coordinate point 101. Taking coordinate point 200 as an example... Figure 3In the (m) value, the 200th point enters the return queue. The watch draws a trajectory based on the coordinates of the points in the return queue, such as... Figure 3 In the equation (n), the trajectory is from point C to point A. It should be noted that since the number of coordinate points in the return queue remains at 100, therefore... Figure 3 In the given (n) array, the coordinates of the return trajectory from C to A are still 100. It should be noted that... Figure 3 In (m), the 102nd to 200th coordinate points enter the outbound queue and also enter the record queue. The principle is the same and will not be repeated.
[0142] It should be noted that in the above embodiments, the return trajectory is redrawn every time a coordinate point enters the return queue. In other embodiments, when the return queue is not full, it is not necessary to redraw the return trajectory every time a coordinate point enters. For example, if the first return coordinate point enters, the first return coordinate point is drawn; if the second return coordinate point enters, only the second return coordinate point is drawn, without redrawing the first return coordinate point. When the return queue is full, since the return queue needs to be compressed, the return trajectory can be redrawn every time a coordinate point enters. For example, after the 101st return coordinate point enters, the return trajectory is drawn based on all coordinate points in the return queue; after the 102nd return coordinate point enters, the return trajectory is drawn again based on all coordinate points in the return queue.
[0143] therefore, Figure 3 In the given (n) coordinates, the outbound trajectory has 100 coordinate points, the return trajectory has 100 coordinate points, and the two trajectories have a total of 200 coordinate points. If the watch generates a motion record, the motion trajectory is drawn based on the coordinate points in the record queue. For example... Figure 3 In (p), since the recording queue includes 100 coordinate points (these 100 coordinate points include both outbound and return coordinate points), the watch generates the motion trajectory based on the recording queue, such as... Figure 3 In the context of (q), the motion trajectory includes both the outward and return trajectories, totaling 100 coordinate points. In other words, the watch... Figure 3 Switching to the (n) interface Figure 3 When the (q) interface appears, the trajectory changes from the user's perspective. This is because... Figure 3 The interface of (n) contains a total of 200 coordinate points for the two trajectories. (When switching to...) Figure 3 After the (q) interface appears, the total number of coordinate points for the two trajectories becomes 100, which makes users feel that the trajectory has changed, affecting the user experience.
[0144] As mentioned above, when the queue (outbound queue, return queue, or record queue) is full, the watch can compress the coordinate points within the queue. In this embodiment, compressing the coordinate points within the queue can include: reducing the number of coordinate points in the queue. The reduction methods can include various approaches, including but not limited to the following three.
[0145] The first method involves removing inflection point coordinates from the queue. Inflection point coordinates can be understood as coordinates whose angle with the previous and next coordinate points is less than a first preset angle (e.g., 30 degrees). For example, ... Figure 4 In (a) of the diagram, the angle formed by Q2 with Q1 and Q3 is less than the first preset angle, so Q2 is the coordinate of the inflection point. The watch can delete the point Q2, resulting in the following... Figure 4 The trajectory in (b) shows a direct connection between Q1 and Q3. In this way, the watch removes sharp points from the trajectory while retaining its general direction.
[0146] It should be noted that when deleting coordinates from the queue, the watch can delete one at a time or multiple coordinates at once.
[0147] a) Delete only one coordinate point at a time. The watch can first determine the coordinates of all inflection points in the queue, and then delete one of them. The deleted coordinate point may be randomly selected by the watch, or it may be the coordinate point with the smallest included angle among all the inflection point coordinates, i.e., the sharpest inflection point coordinate is deleted.
[0148] b) Delete multiple coordinate points at once. The watch can first determine the coordinates of all inflection points in the queue, and then delete multiple coordinate points from all the inflection point coordinates. The multiple coordinate points to be deleted may be randomly selected by the watch, or they may be the coordinates that are among the first few in the queue after the watch sorts all the inflection point coordinates in ascending order of their included angles.
[0149] The second method involves deleting the horizontal coordinates from the queue. A horizontal coordinate can be understood as a coordinate whose angle with the previous and next coordinate points is greater than a second preset angle (e.g., 170 degrees), where the second preset angle is greater than the first preset angle. For example... Figure 4 In (a), the angle formed by Q5 with Q4 and Q6 is greater than the second preset angle, so Q5 is a horizontal coordinate, and the watch can delete Q5. After deletion, the result is as follows: Figure 4 The trajectory in (b) is where Q4 and Q6 are directly connected.
[0150] It should be noted that when deleting coordinates from the queue, the watch can delete one at a time or multiple coordinates at once.
[0151] a) Delete only one coordinate point at a time. The watch can first determine all straight coordinate points in the queue, and then delete one of them. The deleted coordinate point may be randomly selected by the watch, or it may be the coordinate point that forms the largest angle among all the straight coordinate points, that is, the straightest coordinate point is deleted.
[0152] b) Delete multiple coordinate points at once. The watch can first identify all the horizontal coordinate points in the queue, and then delete multiple coordinate points from all the horizontal coordinate points. The deleted coordinate points may be randomly selected by the watch, or they may be the coordinate points that are among the first few in the queue after the watch sorts all the horizontal coordinate points in descending order of their included angles.
[0153] The third method involves reducing the number of dense coordinates in the queue. Dense coordinates can be understood as a cluster of multiple coordinate points that can be contained within a region, the area of which is smaller than a preset area. For example, ... Figure 4 In (a), a circular area is formed with Q7 as the center point and a preset length as the radius. The area of this circular area is smaller than the preset area, and it contains multiple coordinate points, which are called dense coordinate points. The watch can delete one or more coordinate points within the circular area. For example, if there are only two coordinate points within the circular area, one of them can be deleted. If the circular area contains multiple coordinate points, one or more coordinate points far from the edge can be deleted, while the coordinate points located at or near the edge are retained. For example, Figure 4 In (a), the watch has removed point Q8 inside the circle. After removal, it forms... Figure 4 The coordinates of point (b) in the diagram.
[0154] It should be noted that when deleting coordinates from the queue, the watch can delete one at a time or multiple coordinates at once.
[0155] a) Delete one coordinate point at a time. The watch can identify all dense clusters of coordinate points in the queue; there may be one or more clusters. If there is only one cluster, delete one coordinate point within that cluster. If there are multiple clusters, the watch can identify one cluster from among them and delete one coordinate point within that cluster. The identified cluster can be the densest cluster among all clusters.
[0156] (b) Delete multiple coordinate points at once. The watch can identify all dense clusters of coordinate points in the queue; there may be one or more clusters. If there is only one cluster, delete multiple coordinate points within that cluster. If there are multiple clusters, the watch can delete one or more coordinate points in each cluster. Alternatively, the watch can identify the densest cluster among multiple clusters and delete the coordinate points within that cluster.
[0157] The above lists three ways for the watch to delete coordinate points. Other deletion methods are also possible, and this application does not limit this. Furthermore, whenever there is a queue compression requirement, the watch can use one or more of the above three methods. One possible approach is to use the three methods in a round-robin fashion; for example, using the first method this time, the second method next time, and the third method the time after that. Another possible approach is that the watch sets a priority order for the three methods, and the watch can select according to this priority order. For example, the priority order is: third method > first method > second method. Therefore, the watch first uses the highest priority method, i.e., the third method, to delete coordinate points. Then, if it is determined that the third method cannot be used (e.g., there are no dense coordinates in the queue), the first method is used to delete coordinate points. Finally, if it is determined that the first method cannot be used (e.g., there are no inflection point coordinates that meet the conditions in the queue), the second method is used to delete them.
[0158] In other embodiments, the watch can merge the outbound and return routes into a single route. Two scenarios for route merging are described below.
[0159] In the first scenario, the watch stops its trajectory return but doesn't cease movement; it continues to collect the user's location coordinates and draw a trajectory in real time. In this case, the watch can merge the outbound and return trajectories into a single outbound trajectory.
[0160] For example, such as Figure 5A In (a), the watch displays the outbound trajectory from point A to point C, and also displays a "Track Return" button. When the watch receives an operation on the "Track Return" button, it activates the navigation function to guide the user back to the starting point and begins collecting the user's return coordinates to plot the return trajectory. When the user returns from point C to point E, the watch displays as shown below. Figure 5A The interface shown in (b) includes the return trajectory from point C to point E. Suppose the user reaches point E and no longer wishes to return, they can stop the trajectory return. For example, if the watch receives a second call-out (see previous description) and displays the "Stop Return" button, as shown... Figure 5A (c) When the watch receives an operation on the "Stop Return" button, it stops the trajectory return.
[0161] After the watch stops tracking and returns to home, if it does not receive an instruction to end the movement, it will continue to collect the user's location coordinates and continue drawing the track. In this case, the watch can... Figure 5A In section (c), the return trajectory from point C to point E is adjusted to the outbound trajectory. For example... Figure 5AIn (d), the outbound trajectory becomes a trajectory from point A to point E, that is, the original two trajectories are merged into one outbound trajectory. Assuming the user moves from point E to point F, the watch will display as follows: Figure 5A The interface shown in (e) displays the outbound trajectory from point A to point F. After reaching point F, the user can activate the "Track Return" function by pressing the "Track Return" button. It should be noted that, due to... Figure 5A In (e), the outbound trajectory has changed to a trajectory from point A to point F. When returning to the starting point, the watch guides the user back according to the return trajectory from point F to point A.
[0162] After the watch stops its trajectory and returns to home, if it receives an instruction to end the activity, it generates an activity record, for example, displaying... Figure 5A The interface in (f) includes a motion trajectory, which includes the outbound trajectory from point A to point C and the return trajectory from point C to point E.
[0163] Therefore, after the watch stops its trajectory and returns home, there are two possible processing methods: if the exercise has ended, an exercise record is generated; if the exercise has not ended, the return trajectory is adjusted to the outgoing trajectory. One possible scenario is that after the watch stops its trajectory and returns home, it waits for a preset time. If an operation indicating the end of the exercise is received within the preset time, an exercise record is generated; if no operation indicating the end of the exercise is received within the preset time, the return trajectory is adjusted to the outgoing trajectory. Optionally, if no operation is received within the preset time, the watch can also output a prompt message to ask the user whether to adjust the return trajectory to the outgoing trajectory. After receiving the user's confirmation instruction, the watch adjusts the return trajectory to the outgoing trajectory. It should be noted that... Figure 5A In the example of point E being a point on the return journey, when the user returns to the starting point (i.e., point A), if the user stops the trajectory return and ends the movement, a movement record is generated; if the user stops the trajectory return but does not end the movement, the return trajectory will be adjusted to the outbound trajectory, and the user's location will continue to be collected and the trajectory will continue to be drawn.
[0164] In the second scenario, a user uses a trajectory for return, but deviates from the return trajectory during the journey. In this case, the watch can also merge the outbound and return trajectories into a single outbound trajectory.
[0165] For example, such as Figure 5B In (a), the watch displays the journey from point A to point C, and also shows a "Return to Home" button. When the watch receives an operation on the "Return to Home" button, the navigation function is activated. When the user returns from point C to point E, the watch displays as shown below. Figure 5BThe interface shown in (b) includes the return trajectory from point C to point E. Assume that after reaching point E, the user deviates from the return trajectory, for example, as... Figure 5B In case (c), the user has moved to point F. In this situation, the watch can automatically stop the trajectory return and can also adjust the return trajectory from point C to point F into an outbound trajectory, that is, merge the trajectory from point A to point C and the trajectory from point C to point F into a single outbound trajectory. After merging, the watch can display as follows: Figure 5B The interface in (d) contains a trajectory from point A to point F.
[0166] exist Figure 5A and Figure 5B In both scenarios, the watch needs to merge the tracks. The following explains the principle of track merging when the watch uses the first method to store coordinate points. For ease of understanding, the following explanation uses the first scenario as an example. Figure 5A Let's take a scenario as an example to illustrate.
[0167] like Figure 5C In (a), the watch's outbound queue stores 100 coordinate points (compressed). The watch draws a trajectory based on the coordinate points in the outbound queue, such as... Figure 5C In (b) of the example, the outbound trajectory includes 100 coordinate points. If the watch receives an operation on the "Track Return" button, it begins to collect the coordinate points along the user's return journey in real time and draws the return trajectory based on these coordinate points. For example, as shown... Figure 5C In (c), the watch's return queue stores 30 coordinate points. The watch draws a trajectory based on the coordinate points in the return queue, such as... Figure 5C In section (d), the return trajectory (i.e., the trajectory from C to E) includes 30 coordinate points. If the watch receives an operation on the "Stop Return" button but does not end the movement, the return trajectory (i.e., the trajectory from C to E) needs to be adjusted to the outbound trajectory. For example, as... Figure 5C In step (e), the watch moves the coordinates from the return queue to the outbound queue. It should be understood that because the outbound queue is full, the outbound queue needs to be compressed before the return coordinates can enter. After compression, the return coordinates enter the outbound queue, as shown below. Figure 5C (g) The trajectory drawn by the watch based on coordinates within the outbound queue, such as... Figure 5C In the equation (h), the trajectory is the outbound trajectory from point A to point E, with no return trajectory, meaning the original two trajectories have been merged into one outbound trajectory. Therefore, the watch... Figure 5C Switching to (f) of the interface Figure 5C When the interface (h) is used, the two trajectories are merged into one. It should be noted that since the number of coordinate points in the outbound queue is kept at 100, the outbound trajectory from A to E has 100 coordinate points.
[0168] The above describes the implementation principle of the first solution. Simply put, the outbound and return coordinates are stored in different queues. If there is only an outbound journey and no return journey (e.g., the user does not trigger the "track return" button), the outbound queue will be idle, resulting in wasted resources. Furthermore, if there is only an outbound journey and no return journey, the coordinates in the recording queue will be completely identical to those in the outbound queue, also leading to wasted resources. Additionally, when the watch generates activity records, there may be track jumps, which have already been described above and will not be repeated.
[0169] The second option
[0170] Unlike the first approach described above, in the second approach, the outbound and return coordinates are stored in the same queue. Therefore, the watch only needs to maintain one queue. Considering that the queue needs to store both outbound and return coordinates, its storage capacity can be higher; for example, it can be higher than the storage capacity of any of the three queues in the first approach. One possibility is that the queue can be formed by merging the three queues from the first approach. Taking a storage capacity of 100 points for each of the three queues as an example, the merged queue would have a storage capacity of 300 points. For example, ... Figure 6 In (a), the watch includes a first queue with a storage limit of 300 points. The first queue is used to store outbound and return coordinate points. The watch draws the outbound and return trajectories based on the coordinate points in the first queue.
[0171] In some embodiments, the first queue may be located in a first cache. The first cache may be a cache region in the watch's memory. Assuming the first queue is formed by merging the three queues in the first scheme, then the first cache includes cache 1, cache 2, and cache 3 from the first scheme mentioned above. For example, the storage space of the first cache is greater than or equal to the sum of the storage spaces of cache 1, cache 2, and cache 3.
[0172] by Figure 6 Taking (a) as an example, the first queue is empty at this time. One possible situation is that the watch has just started the trajectory drawing function and has not yet drawn a trajectory. For example, the watch displays something like this. Figure 6The interface shown in (b) does not yet display the trajectory. During the outward journey, the watch collects the user's location coordinates in real time. Each time a coordinate point is collected, it is stored in the first queue, and then the trajectory is drawn based on the coordinate points in the first queue. For example, when the watch collects the first coordinate point, it stores it in the first queue and then draws the first coordinate point, i.e., the starting point (e.g., point A). Afterward, when the watch collects the second coordinate point, it stores it in the first queue and then draws the trajectory based on the two coordinate points in the first queue. That is, each time a new coordinate point is added to the first queue, the trajectory is redrawn, and so on. Figure 6 In step (c), the watch collects the 200th coordinate point and stores it in the first queue. Then, a trajectory is drawn based on the 200 coordinate points in the first queue, such as... Figure 6 In point (d), the trajectory is the outbound journey from point A to point C, and this trajectory includes 200 coordinate points. This is because the storage limit of the first queue is 300 points, and the storage limit of the first queue has not yet been reached, so the watch will not compress the coordinate points. Figure 6 The number of coordinate points of the outbound trajectory in (d) is 200.
[0173] Compared to the first option Figure 3 (h) in the middle and in the second scheme Figure 6 In the first scheme, the storage limit of the outbound queue is 100 points, so the outbound coordinates are compressed from 200 to 100. Figure 3 In the first scheme, the outbound trajectory coordinates in (h) only have 100 points. In the second scheme, the storage limit of the first queue is increased, and 200 outbound coordinates do not require compression. Figure 6 The outbound trajectory in (d) has 200 coordinate points. Therefore, it can be seen that the outbound trajectory in the second scheme is more refined compared to the first scheme.
[0174] Figure 6 In step (d), if the watch receives an operation on the "Return to Home Track" button, it begins to collect the coordinates of the user's return journey in real time and draws the return trajectory based on these coordinates. For example, during the return journey, the watch collects the user's location coordinates in real time. Each time a coordinate point is collected, it is stored in a first queue, and then the trajectory is drawn based on the first queue. That is, each time a new coordinate point is added to the first queue, the trajectory is redrawn, and so on. Figure 6In step (e), the watch collects the 300th coordinate point, which is then stored in the first queue. At this point, the first queue contains 300 coordinate points: the first 200 are outbound coordinate points, and the last 100 are return coordinate points. To facilitate differentiation, the first queue may include first indication information to distinguish between outbound and return coordinate points.
[0175] In the embodiments of this application, the first instruction information can be implemented in various ways, including but not limited to at least one of the following.
[0176] In the first approach, the first indication information could be an identifier added by the watch to each coordinate point within the first queue.
[0177] The identifier added to the outbound coordinate points is different from the identifier added to the return coordinate points. For example, the watch adds identifier 1 to the outbound coordinate points; identifier 1 is the identifier of the outbound trajectory, for example, identifier 1 is the binary number "1". The watch adds identifier 2 to the return coordinate points; identifier 2 is the identifier of the return trajectory, for example, identifier 2 is the binary number "0". One possible approach is that each coordinate point in the first queue is stored as a data group, the data group including (coordinate, identifier), the identifier indicating whether the coordinate is outbound or return. For example, the outbound coordinate points can be stored as (coordinate, 1), and the return coordinate points can be stored as (coordinate, 0). For example, please refer to [link to relevant documentation]. Figure 7A In the first queue, (a) represents one form of the first queue. In the first queue, the coordinates of the points before the trigger trajectory return are stored in the form of data groups (coordinates, 1), and the coordinates of the points after the trigger trajectory return are stored in the form of (coordinates, 0).
[0178] Optionally, the first method also has the following two variations.
[0179] In the first transformation method, only the outbound coordinates are stored in (coordinates, identifier) format, while the return coordinates are stored in (coordinates) format. For example, please refer to [link to example]. Figure 7A (b) represents another form of the first queue. In the first queue, the coordinates before the trigger trajectory return are stored as data groups (coordinates, 1), and the coordinates after the trigger trajectory return are stored as (coordinates).
[0180] The second transformation method stores only the return coordinates in (coordinates, identifier) format, while the outbound coordinates are always stored in (coordinates) format. For example, please refer to [link to example]. Figure 7A (c) represents another form of the first queue. In the first queue, the coordinates before the trigger trajectory return are stored in the form of (coordinates), and the coordinates after the trigger trajectory return are stored in the form of (coordinates, 0). Both of these variations help save storage space.
[0181] In the second approach, the first indication information can be a marker added by the watch to the critical coordinates within the first queue.
[0182] The critical coordinate point can be the boundary between the outbound and return trajectories. Compared to the first method, the second method does not require adding an identifier to each coordinate point, saving storage space. The critical coordinate point can include the last N coordinate points of the outbound trajectory and / or the first M coordinate points of the return trajectory, where N and M are positive integers. Taking the last N coordinate points of the outbound trajectory as an example, since there are 200 outbound coordinate points in the first queue, the critical coordinate point can be the last N coordinate points among these 200 coordinate points. Assuming N=1, the critical coordinate point is the 200th coordinate point, which is the last coordinate point collected by the watch during the outbound journey. Assuming N=10, the critical coordinate points include coordinate points 191 to 200, which are the last 10 coordinate points collected by the watch during the outbound journey. Taking the first M coordinate points of the return trajectory as an example, since there are 100 return coordinate points in the first queue, the critical coordinate points are coordinate points 201 to 300. The critical coordinate point can be the first M coordinate points out of the 100 coordinate points. Assuming M = 1, the critical coordinate point is the 201st coordinate point, which is the first coordinate point collected by the watch during the return trip. Assuming M = 10, the critical coordinate points include the 201st to 210th coordinate points, which are the first 10 coordinate points collected by the watch during the return trip.
[0183] Optionally, the watch adds an identifier to the critical coordinate point, which may include: the watch generating an identifier, and then packaging the identifier and the critical coordinate point together and storing them in a first queue. "Packaging and storing" can be understood as forming a data group with the critical coordinate point and the identifier, the data group being in the form of (coordinates, identifier), and then storing the data group in the first queue.
[0184] In one possible implementation, the watch adds a marker to the critical coordinate point to indicate that the coordinate point is a critical point, without indicating whether the coordinate point belongs to the outbound or return trajectory. For example, the marker could be a critical point identifier, such as "00". In this case, the watch can treat the critical coordinate point as either an outbound or return coordinate point.
[0185] In other possible implementations, the watch adds an identifier to the critical coordinate point to indicate whether the critical coordinate point belongs to the outbound trajectory or the return trajectory. For example, when the critical coordinate point includes the outbound coordinate point, the watch adds identifier 1 to the outbound coordinate point, where identifier 1 is the identifier of the outbound trajectory, for example, identifier 1 is the binary number "1". When the critical coordinate point includes the return coordinate point, the watch adds identifier 2 to the return coordinate point, where identifier 2 is the identifier of the return trajectory, for example, identifier 2 is the binary number "0". The following description mainly uses this implementation as an example.
[0186] In the embodiments of this application, the number of critical coordinate points can be one or more. The following will describe two cases.
[0187] Scenario 1: There is only one critical coordinate point. In this case, the critical coordinate point can be either the outbound coordinate point or the return coordinate point.
[0188] a) The critical coordinate point is the outbound coordinate point. One possible approach is that the watch receives an operation on the "track return" button at time T1. The watch determines that the last coordinate point collected before time T1 is the critical coordinate point. This coordinate point can be understood as the last coordinate point of the outbound trajectory, for example, the 200th coordinate point mentioned earlier. For example, as... Figure 7B In diagram (a), we see one form of the first queue. The 200th coordinate point in the first queue (i.e., the last coordinate point of the outbound trajectory) is stored differently from the other coordinate points. This coordinate point and its identifier are stored as a data group (coordinate, 1). For easy distinction, this coordinate point is filled with gray in the diagram.
[0189] b) The critical coordinate point is the return coordinate point. One possible approach is that the watch receives an operation on the "track return" button at time T1. The watch determines that the first coordinate point collected after time T1 is the critical coordinate point. This coordinate point can be understood as the first coordinate point of the return trajectory, for example, the 201st coordinate point mentioned earlier. For example, as... Figure 7B (b) in the diagram represents another form of the first queue. The 201st coordinate point in the first queue (i.e., the first coordinate point of the outbound trajectory) is stored in a different format than the other coordinate points. This coordinate point and its identifier are stored in the form of a data group (coordinate, 0).
[0190] Scenario 2: There are multiple critical coordinate points. In this case, all of the critical coordinate points can be outbound coordinate points, all of them can be return coordinate points, or they can include both outbound and return coordinate points.
[0191] a) Multiple critical coordinate points are all outbound coordinate points. One possible approach is that the watch receives an operation on the "track return" button at time T1, and the watch determines that the last multiple coordinate points collected before time T1 are critical coordinate points. In this case, since there are multiple critical coordinate points and they are all outbound coordinate points, the watch can add tags to multiple critical coordinate points in batches. For example, the watch generates an identifier and copies the identifier multiple times, packaging and storing each identifier with a separate critical coordinate point. Taking the example that multiple critical coordinate points are the last 10 coordinate points of the outbound trajectory (i.e., coordinate points 191 to 200), such as... Figure 7B(c) represents another form of the first queue. The last 10 coordinates in the outgoing journey of the first queue are stored as data sets (coordinates, 1).
[0192] (b) All critical coordinate points are return coordinate points. One possible approach is that the watch receives an operation on the "track return" button at time T1, and the watch determines that the first multiple coordinate points collected after time T1 are critical coordinate points. In this case, the watch adds tags to multiple critical coordinate points, either in batches or one by one. Taking batch addition as an example, after the watch collects the multiple coordinate points, it generates an identifier and copies the identifier multiple times, adding the identifier to the multiple coordinate points in batches. Taking one by one addition as an example, for each of the multiple coordinate points, the watch generates an identifier and adds the identifier to that coordinate point. For example, if the multiple critical coordinate points are the first 10 coordinate points of the return trajectory (i.e., coordinate points 201 to 210), then... Figure 7B (d) represents another form of the first queue. The first 10 coordinate points in the return journey within the first queue are stored as data sets (coordinates, 0).
[0193] c) Multiple critical coordinate points include both outbound and return coordinate points. One possible approach is that the watch receives an operation on the "track return" button at time T1, and the watch determines that multiple coordinate points collected before and after time T1 are critical coordinate points. Optionally, the number of outbound and return coordinate points among the critical coordinate points can be the same or different. For example, there are a total of 10 critical coordinate points, of which 5 are outbound coordinate points and the other 5 are return coordinate points. In this case, for outbound coordinate points, a batch addition method can be used; for return coordinate points, a batch addition or individual addition method is not limited. For example, as... Figure 7B (e) represents another form of the first queue. In the first queue, the last 5 coordinates of the outbound journey are stored in the form of (coordinate, 1), and the first 5 coordinates of the return journey are stored in the form of (coordinate, 0).
[0194] The third method involves the watch adding an identifier to the first queue, located between the last coordinate point of the outbound journey and the first coordinate point of the return journey. In this method, the watch does not need to store the coordinate points and the identifier as a data set; that is, the identifier and coordinate points are stored independently. For example, please see... Figure 7C This is one form of the first queue. The first queue includes an identifier, which is located between the last coordinate point of the outbound coordinates (e.g., the 200th coordinate point) and the first coordinate point of the return coordinates (e.g., the 201st coordinate point). It should be noted that in this method, the first indication information is not involved in the trajectory drawing.
[0195] The above are several implementation methods for the first indication information. In practical applications, other methods can also be used to distinguish between outbound and return coordinate points, which will not be listed in detail in this application. It should be noted that, considering that the first indication information will occupy a certain amount of memory, adding more first indication information to the first queue may cause the first queue to be unable to accommodate 300 points. To avoid this situation, the storage limit of the first queue can be greater than 300 coordinate points to reserve storage space for the first indication information. That is to say, the storage limit of the first queue can be 300 coordinate points + first indication information.
[0196] Continue with Figure 6 Taking (e) as an example, since the first queue contains 300 coordinate points, the watch draws a trajectory based on the coordinate points in the first queue, such as... Figure 6 In (f), the trajectory includes two parts: a journey from point A to point C, and a return journey from point C to point D. These two trajectories together contain 300 coordinate points. Since the storage limit of the first queue is 300 coordinate points, Figure 6 In step (e), if the watch acquires new coordinate points, the coordinate points in the first queue need to be compressed to make room for storing the new coordinate points. For example, as... Figure 6 In step (g), the watch collects the 301st coordinate point. Since the first queue is full, the watch can compress the coordinate points in the first queue to make room for storing the 301st coordinate point. It should be noted that the first queue includes both outbound and return coordinate points. The watch can compress the first queue in three ways: Method A: Compress only outbound coordinate points, not return coordinate points. Method B: Compress only return coordinate points, not outbound coordinate points. Method C: Compress both outbound and return coordinate points; for example, the watch can compress both outbound and return coordinate points as a whole. The compression methods have been described above and will not be repeated here.
[0197] In this embodiment, to ensure the distinction between outbound and return coordinate points, when the first queue is compressed, the coordinate points corresponding to the first indication information in the first queue may not participate in the compression. As mentioned earlier, the first indication information is an identifier added for critical coordinate points. Therefore, when the first queue is compressed, the critical coordinate points may not participate in the compression to ensure that they are not deleted. As mentioned earlier, there may be one or more critical coordinate points. If there is only one critical coordinate point, it will not participate in the compression; if there are multiple critical coordinate points, not all of them will participate in the compression to avoid all of them being deleted.
[0198] Continue as Figure 6In the (g) part, after compression, the 301st point enters the first queue. The watch draws a trajectory based on the coordinates of the points in the first queue, such as... Figure 6 In the equation (h), the trajectory is the return trajectory from point C to point Y. Since the number of coordinate points in the first queue remains at 300, Figure 6 The total number of coordinate points of the trajectory in (h) is still 300.
[0199] It is worth noting that, Figure 6 The trajectory in (h) and Figure 6 The trajectories in (f) are different. This is because the first queue needs to remove a point to free up storage space for the 301st coordinate point. There are two possible scenarios: Scenario 1, the removed point is a point on the outbound coordinate path; Scenario 2, the removed point is a point on the return coordinate path. If it is Scenario 1, i.e., the removed point is a point on the outbound coordinate path, then... Figure 6 The coordinates of the outgoing trajectory in (h) are compared to Figure 6 In (f), the coordinates of the outbound trajectory are one less than one, while Figure 6 The coordinates of the return trajectory in (h) are compared to Figure 6 In case (f), the return trajectory coordinates have one more point, meaning a 301st point has been added. If it's case 2, where the deleted point is one of the return trajectory coordinates, then... Figure 6 The outbound trajectory in (h) and Figure 6 The outbound trajectories in (f) are the same, while Figure 6 The return trajectory in (h) is compared to Figure 6 The return trajectory in (f) is longer, but the total number of coordinate points of the return trajectory in both figures is the same, which is 100.
[0200] Assuming the watch collects a total of 200 coordinate points during the return trip, the processing method for points 302 to 400 is the same as that for point 301. Taking point 400 as an example... Figure 6 In (i), the 400th coordinate point enters the first queue. The watch draws a trajectory based on the coordinate points in the first queue, such as... Figure 6 In (j), the trajectory includes both the outbound and return trajectories. Since the number of coordinate points in the first queue remains at 300, Figure 6 The outbound and return trajectories in (j) have a total of 300 coordinate points.
[0201] It should be noted that in the above embodiments, the trajectory is redrawn every time a coordinate point enters the first queue. In other embodiments, if the first queue is not full, it is not necessary to redraw the trajectory every time a coordinate point enters. If the first queue is full, since the first queue needs to be compressed, the trajectory can be redrawn every time a coordinate point enters. For example, after the 301st coordinate point enters, the trajectory (including the outbound and return trajectories) is drawn based on all coordinate points in the first queue; after the 302nd coordinate point enters, the trajectory (including the outbound and return trajectories) is drawn again based on all coordinate points in the first queue.
[0202] Figure 6 In step (j), if the watch generates a motion record, the motion trajectory is drawn based on the coordinates within the first queue. For example... Figure 6 In the (k) part, since the first queue includes the first indication information, the watch can distinguish which are outbound coordinate points and which are return coordinate points, and therefore can draw the outbound and return trajectories separately. For example, the watch can display something like... Figure 6 The interface (l) includes a motion trajectory drawn based on coordinate points within the first queue. This trajectory includes both outbound and return paths, totaling 300 coordinate points. Therefore, the watch... Figure 6 Switching to the interface of (j) Figure 6 When the interface is in (l), the number of coordinate points of the motion trajectory is the same. From the user's perspective, the motion trajectory does not change, which improves the user experience.
[0203] In other embodiments, the watch can merge the outbound and return routes into a single route. Optionally, the route merging scenario can include two types. The first scenario involves the user stopping the return route but not ending the activity. Examples of the first scenario are described above. Figure 5A The scenario shown is as follows. The second scenario involves a user using a trajectory return method, but deviating from the return trajectory during the journey. Examples of the second scenario are mentioned above. Figure 5B The scenarios shown are illustrated below. In both scenarios, the watch needs to merge the tracks. The following explains the principle of track merging when the watch uses the second method to store coordinate points. For ease of understanding, the first scenario will be used in the following text. Figure 5A Let's take a scenario as an example to illustrate.
[0204] like Figure 8 In (a), the first queue of the watch includes 200 outbound coordinate points. The watch draws its outbound trajectory based on the coordinate points in the first queue, such as... Figure 8 In (b), the outbound trajectory includes 200 coordinate points. If the watch receives an operation on the "Track Return" button, it begins drawing the return trajectory. For example, as shown... Figure 8In (c), the first queue stores 30 return coordinate points. At this point, the first queue contains a total of 230 coordinate points: the first 200 are outbound coordinate points, and the last 30 are return coordinate points. The first queue also includes first indication information to distinguish between outbound and return coordinate points. The watch draws a trajectory based on the coordinate points in the first queue, such as... Figure 8 In section (d), the trajectory includes the outbound trajectory from point A to point C and the return trajectory from point C to point E, totaling 230 coordinate points. If the watch receives an operation on the "Stop Return" button but does not end the movement, the return trajectory (i.e., the trajectory from C to E) needs to be adjusted to the outbound trajectory. For example, as... Figure 8 In step (e), the watch can process the first indication information (e.g., delete the first indication information) so that all coordinate points in the first queue become outbound coordinate points. Therefore, the trajectory drawn by the watch based on the coordinate points in the first queue is as follows: Figure 8 In (f), the trajectory is the outbound trajectory from point A to point E, with no return trajectory, which means that the original two trajectories are merged into one outbound trajectory.
[0205] exist Figure 8 In this process, the watch processes the first indication information to merge the return and outbound trajectories into a single trajectory. As mentioned earlier, there are multiple ways to implement the first indication information, such as the three methods listed above. The processing of the first indication information differs depending on the method used to achieve trajectory merging, and these will be explained below.
[0206] Taking the first instruction information using the first method as an example, for instance, the first instruction information uses... Figure 7A a) If the first instruction information uses the following method. Figure 7A In method (a), the watch can change the storage format of the return coordinates from (coordinate, 0) to (coordinate, 1), so that all coordinates in the first queue become the outbound coordinates, thus merging the trajectories. (b) If the first indication information uses... Figure 7A In method (b), the watch can adjust the storage format of the return coordinate map from (coordinates) to (coordinates, 1), so that all coordinate points in the first queue are in the (coordinates, 1) format, thus achieving trajectory merging. c), if the first indication information uses... Figure 7A In the method (c), the watch can adjust the storage format of the return coordinate map from (coordinate, 0) to (coordinate) so that the coordinate points in the first queue are all in the form of (coordinate), thus realizing trajectory merging.
[0207] Taking the first instruction information using the second method as an example, for instance, the first instruction information uses... Figure 7BThis is a method where the first indication is a marker added for the critical coordinate point, and the watch can remove this marker. For example, the watch can... Figure 7B (a) Figure 7B (b) Figure 7B (c) Figure 7B (d) or Figure 7B The markers added for critical coordinate points in (e) are deleted.
[0208] Taking the first instruction information using the third method as an example, for instance, the first instruction information uses... Figure 7C In this case, the watch can simply delete the identifier in the first queue.
[0209] Compared to the first solution mentioned above, the second solution involves the watch maintaining a queue, which facilitates management. Furthermore, the second solution has a higher storage capacity for the first queue. In scenarios with only return trips and no outbound trips, the first queue is entirely used to store outbound coordinates, preventing excessive compression of these coordinates and ensuring the accuracy of the outbound trajectory. Additionally, the second solution does not have a separate record queue. When the watch generates activity records, it draws the trajectory based on the coordinates in the first queue, eliminating trajectory jumps and improving the user experience.
[0210] In the above embodiments, two schemes for storing trajectory coordinates are provided: a first scheme and a second scheme. The watch can use only the first scheme, for example, the watch may be manufactured with only the software / hardware modules for implementing the first scheme. Alternatively, the watch can use only the second scheme, for example, the watch may be manufactured with only the software / hardware modules for implementing the second scheme. Alternatively, the watch may be configured with both the first and second scheme software / hardware modules. In this case, the watch can choose to use one of the two schemes. One possible approach is that the watch determines which scheme to use based on user settings. For example, the watch provides an entry point that can be used to set either the first or second scheme. If the user sets the first scheme based on the entry point, the watch uses the first scheme. If the user sets the second scheme based on the entry point, the watch uses the second scheme. Optionally, the entry point may be located in the watch's settings application or other applications; the specific location is not limited. Another possible approach is that the watch decides whether to use the first or second scheme itself. For example, the watch can count the frequency of a user's use of trajectory return. If the frequency exceeds a threshold, the first scheme can be used; otherwise, the second scheme is used. This is because if a user frequently uses trajectory return, storing data in three separate queues facilitates management and prevents the return queue from becoming idle, thus avoiding resource waste. If a user does not frequently use trajectory return, storing data in three separate queues would leave the return queue idle, leading to resource waste. Therefore, the second scheme is used so that the first queue is entirely used to store outbound coordinates, preventing excessive compression of the outbound trajectory. It should be noted that to avoid wasting storage resources, the watch can be configured with three queues. If the watch determines to use the second scheme, the three queues are merged into one queue for storage. If the watch determines to use the first scheme, the queue is split into three separate queues for storage. The process of merging and splitting queues is not detailed in this embodiment.
[0211] Please see Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device can be a wearable device as described above, such as a watch. Figure 9As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0212] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has just used or is recurring. If processor 110 needs to reuse an instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves system efficiency.
[0213] In some embodiments, the processor 110 may execute the trajectory coordinate storage method provided in the embodiments of this application. For example, the processor 110 may store the coordinate points of a first trajectory in a first queue, and may also store the coordinate points of a second trajectory, which is a return trajectory of the first trajectory, in the first queue. Moreover, the first queue includes first indication information, which is used to distinguish the coordinate points of the first trajectory and the coordinate points of the second trajectory.
[0214] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0215] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0216] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0217] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0218] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0219] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0220] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0221] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0222] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0223] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in conjunction with a tuning switch.
[0224] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G in electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0225] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0226] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the electronic device to communicate with networks and other devices via wireless communication technology.
[0227] The display screen 194 is used to display the application's interface, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include one or N display screens 194, where N is a positive integer greater than 1.
[0228] The electronic device 100 can perform shooting functions through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor. The ISP is used to process the data fed back by the camera 193.
[0229] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and software code for at least one application program. The data storage area may store data generated during the use of the electronic device (e.g., images, videos, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, general-purpose flash memory, etc.
[0230] In this embodiment, the internal memory 121 can also be used to store trajectory coordinate points. For example, the internal memory 121 includes a first queue for storing trajectory coordinate points. The internal memory 121 is connected to the processor 110. The processor 110 can store (or write) data in the internal memory 121, for example, it can store data in the first queue. For example, the processor 110 stores the coordinate points of a first trajectory in the first queue, and also stores the coordinate points of a second trajectory, which is the return trajectory of the first trajectory, in the first queue. Moreover, the first queue includes first indication information, which is used to distinguish the coordinate points of the first trajectory and the coordinate points of the second trajectory.
[0231] In this embodiment of the application, the electronic device further includes a positioning module ( Figure 9 (Not shown in the image) This positioning module is used to determine the current location coordinates of the electronic device. The positioning module is described above and will not be repeated here. One possible scenario is that the positioning module sends each acquired location coordinate to the processor 110. The processor 110 stores the location coordinate in a first queue in the internal memory 121. As mentioned above, if the first queue is full, the processor 110 can also compress the coordinates within the first queue. The compression process has been described previously and will not be repeated here.
[0232] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external memory card.
[0233] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.
[0234] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0235] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls and other external playback scenarios through one or more speakers 170A.
[0236] The receiver 170B, also known as a "handpiece," can be one or more, and is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0237] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.
[0238] The 170D headphone jack is used to connect wired headphones.
[0239] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.
[0240] The gyroscope sensor 180B can be used to determine the motion attitude of an electronic device. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization.
[0241] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0242] The magnetic sensor 180D includes a Hall effect sensor. Electronic devices can use the magnetic sensor 180D to detect the opening and closing of a flip cover.
[0243] The 180E accelerometer can detect the magnitude of acceleration in various directions (typically three axes) of electronic devices. When the electronic device is stationary, it can detect the magnitude and direction of gravity.
[0244] The 180F distance sensor is used to measure distance. Electronic devices can measure distance using infrared or laser.
[0245] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device emits infrared light outward through the LED. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that an object is near the electronic device. When insufficient reflected light is detected, the electronic device can determine that no object is near the electronic device.
[0246] An ambient light sensor 180L is used to detect ambient light levels. Electronic devices can adaptively adjust the brightness of the display screen 194 based on the detected ambient light levels.
[0247] The fingerprint sensor 180H is used to collect fingerprints.
[0248] The 180J temperature sensor is used to detect temperature.
[0249] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event.
[0250] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords.
[0251] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. The electronic device can receive button inputs and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device.
[0252] Understandable, Figure 9 The components shown do not constitute a specific limitation on the electronic device. The electronic device in the embodiments of the present invention may include, but is not limited to, components that are more advanced than those shown. Figure 9 More or fewer parts. Furthermore, Figure 9 The combination / connection relationships between the components can also be adjusted and modified.
[0253] Figure 10 This is a schematic diagram of the structure of an electronic device 1000 provided in an embodiment of this application. The electronic device 1000 can be a wearable device (e.g., a watch) as described above. Figure 10As shown, the electronic device 1000 may include: one or more processors 1001; one or more memories 1002; a communication interface 1003; and one or more computer programs 1004. These devices can be connected via one or more communication buses 1005. The one or more computer programs 1004 are stored in the memory 1002 and configured to be executed by the one or more processors 1001. The one or more computer programs 1004 include instructions. For example, when the electronic device 1000 is a wearable device (e.g., a watch) as described above, the instructions can be used to perform relevant steps of the wearable device (e.g., a watch) as described in the corresponding embodiments above, such as executing... Figures 1 to 8 The relevant steps for wearable devices (e.g., watches). The communication interface 1003 is used to enable communication between the electronic device 1000 and other devices, such as a transceiver.
[0254] In the embodiments provided above, the methods provided by the present application are described from the perspective of an electronic device (e.g., a watch) as the executing entity. To implement the functions of the methods provided in the embodiments of the present application, the electronic device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is implemented in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.
[0255] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)). Where there is no conflict, the solutions in the above embodiments can be combined.
[0256] Based on the above embodiments, this application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the methods described in the embodiments of this application.
[0257] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods described in the embodiments of this application.
[0258] Based on the above embodiments, this application also provides a chip for reading computer programs stored in a memory to implement the methods described in the embodiments of this application.
[0259] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the methods described in the embodiments of this application. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete devices.
[0260] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0261] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0262] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0263] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0264] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope and intent of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and variations.
Claims
1. A storage method of trajectory coordinates, characterized by, The method is applied to a wearable device and comprises the following steps: displaying a first trajectory, coordinate points of the first trajectory being stored in a first queue; when it is detected that a user returns along the first trajectory, displaying a second trajectory, the second trajectory being a return trajectory formed when the user returns along the first trajectory, coordinate points of the second trajectory being stored in the first queue, the first queue including first indication information, the first indication information being used to distinguish the coordinate points of the first trajectory from the coordinate points of the second trajectory.
2. The method of claim 1, wherein, The first indication information includes N first identifiers, the first identifiers being identifiers of the first trajectory, the N first identifiers corresponding to N coordinate points one by one, the N coordinate points being all coordinate points of the first trajectory or the last N coordinate points of the first trajectory, N being a positive integer.
3. The method of claim 1, wherein, The first indication information includes M second identifiers, the second identifiers being identifiers of the second trajectory, the M second identifiers corresponding to M coordinate points one by one, the M coordinate points being all coordinate points of the second trajectory or the first M coordinate points of the second trajectory, M being a positive integer.
4. The method of claim 1, wherein, The first indication information includes P third identifiers, the third identifiers being identifiers of critical points, the P third identifiers corresponding to P coordinate points one by one, the P coordinate points including P critical coordinate points of the first trajectory and the second trajectory, P being a positive integer.
5. The method of claim 1, wherein, The first indication information is a first identifier, the first identifier being located between the last coordinate point of the first trajectory and the first coordinate point of the second trajectory.
6. The method according to any one of claims 2-4, characterized in that, The method further comprises the following steps: when the number of coordinate points in the first queue reaches the upper limit of storage of the first queue, performing reduction on the coordinate points in the first queue, wherein the coordinate points corresponding to the first indication information are prohibited from being deleted.
7. The method of claim 5, wherein, The method further comprises the following steps: when the number of coordinate points in the first queue reaches the upper limit of storage of the first queue, performing reduction on the coordinate points in the first queue, wherein the first indication information is prohibited from being deleted.
8. The method according to any one of claims 1 to 7, characterized in that, The method further comprises the following steps: when the number of coordinate points in the first queue reaches the upper limit of storage of the first queue, performing reduction on the coordinate points in the first queue; if the coordinate points of the first trajectory are reduced, redrawing the first trajectory; if the coordinate points of the second trajectory are reduced, redrawing the second trajectory.
9. The method of claim 8, wherein, The reduction on the coordinate points in the first queue comprises the following steps: deleting at least one of inflection point coordinates, straight coordinates and dense coordinates in the first queue.
10. The method according to any one of claims 1 to 9, characterized in that, The method further comprises the following steps: determining that the user stops returning along the first trajectory and no instruction of ending movement is received; displaying a third trajectory, the third trajectory being a trajectory formed by merging the second trajectory and the first trajectory.
11. The method of claim 10, wherein: before the second trajectory and the first trajectory are merged into the third trajectory, the second trajectory and the first trajectory have different display modes; after the second trajectory and the first trajectory are merged into the third trajectory, the first trajectory and the second trajectory have the same display mode.
12. The method according to claim 10 or 11, characterized in that, The third trajectory is displayed, including: canceling the first indication information; According to all coordinate points in the first queue, a third trajectory is displayed.
13. The method according to any one of claims 10-12, characterized in that, The method further comprises: When it is detected that the user returns along the third trajectory, a fourth trajectory is displayed, the fourth trajectory being a return trajectory formed when the user returns along the third trajectory, coordinate points of the fourth trajectory being stored in the first queue, the first queue including second indication information, the second indication information being used to distinguish the coordinate points of the fourth trajectory from the coordinate points of the third trajectory.
14. The method according to any one of claims 1 to 9, characterized in that, The method further comprises: determining to stop returning along the first trajectory and receiving an instruction to end the movement; According to the coordinate points in the first queue, a movement record is generated, the movement record including the second trajectory and the first trajectory.
15. The method according to claim 10 or 14, characterized in that, The determination to stop returning along the first trajectory comprises one or more of: receiving a user operation for indicating to stop returning along the first trajectory; determining that the user has returned to the starting point; determining that the user deviates from the first trajectory; determining that the duration of the user's return along the first trajectory has reached a first preset duration; determining that the movement distance of the user's return along the first trajectory has reached a first preset distance.
16. The method of claim 15, wherein, The receiving of the user operation for indicating to stop returning along the first trajectory comprises: determining that a first call condition is met, displaying a first button for triggering the stop returning along the first trajectory, and receiving a user operation on the first button. The determination that the first call condition is met comprises one or more of:
17. The method of claim 16, wherein, receiving a first call operation for calling the first button; determining that the distance between the user and the starting point of the first trajectory is less than a second preset distance; determining that the user deviates from the first trajectory; determining that the duration of the user's return along the first trajectory has reached or will reach a second preset duration; determining that the movement distance of the user's return along the first trajectory has reached or will reach a third preset distance. The detection that the user returns along the first trajectory comprises one or more of:
18. The method according to any one of claims 1 to 17, characterized in that, receiving a user operation for indicating to return along the first trajectory; determining that the user turns around at the end point of the first trajectory and the turning distance is greater than a fourth preset distance; determining that the user historically returns along the first trajectory; determining that the duration of the user's movement reaches a third preset duration; determining that the movement distance of the user reaches a fifth preset distance. The receiving of the user operation for indicating to return along the first trajectory comprises:
19. The method of claim 18, wherein, determining that a second call condition is met, displaying a second button for triggering the return along the first trajectory, and receiving a user operation on the second button. The determination that the second call condition is met comprises one or more of: receiving a second call operation for calling the second button; 20. The method of claim 19, wherein, determining that the user turns around at the end point of the first trajectory; determining that the user turns around at the end point of the first trajectory and the turning distance is greater than a sixth preset distance; determining that the user historically returned on the first trajectory from an end point of the first trajectory, and a distance between a current location of the user and the end point is less than a seventh preset distance; determining that a motion duration of the user reaches or is about to reach a fourth preset duration; determining that a motion distance of the user reaches or is about to reach an eighth preset distance.
21. The method of any one of claims 1-20, wherein, The wearable device is a watch or a bracelet.
22. A wearable device, comprising: comprising: a processor, a memory, and one or more programs; wherein the one or more programs are stored in the memory and comprise instructions which, when executed by the processor, cause the wearable device to perform the method steps of any one of claims 1-21.
23. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program which, when executed on a computer, causes the computer to perform the method of any one of claims 1-21.
24. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed on a computer, causes the computer to perform the method of any one of claims 1-21.