A motion trajectory processing method, medium, device and equipment

Through the method of sharing the center position and cluster intersection set, the problems of low efficiency of motion trajectory data processing and insufficient privacy protection in the prior art are solved, and the motion route recommendation for efficient processing and privacy protection are achieved.

CN112989220BActive Publication Date: 2025-02-14HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201911283885.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-13
Publication Date
2025-02-14
Estimated Expiration
2039-12-13

AI Technical Summary

Technical Problem

When recommending a motion route, it is difficult to efficiently process and store motion trajectory data of multiple users, and it is impossible to effectively protect user privacy.

Method used

By obtaining the set of motion trajectories, the motion route elements are determined, including the center position and the set of intersections. The center location is shared by multiple grids, and the set of intersections reduces storage and processing costs through clustering and relative coordinate transformations, and improves privacy.

Benefits of technology

It reduces the storage and processing costs of motion trajectories, improves processing efficiency, and protects user privacy through relative coordinate conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112989220B_ABST
    Figure CN112989220B_ABST
Patent Text Reader

Abstract

The present application relates to a motion trajectory processing method, comprising: obtaining a motion trajectory set, wherein the motion trajectory set includes multiple motion trajectories; and determining motion route elements according to the motion trajectory set, wherein the motion route elements include at least one of a center position and an intersection set, wherein the center position is shared by multiple grids and the motion trajectory set is contained within the geographical range of the multiple grids; wherein the intersection set includes multiple intersections associated with multiple trajectory segment clusters, wherein each of the multiple trajectory segment clusters includes multiple trajectory segments of multiple motion trajectories, and the spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories in the multiple motion trajectories. In the present application, determining the center position and / or intersection set of multiple motion trajectories can reduce the storage and processing costs of the motion trajectories and improve the processing efficiency of the motion trajectories.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present application generally relate to the field of artificial intelligence, and specifically to a motion trajectory processing method, medium, device, and equipment. Background Art

[0002] In the prior art, when recommending a movement route, a mobile terminal is usually used to collect multiple movement trajectory data of multiple users, and these movement trajectory data including multiple GPS coordinate points are sent to the cloud-side server through the network. The server directly stores these movement trajectory data as a movement route, or uses a centroid algorithm of a regular trajectory shape to store the movement trajectory data and the GPS coordinates of the centroid as a movement route. Finally, when other users request a movement route, the cloud-side database is searched for a movement route close to the requesting user according to the GPS coordinates of the requesting user, and the route is returned to the requesting user. Summary of the invention

[0003] The present application is introduced below from multiple aspects, and the implementation methods and beneficial effects of the following multiple aspects can be referenced to each other.

[0004] In a first aspect, an embodiment of the present application provides a motion trajectory processing method, the method comprising: obtaining a motion trajectory set, wherein the motion trajectory set includes multiple motion trajectories; and determining a motion route element according to the motion trajectory set, wherein the motion route element includes at least one of a center position and an intersection set, wherein the center position is shared by multiple grids and the motion trajectory set is contained within the geographical range of the multiple grids; wherein the intersection set includes multiple intersections associated with multiple trajectory segment clusters, wherein each trajectory segment cluster in the multiple trajectory segment clusters includes multiple trajectory segments of multiple motion trajectories, and a spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories in the multiple motion trajectories.

[0005] According to an embodiment of the present application, compared with directly storing and processing multiple motion trajectories, by clustering multiple trajectory segments of the user's multiple motion trajectories and obtaining multiple intersection points related to the multiple trajectory segment clusters as elements of the running route extracted from the user's multiple motion trajectories, the storage and processing costs of the motion trajectories can be reduced and the processing efficiency of the motion trajectories can be improved; compared with making each grid correspond to a central position, making multiple grids share a central position can also reduce the storage and processing costs of the motion trajectories and improve the processing efficiency of the motion trajectories.

[0006] In some embodiments, the motion route element further includes: a Geohash code corresponding to each grid in the plurality of grids, used to index the geographic range corresponding to each grid.

[0007] According to an embodiment of the present application, by using geohash code values ​​of multiple grids to index the movement route, the retrieval efficiency of the movement route can be improved.

[0008] In some embodiments, the Geohash encoding includes at least 7 Base32 encoded characters.

[0009] In some embodiments, the motion route element further includes: an intersection link table indicating a link relationship between each of the plurality of intersections and at least one other intersection of the plurality of intersections.

[0010] In some embodiments, the central location includes GPS coordinates of the central location, and each of the plurality of intersections includes relative coordinates in a relative coordinate system with the central location as an origin.

[0011] According to some embodiments of the present application, by taking the center position as the origin and performing relative coordinate transformation on each intersection of the motion route, the user's privacy can be protected and sensitive data related to the user can be eliminated.

[0012] In some embodiments, the motion route elements are determined based on the motion trajectory set, including: selecting the easternmost, southernmost, westernmost, and northernmost four intersections from multiple intersections; determining the geographical range of multiple grids based on the four intersections, and determining the center point of the geographical range as the center position.

[0013] In some embodiments, determining the motion route element according to the motion trajectory set includes: dividing each motion trajectory in the motion trajectory set into a plurality of trajectory segments; clustering a plurality of trajectory segments whose spacing between adjacent trajectory segments is less than a predetermined value into one of a plurality of trajectory segment clusters;

[0014] In some embodiments, based on multiple trajectory segments in each trajectory segment cluster in the multiple trajectory clusters, a cluster vector corresponding to each trajectory segment cluster is determined to form multiple cluster vectors corresponding to the multiple trajectory segment clusters; and intersection points between adjacent cluster vectors in the multiple cluster vectors are determined.

[0015] In some embodiments, the starting coordinate of the cluster vector is the average of the starting coordinates of the multiple track segments in the track segment cluster, and the ending coordinate of the cluster vector is the average of the ending coordinates of the multiple track segments in the track segment cluster.

[0016] In a second aspect, an embodiment of the present application provides a motion trajectory processing method, the method comprising: obtaining multiple current motion trajectory intersections related to a current motion trajectory set and multiple historical motion trajectory intersections related to a historical motion trajectory set; and determining whether to retain at least one current motion trajectory intersection among the multiple current motion trajectory intersections and / or at least one historical motion trajectory intersection among the multiple historical motion trajectory intersections based at least in part on the abnormal segment deviation, thereby obtaining an optimized motion route, wherein the abnormal segment deviation at least in part specifies the proportion of abnormal trajectory segments in multiple trajectory segments of the multiple motion trajectories of the current motion trajectory set, wherein the abnormal trajectory segment is beyond a first predetermined value from at least one class center of the multiple trajectory segments.

[0017] According to an embodiment of the present application, when fusing the current motion trajectory set and the historical motion trajectory set, the abnormal segment deviation of the current motion trajectory set is taken into consideration, and the abnormal segment deviation is related to the GPS signal quality when the multiple motion trajectories in the current motion trajectory set are generated. Therefore, using the abnormal segment deviation of the current motion trajectory set to determine whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points can more accurately control the fusion error and improve the fusion quality.

[0018] In some embodiments, the current movement trajectory set and the historical movement trajectory set are contained within the same geographical range.

[0019] In some embodiments, determining whether to retain at least one current motion trajectory intersection among multiple current motion trajectory intersections and / or at least one historical motion trajectory intersection among multiple historical motion trajectory intersections includes using an LSTM (Long short-term memory) model to determine whether to retain at least one current motion trajectory intersection among multiple current motion trajectory intersections and / or at least one historical motion trajectory intersection among multiple historical motion trajectory intersections.

[0020] In some embodiments, determining whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points further includes: using an LSTM model, calculating a forget gate for determining whether to retain at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points according to the following formula:

[0021] f t =σ(W f ·[h t-1 ,X t ]+b f )

[0022] b f=1+b m

[0023] Among them, f t represents the forget gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, and W f represents the weight matrix of the forget gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] means to set h t-1 and X t The long vector formed by concatenation, b f represents the bias value of the forget gate, b m Indicates abnormal segment deviation.

[0024] In some embodiments, determining whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points further includes, using an LSTM model, calculating an input gate for determining whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points according to the following formula:

[0025] i t =σ(W i ·[h t-1 ,X t ]+b i )

[0026] Among them, i t represents the input gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, and W i represents the weight matrix of the input gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] means to set h t-1 and X t The long vector formed by concatenation, b i Represents the bias value of the input gate.

[0027] In some embodiments, determining whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points further includes, using an LSTM model, determining whether to output at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points according to the following formula, thereby obtaining an optimized motion route:

[0028]

[0029]

[0030] o t =σ(W o ·[h t-1 ,X t ]+b o )

[0031] h t =o t tanh(C t )

[0032] Among them, X t represents the input of the neuron at the tth moment of the LSTM model and includes multiple current motion trajectory intersections, h t-1 Represents the output of the neuron at the t-1th moment of the LSTM model and includes multiple historical motion trajectory intersections, represents the input cell state of the neuron at the tth moment of the LSTM model, W c The weight matrix representing the input cell state of the neuron at the tth moment of the LSTM model, b c Represents the bias value of the input cell state of the neuron at the tth moment of the LSTM model, C t represents the cell state of the neuron at the tth moment of the LSTM model, C t-1 represents the cell state of the neuron at the t-1th moment of the LSTM model, f t Represents the forget gate of the neuron at the tth moment of the LSTM model, i t Represents the input gate of the neuron at the tth moment of the LSTM model, o t Represents the output gate of the neuron at the tth moment of the LSTM model, W o represents the weight matrix of the output gate, b o Represents the bias value of the output gate, h t Represents the output of the neuron at the t-th moment of the LSTM model and may include multiple intersections of the optimized motion path.

[0033] In some embodiments, the method further includes selecting four easternmost, southernmost, westernmost, and northernmost intersection points from among the plurality of intersection points of the optimized motion route;

[0034] A geographical range including the optimized motion route is determined according to the four intersection points, and a center point of the geographical range is determined as a center position of the optimized motion route.

[0035] In some embodiments, the method further includes determining a plurality of rasters of a geographic range and geohash code values ​​for the plurality of rasters, wherein the plurality of rasters share a central location.

[0036] According to an embodiment of the present application, compared with making each grid correspond to a central position, making multiple grids share a central position can reduce the storage and processing costs of the optimized motion route and improve the processing efficiency of the optimized motion route; in addition, by using the geohash encoding values ​​of multiple grids to index the optimized motion route, the retrieval efficiency of the optimized motion route can be improved.

[0037] In some embodiments, the central position includes GPS coordinates of the central position, and each of the plurality of intersections of the optimized motion route includes relative coordinates in a relative coordinate system with the central position as the origin.

[0038] According to an embodiment of the present application, by taking the center position as the origin and performing relative coordinate transformation on each intersection of the optimized motion route, the user's privacy can be protected and sensitive data related to the user can be eliminated.

[0039] In some embodiments, the method further includes: clustering the centers of the plurality of trajectory segments and obtaining at least one cluster center of the plurality of trajectory segments.

[0040] In a third aspect, an embodiment of the present application provides a method for recommending a sports route, the method comprising: receiving a user's request for recommending a sports route; obtaining the user's GPS coordinates, and calculating the geohash code value of the user's GPS (Global Positioning System) coordinates; querying the grid geohash code value with the smallest difference from the geohash code value of the user's GPS coordinates from multiple grid geohash code values; obtaining the sports route corresponding to the grid geohash code value with the smallest difference from the geohash code value of the user's GPS coordinates and the center position of the sports route, wherein the center position is shared by multiple grids in the geographical range that includes the sports route; and recommending a sports route to the user based on the center position.

[0041] According to an embodiment of the present application, compared with making each grid correspond to a central position, making multiple grids share a central position can reduce the storage and processing costs of the motion route and improve the processing efficiency of the motion route; in addition, by using the geohash encoding values ​​of multiple grids to index the motion route, the retrieval efficiency of the motion route can be improved.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a machine, the machine executes any one of the above methods.

[0043] In a fifth aspect, an embodiment of the present application provides a motion route processing device, which includes: a processor; a memory, in which instructions are stored, and when the instructions are executed by the processor, the processor executes any one of the above methods.

[0044] In a sixth aspect, an embodiment of the present application provides a motion trajectory processing device, the device comprising a motion trajectory recording module for obtaining a motion trajectory set, wherein the motion trajectory set includes multiple motion trajectories; and a motion route extraction module for determining motion route elements based on the motion trajectory set, wherein the motion route elements include at least one of a center position and an intersection set, wherein the center position is shared by multiple grids and the motion trajectory set is contained within the geographical range of the multiple grids; and wherein the intersection set includes multiple intersections associated with multiple trajectory segment clusters, wherein each trajectory segment cluster in the multiple trajectory segment clusters includes multiple trajectory segments of multiple motion trajectories, and the spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories in the multiple motion trajectories.

[0045] According to an embodiment of the present application, compared with directly storing and processing multiple motion trajectories, by clustering multiple trajectory segments of the user's multiple motion trajectories and obtaining multiple intersection points related to the multiple trajectory segment clusters as elements of the user's multiple motion trajectories, the storage and processing costs of the motion trajectories can be reduced and the processing efficiency of the motion trajectories can be improved; compared with making each grid correspond to a central position, making multiple grids share a central position can also reduce the storage and processing costs of the motion trajectories and improve the processing efficiency of the motion trajectories.

[0046] In some embodiments, the motion route element further includes: a Geohash code corresponding to each grid in the plurality of grids, used to index the geographic range corresponding to each grid.

[0047] According to an embodiment of the present application, by using geohash code values ​​of multiple grids to index the movement route, the retrieval efficiency of the movement route can be improved.

[0048] In some embodiments, the Geohash encoding includes at least 7 Base32 encoded characters.

[0049] In some embodiments, the motion route element further includes: an intersection link table indicating a link relationship between each of the plurality of intersections and at least one other intersection of the plurality of intersections.

[0050] In some embodiments, the motion route extraction module is further used to determine the relative coordinates of each of the multiple intersections in a relative coordinate system with the center position as the origin.

[0051] According to some embodiments of the present application, by taking the center position as the origin and performing relative coordinate transformation on each intersection of the motion route, the user's privacy can be protected and sensitive data related to the user can be eliminated.

[0052] In some embodiments, the motion route extraction module is used to determine the motion route elements based on the motion trajectory set, including: selecting the easternmost, southernmost, westernmost, and northernmost four intersections from multiple intersections; determining the geographical range of multiple grids based on the four intersections, and determining the center point of the geographical range as the center position.

[0053] In some embodiments, a motion route extraction module is used to determine motion route elements based on a motion trajectory set, including: dividing each motion trajectory in the motion trajectory set into multiple trajectory segments; clustering multiple trajectory segments whose spacing between adjacent trajectory segments is less than a predetermined value into one trajectory segment cluster among multiple trajectory segment clusters; determining a cluster vector corresponding to each trajectory segment cluster based on multiple trajectory segments in each trajectory segment cluster in the multiple trajectory clusters to form multiple cluster vectors corresponding to the multiple trajectory segment clusters; and determining intersection points between adjacent cluster vectors in the multiple cluster vectors.

[0054] In some embodiments, the starting coordinate of the cluster vector is the average of the starting coordinates of the multiple track segments in the track segment cluster, and the ending coordinate of the cluster vector is the average of the ending coordinates of the multiple track segments in the track segment cluster.

[0055] In a seventh aspect, an embodiment of the present application provides a motion trajectory processing device, the device comprising: a motion route extraction module, used to obtain multiple current motion trajectory intersections related to a current motion trajectory set and multiple historical motion trajectory intersections related to a historical motion trajectory set; and a motion route optimization module, which determines whether to retain at least one current motion trajectory intersection among multiple current motion trajectory intersections and / or at least one historical motion trajectory intersection among multiple historical motion trajectory intersections based at least in part on the abnormal segment deviation, thereby obtaining an optimized motion route; wherein the abnormal segment deviation at least in part specifies the proportion of abnormal trajectory segments in multiple trajectory segments of multiple motion trajectories in the current motion trajectory set, wherein the abnormal trajectory segment is beyond a first predetermined value from at least one class center of the multiple trajectory segments.

[0056] According to an embodiment of the present application, when fusing the current motion trajectory set and the historical motion trajectory set, the abnormal segment deviation of the current motion trajectory set is taken into consideration, and the abnormal segment deviation is related to the GPS signal quality when the multiple motion trajectories in the current motion trajectory set are generated. Therefore, using the abnormal segment deviation of the current motion trajectory set to decide whether to discard multiple historical motion trajectory intersections can more accurately control the fusion error and improve the fusion quality.

[0057] In some embodiments, the current movement trajectory set and the historical movement trajectory set are contained within the same geographical range.

[0058] In some embodiments, the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection among multiple current motion trajectory intersections and / or at least one historical motion trajectory intersection among multiple historical motion trajectory intersections, including using an LSTM (Long short-term memory) model to determine whether to retain at least one current motion trajectory intersection among multiple current motion trajectory intersections and / or at least one historical motion trajectory intersection among multiple historical motion trajectory intersections.

[0059] In some embodiments, the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points, and further includes: using an LSTM model, calculating a forget gate for determining whether to retain at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points according to the following formula:

[0060] f t =σ(W f ·[h t-1 ,X t ]+b f )

[0061] bf =1+b m

[0062] Among them, f t represents the forget gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, and W f represents the weight matrix of the forget gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] means to set h t-1 and X t The long vector formed by concatenation, b f represents the bias value of the forget gate, b m Indicates abnormal segment deviation.

[0063] In some embodiments, the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points, and further includes: using an LSTM model, calculating an input gate for determining whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points according to the following formula:

[0064] i t =σ(W i ·[h t-1 ,X t ]+b i )

[0065] Among them, i t represents the input gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, and W i represents the weight matrix of the input gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] means to set h t-1 and X t The long vector formed by concatenation, b i Represents the bias value of the input gate.

[0066] In some embodiments, the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points, and further includes: using an LSTM model, according to the following formula, to determine whether to output at least one current motion trajectory intersection point among multiple current motion trajectory intersection points and at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points, thereby obtaining an optimized motion route:

[0067]

[0068]

[0069] o t =σ(W o ·[h t-1 ,X t ]+b o )

[0070] h t =o t tanh(C t )

[0071] Among them, X t represents the input of the neuron at the tth moment of the LSTM model and includes multiple current motion trajectory intersections, h t-1 Represents the output of the neuron at the t-1th moment of the LSTM model and includes multiple historical motion trajectory intersections, represents the input cell state of the neuron at the tth moment of the LSTM model, W c The weight matrix representing the input cell state of the neuron at the tth moment of the LSTM model, b c Represents the bias value of the input cell state of the neuron at the tth moment of the LSTM model, C t represents the cell state of the neuron at the tth moment of the LSTM model, C t-1 represents the cell state of the neuron at the t-1th moment of the LSTM model, f t Represents the forget gate of the neuron at the tth moment of the LSTM model, i t Represents the input gate of the neuron at the tth moment of the LSTM model, o t Represents the output gate of the neuron at the tth moment of the LSTM model, W o represents the weight matrix of the output gate, b o Represents the bias value of the output gate, h t Represents the output of the neuron at the t-th moment of the LSTM model and may include multiple intersections of the optimized motion path.

[0072] In some embodiments, the motion route extraction module is also used to select the easternmost, southernmost, westernmost, and northernmost four intersection points from multiple intersection points of the optimized motion route; determine the geographical range including the motion route based on the four intersection points, and determine the center point of the geographical range as the center position of the optimized motion route.

[0073] In some embodiments, the movement route extraction module is further used to determine a plurality of grids of a geographic range and geohash code values ​​of the plurality of grids, wherein the plurality of grids share a central position.

[0074] According to an embodiment of the present application, compared with making each grid correspond to a central position, making multiple grids share a central position can reduce the storage and processing costs of the motion route and improve the processing efficiency of the motion route; in addition, by using the geohash encoding values ​​of multiple grids to index the motion route, the retrieval efficiency of the motion route can be improved.

[0075] In some embodiments, the motion route extraction module is further used to determine the relative coordinates of each of the multiple intersection points of the optimized motion route in a relative coordinate system with the center position as the origin.

[0076] According to an embodiment of the present application, by taking the center position as the origin and performing relative coordinate transformation on each intersection of the motion route, the user's privacy can be protected and sensitive data related to the user can be eliminated.

[0077] In some embodiments, the motion route extraction module is further configured to:

[0078] The centers of the plurality of trajectory segments are clustered and at least one cluster center of the plurality of trajectory segments is obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 A schematic diagram of a scenario in which a user's motion trajectory is recorded by a terminal device according to an embodiment of the present application is shown;

[0080] Figure 2 A schematic diagram of the structure of a terminal device 100 according to an embodiment of the present application is shown;

[0081] Figure 3 A schematic diagram of trajectory segmentation and clustering during motion route extraction according to an embodiment of the present application is shown;

[0082] Figure 4 A schematic diagram showing a bidirectional linked list of intersections of movement routes according to an embodiment of the present application;

[0083] Figure 5 A schematic diagram showing geohash encoding of a movement route according to an embodiment of the present application is shown;

[0084] Figure 6 A schematic diagram of a model of a long short-term memory network according to an embodiment of the present application is shown;

[0085] Figure 7 A schematic diagram of a flow chart of a method for extracting a motion route according to an embodiment of the present application is shown;

[0086] Figure 8 A schematic diagram of a flow chart of a method for optimizing a motion route according to an embodiment of the present application is shown;

[0087] Fig. 9 A schematic diagram showing a flow chart of a method for recommending a sports route according to an embodiment of the present application;

[0088] Fig.10 A schematic structural diagram of a motion route processing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0089] The present application is further described below in conjunction with specific embodiments and accompanying drawings. The specific embodiments described herein are only for explaining the present application, rather than limiting the present application. In addition, for ease of description, only some but not all structures or processes related to the present application are shown in the accompanying drawings. It should be noted that in this specification, similar reference numerals and letters represent similar items in the following accompanying drawings, and therefore, once an item is defined in an accompanying drawing, it does not need to be further defined and explained in subsequent accompanying drawings.

[0090] Figure 1 A schematic diagram of a scenario in which a user's motion trajectory is recorded by a terminal device according to an embodiment of the present application is shown, wherein the terminal device, for example Figure 2 The terminal device 100 in the embodiment may include, but is not limited to, portable or mobile devices, mobile phones, personal digital assistants, cellular phones, handheld PCs, portable media players, handheld devices, wearable devices (e.g., watches, bracelets, display glasses or goggles, head-mounted displays, head-mounted devices), navigation devices, servers, network devices, graphics devices, video game devices, set-top boxes, laptop devices, virtual reality and / or augmented reality devices, Internet of Things devices, industrial control devices, in-vehicle infotainment devices, streaming client devices, e-books, reading devices, POS machines, and other devices. Figure 1 As shown, during the user's exercise (e.g., but not limited to, running, brisk walking, etc.) along a sports venue (e.g., but not limited to, a playground, a park, a community, a square, a road or other venues), the terminal device, such as Figure 2The terminal device 100 in the embodiment can determine the GPS (global positioning system) coordinates of the user in real time according to the received satellite signals, thereby recording the movement trajectory of the user in real time.

[0091] Figure 2 A schematic diagram of the structure of a terminal device 100 according to an embodiment of the present application is shown. Figure 2 As shown, the terminal device 100 may include, but is not limited to, a GPS positioning module 110, a motion track recording module 120, a data center 130, a motion route extraction module 140, a motion route optimization module 150, and a motion route recommendation module 160. Among them, one or more components of the terminal device 100 (for example, one or more of the GPS positioning module 110, the motion track recording module 120, the data center 130, the motion route extraction module 140, the motion route optimization module 150, and the motion route recommendation module 160) can be composed of any combination of application-specific integrated circuits (ASICs), electronic circuits, (shared, dedicated or group) processors and / or memories that execute one or more software or firmware programs, combinational logic circuits, and other suitable components that provide the described functions. According to one aspect, the processor can be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. According to another aspect, the processor can be a single-core processor, a multi-core processor, etc., and / or any combination thereof.

[0092] It should be noted that although Figure 2 It is shown that the motion route extraction module 140, the motion route optimization module 150 and the motion route recommendation module 160 are all located on the terminal device 100 on the user side, but one or more of the motion route extraction module 140, the motion route optimization module 150 and the motion route recommendation module 160 can be located on other devices, such as, but not limited to, cloud-side servers. Therefore, in the embodiments of the present application, the terminal device 100 and the cloud-side server are collectively referred to as motion trajectory processing devices. In addition, although Figure 2 It is shown that the motion trajectory recording module 120 and the motion route extraction module 140, the motion route optimization module 150 and the motion route recommendation module 160 are independent modules, but one or more of the motion route extraction module 140, the motion route optimization module 150 and the motion route recommendation module 160 can also be used as part of the motion trajectory recording module 120.

[0093] According to some embodiments of the present application, the GPS positioning module 110 is used to determine the GPS coordinates of the user (or terminal device 100) based on the received satellite signals, and the motion trajectory recording module 120 is used to record the user's motion trajectory during the user's exercise. Specifically, the sports APP can obtain the user's GPS coordinates from the GPS positioning module 110 at a certain frequency (i.e., the marking frequency). The GPS coordinates and the corresponding time will constitute a trajectory point. A motion trajectory may include multiple trajectory points.

[0094] According to some embodiments of the present application, the motion trajectory recorded by the motion trajectory recording module 120 can be saved in the data center 130, which may include, but is not limited to, a non-transient tangible arrangement of items manufactured or formed by a machine or equipment, including storage media, such as a hard disk or any other type of disk, including a floppy disk, an optical disk, a compact disk read-only memory (CD-ROM), a compact disk rewritable (CD-RW), and a magneto-optical disk; semiconductor devices, such as read-only memory (ROM), random access memory (RAM) such as dynamic random access memory (DRAM) and static random access memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); a magnetic card or an optical card; or any other type of medium suitable for storing data.

[0095] According to some embodiments of the present application, the motion route extraction module 140 is used to extract a simplified motion route from multiple motion trajectories generated by the user within a period of time (for example, one day, three days, one week, two weeks, one month or other time period) in the same geographical range (for example, the same sports venue) recorded by the motion trajectory recording module 120 according to the motion route model. Examples of multiple motion trajectories may include, but are not limited to, motion trajectories generated by the user today, yesterday, and the day before yesterday, or multiple motion trajectories obtained by segmenting the motion trajectories generated by the user in one exercise, for example, multiple motion trajectories obtained by segmenting the motion trajectories generated by the user running multiple laps along the sports venue according to each lap. The motion route model may include, but is not limited to, a set of multiple intersections constituting the motion route, the set of intersections including multiple intersections associated with multiple trajectory segment clusters, wherein each of the multiple trajectory segment clusters includes multiple trajectory segments of the motion trajectory, and the spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different running trajectories in the multiple running trajectories.

[0096] According to some embodiments of the present application, the movement route optimization module 150 is used to fuse the intersection of the current movement route and at least one historical movement route within the same geographical range (for example, the same sports venue) based on the recurrent neural network 151 to obtain an optimized movement route within the geographical range, and store it as a default movement route within the geographical range in the data center 130. The current movement route refers to a movement route extracted by the movement route extraction module 140 from a current movement track set generated by the user in a current time period (for example, one day, three days, one week, two weeks, one month or other time period), and each historical movement route in the at least one historical movement route refers to a movement route extracted by the movement route extraction module 140 from a historical movement track set generated by the user in a historical time period before the current time period (for example, one day, three days, one week, two weeks, one month or other time period). Among them, the recurrent neural network 151 is a type of deep learning network with memory ability. The output of a neuron of the recurrent neural network 151 is not only related to the input of the neuron, but also related to the output of the previous neuron. Examples of the recurrent neural network 151 may include, but are not limited to, LSTM (long short-term memory) networks and GRU (gated recurrent unit) networks. In one example, each neuron of the recurrent neural network 151 may be related to the movement routes at different times. Among them, the fusion includes using the recurrent neural network 151 to determine which intersections of the current movement route and each historical movement route can be retained to form an optimized movement route, so the optimized movement route includes the current movement route and one or more intersections of each historical movement route. Among them, the generating user of the current movement route and the generating user of each historical movement route may be the same or different. In different cases, the terminal device 100 may, for example, obtain the movement routes of other users in the same geographical range from the server through the network.

[0097] According to some embodiments of the present application, the exercise route recommendation module 160 is used to receive a user's request for an exercise route recommendation, obtain the user's GPS coordinates, and recommend an exercise route close to the user based on the user's GPS coordinates.

[0098] The following will refer to Figure 2 , further describing the functions of the motion route extraction module 140, the motion route optimization module 150 and the motion route recommendation module 160 of the terminal device 100.

[0099] like Figure 2As shown, the motion route extraction module 140 may include, but is not limited to, a trajectory segmentation unit 141, a trajectory clustering unit 142, a trajectory extraction unit 143, and a model element determination unit 144. Among them, one or more components of the motion route extraction module 140 (for example, one or more of the trajectory segmentation unit 141, the trajectory clustering unit 142, the trajectory extraction unit 143, and the model element determination unit 144) may be composed of any combination of application-specific integrated circuits (ASICs), electronic circuits, (shared, dedicated, or group) processors and / or memories that execute one or more software or firmware programs, combinational logic circuits, and other suitable components that provide the described functions. According to one aspect, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.

[0100] According to some embodiments of the present application, the trajectory segmentation unit 141 may be configured to obtain a plurality of motion trajectories recorded by the motion trajectory recording module 120 from the data center 130 , and segment each motion trajectory into a plurality of trajectory segments.

[0101] Specifically, each motion trajectory can be expressed as

[0102]

[0103] Among them, TR m represents the mth motion trajectory, n m represents the number of trajectory points included in the mth motion trajectory, represents the i-th trajectory point of the m-th motion trajectory, represents the GPS coordinates of the ith track point of the mth motion track, Indicates the time corresponding to the GPS coordinates of the ith track point of the mth motion track.

[0104] For each motion trajectory, the trajectory segmentation unit 141 can represent two trajectory points that are adjacent in time as a trajectory segment, where the direction of the trajectory segment is from the trajectory point with an earlier time (i.e., the starting trajectory point) to the trajectory point with a later time (i.e., the ending trajectory point), and the size of the trajectory segment is the distance between the two trajectory points. Figure 3 An example of three motion trajectories TR1 to TR3 is shown. It should be noted that the figure only shows a part of the motion trajectories TR1 to TR3, wherein each motion trajectory is divided into a plurality of trajectory segments.

[0105] According to some embodiments of the present application, the trajectory clustering unit 142 may cluster the trajectory segments of each motion trajectory into a plurality of trajectory segment clusters in sequence, wherein, within a trajectory segment cluster, the spacing between adjacent trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different running trajectories among the plurality of running trajectories. As an example, two trajectory segments are represented as ts i and ts j , where the trajectory segment ts i The starting point is s i , the end point is e i , trajectory segment ts j The starting point is s j , the end point is e j , then the trajectory segment ts can be calculated based on the following formula i and ts j Spacing between:

[0106]

[0107] d || =MIN(l ||1 , l ||2 ) Formula 3

[0108]

[0109] Among them, l ⊥1 Represents the trajectory segment ts j Starting point j To trajectory segment ts i The vertical distance, l ⊥2 Represents the trajectory segment ts j The end point j To trajectory segment ts i The vertical distance, l ||1 Represents the trajectory segment ts i Starting point i To trajectory segment ts j Starting point j In the trajectory segment ts i The distance of the projection point on ||2 Represents the trajectory segment ts i The end point i To trajectory segment ts j The end point j In the trajectory segment ts i The distance of the projection point on the trajectory segment ts i and ts j The spacing between.

[0110] For example, in Figure 3 In the example shown, Figure 2The trajectory clustering unit 142 may first determine a first trajectory segment cluster and a reference trajectory segment of the first trajectory segment cluster, Figure 2 The trajectory clustering unit 142 determines the trajectory segments that can be clustered with the reference trajectory segment in the trajectory segments of each motion trajectory. Figure 2 The trajectory clustering unit 142 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P11 of TR1, and determine the trajectory segment that can be clustered with the trajectory segment P11 of TR1 from other trajectory segments. Specifically, Figure 2 The trajectory clustering unit 142 may first determine that in the motion trajectories TR2-TR3, the distances between the trajectory segments P31 and P32 and the trajectory segment P11 of TR1 are less than a predetermined value and thus may be clustered with the trajectory segment P11 of TR1 as trajectory segments adjacent to the trajectory segment P11 of TR1; Figure 2 The trajectory clustering unit 142 can continue to determine that the distance between the trajectory segment P21 of TR2 and the trajectory segments P31 and P32 of TR3 is less than a predetermined value and can therefore be clustered with the trajectory segments P31 and P32 of TR3 as trajectory segments adjacent to the trajectory segments P31 and P32 of TR3. Then, ultimately, the trajectory clustering unit 142 can cluster the trajectory segment P11 of TR1, the trajectory segments P31 and P32 of TR3, and the trajectory segment P21 of TR2 into the first trajectory segment cluster.

[0111] In another example, Figure 2 The trajectory clustering unit 142 can determine the base trajectory segment of the first trajectory segment cluster as the trajectory segment P31 of TR3, and determine the trajectory segment that can be clustered with the trajectory segment P31 of TR3 from other trajectory segments. Specifically, the trajectory clustering unit 142 can determine that the distance between the trajectory segment P11 of TR1 and the trajectory segment P21 of TR2 and the trajectory segment P31 of TR3 is less than a predetermined value, so the trajectory segment P11 of TR1 and the trajectory segment P21 of TR2 can be clustered with the trajectory segment P31 of TR3 as the first trajectory segment cluster as the trajectory segment adjacent to the trajectory segment P31 of TR3. It should be noted that Figure 2 The trajectory clustering unit 142 may also determine other trajectory segments as reference trajectory segments of the first trajectory segment cluster.

[0112] Then, the trajectory clustering unit 142 may determine a second trajectory segment cluster and a reference trajectory segment of the second trajectory segment cluster. Figure 2 The trajectory clustering unit 142 may determine the reference trajectory segment of the second trajectory segment cluster as the trajectory segment P12 of TR1, and determine the trajectory segment that can be clustered with the trajectory segment P12 of TR1 from other trajectory segments. Specifically, Figure 2The trajectory clustering unit 142 can determine that the distance between the trajectory segment P33 of TR3 and the trajectory segment P12 of TR1 is less than a predetermined value and can therefore be clustered with the trajectory segment P12 of TR1 as a trajectory segment adjacent to the trajectory segment P12 of TR1, and the distance between the trajectory segment P22 of TR2 and the trajectory segment P33 of TR3 is less than a predetermined value and can therefore be clustered with the trajectory segment P33 of TR3 as a trajectory segment adjacent to the trajectory segment P33 of TR3, then finally, the trajectory clustering unit 142 can cluster the trajectory segment P12 of TR1, the trajectory segment P33 of TR3 and the trajectory segment P22 of TR2 into the second trajectory segment cluster. It should be noted that Figure 2 The trajectory clustering unit 142 may also determine other trajectory segments as reference trajectory segments of the second trajectory segment cluster.

[0113] And so on. Figure 2 The trajectory clustering unit 142 can determine other trajectory segment clusters of the motion trajectory. Figure 3 The motion trajectory shown can determine each trajectory segment cluster of the motion trajectory using a principle similar to the above.

[0114] According to some embodiments of the present application, for each trajectory segment cluster, the trajectory extraction unit 143 can calculate a cluster vector based on each trajectory segment in the cluster. As an example, the trajectory extraction unit 143 can use the mean of the GPS coordinates of the starting trajectory points of each trajectory segment in the trajectory segment cluster as the GPS coordinates of the starting point of the cluster vector, and use the mean of the GPS coordinates of the ending trajectory points of each trajectory segment as the GPS coordinates of the end point of the cluster vector. As another example, the trajectory extraction unit 143 can use any trajectory segment in the trajectory segment cluster as the cluster vector. It should be noted that the cluster vector can also be determined based on any other suitable method.

[0115] According to some embodiments of the present application, the trajectory clustering unit 142 is also used to determine abnormal trajectory segments, and determine the proportion of abnormal trajectory segments in all trajectory segments, that is, the abnormal segment deviation. Specifically, the trajectory clustering unit 142 can cluster the center points of each trajectory segment of multiple running trajectories through a hierarchical clustering algorithm, a K-means clustering algorithm, or other clustering algorithms, and obtain the categories of multiple trajectory segment center points and the class centers of each category. The trajectory clustering unit 142 can calculate the distance between the center point of each trajectory segment of the multiple running trajectories and each class center, and mark the trajectory segment whose minimum distance between its center point and each class center is greater than a predetermined value (the predetermined value is the same as or different from the predetermined value related to the spacing between trajectory segments mentioned above) as an abnormal trajectory segment. For example, in Figure 3 In the example of , the track segment P15 of TR1 and the track segment P35 of TR3 can be marked as abnormal track segments. In some cases, a higher abnormal segment deviation can indicate that the quality of the GPS signal during the movement is poor.

[0116] According to some embodiments of the present application, the model element determination unit 144 may be used to determine the model elements of the simplified motion route extracted from the motion trajectory according to the motion route model. Specifically, the motion route model may include a set of intersection points of adjacent cluster vectors of adjacent trajectory segment clusters. As an example, when the adjacent cluster vectors of adjacent trajectory segment clusters are not connected at the beginning and the end, the model element determination unit 144 may extend one or two of the adjacent cluster vectors to determine the GPS coordinates of the intersection between the adjacent cluster vectors; when the adjacent cluster vectors have intersected, the model element determination unit 144 may directly determine the GPS coordinates of the intersection between the adjacent cluster vectors. The motion route model may also include a starting point of the motion route and an end point of the motion route. The model element determination unit 144 may use the starting point of the cluster vector of the first trajectory segment cluster of the motion trajectory as the starting point of the motion route, and the end point of the cluster vector of the last trajectory segment cluster as the end point of the motion route. The motion route model may also include an intersection link table indicating the link relationship between each intersection in the intersection set of the cluster vectors and at least one other intersection, wherein the intersection set includes the starting point and the end point of the motion route. As an example, the model element determination unit 144 may determine: Figure 4 The bidirectional linked list between the intersections shown, where the starting point can be the starting point of the motion path, the intersection 1 can be the intersection point between the cluster vector of the first trajectory segment cluster of the motion trajectory and the cluster vector of the second trajectory segment cluster, the intersection 2 can be the intersection point between the cluster vector of the second trajectory segment cluster of the motion trajectory and the cluster vector of the third trajectory segment cluster, and so on, and the end point can be the end point of the motion path. In addition, Figure 4 Each intersection shown in may include the GPS coordinates of the intersection, a link to the previous intersection (e.g., but not limited to, a pointer), and a link to the next intersection (e.g., but not limited to, a pointer), while the starting point may include the GPS coordinates of the starting point, a link to the next intersection (e.g., but not limited to, a pointer), and the end point may include the GPS coordinates of the end point, a link to the previous intersection (e.g., but not limited to, a pointer). Figure 4 The bidirectional linked list shown enables the user to move along the forward direction of the motion route (for example, by Figure 4 The starting point shown is Figure 4 The end point shown in the figure) can also be moved in the reverse direction of the movement path (for example, by Figure 4 The end point shown is pointing to Figure 4 It should be noted that the model element determination unit 144 can also determine a one-way linked list between the intersection points, that is, Figure 4 Each intersection shown in may include the GPS coordinates of the intersection, a link to a previous intersection (eg, but not limited to, a pointer), or a link to a next intersection (eg, but not limited to, a pointer).

[0117] In order to improve the retrieval efficiency of movement routes when recommending movement routes to users, the movement route model can also include an index of the movement route, that is, the geohash code values ​​of multiple grids representing the geographical range of the movement route, where the geohash code is an address code that can encode two-dimensional latitude and longitude coordinates into a one-dimensional string, for example, a base32 encoded string, to improve the retrieval efficiency of the geographic location. Figure 5 Four grids representing the geographical range of the motion route and their geohash encoding values ​​are shown. As shown in the figure, the model element determination unit 144 can determine the minimum enclosing rectangle of the motion route, wherein two sides of the minimum enclosing rectangle are parallel to the latitude lines and are determined by the latitude coordinates of the southernmost and northernmost intersections in the set of intersections of the motion route, and the other two sides are parallel to the longitude lines and are determined by the longitude coordinates of the easternmost and westernmost intersections in the set of intersections of the motion route, and the model element determination unit 144 can use the center point of the minimum enclosing rectangle of the motion route as the center position of the motion route. For example, the GPS coordinates of the center position of the motion route shown in the figure are (121.623, 29.855).

[0118] like Figure 5 As shown, Figure 2 The model element determination unit 144 can divide the minimum circumscribed rectangle of the movement route into four grids with the center position as the center, and determine the geohash code value corresponding to the geographic range of each grid, wherein the number of bits of the geohash code value can be, for example, but not limited to, 7-bit base32 code, for example, Figure 5 As shown, the encoding values ​​of the four grids are wx4g340, wx4g341, wx4g342 and wx4g343 respectively.

[0119] It should be noted that Figure 5 This is just an example of a grid representing the geographical range of the movement route. The movement route formed by each intersection is not limited to Figure 5 The GPS coordinates of the center position of the movement route shown in the figure are not limited to the GPS coordinates shown in the figure.

[0120] In addition, in order to protect the privacy of the user, the motion route model may also include the GPS coordinates of the center position of the motion route, and the coordinates of each intersection of the motion route are relative coordinates relative to the center position. As an example, the model element determination unit 144 may construct a relative coordinate system with the above-mentioned center position as the origin, and convert the absolute GPS coordinates (e.g., longitude and latitude) of each intersection of the motion route into relative coordinates in the relative coordinate system, so that sensitive data related to the user can be eliminated.

[0121] The model element determination unit 144 may also store the elements of the simplified motion route extracted from the motion trajectory determined according to the motion route model in the data center 130 as candidate motion routes to be recommended to the user.

[0122] According to some embodiments of the present application, in order to further improve the quality of the recommended exercise route for the user, the exercise route optimization module 150 can fuse the intersection of the current exercise route and at least one historical exercise route within the same geographical range (for example, the same sports venue) based on the recurrent neural network 151 to obtain an optimized exercise route within the geographical range. Specifically, the fusion process of the current exercise route and at least one historical exercise route is described by taking the recurrent neural network 151 as an LSTM network as an example. Figure 6 A model diagram of the LSTM network is shown, Figure 6 As shown, the LSTM network may include multiple neurons A1 to A t Each neuron is associated with a movement route. For example, neuron A1 is associated with the movement route at the initial moment, and neuron A t-1 Related to the movement path at time t-1, neuron A t In relation to the motion route at the t-th moment (e.g., the current motion route), each neuron is arranged in sequence according to the generation time of each motion route (e.g., the time when the motion route extraction module 140 extracts the motion route from the motion trajectory set, or the time when the motion route extraction module 140 stores the extracted motion route in the data center 130). In the LSTM network, the fusion of the intersections of the motion routes is performed gradually over time.

[0123] like Figure 6 As shown, each neuron includes input and output, with neuron A t and neuron A t-1 For example, X t Represents neuron A t The input of neuron A t The intersection point set of the relevant motion path (e.g., the current motion path), h t Represents neuron A t The output of neuron A t The intersection point set of the determined optimized motion path, X t-1 Represents neuron A t-1 The input of neuron A t-1 The intersection point set of the related motion routes (e.g., a historical motion route before the current motion route), h t-1 Represents neuron A t-1 The output of neuron A t-1In addition, the neuron at the previous moment can transfer its cell state and output to the neuron at the next moment, where the cell state is the memory of the LSTM network, and the cell state transferred to a neuron may include the set of intersections of multiple motion routes related to each neuron before the neuron, and the cell state transferred from one neuron to the next neuron may include the set of intersections of multiple motion routes related to the neuron and each neuron before the neuron. For example, neuron A t-1 can be sent to neuron A t Transmitter neuron A t-1 The output h t-1 And cell state C t-1 Therefore, the output and cell state of each neuron is not only related to the input of this neuron, but also to the output and cell state of the previous neuron. For example, neuron A t-1 The output h t-1 , that is, by neuron A t-1 The determined set of intersection points of the optimized motion path will include one or more intersection points of the historical motion path from the first moment to the t-1th moment. t The output h t , that is, by neuron A t The determined intersection point set of the optimized motion route may include one or more intersection points of the historical motion routes from the 1st moment to the t-1th moment and the current motion route at the tth moment.

[0124] The output and cell state of each neuron in the LSTM network are controlled by the forget gate, input gate, and output gate, such as Figure 6 As shown, neuron A t For example, the forget gate f t Decision from neuron A t-1 The cell state C t-1 Which intersections are discarded in the input gate i t Decision to neuron A t-1 The cell state C t-1 Which intersections are added in the output gate o t Decision from neuron A t The cell state C t Which intersection points are output in order to obtain the output h t Among them, the forget gate f t The calculation formula is as follows:

[0125] f t =σ(W f ·[h t-1 ,X t ]+b f ) Formula 5

[0126] b f =1+b m Formula 6: Where σ represents the sigmoid function; W f represents the weight matrix of the forget gate; [h t-1 ,X t ] means to set h t-1 and X t The long vector formed by splicing; b f represents the bias value of the forget gate; b m represents the abnormal segment deviation calculated when determining the model elements of the current motion route. It should be noted that the b of other neurons m Represents the abnormal segment deviation calculated when determining the model elements of the historical movement route associated with each neuron.

[0127] Neuron A t The input gate i t The calculation formula is as follows

[0128] i t =σ(W i ·[h t-1 ,X t ]+b i ) Formula 7

[0129] Where σ represents the sigmoid function; W i represents the weight matrix of the input gate; [h t-1 ,X t ] means to set h t-1 and X t The long vector formed by splicing; b i Represents the bias value of the input gate.

[0130] In neuron A t In the process, the forget gate f t and input gate i t Get neuron A t The cell state C t , the specific calculation formula is as follows:

[0131]

[0132]

[0133] in, Indicates the input cell state; W c The weight matrix representing the input cell state; b c Represents the bias value of the input cell state; Represents the input gate i t control Which intersection points will be updated to Ct in;f t ·C t-1 represents the forget gate f t Control neuron A t-1 The cell state C t-1 Which intersections in will be discarded? The higher the value of bm, the worse the GPS signal quality of the current movement route. Then neuron A t-1 The cell state C t-1 Through the forget gate f t Fewer intersections will be discarded.

[0134] Neuron A t The output gate o t The calculation formula is as follows:

[0135] o t =σ(W o ·[h t-1 ,X t ]+b o ) Formula 10

[0136] Among them, W o represents the weight matrix of the output gate; b o Represents the bias value of the output gate.

[0137] In neuron A t In the output gate o t Control cell state C t Which intersection points of will be output to obtain the output h t , the specific calculation formula is as follows:

[0138] h t =o t tanh(C t ) Formula 11

[0139] It should be noted that although Figure 6 The LSTM network is used as an example to describe the fusion of the intersection of the current movement route and each historical movement route. Figure 2 The motion route optimization module 150 can use a GRU network to achieve the fusion of the intersections of the current motion route and various historical motion routes based on a similar principle.

[0140] Back to Figure 2 The model element determination unit 144 can also be used to determine the neuron A according to the motion path model. t Specifically, the model element determination unit 144 may determine the model elements of the optimized motion path outputted by the neuron A. tThe outputted intersection link table of the link relationship between each intersection in the intersection set of the optimized motion route and at least one other intersection is, for example, but not limited to, Figure 4 Since the motion route optimization module 150 merges the intersections of the current motion route and at least one historical motion route, the link relationship between the original intersections of the motion routes is broken, and the model element determination unit 144 can be obtained from the neuron A t From the set of intersections of the output optimized motion path, one intersection is selected as the starting point of the optimized motion path, the distances between the remaining intersections and the starting point (for example, but not limited to, the Euclidean distance between two points) are calculated, and the intersection closest to the starting point is determined as the second intersection of the optimized motion path, and then the intersection closest to the second intersection is determined from the remaining intersections as the third intersection of the optimized motion path, and so on, until the last intersection is determined as the end point of the optimized motion path. In neuron A t In the output intersection link table of the optimized motion route, each intersection except the starting point and the end point may include the GPS coordinates of the intersection, a link to the previous intersection (for example, but not limited to, a pointer), and a link to the next intersection (for example, but not limited to, a pointer), and the starting point may include the GPS coordinates of the starting point, a link to the next intersection (for example, but not limited to, a pointer), and the end point may include the GPS coordinates of the end point, a link to the previous intersection (for example, but not limited to, a pointer).

[0141] The model element determination unit 144 can also determine the representation of the neuron A t Specifically, the model element determination unit 144 can determine the geohash encoding values ​​of multiple grids in the geographical range where the optimized movement route is output. t The output minimum bounding rectangle of the optimized motion route, wherein two sides of the minimum bounding rectangle are parallel to the latitude and are determined by the latitude coordinates of the southernmost and northernmost intersections in the set of intersections of the optimized motion route, and the other two sides are parallel to the longitude and are determined by the longitude coordinates of the easternmost and westernmost intersections in the set of intersections of the optimized motion route. The model element determination unit 144 can use the center point of the minimum bounding rectangle of the optimized motion route as the center point of the minimum bounding rectangle generated by the neuron A. t Output the center position of the optimized motion path.

[0142] The model element determination unit 144 can be composed of neurons A t The center position of the output optimized movement route is taken as the center, and the minimum enclosing rectangle of the optimized movement route is divided into four grids, and then the geohash code value corresponding to the geographic range of each grid is determined.

[0143] The model element determination unit 144 can also be composed of neurons At The center position of the output optimized motion path is taken as the origin, and a relative coordinate system is constructed. t The output absolute GPS coordinates (eg, longitude and latitude) of each intersection point of the optimized motion route are converted into relative coordinates in the relative coordinate system.

[0144] The model element determination unit 144 may also determine the motion path model and the neuron A t The various elements of the output optimized movement route are stored in the data center 130 as the default movement route within the geographical range of the current movement route and various historical movement routes, as well as the candidate movement routes to be recommended to the user.

[0145] According to some embodiments of the present application, the movement route recommendation module 160 can receive a user's recommendation request for a movement route, obtain the user's current GPS coordinates, and calculate the geohash code value of the user's GPS coordinates. Then, the movement route recommendation module 160 can determine the grid geohash code value with the smallest difference from the geohash code value of the user's GPS coordinates among the multiple grid geohash code values ​​of the multiple movement routes stored in the data center 130. Since similar geohash code values ​​can represent similar geographical locations, the movement route corresponding to the grid geohash code value with the smallest difference from the geohash code value of the user's GPS coordinates is closest to the user's geographical location, and the movement route recommendation module 160 can recommend the movement route to the user. In one example, when the coordinates of the intersection of the recommended moving route are GPS coordinates, the moving route recommendation module 160 can present the recommended moving route on the map according to the intersection link table of the recommended moving route; when the coordinates of the intersection of the recommended moving route are relative coordinates relative to the center position, the moving route recommendation module 160 can present the recommended moving route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended moving route.

[0146] In an embodiment of the present application, by segmenting, clustering, and analyzing multiple motion trajectories generated by a user within a period of time and extracting a simplified motion route, the storage and processing costs of the motion trajectories can be reduced and the processing efficiency of the motion trajectories can be improved.

[0147] Furthermore, by dividing the geographical range containing the movement route into multiple grids, and the multiple grids share a central position, the storage and processing costs of the movement trajectory can be further reduced, and by using the geohash encoding values ​​of multiple grids to index the movement route, the retrieval efficiency of the movement route can be improved.

[0148] Furthermore, by taking the center position of the motion route as the origin and performing relative coordinate transformation on each intersection of the motion route, the privacy of the user can be protected and sensitive data related to the user can be eliminated.

[0149] Furthermore, when the intersection points of the current motion route and the historical motion route are fused through a recurrent neural network, the abnormal segment deviation of the current motion route is taken into account, that is, the quality of the GPS signal when recording the motion trajectory related to the current motion route is taken into account. When the GPS signal quality is poor, fewer intersection points of the historical motion route will be discarded, so the fusion error can be controlled more accurately, and the quality of the optimized motion route can also be improved.

[0150] Furthermore, in an embodiment of the present application, the terminal device 100 is a user-side device. Compared with the prior art in which the motion route is processed on a cloud-side server, the embodiment of the present application can reduce the risk of being unable to process the motion route due to network and cloud-side failures, and can reduce the response delay to the user's route recommendation request.

[0151] Figure 7 A schematic flow chart of a method for extracting a motion route according to an embodiment of the present invention is shown. Figure 2 The movement route extraction module 140 of the terminal device 100 in the embodiment may implement different blocks or other parts of the method. For the contents not described in the above device embodiment, please refer to the following method embodiment. Similarly, for the contents not described in the method embodiment, please refer to the above device embodiment. Figure 7 As shown, the method for extracting the motion route may include:

[0152] S701, through the trajectory segmentation unit 141, obtain from the data center 130 a plurality of motion trajectories generated by the user within a period of time (for example, one day, three days, one week, two weeks, one month or other time period) within the same geographical range (for example, the same sports venue) recorded by the motion trajectory recording module 120.

[0153] Examples of multiple motion trajectories may be, but are not limited to, motion trajectories generated by users today, yesterday, and the day before yesterday, or multiple motion trajectories obtained by segmenting the motion trajectory generated by the user in one exercise, for example, multiple motion trajectories obtained by segmenting the motion trajectory generated by the user running multiple laps along a sports field according to each lap.

[0154] S702 , segmenting each of the plurality of motion trajectories into a plurality of trajectory segments by the trajectory segmentation unit 141 .

[0155] Specifically, each motion trajectory can be expressed as

[0156]

[0157] Among them, TR m represents the mth motion trajectory, n m represents the number of trajectory points included in the mth motion trajectory, represents the i-th trajectory point of the m-th motion trajectory, represents the GPS coordinates of the ith track point of the mth motion track, Indicates the time corresponding to the GPS coordinates of the ith track point of the mth motion track.

[0158] For each motion trajectory, the trajectory segmentation unit 141 can represent two trajectory points that are adjacent in time as a trajectory segment, where the direction of the trajectory segment is from the trajectory point with an earlier time (i.e., the starting trajectory point) to the trajectory point with a later time (i.e., the ending trajectory point), and the size of the trajectory segment is the distance between the two trajectory points. Figure 3 An example of three motion trajectories TR1 to TR3 is shown. It should be noted that the figure only shows a part of the motion trajectories TR1 to TR3, wherein each motion trajectory is divided into a plurality of trajectory segments.

[0159] S703, clustering the trajectory segments of each motion trajectory into a plurality of trajectory segment clusters in sequence through the trajectory clustering unit 142, wherein, within a trajectory segment cluster, a spacing between adjacent trajectory segments is less than a predetermined value, wherein within a trajectory segment cluster, a spacing between adjacent trajectory segments is less than a predetermined value, and wherein adjacent trajectory segments respectively belong to different running trajectories among the plurality of running trajectories.

[0160] As an example, let two trajectory segments be denoted as ts i and ts j , where the trajectory segment ts i The starting point is s i , the end point is e i , trajectory segment ts j The starting point is s j , the end point is e j , then the trajectory segment ts can be calculated based on the following formula i and ts j Spacing between:

[0161]

[0162] d || =MIN(l ||1 , l ||2 ) Formula 14

[0163]

[0164] Among them, l ⊥1 Represents the trajectory segment tsj Starting point j To trajectory segment ts i The vertical distance, l ⊥2 Represents the trajectory segment ts j The end point j To trajectory segment ts i The vertical distance, l ||1 Represents the trajectory segment ts i Starting point i To trajectory segment ts j Starting point j In the trajectory segment ts i The distance of the projection point on ||2 Represents the trajectory segment ts i The end point i To trajectory segment ts j The end point j In the trajectory segment ts i The distance of the projection point on the trajectory segment ts i and ts j The spacing between.

[0165] For example, in Figure 3 In the example shown, Figure 2 The trajectory clustering unit 142 may first determine a first trajectory segment cluster and a reference trajectory segment of the first trajectory segment cluster, Figure 2 The trajectory clustering unit 142 determines the trajectory segments that can be clustered with the reference trajectory segment in the trajectory segments of each motion trajectory. Figure 2 The trajectory clustering unit 142 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P11 of TR1, and determine the trajectory segment that can be clustered with the trajectory segment P11 of TR1 from other trajectory segments. Specifically, Figure 2 The trajectory clustering unit 142 may first determine that in the motion trajectories TR2-TR3, the distances between the trajectory segments P31 and P32 and the trajectory segment P11 of TR1 are less than a predetermined value and thus may be clustered with the trajectory segment P11 of TR1 as trajectory segments adjacent to the trajectory segment P11 of TR1; Figure 2 The trajectory clustering unit 142 can continue to determine that the distance between the trajectory segment P21 of TR2 and the trajectory segments P31 and P32 of TR3 is less than a predetermined value and can therefore be clustered with the trajectory segments P31 and P32 of TR3 as trajectory segments adjacent to the trajectory segments P31 and P32 of TR3. Then, ultimately, the trajectory clustering unit 142 can cluster the trajectory segment P11 of TR1, the trajectory segments P31 and P32 of TR3, and the trajectory segment P21 of TR2 into the first trajectory segment cluster.

[0166] In another example, Figure 2The trajectory clustering unit 142 can determine the base trajectory segment of the first trajectory segment cluster as the trajectory segment P31 of TR3, and determine the trajectory segment that can be clustered with the trajectory segment P31 of TR3 from other trajectory segments. Specifically, the trajectory clustering unit 142 can determine that the distance between the trajectory segment P11 of TR1 and the trajectory segment P21 of TR2 and the trajectory segment P31 of TR3 is less than a predetermined value, so the trajectory segment P11 of TR1 and the trajectory segment P21 of TR2 can be clustered with the trajectory segment P31 of TR3 as the first trajectory segment cluster as the trajectory segment adjacent to the trajectory segment P31 of TR3. It should be noted that Figure 2 The trajectory clustering unit 142 may also determine other trajectory segments as reference trajectory segments of the first trajectory segment cluster.

[0167] Then, the trajectory clustering unit 142 may determine a second trajectory segment cluster and a reference trajectory segment of the second trajectory segment cluster. Figure 2 The trajectory clustering unit 142 may determine the reference trajectory segment of the second trajectory segment cluster as the trajectory segment P12 of TR1, and determine the trajectory segment that can be clustered with the trajectory segment P12 of TR1 from other trajectory segments. Specifically, Figure 2 The trajectory clustering unit 142 can determine that the distance between the trajectory segment P33 of TR3 and the trajectory segment P12 of TR1 is less than a predetermined value and can therefore be clustered with the trajectory segment P12 of TR1 as a trajectory segment adjacent to the trajectory segment P12 of TR1, and the distance between the trajectory segment P22 of TR2 and the trajectory segment P33 of TR3 is less than a predetermined value and can therefore be clustered with the trajectory segment P33 of TR3 as a trajectory segment adjacent to the trajectory segment P33 of TR3, then finally, the trajectory clustering unit 142 can cluster the trajectory segment P12 of TR1, the trajectory segment P33 of TR3 and the trajectory segment P22 of TR2 into the second trajectory segment cluster. It should be noted that Figure 2 The trajectory clustering unit 142 may also determine other trajectory segments as reference trajectory segments of the second trajectory segment cluster.

[0168] And so on. Figure 2 The trajectory clustering unit 142 can determine other trajectory segment clusters of the motion trajectory. Figure 3 The motion trajectory shown can determine each trajectory segment cluster of the motion trajectory using a principle similar to the above.

[0169] S704 , for each trajectory segment cluster, the trajectory extraction unit 143 calculates a cluster vector based on each trajectory segment in the cluster.

[0170] As an example, the trajectory extraction unit 143 may use the mean of the GPS coordinates of the starting trajectory points of each trajectory segment in the trajectory segment cluster as the GPS coordinates of the starting point of the cluster vector, and use the mean of the GPS coordinates of the ending trajectory points of each trajectory segment as the GPS coordinates of the ending point of the cluster vector. As another example, the trajectory extraction unit 143 may use any trajectory segment in the trajectory segment cluster as the cluster vector. It should be noted that the cluster vector may also be determined based on any other suitable method.

[0171] S705 , determining abnormal trajectory segments in the plurality of motion trajectories through the trajectory clustering unit 142 , and determining the proportion of the abnormal trajectory segments in all trajectory segments, that is, the abnormal segment deviation.

[0172] Specifically, the trajectory clustering unit 142 can cluster the center points of each trajectory segment of the multiple running trajectories by using a hierarchical clustering algorithm, a K-means clustering algorithm, or other clustering algorithms, and obtain the categories of the center points of the multiple trajectory segments and the class centers of each category. The trajectory clustering unit 142 can calculate the distance between the center points of each trajectory segment of the multiple running trajectories and the centers of each class, and mark the trajectory segments whose minimum distance between their center points and the centers of each class is greater than a predetermined value (the predetermined value is the same as or different from the predetermined value related to the spacing between trajectory segments) as abnormal trajectory segments. For example, in Figure 3 In the example of , the track segment P15 of TR1 and the track segment P35 of TR3 can be marked as abnormal track segments. In some cases, a higher abnormal segment deviation can indicate that the quality of the GPS signal during the movement is poor.

[0173] S706 , determining the intersection points of adjacent cluster vectors of adjacent trajectory segment clusters by the model element determination unit 144 , so as to determine a set of intersection points of the simplified motion route extracted from the motion trajectory.

[0174] As an example, when the adjacent cluster vectors of adjacent trajectory segment clusters are not connected at the beginning and the end, the model element determination unit 144 can extend one or two of the adjacent cluster vectors to determine the GPS coordinates of the intersection between the adjacent cluster vectors; when the adjacent cluster vectors have already intersected, the model element determination unit 144 can directly determine the GPS coordinates of the intersection between the adjacent cluster vectors.

[0175] S707 , the model element determining unit 144 determines the start point and the end point of the motion route from the set of intersection points of the motion route.

[0176] As an example, the model element determination unit 144 may use the starting point of the cluster vector of the first trajectory segment cluster of the motion trajectory as the starting point of the motion route, and use the ending point of the cluster vector of the last trajectory segment cluster as the ending point of the motion route.

[0177] S708: Determine, by the model element determination unit 144, an intersection link table indicating a link relationship between each intersection in the intersection set of the motion route and at least one other intersection, wherein the intersection set includes a start point and an end point of the motion route.

[0178] As an example, the model element determination unit 144 may determine: Figure 4 The bidirectional linked list between the intersections shown, where the starting point can be the starting point of the motion path, the intersection 1 can be the intersection point between the cluster vector of the first trajectory segment cluster of the motion trajectory and the cluster vector of the second trajectory segment cluster, the intersection 2 can be the intersection point between the cluster vector of the second trajectory segment cluster of the motion trajectory and the cluster vector of the third trajectory segment cluster, and so on, and the end point can be the end point of the motion path. In addition, Figure 4 Each intersection shown in may include the GPS coordinates of the intersection, a link to the previous intersection (e.g., but not limited to, a pointer), and a link to the next intersection (e.g., but not limited to, a pointer), while the starting point may include the GPS coordinates of the starting point, a link to the next intersection (e.g., but not limited to, a pointer), and the end point may include the GPS coordinates of the end point, a link to the previous intersection (e.g., but not limited to, a pointer). Figure 4 The bidirectional linked list shown enables the user to move along the forward direction of the motion route (for example, by Figure 4 The starting point shown is Figure 4 The end point shown in the figure) can also be moved in the reverse direction of the movement path (for example, by Figure 4 The end point shown is pointing to Figure 4 It should be noted that the model element determination unit 144 can also determine a one-way linked list between the intersection points, that is, Figure 4 Each intersection shown in may include the GPS coordinates of the intersection, a link to a previous intersection (eg, but not limited to, a pointer), or a link to a next intersection (eg, but not limited to, a pointer).

[0179] S709 , determining the center position of the motion route through the model element determination unit 144 .

[0180] In one example, the model element determination unit 144 may determine a minimum bounding rectangle of the motion route, wherein two sides of the minimum bounding rectangle are parallel to the latitude lines and are determined by the latitude coordinates of the southernmost and northernmost intersections in the set of intersections of the motion route, and the other two sides are parallel to the longitude lines and are determined by the longitude coordinates of the easternmost and westernmost intersections in the set of intersections of the motion route, and the model element determination unit 144 may use the center point of the minimum bounding rectangle of the motion route as the center position of the motion route, for example, Figure 5 The GPS coordinates of the center position of the exercise route shown in are (121.623, 29.855).

[0181] S710 , determining, by the model element determination unit 144 , geohash code values ​​of a plurality of grids representing the geographical range of the movement route.

[0182] In one example, if Figure 5 As shown, Figure 2 The model element determination unit 144 can divide the minimum circumscribed rectangle of the movement route into four grids with the center position as the center, and determine the geohash code value corresponding to the geographic range of each grid, wherein the number of bits of the geohash code value can be, for example, but not limited to, 7-bit base32 code, for example, Figure 5 As shown, the encoding values ​​of the four grids are wx4g340, wx4g341, wx4g342 and wx4g343 respectively.

[0183] It should be noted that Figure 5 This is just an example of a grid representing the geographical range of the movement route. The movement route formed by each intersection is not limited to Figure 5 The GPS coordinates of the center position of the movement route shown in the figure are not limited to the GPS coordinates shown in the figure.

[0184] S711, determining the relative coordinates of each intersection point of the motion route relative to the center position through the model element determination unit 144.

[0185] As an example, the model element determination unit 144 can construct a relative coordinate system with the above-mentioned center position as the origin, and convert the absolute GPS coordinates (for example, longitude and latitude) of each intersection of the motion route into relative coordinates in the relative coordinate system, so that sensitive data related to the user can be eliminated.

[0186] S712 , the model element determination unit 144 stores the elements of the simplified motion route extracted from the motion trajectory determined according to the motion route model in the data center 130 as a candidate motion route to be recommended to the user.

[0187] Figure 8 A schematic flow chart of a method for optimizing a motion route according to an embodiment of the present invention is shown. Figure 2 The movement route optimization module 150 and the movement route extraction module 140 of the terminal device 100 in the embodiment may implement different blocks or other parts of the method. For the contents not described in the above device embodiment, please refer to the following method embodiment. Similarly, for the contents not described in the method embodiment, please refer to the above device embodiment. Figure 8 As shown, the optimization method of the motion route may include:

[0188] S801, obtaining, through the movement route optimization module 150, a current movement route and at least one historical movement route within the same geographical range (eg, the same sports venue).

[0189] The current movement route refers to the Figure 7 The method shown in the embodiment extracts a motion route from a current motion track set generated by a user within a current time period (for example, but not limited to, one day, three days, one week, two weeks, one month or other time period), and each of the at least one historical motion route refers to a motion route generated by a user through Figure 7 The method shown in extracts a motion route from a set of historical motion trajectories generated by the user in a historical time period (for example, but not limited to, one day, three days, one week, two weeks, one month or other time periods) before the current time period.

[0190] S802, through the movement route optimization module 150, the intersection set of the current movement route and the intersection set of each historical movement route in at least one historical movement route are respectively input into different neurons of the recurrent neural network to obtain the intersection set of the optimized movement route. Figure 6 The relevant description will not be repeated here.

[0191] S803, determining the intersection link table of the optimized motion route output by the last neuron of the recurrent neural network through the model element determination unit 144.

[0192] exist Figure 6 In the example of FIG. 1 , the model element determining unit 144 can determine the neuron A according to the motion path model. t Specifically, the model element determination unit 144 can determine the intersection link table of the optimized motion path outputted. t The outputted intersection link table of the link relationship between each intersection in the intersection set of the optimized motion route and at least one other intersection is, for example, but not limited to, Figure 4 Since the motion route optimization module 150 merges the intersections of the current motion route and at least one historical motion route, the link relationship between the original intersections of the motion routes is broken, and the model element determination unit 144 can be obtained from the neuron A tFrom the set of intersections of the output optimized motion path, one intersection is selected as the starting point of the optimized motion path, the distances between the remaining intersections and the starting point (for example, but not limited to, the Euclidean distance between two points) are calculated, and the intersection closest to the starting point is determined as the second intersection of the optimized motion path, and then the intersection closest to the second intersection is determined from the remaining intersections as the third intersection of the optimized motion path, and so on, until the last intersection is determined as the end point of the optimized motion path. In neuron A t In the output intersection link table of the optimized motion route, each intersection except the starting point and the end point may include the GPS coordinates of the intersection, a link to the previous intersection (for example, but not limited to, a pointer), and a link to the next intersection (for example, but not limited to, a pointer), and the starting point may include the GPS coordinates of the starting point, a link to the next intersection (for example, but not limited to, a pointer), and the end point may include the GPS coordinates of the end point, a link to the previous intersection (for example, but not limited to, a pointer).

[0193] S804, optionally, determining, through the model element determination unit 144, geohash encoding values ​​of multiple grids representing the geographical range of the optimized movement route output by the last neuron of the recurrent neural network.

[0194] exist Figure 6 In the example of t The output minimum bounding rectangle of the optimized motion route, wherein two sides of the minimum bounding rectangle are parallel to the latitude and are determined by the latitude coordinates of the southernmost and northernmost intersections in the set of intersections of the optimized motion route, and the other two sides are parallel to the longitude and are determined by the longitude coordinates of the easternmost and westernmost intersections in the set of intersections of the optimized motion route. The model element determination unit 144 can use the center point of the minimum bounding rectangle of the optimized motion route as the center point of the minimum bounding rectangle generated by the neuron A. t Output the center position of the optimized motion path.

[0195] The model element determination unit 144 can be composed of neurons A t The center position of the output optimized movement route is taken as the center, and the minimum enclosing rectangle of the optimized movement route is divided into four grids, and then the geohash code value corresponding to the geographic range of each grid is determined.

[0196] S805, optionally, determining the relative coordinates of each intersection point of the optimized motion path output by the last neuron of the recurrent neural network through the model element determination unit 144.

[0197] exist Figure 6 In the example of tThe center position of the output optimized motion path is taken as the origin, and a relative coordinate system is constructed. t The output absolute GPS coordinates (eg, longitude and latitude) of each intersection point of the optimized motion route are converted into relative coordinates in the relative coordinate system.

[0198] S806, storing the model element of the optimized motion route output by the last neuron of the recurrent neural network through the model element determination unit 144.

[0199] exist Figure 6 In the example of t Each model element of the output optimized movement route is stored in the data center 130 as a default movement route within the geographical range where the current movement route and each historical movement route are located.

[0200] Fig. 9 A schematic flow chart of a method for recommending a sports route according to an embodiment of the present invention is shown. Figure 2 The exercise route recommendation module 160 of the terminal device 100 in the embodiment may implement different blocks or other parts of the method. For the contents not described in the above device embodiment, please refer to the following method embodiment. Similarly, for the contents not described in the method embodiment, please refer to the above device embodiment. Figure 7 As shown, the recommended method of the exercise route may include:

[0201] S901 : Receive a user's request for a sports route recommendation through the sports route recommendation module 160 .

[0202] S902 , obtaining the current GPS coordinates of the user from the GPS positioning module 120 through the exercise route recommendation module 160 .

[0203] S903, calculating the geohash code value of the user's GPS coordinates through the exercise route recommendation module 160.

[0204] S904, determining, through the movement route recommendation module 160, a grid geohash code value having the smallest difference from the geohash code value of the user's GPS coordinates among the multiple grid geohash code values ​​of the multiple movement routes stored in the data center 130;

[0205] S905 , recommending to the user, through the movement route recommendation module 160 , a movement route corresponding to the grid geohash code value having the smallest difference from the geohash code value of the user's GPS coordinates.

[0206] Since similar geohash code values ​​can represent similar geographical locations, the movement route corresponding to the grid geohash code value with the smallest difference from the geohash code value of the user's GPS coordinates is closest to the user's geographical location, and the movement route recommendation module 160 can recommend this movement route to the user. In one example, when the coordinates of the intersection of the recommended movement route are GPS coordinates, the movement route recommendation module 160 can present the recommended movement route on the map according to the intersection link table of the recommended movement route; when the coordinates of the intersection of the recommended movement route are relative coordinates relative to the center position, the movement route recommendation module 160 can present the recommended movement route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended movement route.

[0207] In an embodiment of the present application, by segmenting, clustering, and analyzing the motion trajectories generated by the user within a period of time and extracting a simplified motion route, the storage and processing costs of the motion trajectories can be reduced and the processing efficiency of the motion trajectories can be improved.

[0208] Furthermore, by dividing the geographical range containing the movement route into multiple grids, and the multiple grids share a central position, the storage and processing costs of the movement trajectory can be further reduced, and by using the geohash encoding values ​​of multiple grids to index the movement route, the retrieval efficiency of the movement route can be improved.

[0209] Furthermore, by taking the center position of the motion route as the origin and performing relative coordinate transformation on each intersection of the motion route, the privacy of the user can be protected and sensitive data related to the user can be eliminated.

[0210] Furthermore, when the intersection points of the current motion route and the historical motion route are fused through a recurrent neural network, the abnormal segment deviation of the current motion route is taken into account, that is, the quality of the GPS signal when recording the motion trajectory related to the current motion route is taken into account. When the GPS signal quality is poor, fewer intersection points of the historical motion route will be discarded, so the fusion error can be controlled more accurately, and the quality of the optimized motion route can also be improved.

[0211] Fig.10 A schematic diagram of the structure of a motion route processing device 1000 according to an embodiment of the present application is shown. The device 1000 may include one or more processors 1002, a system control logic 1008 connected to at least one of the processors 1002, a system memory 1004 connected to the system control logic 1008, a non-volatile memory (NVM) 1006 connected to the system control logic 1008, and a network interface 1010 connected to the system control logic 1008.

[0212] The processor 1002 may include one or more single-core or multi-core processors. The processor 1002 may include any combination of a general-purpose processor and a special-purpose processor (e.g., a graphics processor, an application processor, a baseband processor, etc.). In an embodiment of the present application, the processor 1002 may be configured to execute the following Figure 7-9 One or more of the various embodiments shown.

[0213] In some embodiments, system control logic 1008 may include any suitable interface controller to provide any suitable interface to at least one of processors 1002 and / or any suitable device or component in communication with system control logic 1008 .

[0214] In some embodiments, the system control logic 1008 may include one or more memory controllers to provide an interface to the system memory 1004. The system memory 1004 may be used to load and store data and / or instructions. In some embodiments, the memory 1004 of the device 1000 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).

[0215] NVM / memory 1006 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / memory 1006 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of a HDD (Hard Disk Drive), a CD (Compact Disc) drive, and a DVD (Digital Versatile Disc) drive.

[0216] NVM / storage 1006 may include a portion of storage resources installed on the device of apparatus 1000, or it may be accessible by the device but not necessarily a part of the device. For example, NVM / storage 1006 may be accessed over a network via network interface 1010.

[0217] In particular, system memory 1004 and NVM / storage 1006 may include, respectively, a temporary copy and a permanent copy of instructions 1020. Instructions 1020 may include instructions that, when executed by at least one of processors 1002, cause apparatus 1000 to perform the following operations: Figure 7-9 In some embodiments, instructions 1020, hardware, firmware, and / or software components thereof may additionally / alternatively be placed in system control logic 1008, network interface 1010, and / or processor 1002.

[0218] The network interface 1010 may include a transceiver for providing a radio interface for the apparatus 1000, thereby communicating with any other suitable device (such as a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 1010 may be integrated with other components of the apparatus 1000. For example, the network interface 1010 may be integrated with at least one of the processor 1002, the system memory 1004, the NVM / storage 1006, and a firmware device (not shown) having instructions. When at least one of the processors 1002 executes the instructions, the apparatus 1000 implements Figure 7-9 One or more of the various embodiments shown.

[0219] The network interface 1010 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 1010 may be a network adapter, a wireless network adapter, a telephone modem and / or a wireless modem.

[0220] In one embodiment, at least one of the processors 1002 may be packaged together with logic for one or more controllers of the system control logic 1008 to form a system in package (SiP). In one embodiment, at least one of the processors 1002 may be integrated on the same die with logic for one or more controllers of the system control logic 1008 to form a system on chip (SoC).

[0221] The device 1000 may further include an input / output (I / O) interface 1012. The I / O interface 1012 may include a user interface that enables a user to interact with the device 1000; the design of the peripheral component interface enables peripheral components to also interact with the device 1000. In some embodiments, the device 1000 further includes a sensor for determining at least one of an environmental condition and location information related to the device 1000.

[0222] In some embodiments, the user interface may include, but is not limited to, a display (e.g., an LCD display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.

[0223] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.

[0224] In some embodiments, the sensors may include, but are not limited to, gyroscope sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of or interact with the network interface 1010 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).

[0225] Although the description of the present application will be introduced in conjunction with a preferred embodiment, this does not mean that the features of this invention are limited to this embodiment. On the contrary, the purpose of introducing the invention in conjunction with the embodiment is to cover other options or modifications that may be extended based on the claims of the present application. In order to provide a deep understanding of the present application, many specific details will be included in the following description. The present application may also be implemented without using these details. In addition, in order to avoid confusion or blurring the focus of the present application, some specific details will be omitted in the description. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0226] Furthermore, various operations will be described as multiple discrete operations in a manner that is most helpful for understanding the illustrative embodiments; however, the order of description should not be construed as implying that these operations are necessarily order dependent. In particular, these operations do not need to be performed in the order presented.

[0227] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A / B" means "A or B." The phrase "A and / or B" means "(A and B) or (A or B)."

[0228] As used herein, the term "module" or "unit" may refer to, be or include: an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor and / or memory that executes one or more software or firmware programs, a combinational logic circuit and / or other suitable components that provide the described functionality.

[0229] In the accompanying drawings, some structural or method features are shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. In some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a specific figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0230] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.

[0231] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0232] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0233] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. In some cases, one or more aspects of at least some embodiments may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logics in a processor, and when the instructions are read by a machine, the machine makes logic for performing the techniques described herein. These representations, known as “IP cores,” may be stored on a tangible computer-readable storage medium and provided to multiple customers or production facilities to be loaded into a manufacturing machine that actually manufactures the logic or processor.

[0234] Such computer-readable storage media may include, but are not limited to, a non-transitory tangible arrangement of an article manufactured or formed by a machine or apparatus, including storage media such as: a hard disk, any other type of disk, including a floppy disk, an optical disk, a compact disk-read only memory (CD-ROM), a compact disk-rewritable (CD-RW), and a magneto-optical disk; semiconductor devices, such as read-only memory (ROM), random access memory (RAM) such as dynamic random access memory (DRAM) and static random access memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); a magnetic card or an optical card; or any other type of medium suitable for storing electronic instructions.

[0235] Therefore, various embodiments of the present application also include non-transitory computer-readable storage media that contain instructions or contain design data, such as hardware description language (HDL), which defines the structures, circuits, devices, processors and / or system features described in the present application.

Claims

1. A motion trajectory processing method, characterized in that: include: Acquire a motion trajectory set, wherein the motion trajectory set includes a plurality of motion trajectories; and Determine a motion route element according to the motion trajectory set, wherein the motion route element includes at least one of a center position and an intersection set, the center position is a center point of a geographic range, and the geographic range is determined by selecting four easternmost, southernmost, westernmost, and northernmost intersection points from a plurality of intersection points; wherein the central position is shared by a plurality of grids and the set of movement trajectories is contained within the geographical range of the plurality of grids; and The intersection points in the intersection point set are intersection points between cluster vectors of multiple trajectory segment clusters, wherein each trajectory segment cluster in the multiple trajectory segment clusters includes multiple trajectory segments of the multiple motion trajectories, and the spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories in the multiple motion trajectories, the starting point of the cluster vector is the average of the starting trajectory points of each trajectory segment in the multiple trajectory segment clusters, the end point of the cluster vector is the average of the ending trajectory points of each trajectory segment in the multiple trajectory segment clusters, or the cluster vector is any one trajectory segment in the multiple trajectory segment clusters.

2. The motion trajectory processing method according to claim 1, characterized in that: The movement route elements also include: The Geohash code corresponding to each grid in the plurality of grids is used to index the geographic range corresponding to each grid.

3. The motion trajectory processing method according to claim 2, characterized in that: The Geohash code includes at least 7 Base32 encoded characters.

4. The motion trajectory processing method according to claim 1, characterized in that: The motion route element further includes an intersection link table indicating a link relationship between each of the plurality of intersections and at least one other intersection of the plurality of intersections.

5. The motion trajectory processing method according to claim 1, characterized in that: The central position includes the GPS coordinates of the central position, and each of the plurality of intersections includes relative coordinates in a relative coordinate system with the central position as an origin.

6. The motion trajectory processing method according to claim 1, characterized in that: Determining the motion route elements according to the motion trajectory set includes: Segment each motion trajectory in the motion trajectory set into a plurality of trajectory segments; clustering the plurality of trajectory segments whose intervals between adjacent trajectory segments are smaller than the predetermined value into one trajectory segment cluster among the plurality of trajectory segment clusters; According to the plurality of trajectory segments in each trajectory segment cluster of the plurality of trajectory segment clusters, determining a cluster vector corresponding to the each trajectory segment cluster so as to form a plurality of cluster vectors corresponding to the plurality of trajectory segment clusters; The intersection points between adjacent cluster vectors in the plurality of cluster vectors are determined.

7. The motion trajectory processing method according to claim 6, characterized in that: The starting point coordinates of the cluster vector are the average of the starting point coordinates of the multiple track segments in the track segment cluster, and the ending point coordinates of the cluster vector are the average of the ending point coordinates of the multiple track segments in the track segment cluster.

8. A motion trajectory processing method, characterized in that: include: Acquire multiple current motion trajectory intersection points associated with the current motion trajectory set and multiple historical motion trajectory intersection points associated with the historical motion trajectory set; and Determining whether to retain at least one current motion trajectory intersection point among the plurality of current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the plurality of historical motion trajectory intersection points based at least in part on the abnormal segment deviation, thereby obtaining an optimized motion route; The intersection point is a point formed by the intersection of adjacent cluster vectors of adjacent trajectory segment clusters, the trajectory segment cluster includes multiple trajectory segments of multiple motion trajectories, and the spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories in the multiple motion trajectories, the starting point of the cluster vector is the average of the starting trajectory points of each trajectory segment in the multiple trajectory segment clusters, the end point of the cluster vector is the average of the ending trajectory points of each trajectory segment in the multiple trajectory segment clusters, or the cluster vector is any one trajectory segment in the multiple trajectory segment clusters; The abnormal segment deviation at least partially specifies a proportion of abnormal trajectory segments in a plurality of trajectory segments of a plurality of motion trajectories of the current motion trajectory set, wherein the abnormal trajectory segment is more than a first predetermined value away from at least one class center of the plurality of trajectory segments.

9. The motion trajectory processing method according to claim 8, characterized in that: The current movement trajectory set and the historical movement trajectory set are included in the same geographical range.

10. The motion trajectory processing method according to claim 8, characterized in that: The determining whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points includes using an LSTM (Long short-term memory) model to determine whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points.

11. The motion trajectory processing method according to claim 10, characterized in that: The determining whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points further includes: using an LSTM model to calculate a forget gate for determining whether to retain the at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points according to the following formula: , Among them, f t represents the forget gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, W f represents the weight matrix of the forget gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes the multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes the multiple historical motion trajectory intersections, [h t-1 , X t ] means to set h t-1 and X t The long vector formed by concatenation, b f represents the bias value of the forget gate, b m Indicates the abnormal segment deviation.

12. The motion trajectory processing method according to any one of claims 8 to 11, characterized in that: The determining whether to retain at least one of the multiple current motion trajectory intersections and / or at least one of the multiple historical motion trajectory intersections further includes calculating, using the LSTM model, an input gate for determining whether to retain at least one of the multiple current motion trajectory intersections according to the following formula: , Among them, i t represents the input gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, and W i represents the weight matrix of the input gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes the multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes the multiple historical motion trajectory intersections, [h t-1 , X t ] means to set h t-1 and X t The long vector formed by concatenation, b i Represents the bias value of the input gate.

13. The motion trajectory processing method according to any one of claims 8 to 11, characterized in that: The determining whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points further includes, using an LSTM model, determining whether to output at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points according to the following formula, thereby obtaining the optimized motion route: , Among them, X t represents the input of the neuron at the tth moment of the LSTM model and includes the multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes the multiple historical motion trajectory intersections, represents the input cell state of the neuron at the tth moment of the LSTM model, W c represents the weight matrix of the input cell state of the neuron at the tth moment of the LSTM model, b c represents the bias value of the input cell state of the neuron at the tth moment of the LSTM model, C t represents the cell state of the neuron at the tth moment of the LSTM model, C t-1 represents the cell state of the neuron at the t-1th moment of the LSTM model, f t represents the forget gate of the neuron at the tth moment of the LSTM model, i t represents the input gate of the neuron at the tth moment of the LSTM model, o t represents the output gate of the neuron at the tth moment of the LSTM model, W o represents the weight matrix of the output gate, b o represents the bias value of the output gate, h t It represents the output of the neuron at the t-th moment of the LSTM model and includes multiple intersection points of the optimized motion path.

14. The motion trajectory processing method according to claim 13, characterized in that: The method further includes selecting, from the plurality of intersection points of the optimized motion route, four intersection points, namely, the easternmost, southernmost, westernmost, and northernmost; A geographical range including the movement route is determined according to the four intersection points, and a center point of the geographical range is determined as a center position of the optimized movement route.

15. The motion trajectory processing method according to claim 14, characterized in that: The method also includes determining a plurality of grids of the geographic range and geohash code values ​​of the plurality of grids, wherein the plurality of grids share the central location.

16. The motion trajectory processing method according to claim 14, characterized in that: The central position includes the GPS coordinates of the central position, and each of the plurality of intersections of the optimized motion route includes relative coordinates in a relative coordinate system with the central position as an origin.

17. The motion trajectory processing method according to claim 8, characterized in that: The method further comprises: The centers of the plurality of trajectory segments are clustered and the at least one cluster center of the plurality of trajectory segments is obtained.

18. A method for recommending a sports route, characterized in that: include: receiving a user's request for a sports route recommendation; Obtaining the GPS coordinates of the user, and calculating the geohash code value of the GPS (Global Positioning System) coordinates of the user; From a plurality of grid geohash code values, searching for a grid geohash code value having the smallest difference from the geohash code value of the GPS coordinates of the user; Obtaining a movement route corresponding to the grid geohash code value having the smallest difference from the geohash code value of the GPS coordinates of the user and a center position of the movement route, wherein the center position is shared by a plurality of grids in a geographical range including the movement route; and recommending the exercise route to the user according to the central position; The central position is the center point of the geographical range, and the geographical range is determined by selecting the easternmost, southernmost, westernmost and northernmost four intersection points from multiple intersection points.

19. A computer-readable storage medium, characterized in that: Instructions are stored on the computer-readable storage device. When the instructions are executed on a machine, the machine is caused to perform the method according to any one of claims 1 to 18.

20. A motion trajectory processing device, characterized in that: include: processor; A memory having instructions stored therein, wherein when the instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 18.

21. A motion trajectory processing device, characterized in that: include: A motion trajectory recording module, used to obtain a motion trajectory set, wherein the motion trajectory set includes multiple motion trajectories; and a motion route extraction module, configured to determine motion route elements according to the motion trajectory set, wherein the motion route elements include at least one of a center position and an intersection set, the center position being the center point of a geographic range, and the geographic range being determined by selecting four easternmost, southernmost, westernmost, and northernmost intersection points from a plurality of intersection points; wherein the central position is shared by a plurality of grids and the set of movement trajectories is contained within the geographical range of the plurality of grids; and The intersection points in the intersection point set are intersection points between cluster vectors of multiple trajectory segment clusters, wherein each trajectory segment cluster in the multiple trajectory segment clusters includes multiple trajectory segments of the multiple motion trajectories, and the spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories in the multiple motion trajectories, the starting point of the cluster vector is the average of the starting trajectory points of each trajectory segment in the multiple trajectory segment clusters, the end point of the cluster vector is the average of the ending trajectory points of each trajectory segment in the multiple trajectory segment clusters, or the cluster vector is any one trajectory segment in the multiple trajectory segment clusters.

22. The motion trajectory processing device according to claim 21, characterized in that: The movement route elements also include: The Geohash code corresponding to each grid in the plurality of grids is used to index the geographic range corresponding to each grid.

23. The motion trajectory processing device according to claim 22, characterized in that: The Geohash code includes at least 7 Base32 encoded characters.

24. The motion trajectory processing device according to claim 21, characterized in that: The movement route elements also include: A node link table indicates a link relationship between each node of the plurality of nodes and at least one other node of the plurality of nodes.

25. The motion trajectory processing device according to claim 21, characterized in that: The motion route extraction module is further used to determine the relative coordinates of each of the multiple intersections in a relative coordinate system with the center position as the origin.

26. The motion trajectory processing device according to claim 21, characterized in that: The motion route extraction module is used to determine the motion route elements according to the motion trajectory set, including: Segment each motion trajectory in the motion trajectory set into a plurality of trajectory segments; clustering the plurality of trajectory segments whose intervals between adjacent trajectory segments are smaller than the predetermined value into one trajectory segment cluster among the plurality of trajectory segment clusters; According to the plurality of trajectory segments in each trajectory segment cluster of the plurality of trajectory segment clusters, determining a cluster vector corresponding to the each trajectory segment cluster so as to form a plurality of cluster vectors corresponding to the plurality of trajectory segment clusters; The intersection points between adjacent cluster vectors in the plurality of cluster vectors are determined.

27. The motion trajectory processing device according to claim 26, characterized in that: The starting point coordinates of the cluster vector are the average of the starting point coordinates of the multiple track segments in the track segment cluster, and the ending point coordinates of the cluster vector are the average of the ending point coordinates of the multiple track segments in the track segment cluster.

28. A motion trajectory processing device, characterized in that: include: A motion route extraction module, used to obtain a plurality of current motion trajectory intersection points associated with a current motion trajectory set and a plurality of historical motion trajectory intersection points associated with a historical motion trajectory set; and a motion route optimization module, which determines whether to retain at least one current motion trajectory intersection point among the plurality of current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the plurality of historical motion trajectory intersection points based at least in part on the abnormal segment deviation, thereby obtaining an optimized motion route; The intersection point is a point formed by the intersection of adjacent cluster vectors of adjacent trajectory segment clusters, the trajectory segment cluster includes multiple trajectory segments of multiple motion trajectories, and the spacing between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories in the multiple motion trajectories, the starting point of the cluster vector is the average of the starting trajectory points of each trajectory segment in the multiple trajectory segment clusters, the end point of the cluster vector is the average of the ending trajectory points of each trajectory segment in the multiple trajectory segment clusters, or the cluster vector is any trajectory in the multiple trajectory segment clusters; The abnormal segment deviation at least partially specifies a proportion of abnormal trajectory segments in a plurality of trajectory segments of a plurality of motion trajectories of the current motion trajectory set, wherein the abnormal trajectory segment is more than a first predetermined value away from at least one class center of the plurality of trajectory segments.

29. The motion trajectory processing device according to claim 28, characterized in that: The current movement trajectory set and the historical movement trajectory set are included in the same geographical range.

30. The motion trajectory processing device according to claim 28, characterized in that: The motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points, including using an LSTM (Long short-term memory) model to determine whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points.

31. The motion trajectory processing device according to claim 30, characterized in that: The motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points, and also includes: using an LSTM model to calculate a forget gate for determining whether to retain the at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points according to the following formula: , Among them, f t represents the forget gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, W f represents the weight matrix of the forget gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes the multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes the multiple historical motion trajectory intersections, [h t-1 , X t ] means to set h t-1 and X t The long vector formed by concatenation, b f represents the bias value of the forget gate, b m Indicates the abnormal segment deviation.

32. The motion trajectory processing device according to any one of claims 28 to 31, characterized in that: The motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points, and also includes: using the LSTM model to calculate an input gate for determining whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points according to the following formula: , Among them, i t represents the input gate of the neuron at the tth moment of the LSTM model, σ represents the sigmoid function, and W i represents the weight matrix of the input gate, X t represents the input of the neuron at the tth moment of the LSTM model and includes the multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes the multiple historical motion trajectory intersections, [h t-1 , X t ] means to set h t-1 and X t The long vector formed by concatenation, b i Represents the bias value of the input gate.

33. The motion trajectory processing device according to any one of claims 28 to 31, characterized in that: The motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and / or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points, and also includes: using an LSTM model, according to the following formula, to determine whether to output at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points, so as to obtain the optimized motion route: , Among them, X t represents the input of the neuron at the tth moment of the LSTM model and includes the multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1th moment of the LSTM model and includes the multiple historical motion trajectory intersections, represents the input cell state of the neuron at the tth moment of the LSTM model, W c represents the weight matrix of the input cell state of the neuron at the tth moment of the LSTM model, b c represents the bias value of the input cell state of the neuron at the tth moment of the LSTM model, C t represents the cell state of the neuron at the tth moment of the LSTM model, C t-1 represents the cell state of the neuron at the t-1th moment of the LSTM model, f t represents the forget gate of the neuron at the tth moment of the LSTM model, i t represents the input gate of the neuron at the tth moment of the LSTM model, o t represents the output gate of the neuron at the tth moment of the LSTM model, W o represents the weight matrix of the output gate, b o represents the bias value of the output gate, h t It represents the output of the neuron at the t-th moment of the LSTM model and includes multiple intersection points of the optimized motion path.

34. The motion trajectory processing device according to claim 33, characterized in that: The movement route extraction module is further used to select the easternmost, southernmost, westernmost and northernmost four intersection points from the multiple intersection points of the optimized movement route; A geographical range including the movement route is determined according to the four intersection points, and a center point of the geographical range is determined as a center position of the optimized movement route.

35. The motion trajectory processing device according to claim 34, characterized in that: The movement route extraction module is also used to determine a plurality of grids of the geographic range and geohash code values ​​of the plurality of grids, wherein the plurality of grids share the central position.

36. The motion trajectory processing device according to claim 34, characterized in that: The motion route extraction module is further used to determine the relative coordinates of each of the multiple intersection points of the optimized motion route in a relative coordinate system with the center position as the origin.

37. The motion trajectory processing device according to claim 28, characterized in that: The motion route extraction module is also used for: The centers of the plurality of trajectory segments are clustered and the at least one cluster center of the plurality of trajectory segments is obtained.

Citation Information

Patent Citations

  • Emergency guiding method and emergency guiding system for individual on basis of big data

    CN103838846A

  • Track anomaly detection method under double view angles of time and space

    CN108804539A

  • Method for extracting target classic track in complex environment

    CN109000645A