WO2021115143A1 - Motion trajectory processing method, medium, apparatus, and device - Google Patents

Motion trajectory processing method, medium, apparatus, and device Download PDF

Info

Publication number
WO2021115143A1
WO2021115143A1 PCT/CN2020/132333 CN2020132333W WO2021115143A1 WO 2021115143 A1 WO2021115143 A1 WO 2021115143A1 CN 2020132333 W CN2020132333 W CN 2020132333W WO 2021115143 A1 WO2021115143 A1 WO 2021115143A1
Authority
WO
WIPO (PCT)
Prior art keywords
trajectory
motion
intersection
motion trajectory
route
Prior art date
Application number
PCT/CN2020/132333
Other languages
French (fr)
Chinese (zh)
Inventor
刘亘轶
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021115143A1 publication Critical patent/WO2021115143A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes

Definitions

  • One or more embodiments of the present application generally relate to the field of artificial intelligence, and specifically relate to a motion trajectory processing method, medium, device, and equipment.
  • a mobile terminal when recommending a movement route, is usually used to collect multiple movement trajectory data of multiple users, and the movement trajectory data including multiple GPS coordinate points are sent to the cloud-side server through the network, and the server transmits these movement data to the cloud server.
  • the trajectory data is directly stored as the motion route, or the center of mass calculation algorithm of the regular trajectory shape is used to store the motion trajectory data and the GPS coordinates of the center of mass as the motion route.
  • other users request an exercise route, they search for an exercise route close to the requesting user from the cloud-side database according to the GPS coordinates of the requesting user, and return it to the requesting user.
  • an embodiment of the present application provides a motion trajectory processing method, the method includes: obtaining a motion trajectory set, wherein the motion trajectory set includes a plurality of motion trajectories; and determining a motion route element according to the motion trajectory set, wherein the motion route element It includes at least one of a center position and an intersection point set, where the center position is shared by multiple grids and the motion track set is contained within the geographic range of the multiple grids; wherein the intersection point set includes information related to multiple trajectory segment clusters.
  • each of the multiple trajectory segment clusters includes multiple trajectory segments of multiple motion trajectories, and the distance between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, where adjacent The trajectory segments respectively belong to different motion trajectories among the multiple motion trajectories.
  • multiple trajectory segments of the multiple motion trajectories of the user are clustered, and multiple intersection points related to the multiple trajectory segment clusters are obtained as slaves.
  • the elements of the running route extracted from the user's multiple motion trajectories can reduce the storage and processing cost of the motion trajectory, and improve the processing efficiency of the motion trajectory; instead of making each grid correspond to a central position, multiple grids can share one The central position can also reduce the storage and processing cost of the motion trajectory, and improve the processing efficiency of the motion trajectory.
  • the motion route element further includes: a Geohash code corresponding to each grid in the plurality of grids, which is used to index the geographic range corresponding to each grid.
  • the retrieval efficiency of the movement route can be improved.
  • Geohash encoding includes at least 7-bit Base32 encoded characters.
  • the motion route element further includes: an intersection link table indicating a link relationship between each intersection of the plurality of intersections and at least one other intersection of the plurality of intersections.
  • the center position includes the GPS coordinates of the center position, and each of the multiple intersection points includes relative coordinates in a relative coordinate system with the center position as the origin.
  • the privacy of the user can be protected and sensitive data related to the user can be eliminated.
  • determining the movement route elements according to the set of movement trajectories includes: selecting the four most east, south, west, and north most intersections from a plurality of intersections; and determining the geography of the multiple grids based on the four intersections Range, and determine the center point of the geographic range as the center position.
  • 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; and dividing a plurality of trajectories whose distance between adjacent trajectory segments is less than a predetermined value
  • the segment cluster is a trajectory segment cluster among multiple trajectory segment clusters
  • a cluster vector corresponding to each trajectory segment cluster is determined to form multiple cluster vectors corresponding to the multiple trajectory segment clusters ; Determine the intersection between adjacent cluster vectors among multiple cluster vectors.
  • the start point coordinates of the cluster vector are the average value of the start point coordinates of the multiple trajectory segments in the trajectory segment cluster
  • the end point coordinates of the cluster vector are the average value of the end point coordinates of the multiple trajectory segments in the trajectory segment cluster.
  • an embodiment of the present application provides a motion trajectory processing method, which includes: obtaining multiple current motion trajectory intersection points related to a current motion trajectory set and multiple historical motion trajectory intersection points related to a historical motion trajectory set; And at least partly based on the abnormal segment deviation, 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, so as to obtain an optimized motion route , Wherein the abnormal segment deviation at least partially specifies the proportion of abnormal trajectory segments in the multiple trajectory segments in the current trajectory set, where the distance from the abnormal trajectory segment to at least one class center of the multiple trajectory segments exceeds the first predetermined value.
  • the abnormal segment deviation of the current motion trajectory set when fusing the current motion trajectory set and the historical motion trajectory set, the abnormal segment deviation of the current motion trajectory set is considered, and the abnormal segment deviation is the same as the GPS when multiple motion trajectories in the current motion trajectory set are generated.
  • Signal quality is related, so the abnormal segment deviation of the current motion trajectory set 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. More accurately controlling the fusion error can also improve the fusion quality.
  • the current motion trajectory set and the historical motion trajectory set are contained in the same geographic scope.
  • 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 LSTM (Long short-term memory , Long-short-term memory) model 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.
  • LSTM Long short-term memory , Long-short-term memory
  • 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 the LSTM model according to the following Formula calculation is used to determine whether to retain at least one of the multiple historical motion trajectory intersection points of the forgetting gate:
  • f t represents the forgetting gate of the neuron at the t-th moment of the LSTM model
  • represents the sigmoid function
  • W f represents the weight matrix of the forgetting gate
  • X t represents the input of the neuron at the t-th moment of the LSTM model and includes Multiple current motion trajectory intersections
  • h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections
  • [h t-1 ,X t ] represents h t-1
  • the long vector formed by splicing with X t , b f represents the offset value of the forgetting gate
  • b m represents the deviation of the abnormal segment.
  • determining whether to retain at least one current motion trajectory intersection of the multiple current motion trajectory intersections and/or at least one historical motion trajectory intersection of the multiple historical motion trajectory intersections further includes using an LSTM model according to the following formula Calculate the input gate used to determine whether to keep at least one of the multiple current motion trajectory intersection points:
  • i t represents neurons t-th time LSTM model input gate
  • represents a sigmoid function
  • W i represents the weight of the input gate of the weight matrix
  • X t denotes an input neuron t-th time LSTM models and comprising Multiple current motion trajectory intersections
  • h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections
  • [h t-1 ,X t ] represents h t-1
  • the long vector formed by splicing with X t , b i represents the bias value of the input gate.
  • determining whether to retain at least one current motion trajectory intersection of the multiple current motion trajectory intersections and/or at least one historical motion trajectory intersection of the multiple historical motion trajectory intersections further includes using an LSTM model according to the following formula It is determined 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 an optimized motion route:
  • X t represents the input of the neuron at the t-th time of the LSTM model and includes multiple current trajectory intersections
  • h t-1 represents the output of the neuron at the t-1th time of the LSTM model and includes multiple histories Point of intersection of motion trajectories
  • W c represents the weight matrix of the input cell state of the neuron at the t-th time of the LSTM model
  • b c represents the neuron at the t-th time of the LSTM model
  • the input cell state bias value, C t represents the cell state of the neuron at the t time of the LSTM model, C t-1 represents the cell state of the neuron at the t-1 time of the LSTM model, and f t represents The forget gate of the neuron at the t-th time of the LSTM model, i t represents the input gate of the neuron at the t-th time
  • the method further includes selecting the four most eastward, most southerly, most westward, and most northerly intersection points from the multiple intersection points of the optimized motion route;
  • the geographic range containing the optimized motion route is determined, and the center point of the geographic range is determined as the center position of the optimized motion route.
  • the method further includes determining a plurality of grids of a geographic range and geohash coding values of the plurality of grids, wherein the plurality of grids share a central location.
  • the storage and processing cost of the optimized movement route can be reduced, and the processing efficiency of the optimized movement route can be improved;
  • the retrieval efficiency of the optimized movement route can be improved.
  • the center position includes the GPS coordinates of the center position, and each of the multiple intersection points of the optimized movement route includes relative coordinates in a relative coordinate system with the center position as the origin.
  • the privacy of the user can be protected and sensitive data related to the user can be eliminated.
  • 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.
  • an embodiment of the present application provides a method for recommending a sports route.
  • the method includes: receiving a user's recommendation request for a sports route; acquiring the user's GPS coordinates, and calculating the user's GPS (Global Positioning System, global positioning system). ) The geohash code value of the coordinate; from multiple grid geohash code values, query the grid geohash code value with the smallest difference with the user's GPS coordinate geohash code value; obtain the smallest difference with the user's GPS coordinate geohash code value
  • the grid geohash code value corresponds to the motion route and the center position of the motion route, where the center position is shared by multiple grids containing the geographic range of the motion route; and the motion route is recommended to the user according to the center position.
  • each grid instead of making each grid correspond to a central position and making multiple grids share a central position, the storage and processing cost of the movement route can be reduced, and the processing efficiency of the movement route can be improved; in addition, by using The geohash code values of multiple grids index the movement route, which can improve the retrieval efficiency of the movement route.
  • an embodiment of the present application provides a computer-readable storage medium that stores instructions on the computer-readable storage, and when the instructions run on a machine, the machine executes any of the above methods.
  • an embodiment of the present application provides a motion route processing device, which includes: a processor; a memory, which stores instructions on the memory, and when the instructions are executed by the processor, the processor executes any of the above methods .
  • an embodiment of the present application provides a motion trajectory processing device.
  • the device includes a motion trajectory recording module for acquiring a motion trajectory set, where the motion trajectory set includes multiple motion trajectories; and a motion route extraction module for Determine the motion route element according to the motion trajectory set, where 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 track set is contained in the geographic range of the multiple grids; And wherein, the intersection set includes multiple intersections related to 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 phases in the multiple trajectory segments The distance between adjacent track segments is less than a predetermined value, and the adjacent track segments respectively belong to different motion tracks among the multiple motion tracks.
  • multiple trajectory segments of the multiple motion trajectories of the user are clustered, and multiple intersection points related to the multiple trajectory segment clusters are obtained as the user
  • the multiple motion trajectory elements can reduce the storage and processing cost of the motion trajectory, and improve the processing efficiency of the motion trajectory; instead of making each grid correspond to a central position, making multiple grids share a central position can also reduce The storage and processing cost of the motion trajectory improves the processing efficiency of the motion trajectory.
  • the motion route element further includes: a Geohash code corresponding to each grid in the plurality of grids, which is used to index the geographic range corresponding to each grid.
  • the retrieval efficiency of the movement route can be improved.
  • Geohash encoding includes at least 7-bit Base32 encoded characters.
  • the motion route element further includes: an intersection link table indicating a link relationship between each intersection of the plurality of intersections and at least one other intersection of the plurality of intersections.
  • the motion route extraction module is further used to determine the relative coordinates of each of the multiple intersection points in a relative coordinate system with the center position as the origin.
  • the privacy of the user can be protected and sensitive data related to the user can be eliminated.
  • the movement route extraction module is used to determine the movement route elements according to the set of movement trajectories, including: selecting the four most east, south, west, and northest intersections from a plurality of intersections; according to the four The intersection point determines the geographic range of multiple grids, and determines the center point of the geographic range as the center position.
  • the motion route extraction module is used to determine the motion route elements according to the motion trajectory set, including: dividing each motion trajectory in the motion trajectory set into multiple trajectory segments; The multiple trajectory segments whose spacing is less than the predetermined value are clustered into one trajectory segment cluster in the multiple trajectory segment clusters; according to the multiple trajectory segments in each trajectory segment cluster in the multiple trajectory clusters, it is determined to correspond to each track segment
  • the cluster vectors of the clusters thus form multiple cluster vectors corresponding to multiple trajectory segment clusters; the intersection between adjacent cluster vectors in the multiple cluster vectors is determined.
  • the start point coordinates of the cluster vector are the average value of the start point coordinates of the multiple trajectory segments in the trajectory segment cluster
  • the end point coordinates of the cluster vector are the average value of the end point coordinates of the multiple trajectory segments in the trajectory segment cluster.
  • an embodiment of the present application provides a motion trajectory processing device, which includes: a motion route extraction module, configured to obtain multiple current motion trajectory intersections related to the current motion trajectory set and information related to the historical motion trajectory set Multiple historical motion trajectory intersections; and a motion route optimization module that determines 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 based at least in part on the abnormal segment deviation A historical motion trajectory intersection point to obtain an optimized motion route; where the abnormal segment deviation at least partially specifies the proportion of abnormal trajectory segments in the multiple trajectory segments of the current motion trajectory set, where the distance of the abnormal trajectory segment is large At least one class center of the trajectory segments exceeds the first predetermined value.
  • the abnormal segment deviation of the current motion trajectory set is considered, and the abnormal segment deviation is the same as the GPS when multiple motion trajectories in the current motion trajectory set are generated.
  • the signal quality is related, so the abnormal segment deviation of the current motion trajectory set is used to determine whether to discard multiple historical motion trajectory intersections, which can more accurately control the fusion error and improve the fusion quality.
  • the current motion trajectory set and the historical motion trajectory set are contained in the same geographic scope.
  • 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: A LSTM (Long short-term memory) model 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.
  • a LSTM Long short-term memory
  • the motion route optimization module is used to determine 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. Yu: Using the LSTM model, calculate the forgetting gate used to determine whether to retain at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points according to the following formula:
  • f t represents the forgetting gate of the neuron at the t-th moment of the LSTM model
  • represents the sigmoid function
  • W f represents the weight matrix of the forgetting gate
  • X t represents the input of the neuron at the t-th moment of the LSTM model and includes Multiple current motion trajectory intersections
  • h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections
  • [h t-1 ,X t ] represents the combination of h tt and X
  • b f represents the offset value of the forget gate
  • b m represents the deviation of the abnormal segment.
  • the motion route optimization module is used to determine 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. Yu: Using the LSTM model, calculate the input gate used to determine whether to retain at least one of the current motion trajectory intersection points according to the following formula:
  • i t represents neurons t-th time LSTM model input gate
  • represents a sigmoid function
  • W i represents the weight of the input gate of the weight matrix
  • X t denotes an input neuron t-th time LSTM models and comprising Multiple current motion trajectory intersections
  • h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections
  • [h t-1 ,X t ] represents h t-1
  • the long vector formed by splicing with X t , b i represents the bias value of the input gate.
  • the motion route optimization module is used to determine 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. Yu: Using the LSTM model, determine whether to output at least one of the multiple current motion trajectory intersections and at least one of the multiple historical motion trajectory intersections according to the following formula, so as to obtain an optimized motion route:
  • X t represents the input of the neuron at the t-th time of the LSTM model and includes multiple current trajectory intersections
  • h t-1 represents the output of the neuron at the t-1th time of the LSTM model and includes multiple histories Point of intersection of motion trajectories
  • W c represents the weight matrix of the input cell state of the neuron at the t-th time of the LSTM model
  • b c represents the neuron at the t-th time of the LSTM model
  • the input cell state bias value, C t represents the cell state of the neuron at the t time of the LSTM model, C t-1 represents the cell state of the neuron at the t-1 time of the LSTM model, and f t represents The forget gate of the neuron at the t-th time of the LSTM model, i t represents the input gate of the neuron at the t-th time
  • the motion route extraction module is also used to select the four most east, south, west, and northest intersections from the multiple intersections of the optimized motion route; determine the included movement route according to the four intersections
  • the geographic range of the geographic area is determined, and the center point of the geographic range is determined as the center position of the optimized movement route.
  • the motion route extraction module is also used to determine multiple grids in a geographic range and geohash coding values of multiple grids, where multiple grids share a central position.
  • each grid instead of making each grid correspond to a central position and making multiple grids share a central position, the storage and processing cost of the movement route can be reduced, and the processing efficiency of the movement route can be improved; in addition, by using The geohash code values of multiple grids index the movement route, which can improve the retrieval efficiency of the movement route.
  • 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 the relative coordinate system with the center position as the origin.
  • the privacy of the user can be protected and the sensitive data related to the user can be eliminated.
  • the motion route extraction module is also used to:
  • FIG. 1 shows a schematic diagram of a scene in which a user's motion track is recorded through a terminal device according to an embodiment of the present application
  • FIG. 2 shows a schematic structural diagram of a terminal device 100 according to an embodiment of the present application
  • Fig. 3 shows a schematic diagram of trajectory segmentation and clustering during motion route extraction according to an embodiment of the present application
  • FIG. 4 shows a schematic diagram of a doubly linked list of intersection points of movement routes according to an embodiment of the present application
  • FIG. 5 shows a schematic diagram of geohash encoding of a movement route according to an embodiment of the present application
  • FIG. 6 shows a schematic diagram of a model of a long and short-term memory network according to an embodiment of the present application
  • FIG. 7 shows a schematic flowchart of a method for extracting a movement route according to an embodiment of the present application
  • FIG. 8 shows a schematic flowchart of a method for optimizing a movement route according to an embodiment of the present application
  • FIG. 9 shows a schematic flowchart of a method for recommending a sports route according to an embodiment of the present application.
  • Fig. 10 shows a schematic structural diagram of a motion route processing device according to an embodiment of the present application.
  • FIG. 1 shows a schematic diagram of a scene of recording a user's motion track through a terminal device according to an embodiment of the present application.
  • the terminal device such as the terminal device 100 in FIG. 2, may include, but is not limited to, a portable or mobile device , Mobile phones, personal digital assistants, cellular phones, handheld PCs, portable media players, handheld devices, wearable devices (for example, 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, IoT devices, industrial control devices, in-vehicle infotainment devices, streaming media client devices, e-books , Reading equipment, POS machines and other equipment.
  • a portable or mobile device Mobile phones, personal digital assistants, cellular phones, handheld PCs, portable media players, handheld devices, wearable devices (for example, watches, bracelets, display glasses or goggles, head-mounted displays, head-
  • the terminal device such as The terminal device 100 in FIG. 2 can determine the user's GPS (global positioning system, global positioning system) coordinates in real time according to the received satellite signals, so as to record the user's movement trajectory in real time.
  • GPS global positioning system, global positioning system
  • FIG. 2 shows a schematic structural diagram of a terminal device 100 according to an embodiment of the present application.
  • the terminal device 100 may include, but is not limited to, a GPS positioning module 110, a motion track recording module 120, and a data center 130.
  • the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 may include, but is not limited to, a GPS positioning module 110, a motion track recording module 120, and a data center 130. .
  • the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 may include, but is not limited to, a GPS positioning module 110, a motion track recording module 120, and a data center 130.
  • the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 may include, but is not limited to, a GPS positioning module 110, a motion track recording module 120, and a data center 130.
  • the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 may include, but is not
  • one or more components of the terminal device 100 can be composed of application-specific integrated circuits (ASIC), electronic circuits, (shared, dedicated or group) processors and/or memories that execute one or more software or firmware programs, combinational logic circuits, and devices that provide the described functions Any combination of other suitable components.
  • the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and/or any combination thereof.
  • the processor may be a single-core processor, a multi-core processor, etc., and/or any combination thereof.
  • FIG. 2 shows that the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 are all located on the terminal device 100 on the user side, the exercise route extraction module 140 and the exercise route optimization module 150 And one or more of the exercise route recommendation module 160 may be located on other devices, such as, but not limited to, a cloud-side server. Therefore, in the embodiment of the present application, the terminal device 100 and the cloud-side server, etc. Collectively referred to as motion trajectory processing equipment.
  • FIG. 2 shows that the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 are all located on the terminal device 100 on the user side, the exercise route extraction module 140 and the exercise route optimization module 150 And one or more of the exercise route recommendation module 160 may be located on other devices, such as, but not limited to, a cloud-side server. Therefore, in the embodiment of the present application, the terminal device 100 and the cloud-side server, etc. Collectively referred to as motion trajectory processing equipment.
  • the movement track recording module 120, the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 are independent modules, the movement route extraction module 140, the movement route optimization module 150, and the One or more of the exercise route recommendation modules 160 may also be used as a part of the exercise track recording module 120.
  • the GPS positioning module 110 is used to determine the GPS coordinates of the user (or the terminal device 100) according to the received satellite signals, and the motion track recording module 120 is used to record the user's motion track during the user's motion, specifically
  • the sports APP can obtain the user's GPS coordinates from the GPS positioning module 110 at a certain frequency (ie, dot frequency).
  • the GPS coordinates and the corresponding time will constitute a track point, and a motion track may include multiple track points.
  • the motion trajectory recorded by the motion trajectory recording module 120 may be stored in the data center 130.
  • the data center 130 may include, but is not limited to, non-transient objects manufactured or formed by machines or equipment.
  • a tangible arrangement of state which includes storage media, such as hard disks or any other types of disks, including floppy disks, optical disks, compact disk read-only memory (CD-ROM), compact disk rewritable (CD-RW), and magneto-optical disks ;
  • 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); magnetic or optical card; or any other type of medium suitable for storing data.
  • the exercise route extraction module 140 is used to record the user from the exercise track recording module 120 within a period of time (for example, one day, three days, one week, two weeks, one month or other Time period) Extract a simplified motion route from multiple motion trajectories generated in the same geographic range (for example, the same sports field).
  • a period of time for example, one day, three days, one week, two weeks, one month or other Time period
  • Extract a simplified motion route from multiple motion trajectories generated in the same geographic range for example, the same sports field.
  • Examples of multiple motion trajectories may be, but are not limited to, motion trajectories generated by the user today, yesterday, and the day before yesterday, or multiple motion trajectories obtained by dividing the motion trajectory generated by the user in one exercise, for example, The motion trajectory generated by the user running multiple laps along the sports field is divided into multiple motion trajectories obtained by dividing each lap.
  • the motion route model may include, but is not limited to, a set of multiple intersection points constituting the motion route, and the intersection point set includes multiple intersection points related to multiple trajectory segment clusters, wherein each of the multiple trajectory segment clusters
  • the trajectory segment cluster includes multiple trajectory segments of the motion trajectory, and the distance 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 .
  • the exercise route optimization module 150 is used to merge the intersection of the current exercise route and at least one historical exercise route in the same geographic area (for example, the same sports venue) based on the cyclic neural network 151 to obtain An optimized exercise route in the geographic range is stored in the data center 130 as a default exercise route in the geographic range.
  • the current exercise route refers to the exercise route extraction module 140 extracted from the current exercise trajectory set generated by the user in the current time period (for example, one day, three days, one week, two weeks, one month, or other time periods).
  • each historical exercise route in at least one historical exercise route refers to the historical time period (for example, one day, three days, one week, two weeks, one month) from the user before the current time period through the exercise route extraction module 140 Or other time periods).
  • 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.
  • the recurrent neural network 151 Examples of may include, but are not limited to, an LSTM (long short-term memory) network and a GRU (gated recurrent unit, gated recurrent unit) network.
  • each neuron of the recurrent neural network 151 may Related to the movement route at different times.
  • the fusion includes using the cyclic 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. Therefore, the optimized movement route includes the current movement route and one or the other of each historical movement route. Multiple intersections.
  • the current exercise route generation user and the historical exercise route generation users may be the same or different.
  • the terminal device 100 may obtain the exercises of other users in the same geographic area from the server, for example, through the network. route.
  • the sports route recommendation module 160 is configured to receive a user's recommendation request for a sports route, obtain the user's GPS coordinates, and recommend a sports route close to the user according to the user's GPS coordinates.
  • 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.
  • one or more components of the motion route extraction module 140 can be integrated by dedicated Any combination of circuits (ASIC), 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 .
  • the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and/or any combination thereof.
  • the processor may be a single-core processor, a multi-core processor, etc., and/or any combination thereof.
  • the trajectory segmentation unit 141 may be used to obtain multiple motion trajectories recorded by the motion trajectory recording module 120 from the data center 130, and divide each motion trajectory into multiple trajectory segments.
  • each trajectory can be expressed as
  • TR m represents the m-th motion trajectory
  • n m represents the number of trajectory points included in the m-th motion trajectory
  • the trajectory dividing unit 141 may represent two trajectory points that are adjacent in time as a trajectory segment, wherein the direction of the trajectory segment is determined by the earlier trajectory point (ie, the starting trajectory point). Point to a later track point (ie, end track point), and the size of the track segment is the distance between two track points.
  • Figure 3 shows an example of three motion trajectories TR 1 to TR 3 , it should be noted that only a part of the motion trajectories TR 1 to TR 3 are shown in the figure, where each motion trajectory is divided into multiple trajectories segment.
  • the trajectory clustering unit 142 may sequentially cluster the trajectory segments of each motion trajectory into a plurality of trajectory segment clusters. Among them, in a trajectory segment cluster, the trajectory segments between adjacent trajectory segments The distance is less than a predetermined value, wherein the adjacent track segments respectively belong to different running tracks in the plurality of running tracks.
  • trajectory segments ts i and ts j are represented as ts i and ts j , where the starting point of the trajectory segment ts i is si , the end point is e i , the starting point of the trajectory segment ts j is s j , and the end point is e j , then
  • the distance between trajectory segments ts i and ts j can be calculated based on the following formula:
  • l ⁇ 1 J represents a path section starting point ts to the track segment s j i is the vertical distance ts
  • l ⁇ 2 represents the end of the track period ts J e j to the track segment i is the vertical distance ts
  • 1 represents a locus I starting period ts in the track section s i ts s j J starting from the projection point in the track period ts of I
  • 2 indicates the end of the track segment e i i ts to ts track segment endpoint e j J
  • the distance of the projection point on the trajectory segment ts i , d represents the distance between the trajectory segment ts i and ts j .
  • the trajectory clustering unit 142 of FIG. 2 may first determine the first trajectory segment cluster and the reference trajectory segment of the first trajectory segment cluster, and the trajectory clustering unit 142 of FIG. Determine the trajectory segment that can be clustered with the reference trajectory segment among the trajectory segments of each motion trajectory.
  • the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P11 of TR 1 , and determine that it can be compatible with the trajectory segment P11 of TR 1 in other trajectory segments.
  • FIG track clustering unit 1422 may continue to determine the track segment of P21 TR 2 and TR track segment 3 and P31 the spacing between the predetermined value smaller than P32 and thus can be used as the track TR 3 segments P31 and P32 adjacent tracks TR track segment clustering section 3 P31 and P32, then finally, the clustering unit 142 may track TR. 1 trajectory segment P11, TR track segment P31 and P32 3 and cluster TR 2 P21 path sections for the first track segment cluster.
  • the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P31 of TR 3 , and it can be matched with the trajectory segment of TR 3 in other trajectory segments.
  • P31 cluster path sections in particular, the trajectory clustering unit may determine the track segment P11 142 tracks TR 1 and TR 2 and the segment of P21 spacing between the tracks TR 3 is less than the predetermined value P31 segment, it is possible to TR 1 TR trajectory segment P11 and P21 of a track section 2 and section 3 of the track TR P31 adjacent tracks TR track segment P31 clustering section 3 for the first track segment cluster.
  • the trajectory clustering unit 142 in FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the first trajectory segment cluster.
  • the trajectory clustering unit 142 may determine the second trajectory segment cluster and the reference trajectory segment of the second trajectory segment cluster.
  • the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the second trajectory segment cluster as the trajectory segment P12 of TR 1 , and determine that it can be compatible with the trajectory segment P12 of TR 1 in other trajectory segments.
  • cluster path section, in particular, FIG. 2 locus clustering unit 142 can determine the distance between the track segments P33 TR 3 and TR track segment 1 is less than the predetermined value P12, and thus may be used as the trajectory of a segment P12 TR adjacent tracks segment P12 of the track segment TR.
  • the final trajectory clustering unit 142 may track TR. 1 segment of P12, P33 TR track segment 3 and segment track TR 2 P22 cluster for the second trail segment cluster. It should be noted that the trajectory clustering unit 142 of FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the second trajectory segment cluster.
  • the trajectory clustering unit 142 of FIG. 2 can determine other trajectory segment clusters of the motion trajectory. It should be noted that, for the motion trajectory that is different from that shown in FIG. 3, the trajectory segment clusters of the motion trajectory can be determined based on the principle similar to the foregoing.
  • the trajectory extraction unit 143 may calculate a cluster vector based on each trajectory segment in the cluster.
  • the trajectory extraction unit 143 may use the average value of the GPS coordinates of the starting trajectory point of each trajectory segment in the trajectory segment cluster as the GPS coordinates of the starting point of the cluster vector, and the GPS coordinates of the ending trajectory point of each trajectory segment The mean value is used as the GPS coordinates of the end point of the cluster vector.
  • 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 can also be determined based on any other suitable method.
  • the trajectory clustering unit 142 is also used to determine the abnormal trajectory segment and determine the proportion of the abnormal trajectory segment in all the trajectory segments, that is, the deviation of the abnormal segment.
  • the trajectory clustering unit 142 may use a hierarchical clustering algorithm, a K-means clustering algorithm or other clustering algorithms to cluster the center points of each trajectory segment of the multiple running trajectories, and obtain multiple trajectory segment center points.
  • the trajectory clustering unit 142 can calculate the distance between the center point of each trajectory segment of multiple running trajectories and the center of each category, and the minimum distance between the center point and the center of each category is greater than a predetermined
  • a trajectory segment with a value (the predetermined value is the same as or different from the aforementioned predetermined value related to the distance between trajectory segments) is marked as an abnormal trajectory segment.
  • the trajectory segment P15 of TR 1 and the trajectory segment P35 of TR 3 may be marked as abnormal trajectory segments.
  • a higher abnormal segment deviation can indicate poor GPS signal quality during movement.
  • 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.
  • the motion route model may include a set of intersection points of adjacent cluster vectors of adjacent trajectory segment clusters.
  • the model element determining unit 144 may extend one or two of the adjacent cluster vectors to determine the adjacent cluster vector The GPS coordinates of the intersection between the adjacent cluster vectors; in the case where the adjacent cluster vectors have intersected, the model element determination unit 144 can directly determine the GPS coordinates of the intersection between the adjacent cluster vectors.
  • the sports route model can also include the starting point of the sports route and the end of the sports route.
  • the model element determining unit 144 may use the start 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 further include an intersection link table indicating the link relationship between each intersection point in the intersection point set of the cluster vector and the other at least one intersection point, wherein the intersection point set includes the start point and the end point of the motion route.
  • the model element determining unit 144 may determine the doubly linked list between the intersection points as shown in FIG.
  • intersection point 1 may be the cluster of the first trajectory segment cluster of the motion trajectory.
  • Intersection point 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,
  • the end point can be the end point of the movement route.
  • the doubly linked list shown in FIG. 4 enables the user to move along the forward direction of the movement route (for example, from the starting point shown in FIG. 4 to the end point shown in FIG.
  • model element determining unit 144 may also determine a one-way linked list between intersections, that is, each intersection shown in FIG. 4 may include the GPS coordinates of the intersection and the link to the previous intersection (for example, but not Limited to pointers) or links to the next intersection (for example, but not limited to pointers).
  • the sports route model can also include the index of the sports route, that is, the geohash code value of multiple grids representing the geographic range of the sports route, where the geohash code is An address encoding 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 geographic locations.
  • Figure 5 shows four grids representing the geographic range of the movement route and their geohash code values.
  • the model element determination unit 144 can determine the smallest bounding rectangle of the movement route, wherein two of the smallest bounding rectangles One edge is parallel to the line of latitude and is determined by the latitude coordinates of the southernmost and northernmost intersection points in the set of intersection points of the movement route, and the other two edges are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the movement route.
  • the model element determining unit 144 may use the center point of the minimum circumscribed 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).
  • the model element determination unit 144 of FIG. 2 can take the center position as the center, divide the minimum bounding rectangle of the motion route into four grids, and determine the geohash code value corresponding to the geographic range of each grid.
  • the number of bits of the geohash encoding value may be, for example, but not limited to, 7-bit base32 encoding.
  • the encoding values of the four grids are wx4g340, wx4g341, wx4g342, and wx4g343, respectively.
  • Fig. 5 is only an example of a grid that characterizes the geographic range of the movement route.
  • the movement route formed by each intersection is not limited to the movement route shown in Fig. 5, and the GPS coordinates of the center position are not limited to the figure. GPS coordinates shown.
  • the sports route model may also include the GPS coordinates of the center position of the sports route, and the coordinates of each intersection point of the sports route are relative coordinates with respect to the center position.
  • the model element determination unit 144 may use the aforementioned center position as the origin to construct a relative coordinate system, and convert the absolute GPS coordinates (for example, longitude and latitude) of each intersection of the movement route into relative coordinates in the relative coordinate system. Coordinates, in this way, can eliminate sensitive data related to users.
  • the model element determination unit 144 may also save each element 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.
  • the exercise route optimization module 150 may be based on the recurrent neural network 151 to compare the current exercise route in the same geographic area (for example, the same sports venue) and The intersections of at least one historical movement route are merged to obtain an optimized movement route within the geographic range.
  • the recurrent neural network 151 as the LSTM network as an example to illustrate the fusion process of the current movement route and at least one historical movement route
  • FIG. 6 shows a schematic diagram of a model of the LSTM network. As shown in FIG.
  • the LSTM network may include a plurality of neurons a 1 ⁇ a t, each neuron associated with a movement route, e.g., neuron a 1 associated with the initial time course of motion, the movement route a neuron t-1 and the first time of t-1 Related neuron a movement route t to t-th time (e.g., current motion path) related to each neuron in accordance with the generation time pieces movement route (e.g., movement route extracting module 140 extracts from the trajectory set movement route Or the time at which the exercise route extraction module 140 stores the extracted exercise route in the data center 130).
  • the fusion of the intersection points of the motion routes is gradually carried out over time.
  • each neuron comprises input and output, to neurons and neurons A t A t-1 as an example
  • X t denotes an input neuron A t, which includes information related to the neuronal A t motion path (e.g., the current movement path) of the intersection set
  • h t represents the output neuron a t, which comprises determining by neurons a t optimized movement path set intersection
  • X t-1 represents neurons a t-1
  • the input of neuron A t-1 which includes the set of intersection points of the movement route related to neuron A t-1 (for example, a historical movement route before the current movement route)
  • h t-1 represents the output of neuron A t-1, which includes The set of intersection points of the optimized motion route determined by the neuron At -1.
  • the neuron at the previous moment can transmit its cell state and output to the neuron at the next moment.
  • the cell state is the memory of the LSTM network
  • the cell state transmitted to a neuron can include the state and output of the neuron before the neuron.
  • a collection of intersection points of multiple motor routes related to a neuron, and the cell state transmitted from one neuron to the next neuron may include the intersection of multiple motor routes related to the neuron and the neurons before the neuron. set.
  • neurons A t-1 can be transmitted to the neurons neurons A A t t-1 t-1 h, the output state of the cell, and C t-1.
  • the output and cell state of each neuron is not only related to the input of the neuron, but also related to the output and cell state of the previous neuron.
  • the output h t-1 of neuron A t-1 is determined by The set of intersection points of the optimized motion route determined by the neuron At -1 will include one or more intersection points of the historical motion route from the 1st moment to the t-1th moment.
  • the output h t of the neuron A t is determined by the neuron movement route optimization set intersection membered t a determination may include a history of the current course of motion and the movement route of the first time t 1 to time t-1 the first time or a plurality of intersections.
  • the calculation formula of the forget gate f t is as follows:
  • represents the sigmoid function
  • W f represents the weight matrix of the forgetting gate
  • [h t-1 ,X t ] represents the long vector formed by splicing h t-1 and X t
  • b f represents the offset value of the forgetting gate
  • b m represents the abnormal segment deviation calculated when determining the model element of the current motion route. It should be noted that b m of each neuron represents the abnormal segment deviation calculated when determining the model element of the historical motion route related to each neuron. .
  • represents the sigmoid function
  • W i represents the weight matrix of the input gate
  • [h t-1 ,X t ] represents the long vector formed by splicing h t-1 and X t
  • b i represents the bias value of the input gate.
  • the cell state can be obtained i t C t A t neurons via forgetting input gate door and f t, the specific calculation formula is as follows:
  • a neuron output gate o t t is calculated as follows:
  • W o represents the weight matrix of the output gate
  • b o represents the bias value of the output gate
  • the movement route optimization module 150 of FIG. 2 can use the GRU network and implement it based on similar principles. The fusion of the current movement route and the intersection of each historical movement route.
  • the model feature determination unit 144 may also be used in accordance with the movement route model to determine the movement route optimization model element A t neuron output.
  • the model feature determination unit 144 may determine the intersection of the link table link relationship between each intersection in the intersection set a movement route optimization neuron output in A t least one other point of intersection, for example, but not limited to, such as Figure 4 shows the doubly linked list between the intersection points.
  • the model determination unit 144 may feature A t from neural element In the set of intersection points of the output optimized motion route, select an intersection point as the starting point of the optimized motion route, calculate the distance between the remaining intersection points and the starting point (for example, but not limited to the Euclidean distance between two points), and determine the distance from the starting point The nearest intersection is used as the second intersection of the optimized movement route, and then the intersection closest to the second intersection is determined from the remaining intersections as the third intersection of the optimized movement route, and so on, until the last intersection is determined To optimize the end point of the exercise route.
  • Intersection link movement route optimization table A t the output neurons, each of the intersections other than the start and end points may include GPS coordinates of the intersection, the intersection of a front link (e.g., but not limited to, a pointer) and The link to the next point of intersection (for example, but not limited to, pointer), and the starting point may include the GPS coordinates of the starting point, the link to the next point of intersection (for example, but not limited to, pointer), and the end point may include the GPS coordinates of the end point, to The link to the previous intersection (for example, but not limited to, pointer).
  • a front link e.g., but not limited to, a pointer
  • the link to the next point of intersection for example, but not limited to, pointer
  • the starting point may include the GPS coordinates of the starting point
  • the link to the next point of intersection for example, but not limited to, pointer
  • the end point may include the GPS coordinates of the end point, to The link to the previous intersection (for example, but not limited
  • Model element determination unit 144 may also determine which value is characterized by the optimized coding geohash movement route A t neuron output raster plurality of geographical range.
  • the model feature determination unit 144 may determine the minimum bounding rectangle of the movement route optimization output neuron A t, wherein, the smallest circumscribed rectangle in which two parallel sides and a set of weft intersections movement route optimization most South The latitude coordinates of the northernmost point of intersection are determined, and the other two sides are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the optimized motion route.
  • the model element determination unit 144 can determine the minimum circumscribed rectangle of the optimized motion route. center as the movement route optimization by the output neuron a t the center position.
  • Model determination unit 144 may be elements of minimum bounding rectangle center position of the movement route optimization neuron output A t the center, the movement route optimization divided into four grid, each grid is then determined corresponding to the geographical range geohash encoding value.
  • Model element determination unit 144 may also be in a central location of neurons A t outputted movement route optimization origin construct relative coordinate system, by the absolute GPS coordinates of each intersection optimized movement route neuron A t output (e.g., longitude And latitude) are converted to relative coordinates in the relative coordinate system.
  • a t output e.g., longitude And latitude
  • Model element determination unit 144 may also be determined according to the motion path model, each element of the movement route optimization A t neuron output stored in the data center 130, as the range of the current geographic movement route and the pieces of the history of the movement route which The default exercise route for and the candidate exercise route to be recommended to the user.
  • the sports route recommendation module 160 may receive a user's recommendation request for a sports route, obtain the user's current GPS coordinates, and calculate the geohash code value of the user's GPS coordinates. Then, the sports 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 sports routes stored in the data center 130.
  • the geohash code value can represent a similar geographic location.
  • the exercise route recommendation module 160 can recommend to the user The movement route.
  • the exercise route recommendation module 160 may present the recommended exercise route on the map according to the intersection link table of the recommended exercise route; at the intersection of the recommended exercise route In the case where the coordinates of are relative to the center position, the exercise route recommendation module 160 can present the recommended exercise route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended exercise route.
  • the storage and processing cost of the motion trajectory can be reduced, and the motion can be improved.
  • the processing efficiency of the trajectory is
  • the storage and processing cost of the movement track can be further reduced, and the geohash encoding of multiple grids can be used.
  • the value index of the sports route can improve the retrieval efficiency of the sports route.
  • the privacy of the user can be protected and the sensitive data related to the user can be eliminated.
  • the abnormal segment deviation of the current movement route is considered, that is, the quality of the GPS signal when recording the movement trajectory related to the current movement route is considered.
  • the GPS signal quality is poor, the discarded historical movement routes will have fewer intersections, so the fusion error can be controlled more accurately, and the quality of the optimized movement route can also be improved.
  • the terminal device 100 is a user-side device. Compared with the processing of the movement route on the cloud-side server in the prior art, the embodiment of the present application can reduce the inability to cause network and cloud-side failures. Deal with the risk of the sports route, and can reduce the response delay to the user's route recommendation request.
  • Fig. 7 shows a schematic flowchart of a method for extracting a movement route according to an embodiment of the present invention.
  • the motion route extraction module 140 of the terminal device 100 in FIG. 2 may implement different blocks or other parts of the method.
  • the method for extracting the movement route may include:
  • Examples of multiple motion trajectories may be, but are not limited to, the motion trajectories generated by the user today, yesterday, and the day before, or multiple motion trajectories obtained by dividing the motion trajectory generated by the user in one exercise, for example, the user
  • the motion trajectory generated by running multiple laps along the sports field is divided into multiple motion trajectories according to each lap.
  • each of the multiple movement trajectories is divided into multiple trajectory segments.
  • each trajectory can be expressed as
  • TR m represents the m-th motion trajectory
  • n m represents the number of trajectory points included in the m-th motion trajectory
  • the trajectory dividing unit 141 may represent two trajectory points that are adjacent in time as a trajectory segment, wherein the direction of the trajectory segment is determined by the earlier trajectory point (ie, the starting trajectory point). Point to a later track point (ie, end track point), and the size of the track segment is the distance between two track points.
  • Figure 3 shows an example of three motion trajectories TR 1 to TR 3 , it should be noted that only a part of the motion trajectories TR 1 to TR 3 are shown in the figure, where each motion trajectory is divided into multiple trajectories segment.
  • trajectory clustering unit 142 Through the trajectory clustering unit 142, the trajectory segments of each motion trajectory are sequentially clustered into a plurality of trajectory segment clusters, wherein, within a trajectory segment cluster, the distance between adjacent trajectory segments is less than a predetermined value, wherein In a cluster of trajectory segments, the distance between adjacent trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different running trajectories of the multiple running trajectories.
  • trajectory segments ts i and ts j are represented as ts i and ts j , where the starting point of the trajectory segment ts i is si , the end point is e i , the starting point of the trajectory segment ts j is s j , and the end point is e j , then
  • the distance between trajectory segments ts i and ts j can be calculated based on the following formula:
  • l ⁇ 1 J represents a path section starting point ts to the track segment s j i is the vertical distance ts
  • l ⁇ 2 represents the end of the track period ts J e j to the track segment i is the vertical distance ts
  • 1 represents a locus I starting period ts in the track section s i ts s j J starting from the projection point in the track period ts of I
  • 2 indicates the end of the track segment e i i ts to ts track segment endpoint e j J
  • the distance of the projection point on the trajectory segment ts i , d represents the distance between the trajectory segment ts i and ts j .
  • the trajectory clustering unit 142 of FIG. 2 may first determine the first trajectory segment cluster and the reference trajectory segment of the first trajectory segment cluster, and the trajectory clustering unit 142 of FIG. Determine the trajectory segment that can be clustered with the reference trajectory segment among the trajectory segments of each motion trajectory.
  • the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P11 of TR 1 , and determine that it can be compatible with the trajectory segment P11 of TR 1 in other trajectory segments.
  • FIG track clustering unit 1422 may continue to determine the track segment of P21 TR 2 and TR track segment 3 and P31 the spacing between the predetermined value smaller than P32 and thus can be used as the track TR 3 segments P31 and P32 adjacent tracks TR track segment clustering section 3 P31 and P32, then finally, the clustering unit 142 may track TR. 1 trajectory segment P11, TR track segment P31 and P32 3 and cluster TR 2 P21 path sections for the first track segment cluster.
  • the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P31 of TR 3 , and it can be matched with the trajectory segment of TR 3 in other trajectory segments.
  • P31 cluster path sections in particular, the trajectory clustering unit may determine the track segment P11 142 tracks TR 1 and TR 2 and the segment of P21 spacing between the tracks TR 3 is less than the predetermined value P31 segment, it is possible to TR 1 TR trajectory segment P11 and P21 of a track section 2 and section 3 of the track TR P31 adjacent tracks TR track segment P31 clustering section 3 for the first track segment cluster.
  • the trajectory clustering unit 142 in FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the first trajectory segment cluster.
  • the trajectory clustering unit 142 may determine the second trajectory segment cluster and the reference trajectory segment of the second trajectory segment cluster.
  • the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the second trajectory segment cluster as the trajectory segment P12 of TR 1 , and determine that it can be compatible with the trajectory segment P12 of TR 1 in other trajectory segments.
  • cluster path section, in particular, FIG. 2 locus clustering unit 142 can determine the distance between the track segments P33 TR 3 and TR track segment 1 is less than the predetermined value P12, and thus may be used as the trajectory of a segment P12 TR adjacent tracks segment P12 of the track segment TR.
  • the final trajectory clustering unit 142 may track TR. 1 segment of P12, P33 TR track segment 3 and segment track TR 2 P22 cluster for the second trail segment cluster. It should be noted that the trajectory clustering unit 142 of FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the second trajectory segment cluster.
  • the trajectory clustering unit 142 of FIG. 2 can determine other trajectory segment clusters of the motion trajectory. It should be noted that, for the motion trajectory that is different from that shown in FIG. 3, each trajectory segment cluster of the motion trajectory can be determined based on the principle similar to the foregoing.
  • the trajectory extraction unit 143 calculates a cluster vector based on each trajectory segment in the cluster.
  • the trajectory extraction unit 143 may use the average value of the GPS coordinates of the starting trajectory point of each trajectory segment in the trajectory segment cluster as the GPS coordinates of the starting point of the cluster vector, and the GPS coordinates of the ending trajectory point of each trajectory segment The mean value is used as the GPS coordinates of the end point of the cluster vector.
  • 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 can also be determined based on any other suitable method.
  • S705 Through the trajectory clustering unit 142, determine the abnormal trajectory segments in the multiple motion trajectories, and determine the proportion of the abnormal trajectory segments in all the trajectory segments, that is, the abnormal segment deviation.
  • the trajectory clustering unit 142 may use a hierarchical clustering algorithm, a K-means clustering algorithm or other clustering algorithms to cluster the center points of each trajectory segment of the multiple running trajectories, and obtain multiple trajectory segment center points.
  • the trajectory clustering unit 142 can calculate the distance between the center point of each trajectory segment of multiple running trajectories and the center of each category, and the minimum distance between the center point and the center of each category is greater than a predetermined
  • a trajectory segment with a value (the predetermined value is the same as or different from the aforementioned predetermined value related to the distance between trajectory segments) is marked as an abnormal trajectory segment.
  • the trajectory segment P15 of TR 1 and the trajectory segment P35 of TR 3 may be marked as abnormal trajectory segments.
  • a higher abnormal segment deviation can indicate poor GPS signal quality during movement.
  • the model element determining unit 144 determines the intersection of the adjacent cluster vectors of the adjacent trajectory segment clusters to determine the set of intersections of the simplified motion routes extracted from the motion trajectory.
  • the model element determining unit 144 may extend one or two of the adjacent cluster vectors to determine the adjacent cluster vector The GPS coordinates of the intersection between the adjacent cluster vectors; in the case where the adjacent cluster vectors have intersected, the model element determination unit 144 can directly determine the GPS coordinates of the intersection between the adjacent cluster vectors.
  • the model element determining unit 144 determines the start point and the end point of the motion route in the set of intersections of the motion route.
  • the model element determining 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.
  • S708 Determine, through the model element determining unit 144, an intersection link table indicating a link relationship between each intersection in the set of intersections of the motion route and at least one other intersection, where the set of intersections includes the start and end points of the motion route.
  • the model element determining unit 144 may determine the doubly linked list between the intersection points as shown in FIG. 4, where the starting point may be the starting point of the motion route, and the intersection point 1 may be the cluster of the first trajectory segment cluster of the motion trajectory. The intersection point between the vector and the cluster vector of the second trajectory segment cluster. Intersection point 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, The end point can be the end point of the movement route. In addition, each intersection shown in FIG.
  • the doubly linked list shown in FIG. 4 enables the user to move along the forward direction of the movement route (for example, from the starting point shown in FIG. 4 to the end point shown in FIG.
  • model element determining unit 144 may also determine a one-way linked list between intersections, that is, each intersection shown in FIG. 4 may include the GPS coordinates of the intersection and the link to the previous intersection (for example, but not Limited to pointers) or links to the next intersection (for example, but not limited to pointers).
  • the model element determination unit 144 may determine the minimum circumscribed rectangle of the movement route, where two sides of the minimum circumscribed rectangle are parallel to the latitude and are determined by the latitude coordinates of the southernmost and northernmost intersection points in the set of intersection points of the movement route. It is determined that the other two sides are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the movement route, and the model element determination unit 144 may use the center point of the smallest bounding rectangle of the movement route as the center of the movement route.
  • the position for example, the GPS coordinates of the center position of the movement route shown in FIG. 5 are (121.623, 29.855).
  • the model element determining unit 144 determines geohash coding values of multiple grids representing the geographic range of the movement route.
  • the model element determining unit 144 of FIG. 2 may take the center position as the center, divide the minimum bounding rectangle of the movement route into four grids, and determine the geographic location of each grid.
  • the geohash code value corresponding to the range, where the number of bits of the geohash code value can be, for example, but not limited to, 7-bit base32 coding.
  • the coding values of the four grids are wx4g340, wx4g341, wx4g342, and wx4g343.
  • Fig. 5 is only an example of a grid that characterizes the geographic range of the movement route.
  • the movement route formed by each intersection is not limited to the movement route shown in Fig. 5, and the GPS coordinates of the center position are not limited to the figure. GPS coordinates shown.
  • the model element determining unit 144 determines the relative coordinates of each intersection of the motion route with respect to the center position.
  • the model element determination unit 144 may use the aforementioned center position as the origin to construct a relative coordinate system, and convert the absolute GPS coordinates (for example, longitude and latitude) of each intersection of the movement route into relative coordinates in the relative coordinate system. Coordinates, in this way, can eliminate sensitive data related to users.
  • Fig. 8 shows a schematic flowchart of a method for optimizing a movement route according to an embodiment of the present invention.
  • the motion route optimization module 150 and the motion route extraction module 140 of the terminal device 100 in FIG. 2 may implement different blocks or other parts of the method.
  • the optimization method of the movement route may include:
  • the current exercise route refers to the current route generated by the user in the current time period (for example, but not limited to, one day, three days, one week, two weeks, one month, or other time periods) by the method shown in FIG.
  • the exercise route extracted from the exercise track set, each historical exercise route in at least one historical exercise route refers to the historical time period from the user before the current time period (for example, but not limited to, One day, three days, one week, two weeks, one month, or other time period) generated in the historical movement trajectory set extracted from the movement route.
  • the exercise route optimization module 150 through the exercise route optimization module 150, input the intersection set of the current exercise route and the intersection set of each historical exercise route in the at least one historical exercise route into different neurons of the cyclic neural network to obtain the intersection set of the optimized exercise route .
  • the recurrent neural network can refer to the above description related to FIG. 6, which will not be repeated here.
  • the model element determining unit 144 determines the intersection link table of the optimized motion route output by the last neuron of the recurrent neural network.
  • the unit 144 is determined by the model elements, model according to the movement route, the movement route optimization is determined neuron output A t intersection link table.
  • the model feature determination unit 144 may determine the intersection of the link table link relationship between each intersection in the intersection set a movement route optimization neuron output in A t least one other point of intersection, for example, but not limited to, such as Figure 4 shows the doubly linked list between the intersection points.
  • the model determination unit 144 may feature A t from neural element In the set of intersection points of the output optimized motion route, select an intersection point as the starting point of the optimized motion route, calculate the distance between the remaining intersection points and the starting point (for example, but not limited to the Euclidean distance between two points), and determine the distance from the starting point The nearest intersection is used as the second intersection of the optimized movement route, and then the intersection closest to the second intersection is determined from the remaining intersections as the third intersection of the optimized movement route, and so on, until the last intersection is determined To optimize the end point of the exercise route.
  • Intersection link movement route optimization table A t the output neurons, each of the intersections other than the start and end points may include GPS coordinates of the intersection, the intersection of a front link (e.g., but not limited to, a pointer) and The link to the next point of intersection (for example, but not limited to, pointer), and the starting point may include the GPS coordinates of the starting point, the link to the next point of intersection (for example, but not limited to, pointer), and the end point may include the GPS coordinates of the end point, to The link to the previous intersection (for example, but not limited to, pointer).
  • a front link e.g., but not limited to, a pointer
  • the link to the next point of intersection for example, but not limited to, pointer
  • the starting point may include the GPS coordinates of the starting point
  • the link to the next point of intersection for example, but not limited to, pointer
  • the end point may include the GPS coordinates of the end point, to The link to the previous intersection (for example, but not limited
  • the model element determining unit 144 determines the geohash encoding values of multiple grids representing the geographic range of the optimized motion route output by the last neuron of the recurrent neural network.
  • the elements of the model determination unit 144 may determine the minimum bounding rectangle of the movement route optimization output neuron A t, wherein two of the smallest circumscribed rectangle sides parallel to weft and the movement route optimization by the intersection of a set of The latitude coordinates of the southernmost and northernmost intersection points in the middle are determined, and the other two sides are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the optimized motion route.
  • the model element determination unit 144 can determine the optimal motion route's latitude coordinates. the center point of the smallest circumscribed rectangle as the center position of the movement route optimization a t neuron output.
  • Model determination unit 144 may be elements of minimum bounding rectangle center position of the movement route optimization neuron output A t the center, the movement route optimization divided into four grid, each grid is then determined corresponding to the geographical range geohash encoding value.
  • the model element determining unit 144 determines the relative coordinates of each intersection of the optimized motion route output by the last neuron of the cyclic neural network.
  • the determination unit 144 by the model elements may be the center position of neurons A t outputted movement route optimization origin construct relative coordinate system, the respective intersections optimized movement route by neurons A t output
  • the absolute GPS coordinates (for example, longitude and latitude) of is converted to relative coordinates in the relative coordinate system.
  • the model element determining unit 144 stores the model element of the optimized motion route output by the last neuron of the recurrent neural network.
  • the unit 144 is determined by the model elements can be stored by the respective elements of the model movement route optimization A t the output neuron in the data center 130, and the movement route as the current history of the course of motion in which the pieces of geographical range The default exercise route within.
  • Fig. 9 shows a schematic flowchart of a method for recommending a sports route according to an embodiment of the present invention.
  • the motion route recommendation module 160 of the terminal device 100 in FIG. 2 may implement different blocks or other parts of the method.
  • the recommended method of exercise route may include:
  • S902 Obtain the current GPS coordinates of the user from the GPS positioning module 120 through the exercise route recommendation module 160.
  • S903 Calculate the geohash code value of the GPS coordinates of the user through the exercise route recommendation module 160.
  • the motion route recommendation module 160 can The user recommends the exercise route.
  • the exercise route recommendation module 160 may present the recommended exercise route on the map according to the intersection link table of the recommended exercise route; at the intersection of the recommended exercise route In the case where the coordinates of are relative to the center position, the exercise route recommendation module 160 can present the recommended exercise route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended exercise route.
  • the storage and processing cost of the motion trajectory can be reduced, and the performance of the motion trajectory can be improved. Processing efficiency.
  • the storage and processing cost of the movement track can be further reduced, and the geohash encoding of multiple grids can be used.
  • the value index of the sports route can improve the retrieval efficiency of the sports route.
  • the privacy of the user can be protected and the sensitive data related to the user can be eliminated.
  • the abnormal segment deviation of the current movement route is considered, that is, the quality of the GPS signal when recording the movement trajectory related to the current movement route is considered.
  • the GPS signal quality is poor, the discarded historical movement routes will have fewer intersections, so the fusion error can be controlled more accurately, and the quality of the optimized movement route can also be improved.
  • FIG. 10 shows a schematic structural diagram of a movement route processing device 1000 according to an embodiment of the present application.
  • 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, and a non-volatile memory connected to the system control logic 1008 (NVM) 1006, and a network interface 1010 connected to the system control logic 1008.
  • 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, and a non-volatile memory connected to the system control logic 1008 (NVM) 1006, and a network interface 1010 connected to the system control logic 1008.
  • NVM non-volatile memory
  • 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 (for example, a graphics processor, an application processor, a baseband processor, etc.).
  • the processor 1002 may be configured to execute one or more embodiments according to the various embodiments shown in FIGS. 7-9.
  • system control logic 1008 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1002 and/or any suitable device or component in communication with the system control logic 1008.
  • system control logic 1008 may include one or more memory controllers to provide an interface to the system memory 1004.
  • the system memory 1004 can be used to load and store data and/or instructions.
  • the memory 1004 of the device 1000 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).
  • DRAM dynamic random access memory
  • the NVM/memory 1006 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions.
  • the NVM/memory 1006 may include any suitable non-volatile memory such as flash memory and/or any suitable non-volatile storage device, such as HDD (Hard Disk Drive, hard disk drive), CD (Compact Disc , At least one of an optical disc drive and a DVD (Digital Versatile Disc, Digital Versatile Disc) drive.
  • the NVM/memory 1006 may include a part of storage resources installed on the apparatus of the apparatus 1000, or it may be accessed by the device, but not necessarily a part of the device.
  • the NVM/storage 1006 can be accessed through the network via the network interface 1010.
  • system memory 1004 and the NVM/memory 1006 may respectively include: a temporary copy and a permanent copy of the instruction 1020.
  • the instructions 1020 may include instructions that, when executed by at least one of the processors 1002, cause the apparatus 1000 to implement the method shown in FIGS. 7-9.
  • 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.
  • the network interface 1010 may include a transceiver to provide a radio interface for the device 1000, and then communicate with any other suitable equipment (such as a front-end module, an antenna, etc.) through one or more networks.
  • the network interface 1010 may be integrated with other components of the device 1000.
  • the network interface 1010 may be integrated in at least one of the processor 1002, the system memory 1004, the NVM/storage 1006, and a firmware device with instructions (not shown), when at least one of the processor 1002 executes the When instructed, the device 1000 implements one or more of the various embodiments shown in FIGS. 7-9.
  • the network interface 1010 may further include any suitable hardware and/or firmware to provide a multiple input multiple output radio interface.
  • the network interface 1010 may be a network adapter, a wireless network adapter, a telephone modem and/or a wireless modem.
  • At least one of the processors 1002 may be packaged with the logic of one or more controllers used for 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 with the logic of one or more controllers used for the system control logic 1008 on the same die to form a system on chip (SoC).
  • SiP system in package
  • SoC system on chip
  • the device 1000 may further include: an input/output (I/O) interface 1012.
  • the I/O interface 1012 may include a user interface to enable the user to interact with the device 1000; the design of the peripheral component interface enables the peripheral components to also interact with the device 1000.
  • the device 1000 further includes a sensor for determining at least one of environmental conditions and location information related to the device 1000.
  • the user interface may include, but is not limited to, a display (e.g., liquid crystal display, touch screen display, etc.), speakers, microphones, one or more cameras (e.g., still image cameras and/or video cameras), flashlights (e.g., LED flash) and keyboard.
  • a display e.g., liquid crystal display, touch screen display, etc.
  • speakers e.g., speakers, microphones, one or more cameras (e.g., still image cameras and/or video cameras), flashlights (e.g., LED flash) and keyboard.
  • the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
  • the senor may include, but is not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit.
  • the positioning unit may also be part of or interact with the network interface 1010 to communicate with components of the positioning network (eg, global positioning system (GPS) satellites).
  • GPS global positioning system
  • module or “unit” can refer to, be, or include: application specific integrated circuit (ASIC), electronic circuit, (shared, dedicated, or group) processing that executes one or more software or firmware programs And/or memory, combinatorial logic circuits, and/or other suitable components that provide the described functions.
  • ASIC application specific integrated circuit
  • electronic circuit shared, dedicated, or group
  • processing that executes one or more software or firmware programs And/or memory, combinatorial logic circuits, and/or other suitable components that provide the described functions.
  • the various embodiments of the mechanism disclosed in this application may 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 including at least one processor and a storage system (including volatile and non-volatile memory and/or storage elements) , At least one input device and at least one output device.
  • Program codes 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.
  • 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.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • the program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with the processing system.
  • assembly language or machine language can also be used to implement the program code.
  • the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.
  • the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof.
  • one or more aspects of at least some embodiments may be implemented by representative instructions stored on a computer-readable storage medium.
  • the instructions represent various logics in the processor, and the instructions, when read by a machine, cause This machine makes the logic used to execute the techniques described in this application.
  • IP cores can be stored on a tangible computer-readable storage medium and provided to multiple customers or production facilities to be loaded into the manufacturing machine that actually manufactures the logic or processor.
  • Such computer-readable storage media may include, but are not limited to, non-transitory tangible arrangements of objects manufactured or formed by machines or equipment, including storage media, such as hard disks, any other types of disks, including floppy disks, optical disks, compact disks, etc.
  • CD-ROM Compact disk rewritable
  • CD-RW compact disk rewritable
  • magneto-optical disk semiconductor devices such as read only memory (ROM), such as dynamic random access memory (DRAM) and static random access Random access memory (RAM) such as memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); magnetic card Or optical card; or any other type of medium suitable for storing electronic instructions.
  • ROM read only memory
  • DRAM dynamic random access memory
  • RAM static random access Random access memory
  • SRAM erasable programmable read-only memory
  • EPROM erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • PCM phase change memory
  • magnetic card Or optical card or any other type of medium suitable for storing electronic instructions.
  • each embodiment of the present application also includes a non-transitory computer-readable storage medium, which contains instructions or contains design data, such as hardware description language (HDL), which defines the structures, circuits, devices, etc. described in the present application. Processor and/or system characteristics.
  • HDL hardware description language

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Remote Sensing (AREA)
  • Medical Informatics (AREA)
  • Navigation (AREA)

Abstract

The present application relates to a motion trajectory processing method, comprising: obtaining a motion trajectory set, the motion trajectory set comprising a plurality of motion trajectories; determining motion path elements according to the motion trajectory set, the motion path elements comprising at least one of a center position and an intersection point set, the center position being shared by a plurality of grids and the motion trajectory set being contained in a geographic range of a plurality of grids; the intersection set comprises a plurality of intersections related to a plurality of trajectory segment clusters, each of the plurality of trajectory segment clusters comprising a plurality of trajectory segments of a plurality of motion trajectories, and furthermore, the distance between adjacent trajectory segments among the plurality of trajectory segments being less than a predetermined value, the adjacent trajectory segments respectively belonging to different motion trajectories among the plurality of motion trajectories. In the present application, determining the center position and/or intersection set of a plurality of motion trajectories can reduce the cost of storage and processing of motion trajectories, improving motion-trajectory processing efficiency.

Description

一种运动轨迹处理方法、介质、装置及设备Method, medium, device and equipment for processing motion trajectory
本申请要求于2019年12月13日提交中国专利局、申请号为201911283885.X、申请名称为“一种运动轨迹处理方法、介质、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on December 13, 2019, the application number is 201911283885.X, and the application name is "a method, medium, device and equipment for processing trajectories", and its entire contents Incorporated in this application by reference.
技术领域Technical field
本申请的一个或多个实施例通常涉及人工智能领域,具体涉及一种运动轨迹处理方法、介质、装置及设备。One or more embodiments of the present application generally relate to the field of artificial intelligence, and specifically relate to a motion trajectory processing method, medium, device, and equipment.
背景技术Background technique
现有技术中,在推荐运动路线时,通常利用移动终端采集多个用户的多条运动轨迹数据,将这些包括多个GPS坐标点的运动轨迹数据通过网络发到云侧服务器,服务器将这些运动轨迹数据直接存储为运动路线,或是由规则轨迹形状的求质心算法,将运动轨迹数据和质心的GPS坐标存储为运动路线。最后,当其他用户请求运动路线时,根据请求用户的GPS坐标从云侧数据库中查找与请求用户相近的运动路线,返回给请求用户。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 the movement trajectory data including multiple GPS coordinate points are sent to the cloud-side server through the network, and the server transmits these movement data to the cloud server. The trajectory data is directly stored as the motion route, or the center of mass calculation algorithm of the regular trajectory shape is used to store the motion trajectory data and the GPS coordinates of the center of mass as the motion route. Finally, when other users request an exercise route, they search for an exercise route close to the requesting user from the cloud-side database according to the GPS coordinates of the requesting user, and return it to the requesting user.
发明内容Summary of the invention
以下从多个方面介绍本申请,以下多个方面的实施方式和有益效果可互相参考。The following describes the application from multiple aspects, and the implementation and beneficial effects of the following multiple aspects can be referred to each other.
第一方面,本申请实施例提供了一种运动轨迹处理方法,该方法包括:获取运动轨迹集合,其中运动轨迹集合包括多个运动轨迹;和根据运动轨迹集合确定运动路线要素,其中运动路线要素包括中心位置和交点集合中的至少一个,其中,中心位置由多个栅格共享并且运动轨迹集合被包含在多个栅格的地理范围内;其中,交点集合包括与多个轨迹段簇相关的多个交点,其中多个轨迹段簇中的每个轨迹段簇包括多个运动轨迹的多个轨迹段,并且多个轨迹段中的相邻轨迹段之间的间距小于预定值,其中相邻轨迹段分别属于多个运动轨迹中的不同运动轨迹。In a first aspect, an embodiment of the present application provides a motion trajectory processing method, the method includes: obtaining a motion trajectory set, wherein the motion trajectory set includes a plurality of motion trajectories; and determining a motion route element according to the motion trajectory set, wherein the motion route element It includes at least one of a center position and an intersection point set, where the center position is shared by multiple grids and the motion track set is contained within the geographic range of the multiple grids; wherein the intersection point set includes information related to multiple trajectory segment clusters. Multiple intersections, where each of the multiple trajectory segment clusters includes multiple trajectory segments of multiple motion trajectories, and the distance between adjacent trajectory segments in the multiple trajectory segments is less than a predetermined value, where adjacent The trajectory segments respectively belong to different motion trajectories among the multiple motion trajectories.
根据本申请的实施例,相对于直接存储和处理多个运动轨迹,通过对用户的多个运动轨迹的多个轨迹段聚簇,并获得与多个轨迹段簇相关的多个交点,作为从用户的多个运动轨迹中提取的跑步路线的要素,可以降低运动轨迹的存储和处理成本,提高运动轨迹的处理效率;相对于使每个栅格对应一个中心位置,使多个栅格共享一个中心位置,也可以降低运动轨迹的存储和处理成本,提高运动轨迹的处理效率。According to the embodiment of the present application, instead of directly storing and processing multiple motion trajectories, multiple trajectory segments of the multiple motion trajectories of the user are clustered, and multiple intersection points related to the multiple trajectory segment clusters are obtained as slaves. The elements of the running route extracted from the user's multiple motion trajectories can reduce the storage and processing cost of the motion trajectory, and improve the processing efficiency of the motion trajectory; instead of making each grid correspond to a central position, multiple grids can share one The central position can also reduce the storage and processing cost of the motion trajectory, and improve the processing efficiency of the motion trajectory.
在一些实施例中,运动路线要素还包括:与多个栅格中的每个栅格对应的Geohash编码,用于索引每个栅格对应的地理范围。In some embodiments, the motion route element further includes: a Geohash code corresponding to each grid in the plurality of grids, which is used to index the geographic range corresponding to each grid.
根据本申请的实施例,通过利用多个栅格的geohash编码值索引运动路线,可以提高运动路线的检索效率。According to the 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.
在一些实施例中,Geohash编码包括至少7位Base32编码字符。In some embodiments, Geohash encoding includes at least 7-bit Base32 encoded characters.
在一些实施例中,运动路线要素还包括:指示多个交点中的每个交点与多个交点中的其他至少一个交点之间的链接关系的交点链接表格。In some embodiments, the motion route element further includes: an intersection link table indicating a link relationship between each intersection of the plurality of intersections and at least one other intersection of the plurality of intersections.
在一些实施例中,中心位置包括中心位置的GPS坐标,多个交点中的每个交点包括以中心位置为原点的相对坐标系中的相对坐标。In some embodiments, the center position includes the GPS coordinates of the center position, and each of the multiple intersection points includes relative coordinates in a relative coordinate system with the center position as the origin.
根据本申请的一些实施例,通过以中心位置为原点,对运动路线的各个交点进行相对坐标转换,可以保护用户的隐私,消除与用户相关的敏感数据。According to some embodiments of the present application, by taking the center position as the origin and performing relative coordinate conversion on each intersection of the movement route, the privacy of the user can be protected and sensitive data related to the user can be eliminated.
在一些实施例中,根据运动轨迹集合确定运动路线要素,包括:从多个交点中选择最东、最南、最西、最北的四个交点;根据四个交点确定多个栅格的地理范围,并确定地理范围的中心点作为中心位置。In some embodiments, determining the movement route elements according to the set of movement trajectories includes: selecting the four most east, south, west, and north most intersections from a plurality of intersections; and determining the geography of the multiple grids based on the four intersections Range, and determine the center point of the geographic range as the center position.
在一些实施例中,根据运动轨迹集合确定运动路线要素,包括:将运动轨迹集合中的每条运动轨迹分割为多个轨迹段;将相邻轨迹段之间的间距小于预定值的多个轨迹段聚类为多个轨迹段簇中的一个轨迹段簇;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; and dividing a plurality of trajectories whose distance between adjacent trajectory segments is less than a predetermined value The segment cluster is a trajectory segment cluster among multiple trajectory segment clusters;
在一些实施例中,根据多个轨迹簇中的每个轨迹段簇内的多个轨迹段,确定对应于每个轨迹段簇的簇向量从而形成对应于多个轨迹段簇的多个簇向量;确定多个簇向量中相邻簇向量之间的交点。In some embodiments, according to 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 ; Determine the intersection between adjacent cluster vectors among multiple cluster vectors.
在一些实施例中,簇向量的起点坐标为轨迹段簇内的多个轨迹段的起点坐标的平均值,簇向量的终点坐标为轨迹段簇内的多个轨迹段的终点坐标的平均值。In some embodiments, the start point coordinates of the cluster vector are the average value of the start point coordinates of the multiple trajectory segments in the trajectory segment cluster, and the end point coordinates of the cluster vector are the average value of the end point coordinates of the multiple trajectory segments in the trajectory segment cluster.
第二方面,本申请实施例提供了一种运动轨迹处理方法,该方法包括:获取与当前运动轨迹集合相关的多个当前运动轨迹交点以及与历史运动轨迹集合相关的多个历史运动轨迹交点;和至少部分地根据异常段偏差,确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,从而获得优化的运动路线,其中,异常段偏差至少部分地指定当前运动轨迹集合的多个运动轨迹的多个轨迹段中出现异常轨迹段的比例,其中异常轨迹段距离多个轨迹段的至少一个类中心超出第一预定值。In a second aspect, an embodiment of the present application provides a motion trajectory processing method, which includes: obtaining multiple current motion trajectory intersection points related to a current motion trajectory set and multiple historical motion trajectory intersection points related to a historical motion trajectory set; And at least partly based on the abnormal segment deviation, 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, so as to obtain an optimized motion route , Wherein the abnormal segment deviation at least partially specifies the proportion of abnormal trajectory segments in the multiple trajectory segments in the current trajectory set, where the distance from the abnormal trajectory segment to at least one class center of the multiple trajectory segments exceeds the first predetermined value.
根据本申请的实施例,在融合当前运动轨迹集合和历史运动轨迹集合时,考虑了当前运动轨迹集合的异常段偏差,而异常段偏差与当前运动轨迹集合中的多个运动轨迹生成时的GPS信号质量相关,因此使用当前运动轨迹集合的异常段偏差决定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,可以更准确地控制融合误差,也可以提高融合质量。According to the 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 considered, and the abnormal segment deviation is the same as the GPS when multiple motion trajectories in the current motion trajectory set are generated. Signal quality is related, so the abnormal segment deviation of the current motion trajectory set 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. More accurately controlling the fusion error can also improve the fusion quality.
在一些实施例中,当前运动轨迹集合和历史运动轨迹集合被包含在相同的地理范围内。In some embodiments, the current motion trajectory set and the historical motion trajectory set are contained in the same geographic scope.
在一些实施例中,确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,包括利用LSTM(Long short-term memory,长短时记忆)模型确定是否保留多个当前运动轨迹交点 中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点。In some embodiments, 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 LSTM (Long short-term memory , Long-short-term memory) model 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.
在一些实施例中,确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括:利用LSTM模型,根据以下公式计算用于确定是否保留多个历史运动轨迹交点中的至少一个历史运动轨迹交点的遗忘门:In some embodiments, 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 the LSTM model according to the following Formula calculation is used to determine whether to retain at least one of the multiple historical motion trajectory intersection points of the forgetting gate:
f t=σ(W f·[h t-1,X t]+b f) f t =σ(W f ·[h t-1 ,X t ]+b f )
b f=1+b m b f =1+b m
其中,f t表示LSTM模型的第t个时刻的神经元的遗忘门,σ表示sigmoid函数,W f表示遗忘门的权重矩阵,X t表示LSTM模型的第t个时刻的神经元的输入并且包括多个当前运动轨迹交点,h t-1表示LSTM模型的第t-1个时刻的神经元的输出并且包括多个历史运动轨迹交点,[h t-1,X t]表示将h t-1和X t拼接形成的长向量,b f表示遗忘门的偏置值,b m表示异常段偏差。 Among them, f t represents the forgetting gate of the neuron at the t-th moment of the LSTM model, σ represents the sigmoid function, W f represents the weight matrix of the forgetting gate, and X t represents the input of the neuron at the t-th moment of the LSTM model and includes Multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] represents h t-1 The long vector formed by splicing with X t , b f represents the offset value of the forgetting gate, and b m represents the deviation of the abnormal segment.
在一些实施例中,确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点还包括,利用LSTM模型,根据以下公式计算用于确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点的输入门:In some embodiments, determining whether to retain at least one current motion trajectory intersection of the multiple current motion trajectory intersections and/or at least one historical motion trajectory intersection of the multiple historical motion trajectory intersections further includes using an LSTM model according to the following formula Calculate the input gate used to determine whether to keep at least one of the multiple current motion trajectory intersection points:
i t=σ(W i·[h t-1,X t]+b i) i t =σ(W i ·[h t-1 ,X t ]+b i )
其中,i t表示LSTM模型的第t个时刻的神经元的输入门,σ表示sigmoid函数,W i表示输入门的权重矩阵,X t表示LSTM模型的第t个时刻的神经元的输入并且包括多个当前运动轨迹交点,h t-1表示LSTM模型的第t-1个时刻的神经元的输出并且包括多个历史运动轨迹交点,[h t-1,X t]表示将h t-1和X t拼接形成的长向量,b i表示输入门的偏置值。 Wherein, i t represents neurons t-th time LSTM model input gate, σ represents a sigmoid function, W i represents the weight of the input gate of the weight matrix, X t denotes an input neuron t-th time LSTM models and comprising Multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] represents h t-1 The long vector formed by splicing with X t , b i represents the bias value of the input gate.
在一些实施例中,确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点还包括,利用LSTM模型,根据以下公式确定是否输出多个当前运动轨迹交点中的至少一个当前运动轨迹交点以及多个历史运动轨迹交点中的至少一个历史运动轨迹交点,从而获得优化的运动路线:In some embodiments, determining whether to retain at least one current motion trajectory intersection of the multiple current motion trajectory intersections and/or at least one historical motion trajectory intersection of the multiple historical motion trajectory intersections further includes using an LSTM model according to the following formula It is determined 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 an optimized motion route:
Figure PCTCN2020132333-appb-000001
Figure PCTCN2020132333-appb-000001
Figure PCTCN2020132333-appb-000002
Figure PCTCN2020132333-appb-000002
o t=σ(W o·[h t-1,X t]+b o) o t =σ(W o ·[h t-1 ,X t ]+b o )
h t=o t·tanh(C t) h t =o t ·tanh(C t )
其中,X t表示LSTM模型的第t个时刻的神经元的输入并且包括多个当前运动轨迹交点,h t-1表示LSTM模型的第t-1个时刻的神经元的输出并且包括多个历史运动轨迹交点,
Figure PCTCN2020132333-appb-000003
表示LSTM模型的第t个时刻的神经元的输入细胞状态,W c表示LSTM模型的第t个时刻的神经元的输入细胞状态的权重矩阵,b c表示LSTM模型的第t个时刻的神经元的输入细胞状态的偏置值,C t表示LSTM模型的第t个时刻的神经元的细胞状态,C t-1表示LSTM模型的第t-1个时刻的神经元的细胞状态,f t表示LSTM模型的第t个时 刻的神经元的遗忘门,i t表示LSTM模型的第t个时刻的神经元的输入门,o t表示LSTM模型的第t个时刻的神经元的输出门,W o表示输出门的权重矩阵,b o表示输出门的偏置值,h t表示LSTM模型的第t个时刻的神经元的输出并且可以包括优化的运动路线的多个交点。
Among them, X t represents the input of the neuron at the t-th time of the LSTM model and includes multiple current trajectory intersections, and h t-1 represents the output of the neuron at the t-1th time of the LSTM model and includes multiple histories Point of intersection of motion trajectories,
Figure PCTCN2020132333-appb-000003
Represents the input cell state of the neuron at the t-th time of the LSTM model, W c represents the weight matrix of the input cell state of the neuron at the t-th time of the LSTM model, and b c represents the neuron at the t-th time of the LSTM model The input cell state bias value, C t represents the cell state of the neuron at the t time of the LSTM model, C t-1 represents the cell state of the neuron at the t-1 time of the LSTM model, and f t represents The forget gate of the neuron at the t-th time of the LSTM model, i t represents the input gate of the neuron at the t-th time of the LSTM model, o t represents the output gate of the neuron at the t-th time of the LSTM model, W o Represents the weight matrix of the output gate, b o represents the bias value of the output gate, and h t represents the output of the neuron at the t-th time of the LSTM model and may include multiple intersection points of the optimized movement route.
在一些实施例中,该方法还包括,从优化的运动路线的多个交点中,选择最东、最南、最西、最北的四个交点;In some embodiments, the method further includes selecting the four most eastward, most southerly, most westward, and most northerly intersection points from the multiple intersection points of the optimized motion route;
根据四个交点确定包含优化的运动路线的地理范围,并确定地理范围的中心点作为优化的运动路线的中心位置。According to the four intersection points, the geographic range containing the optimized motion route is determined, and the center point of the geographic range is determined as the center position of the optimized motion route.
在一些实施例中,该方法还包括,确定地理范围的多个栅格以及多个栅格的geohash编码值,其中多个栅格共享中心位置。In some embodiments, the method further includes determining a plurality of grids of a geographic range and geohash coding values of the plurality of grids, wherein the plurality of grids share a central location.
根据本申请的实施例,相对于使每个栅格对应一个中心位置,使多个栅格共享一个中心位置,可以降低优化的运动路线的存储和处理成本,提高优化的运动路线的处理效率;另外,通过利用多个栅格的geohash编码值索引优化的运动路线,可以提高优化的运动路线的检索效率。According to the embodiment of the present application, instead of making each grid correspond to a central position and making multiple grids share a central position, the storage and processing cost of the optimized movement route can be reduced, and the processing efficiency of the optimized movement route can be improved; In addition, by indexing the optimized movement route using geohash code values of multiple grids, the retrieval efficiency of the optimized movement route can be improved.
在一些实施例中,中心位置包括中心位置的GPS坐标,优化的运动路线的多个交点中的每个交点包括以中心位置为原点的相对坐标系中的相对坐标。In some embodiments, the center position includes the GPS coordinates of the center position, and each of the multiple intersection points of the optimized movement route includes relative coordinates in a relative coordinate system with the center position as the origin.
根据本申请的实施例,通过以中心位置为原点,对优化的运动路线的各个交点进行相对坐标转换,可以保护用户的隐私,消除与用户相关的敏感数据。According to the embodiment of the present application, by taking the center position as the origin and performing relative coordinate conversion on each intersection of the optimized movement route, the privacy of the user can be protected and sensitive data related to the user can be eliminated.
在一些实施例中,方法还包括:对多个轨迹段的中心进行聚类并获得多个轨迹段的至少一个类中心。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.
第三方面,本申请实施例提供了一种运动路线的推荐方法,该方法包括:接收用户对运动路线的推荐请求;获取用户的GPS坐标,并计算用户的GPS(Global Positioning System,全球定位系统)坐标的geohash编码值;从多个栅格geohash编码值中,查询与用户的GPS坐标的geohash编码值的差距最小的栅格geohash编码值;获取与用户的GPS坐标的geohash编码值的差距最小的栅格geohash编码值对应的运动路线以及运动路线的中心位置,其中,中心位置由包含运动路线的地理范围的多个栅格共享;和根据中心位置向用户推荐运动路线。In the third aspect, an embodiment of the present application provides a method for recommending a sports route. The method includes: receiving a user's recommendation request for a sports route; acquiring the user's GPS coordinates, and calculating the user's GPS (Global Positioning System, global positioning system). ) The geohash code value of the coordinate; from multiple grid geohash code values, query the grid geohash code value with the smallest difference with the user's GPS coordinate geohash code value; obtain the smallest difference with the user's GPS coordinate geohash code value The grid geohash code value corresponds to the motion route and the center position of the motion route, where the center position is shared by multiple grids containing the geographic range of the motion route; and the motion route is recommended to the user according to the center position.
根据本申请的实施例,相对于使每个栅格对应一个中心位置,使多个栅格共享一个中心位置,可以降低运动路线的存储和处理成本,提高运动路线的处理效率;另外,通过利用多个栅格的geohash编码值索引运动路线,可以提高运动路线的检索效率。According to the embodiment of the present application, instead of making each grid correspond to a central position and making multiple grids share a central position, the storage and processing cost of the movement route can be reduced, and the processing efficiency of the movement route can be improved; in addition, by using The geohash code values of multiple grids index the movement route, which can improve the retrieval efficiency of the movement route.
第四方面,本申请实施例提供了一种计算机可读存储介质,在计算机可读存储上存储有指令,当指令在机器上运行时,使得机器执行上述任意一种方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium that stores instructions on the computer-readable storage, and when the instructions run on a machine, the machine executes any of the above methods.
第五方面,本申请实施例提供了一种运动路线处理装置,该装置包括:处理器;存储器,在存储器上存储有指令,当指令被处理器运行时,使得处理器执行上述任意一种方法。In a fifth aspect, an embodiment of the present application provides a motion route processing device, which includes: a processor; a memory, which stores instructions on the memory, and when the instructions are executed by the processor, the processor executes any of the above methods .
第六方面,本申请实施例提供了一种运动轨迹处理设备,该设备包括运动轨迹记录模块,用于获取运动轨迹集合,其中运动轨迹集合包括多个运动轨迹;和运动路线提取模块,用于根据运动轨迹集合确定运动路线要素,其中运动路线要素包括中心位 置和交点集合中的至少一个,其中,中心位置由多个栅格共享并且运动轨迹集合被包含在多个栅格的地理范围内;和其中,交点集合包括与多个轨迹段簇相关的多个交点,其中多个轨迹段簇中的每个轨迹段簇包括多个运动轨迹的多个轨迹段,并且多个轨迹段中的相邻轨迹段之间的间距小于预定值,其中相邻轨迹段分别属于多个运动轨迹中的不同运动轨迹。In a sixth aspect, an embodiment of the present application provides a motion trajectory processing device. The device includes a motion trajectory recording module for acquiring a motion trajectory set, where the motion trajectory set includes multiple motion trajectories; and a motion route extraction module for Determine the motion route element according to the motion trajectory set, where 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 track set is contained in the geographic range of the multiple grids; And wherein, the intersection set includes multiple intersections related to 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 phases in the multiple trajectory segments The distance between adjacent track segments is less than a predetermined value, and the adjacent track segments respectively belong to different motion tracks among the multiple motion tracks.
根据本申请的实施例,相对于直接存储和处理多个运动轨迹,通过对用户的多个运动轨迹的多个轨迹段聚簇,并获得与多个轨迹段簇相关的多个交点,作为用户的多个运动轨迹的要素,可以降低运动轨迹的存储和处理成本,提高运动轨迹的处理效率;相对于使每个栅格对应一个中心位置,使多个栅格共享一个中心位置,也可以降低运动轨迹的存储和处理成本,提高运动轨迹的处理效率。According to the embodiment of the present application, instead of directly storing and processing multiple motion trajectories, multiple trajectory segments of the multiple motion trajectories of the user are clustered, and multiple intersection points related to the multiple trajectory segment clusters are obtained as the user The multiple motion trajectory elements can reduce the storage and processing cost of the motion trajectory, and improve the processing efficiency of the motion trajectory; instead of making each grid correspond to a central position, making multiple grids share a central position can also reduce The storage and processing cost of the motion trajectory improves the processing efficiency of the motion trajectory.
在一些实施例中,运动路线要素还包括:与多个栅格中的每个栅格对应的Geohash编码,用于索引每个栅格对应的地理范围。In some embodiments, the motion route element further includes: a Geohash code corresponding to each grid in the plurality of grids, which is used to index the geographic range corresponding to each grid.
根据本申请的实施例,通过利用多个栅格的geohash编码值索引运动路线,可以提高运动路线的检索效率。According to the 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.
在一些实施例中,Geohash编码包括至少7位Base32编码字符。In some embodiments, Geohash encoding includes at least 7-bit Base32 encoded characters.
在一些实施例中,运动路线要素还包括:指示多个交点中的每个交点与多个交点中的其他至少一个交点之间的链接关系的交点链接表格。In some embodiments, the motion route element further includes: an intersection link table indicating a link relationship between each intersection of the plurality of intersections and at least one other intersection of the plurality of intersections.
在一些实施例中,运动路线提取模块还用于,确定多个交点中的每个交点在以中心位置为原点的相对坐标系中的相对坐标。In some embodiments, the motion route extraction module is further used to determine the relative coordinates of each of the multiple intersection points in a relative coordinate system with the center position as the origin.
根据本申请的一些实施例,通过以中心位置为原点,对运动路线的各个交点进行相对坐标转换,可以保护用户的隐私,消除与用户相关的敏感数据。According to some embodiments of the present application, by taking the center position as the origin and performing relative coordinate conversion on each intersection of the movement route, the privacy of the user can be protected and sensitive data related to the user can be eliminated.
在一些实施例中,运动路线提取模块用于根据运动轨迹集合确定运动路线要素,包括用于:从多个交点中选择最东、最南、最西、最北的四个交点;根据四个交点确定多个栅格的地理范围,并确定地理范围的中心点作为中心位置。In some embodiments, the movement route extraction module is used to determine the movement route elements according to the set of movement trajectories, including: selecting the four most east, south, west, and northest intersections from a plurality of intersections; according to the four The intersection point determines the geographic range of multiple grids, and determines the center point of the geographic range as the center position.
在一些实施例中,运动路线提取模块用于根据运动轨迹集合确定运动路线要素,包括用于:将运动轨迹集合中的每条运动轨迹分割为多个轨迹段;将相邻轨迹段之间的间距小于预定值的多个轨迹段聚类为多个轨迹段簇中的一个轨迹段簇;根据多个轨迹簇中的每个轨迹段簇内的多个轨迹段,确定对应于每个轨迹段簇的簇向量从而形成对应于多个轨迹段簇的多个簇向量;确定多个簇向量中相邻簇向量之间的交点。In some embodiments, the motion route extraction module is used to determine the motion route elements according to the motion trajectory set, including: dividing each motion trajectory in the motion trajectory set into multiple trajectory segments; The multiple trajectory segments whose spacing is less than the predetermined value are clustered into one trajectory segment cluster in the multiple trajectory segment clusters; according to the multiple trajectory segments in each trajectory segment cluster in the multiple trajectory clusters, it is determined to correspond to each track segment The cluster vectors of the clusters thus form multiple cluster vectors corresponding to multiple trajectory segment clusters; the intersection between adjacent cluster vectors in the multiple cluster vectors is determined.
在一些实施例中,簇向量的起点坐标为轨迹段簇内的多个轨迹段的起点坐标的平均值,簇向量的终点坐标为轨迹段簇内的多个轨迹段的终点坐标的平均值。In some embodiments, the start point coordinates of the cluster vector are the average value of the start point coordinates of the multiple trajectory segments in the trajectory segment cluster, and the end point coordinates of the cluster vector are the average value of the end point coordinates of the multiple trajectory segments in the trajectory segment cluster.
第七方面,本申请实施例提供了一种运动轨迹处理设备,该设备包括:运动路线提取模块,用于获取与当前运动轨迹集合相关的多个当前运动轨迹交点以及与历史运动轨迹集合相关的多个历史运动轨迹交点;和运动路线优化模块,至少部分地根据异常段偏差,确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,从而获得优化的运动路线;其中,异常段偏差至少部分地指定当前运动轨迹集合的多个运动轨迹的多个轨迹段中出现异常轨迹段的比例,其中异常轨迹段距离多个轨迹段的至少一个类中心超出第一 预定值。In a seventh aspect, an embodiment of the present application provides a motion trajectory processing device, which includes: a motion route extraction module, configured to obtain multiple current motion trajectory intersections related to the current motion trajectory set and information related to the historical motion trajectory set Multiple historical motion trajectory intersections; and a motion route optimization module that determines 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 based at least in part on the abnormal segment deviation A historical motion trajectory intersection point to obtain an optimized motion route; where the abnormal segment deviation at least partially specifies the proportion of abnormal trajectory segments in the multiple trajectory segments of the current motion trajectory set, where the distance of the abnormal trajectory segment is large At least one class center of the trajectory segments exceeds the first predetermined value.
根据本申请的实施例,在融合当前运动轨迹集合和历史运动轨迹集合时,考虑了当前运动轨迹集合的异常段偏差,而异常段偏差与当前运动轨迹集合中的多个运动轨迹生成时的GPS信号质量相关,因此使用当前运动轨迹集合的异常段偏差决定是否丢弃多个历史运动轨迹交点,可以更准确地控制融合误差,也可以提高融合质量。According to the 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 considered, and the abnormal segment deviation is the same as the GPS when multiple motion trajectories in the current motion trajectory set are generated. The signal quality is related, so the abnormal segment deviation of the current motion trajectory set is used to determine whether to discard multiple historical motion trajectory intersections, which can more accurately control the fusion error and improve the fusion quality.
在一些实施例中,当前运动轨迹集合和历史运动轨迹集合被包含在相同的地理范围内。In some embodiments, the current motion trajectory set and the historical motion trajectory set are contained in the same geographic scope.
在一些实施例中,运动路线优化模块用于确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,包括用于利用LSTM(Long short-term memory,长短时记忆)模型确定是否是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点。In some embodiments, 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: A LSTM (Long short-term memory) model 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.
在一些实施例中,运动路线优化模块用于确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括用于:利用LSTM模型,根据以下公式计算用于确定是否保留多个历史运动轨迹交点中的至少一个历史运动轨迹交点的遗忘门:In some embodiments, the motion route optimization module is used to determine 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. Yu: Using the LSTM model, calculate the forgetting gate used to determine whether to retain at least one historical motion trajectory intersection point among multiple historical motion trajectory intersection points according to the following formula:
f t=σ(W f·[h t-1,X t]+b f) f t =σ(W f ·[h t-1 ,X t ]+b f )
b f=1+b m b f =1+b m
其中,f t表示LSTM模型的第t个时刻的神经元的遗忘门,σ表示sigmoid函数,W f表示遗忘门的权重矩阵,X t表示LSTM模型的第t个时刻的神经元的输入并且包括多个当前运动轨迹交点,h t-1表示LSTM模型的第t-1个时刻的神经元的输出并且包括多个历史运动轨迹交点,[h t-1,X t]表示将h t-t和X t拼接形成的长向量,b f表示遗忘门的偏置值,b m表示异常段偏差。 Among them, f t represents the forgetting gate of the neuron at the t-th moment of the LSTM model, σ represents the sigmoid function, W f represents the weight matrix of the forgetting gate, and X t represents the input of the neuron at the t-th moment of the LSTM model and includes Multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] represents the combination of h tt and X The long vector formed by splicing t , b f represents the offset value of the forget gate, and b m represents the deviation of the abnormal segment.
在一些实施例中,运动路线优化模块用于确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括用于:利用LSTM模型,根据以下公式计算用于确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点的输入门:In some embodiments, the motion route optimization module is used to determine 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. Yu: Using the LSTM model, calculate the input gate used to determine whether to retain at least one of the current motion trajectory intersection points according to the following formula:
i t=σ(W i·[h t-1,X t]+b i) i t =σ(W i ·[h t-1 ,X t ]+b i )
其中,i t表示LSTM模型的第t个时刻的神经元的输入门,σ表示sigmoid函数,W i表示输入门的权重矩阵,X t表示LSTM模型的第t个时刻的神经元的输入并且包括多个当前运动轨迹交点,h t-1表示LSTM模型的第t-1个时刻的神经元的输出并且包括多个历史运动轨迹交点,[h t-1,X t]表示将h t-1和X t拼接形成的长向量,b i表示输入门的偏置值。 Wherein, i t represents neurons t-th time LSTM model input gate, σ represents a sigmoid function, W i represents the weight of the input gate of the weight matrix, X t denotes an input neuron t-th time LSTM models and comprising Multiple current motion trajectory intersections, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes multiple historical motion trajectory intersections, [h t-1 ,X t ] represents h t-1 The long vector formed by splicing with X t , b i represents the bias value of the input gate.
在一些实施例中,运动路线优化模块用于确定是否保留多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括用于:利用LSTM模型,根据以下公式确定是否输出多个当前运动轨迹交点中的至少一个当前运动轨迹交点以及多个历史运动轨迹交点中的至少一个历 史运动轨迹交点,从而获得优化的运动路线:In some embodiments, the motion route optimization module is used to determine 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. Yu: Using the LSTM model, determine whether to output at least one of the multiple current motion trajectory intersections and at least one of the multiple historical motion trajectory intersections according to the following formula, so as to obtain an optimized motion route:
Figure PCTCN2020132333-appb-000004
Figure PCTCN2020132333-appb-000004
Figure PCTCN2020132333-appb-000005
Figure PCTCN2020132333-appb-000005
o t=σ(W o·[h t-1,X t]+b o) o t =σ(W o ·[h t-1 ,X t ]+b o )
h t=o t·tanh(C t) h t =o t ·tanh(C t )
其中,X t表示LSTM模型的第t个时刻的神经元的输入并且包括多个当前运动轨迹交点,h t-1表示LSTM模型的第t-1个时刻的神经元的输出并且包括多个历史运动轨迹交点,
Figure PCTCN2020132333-appb-000006
表示LSTM模型的第t个时刻的神经元的输入细胞状态,W c表示LSTM模型的第t个时刻的神经元的输入细胞状态的权重矩阵,b c表示LSTM模型的第t个时刻的神经元的输入细胞状态的偏置值,C t表示LSTM模型的第t个时刻的神经元的细胞状态,C t-1表示LSTM模型的第t-1个时刻的神经元的细胞状态,f t表示LSTM模型的第t个时刻的神经元的遗忘门,i t表示LSTM模型的第t个时刻的神经元的输入门,o t表示LSTM模型的第t个时刻的神经元的输出门,W o表示输出门的权重矩阵,b o表示输出门的偏置值,h t表示LSTM模型的第t个时刻的神经元的输出并且可以包括优化的运动路线的多个交点。
Among them, X t represents the input of the neuron at the t-th time of the LSTM model and includes multiple current trajectory intersections, and h t-1 represents the output of the neuron at the t-1th time of the LSTM model and includes multiple histories Point of intersection of motion trajectories,
Figure PCTCN2020132333-appb-000006
Represents the input cell state of the neuron at the t-th time of the LSTM model, W c represents the weight matrix of the input cell state of the neuron at the t-th time of the LSTM model, and b c represents the neuron at the t-th time of the LSTM model The input cell state bias value, C t represents the cell state of the neuron at the t time of the LSTM model, C t-1 represents the cell state of the neuron at the t-1 time of the LSTM model, and f t represents The forget gate of the neuron at the t-th time of the LSTM model, i t represents the input gate of the neuron at the t-th time of the LSTM model, o t represents the output gate of the neuron at the t-th time of the LSTM model, W o Represents the weight matrix of the output gate, b o represents the bias value of the output gate, and h t represents the output of the neuron at the t-th time of the LSTM model and may include multiple intersection points of the optimized movement route.
在一些实施例中,运动路线提取模块还用于,从优化的运动路线的多个交点中,选择最东、最南、最西、最北的四个交点;根据四个交点确定包含运动路线的地理范围,并确定地理范围的中心点作为优化的运动路线的中心位置。In some embodiments, the motion route extraction module is also used to select the four most east, south, west, and northest intersections from the multiple intersections of the optimized motion route; determine the included movement route according to the four intersections The geographic range of the geographic area is determined, and the center point of the geographic range is determined as the center position of the optimized movement route.
在一些实施例中,运动路线提取模块还用于,确定地理范围的多个栅格以及多个栅格的geohash编码值,其中多个栅格共享中心位置。In some embodiments, the motion route extraction module is also used to determine multiple grids in a geographic range and geohash coding values of multiple grids, where multiple grids share a central position.
根据本申请的实施例,相对于使每个栅格对应一个中心位置,使多个栅格共享一个中心位置,可以降低运动路线的存储和处理成本,提高运动路线的处理效率;另外,通过利用多个栅格的geohash编码值索引运动路线,可以提高运动路线的检索效率。According to the embodiment of the present application, instead of making each grid correspond to a central position and making multiple grids share a central position, the storage and processing cost of the movement route can be reduced, and the processing efficiency of the movement route can be improved; in addition, by using The geohash code values of multiple grids index the movement route, which can improve the retrieval efficiency of the movement route.
在一些实施例中,运动路线提取模块还用于,确定优化的运动路线的多个交点中的每个交点在以中心位置为原点的相对坐标系中的相对坐标。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 the relative coordinate system with the center position as the origin.
根据本申请的实施例,通过以中心位置为原点,对运动路线的各个交点进行相对坐标转换,可以保护用户的隐私,消除与用户相关的敏感数据。According to the embodiment of the present application, by taking the center position as the origin and performing the relative coordinate conversion on each intersection of the movement route, the privacy of the user can be protected and the sensitive data related to the user can be eliminated.
在一些实施例中,运动路线提取模块还用于:In some embodiments, the motion route extraction module is also used to:
对多个轨迹段的中心进行聚类并获得多个轨迹段的至少一个类中心。Cluster the centers of the multiple trajectory segments and obtain at least one cluster center of the multiple trajectory segments.
附图说明Description of the drawings
图1示出了根据本申请实施例的通过终端设备记录用户的运动轨迹的一种场景示意图;FIG. 1 shows a schematic diagram of a scene in which a user's motion track is recorded through a terminal device according to an embodiment of the present application;
图2示出了根据本申请实施例的终端设备100的一种结构示意图;FIG. 2 shows a schematic structural diagram of a terminal device 100 according to an embodiment of the present application;
图3示出了根据本申请实施例的在运动路线提取时轨迹分割、聚类的一种示意图;Fig. 3 shows a schematic diagram of trajectory segmentation and clustering during motion route extraction according to an embodiment of the present application;
图4示出了根据本申请实施例的运动路线的交点的双向链表的一种示意图;FIG. 4 shows a schematic diagram of a doubly linked list of intersection points of movement routes according to an embodiment of the present application;
图5示出了根据本申请实施例的运动路线的geohash编码的一种示意图;FIG. 5 shows a schematic diagram of geohash encoding of a movement route according to an embodiment of the present application;
图6示出了根据本申请实施例的长短时记忆网络的一种模型示意图;FIG. 6 shows a schematic diagram of a model of a long and short-term memory network according to an embodiment of the present application;
图7示出了根据本申请实施例的运动路线的提取方法的一种流程示意图;FIG. 7 shows a schematic flowchart of a method for extracting a movement route according to an embodiment of the present application;
图8示出了根据本申请实施例的运动路线的优化方法的一种流程示意图;FIG. 8 shows a schematic flowchart of a method for optimizing a movement route according to an embodiment of the present application;
图9示出了根据本申请实施例的运动路线的推荐方法的一种流程示意图;FIG. 9 shows a schematic flowchart of a method for recommending a sports route according to an embodiment of the present application;
图10示出了根据本申请实施例的运动路线处理装置的一种结构示意图。Fig. 10 shows a schematic structural diagram of a motion route processing device according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合具体实施例和附图对本申请做进一步说明。此处描述的具体实施例仅仅是为了解释本申请,而非对本申请的限定。此外,为了便于描述,附图中仅示出了与本申请相关的部分而非全部的结构或过程。应注意的是,在本说明书中,相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The application will be further described below in conjunction with specific embodiments and drawings. The specific embodiments described here are only for explaining the application, rather than limiting the application. In addition, for ease of description, the drawings only show a part of the structure or process related to the present application instead of all. It should be noted that in this specification, similar reference numerals and letters indicate similar items in the following drawings. Therefore, once a certain item is defined in one drawing, it is not necessary to refer to it in subsequent drawings. To further define and explain.
图1示出了根据本申请实施例的通过终端设备记录用户的运动轨迹的一种场景示意图,其中,终端设备,例如图2中的终端设备100,可以包括,但不限于,便携式或移动设备、手机、个人数字助理、蜂窝电话、手持PC、便携式媒体播放器、手持设备、可穿戴设备(例如,手表、手环、显示眼镜或护目镜、头戴式显示器、头戴设备)、导航设备、服务器、网络设备、图形设备、视频游戏设备、机顶盒、膝上型设备、虚拟现实和/或增强现实设备、物联网设备、工业控制设备、车载信息娱乐设备、流媒体客户端设备、电子书、阅读设备、POS机以及其他设备。如图1所示,在用户沿运动场地(例如,但不限于,操场、公园、小区、广场、马路或其他场地)运动(例如,但不限于,跑步、快走等)期间,终端设备,例如图2中的终端设备100,可以实时地根据接收的卫星信号确定用户的GPS(global positioning system,全球定位系统)坐标,从而实时地记录用户的运动轨迹。FIG. 1 shows a schematic diagram of a scene of recording a user's motion track through a terminal device according to an embodiment of the present application. The terminal device, such as the terminal device 100 in FIG. 2, may include, but is not limited to, a portable or mobile device , Mobile phones, personal digital assistants, cellular phones, handheld PCs, portable media players, handheld devices, wearable devices (for example, 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, IoT devices, industrial control devices, in-vehicle infotainment devices, streaming media client devices, e-books , Reading equipment, POS machines and other equipment. As shown in Figure 1, during a user's exercise (such as, but not limited to, running, brisk walking, etc.) along a sports field (such as, but not limited to, a playground, park, community, square, road, or other venues), the terminal device, such as The terminal device 100 in FIG. 2 can determine the user's GPS (global positioning system, global positioning system) coordinates in real time according to the received satellite signals, so as to record the user's movement trajectory in real time.
图2示出了根据本申请实施例的终端设备100的一种结构示意图,如图2所示,终端设备100可以包括,但不限于,GPS定位模块110、运动轨迹记录模块120、数据中心130、运动路线提取模块140、运动路线优化模块150以及运动路线推荐模块160。其中,终端设备100的一个或多个组件(例如,GPS定位模块110、运动轨迹记录模块120、数据中心130、运动路线提取模块140、运动路线优化模块150以及运动路线推荐模块160中的一个或多个),可以由专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的(共享、专用或组)处理器和/或存储器、组合逻辑电路、提供所描述的功能的其他合适的组件的任意组合构成。根据一个方面,处理器可以是微处理器、数字信号处理器、微控制器等,和/或其任何组合。根据另一个方面,所述处理器可以是单核处理器,多核处理器等,和/或其任何组合。FIG. 2 shows a schematic structural diagram of a terminal device 100 according to an embodiment of the present application. As shown in FIG. 2, the terminal device 100 may include, but is not limited to, a GPS positioning module 110, a motion track recording module 120, and a data center 130. , The exercise route extraction module 140, the exercise route optimization module 150, and the exercise 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 movement track recording module 120, the data center 130, the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 Multiple), can be composed of application-specific integrated circuits (ASIC), electronic circuits, (shared, dedicated or group) processors and/or memories that execute one or more software or firmware programs, combinational logic circuits, and devices that provide the described functions Any combination of other suitable components. 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.
需要说明的是,虽然图2示出了运动路线提取模块140、运动路线优化模块150以及运动路线推荐模块160均位于用户侧的终端设备100上,但运动路线提取模块140、运动路线优化模块150以及运动路线推荐模块160中的一个或多个可以位于其他设备上,该其他设备例如,但不限于,云侧服务器,因此,在本申请的实施例中,将终端设备100和云侧服务器等统称为运动轨迹处理设备。另外,虽然图2示出了运动轨迹记录模块120与运动路线提取模块140、运动路线优化模块150以及运动路线推荐模块160 是相互独立的模块,但是运动路线提取模块140、运动路线优化模块150以及运动路线推荐模块160中的一个或多个也可以作为运动轨迹记录模块120的一部分。It should be noted that although FIG. 2 shows that the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 are all located on the terminal device 100 on the user side, the exercise route extraction module 140 and the exercise route optimization module 150 And one or more of the exercise route recommendation module 160 may be located on other devices, such as, but not limited to, a cloud-side server. Therefore, in the embodiment of the present application, the terminal device 100 and the cloud-side server, etc. Collectively referred to as motion trajectory processing equipment. In addition, although FIG. 2 shows that the movement track recording module 120, the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 are independent modules, the movement route extraction module 140, the movement route optimization module 150, and the One or more of the exercise route recommendation modules 160 may also be used as a part of the exercise track recording module 120.
根据本申请的一些实施例,GPS定位模块110用于根据接收的卫星信号确定用户(或终端设备100)的GPS坐标,运动轨迹记录模块120用于在用户运动期间记录用户的运动轨迹,具体地,运动APP可以一定的频率(即,打点频率)从GPS定位模块110获取用户的GPS坐标,该GPS坐标以及对应的时间将构成一个轨迹点,一条运动轨迹可以包括多个轨迹点。According to some embodiments of the present application, the GPS positioning module 110 is used to determine the GPS coordinates of the user (or the terminal device 100) according to the received satellite signals, and the motion track recording module 120 is used to record the user's motion track during the user's motion, specifically The sports APP can obtain the user's GPS coordinates from the GPS positioning module 110 at a certain frequency (ie, dot frequency). The GPS coordinates and the corresponding time will constitute a track point, and a motion track may include multiple track points.
根据本申请的一些实施例,通过运动轨迹记录模块120记录的运动轨迹可以保存在数据中心130中,所述数据中心130可以包括,但不限于,通过机器或设备制造或形成的物品的非瞬态的有形安排,其包括存储介质,诸如硬盘或任何其它类型的盘,包括软盘、光盘、紧致盘只读存储器(CD-ROM)、紧致盘可重写(CD-RW)以及磁光盘;半导体器件,例如只读存储器(ROM)、诸如动态随机存取存储器(DRAM)和静态随机存取存储器(SRAM)之类的随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、闪存、电可擦除可编程只读存储器(EEPROM);相变存储器(PCM);磁卡或光卡;或适于存储数据的任何其它类型的介质。According to some embodiments of the present application, the motion trajectory recorded by the motion trajectory recording module 120 may be stored in the data center 130. The data center 130 may include, but is not limited to, non-transient objects manufactured or formed by machines or equipment. A tangible arrangement of state, which includes storage media, such as hard disks or any other types of disks, including floppy disks, optical disks, compact disk read-only memory (CD-ROM), compact disk rewritable (CD-RW), and magneto-optical disks ; 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); magnetic or optical card; or any other type of medium suitable for storing data.
根据本申请的一些实施例,运动路线提取模块140用于根据运动路线模型,从运动轨迹记录模块120记录的用户在一段时间内(例如,一天、三天、一周、两周、一个月或其他时间段)在相同地理范围内(例如,相同的运动场地)生成的多条运动轨迹中,提取一条简化的运动路线。其中,多条运动轨迹的示例可以是,但不限于,用户分别在今天、昨天、前天生成的运动轨迹,或者将用户在一次运动中生成的运动轨迹进行分割得到的多条运动轨迹,例如,将用户沿运动场地跑多圈生成的运动轨迹按照每一圈进行分割得到的多条运动轨迹。其中,所述运动路线模型可以包括,但不限于,构成运动路线的多个交点的集合,该交点集合包括与多个轨迹段簇相关的多个交点,其中多个轨迹段簇中的每个轨迹段簇包括运动轨迹的多个轨迹段,并且多个轨迹段中相邻轨迹段之间的间距小于预定值,其中所述相邻轨迹段分别属于所述多个跑步轨迹中的不同跑步轨迹。According to some embodiments of the present application, the exercise route extraction module 140 is used to record the user from the exercise track recording module 120 within a period of time (for example, one day, three days, one week, two weeks, one month or other Time period) Extract a simplified motion route from multiple motion trajectories generated in the same geographic range (for example, the same sports field). Examples of multiple motion trajectories may be, but are not limited to, motion trajectories generated by the user today, yesterday, and the day before yesterday, or multiple motion trajectories obtained by dividing the motion trajectory generated by the user in one exercise, for example, The motion trajectory generated by the user running multiple laps along the sports field is divided into multiple motion trajectories obtained by dividing each lap. Wherein, the motion route model may include, but is not limited to, a set of multiple intersection points constituting the motion route, and the intersection point set includes multiple intersection points related to multiple trajectory segment clusters, wherein each of the multiple trajectory segment clusters The trajectory segment cluster includes multiple trajectory segments of the motion trajectory, and the distance 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 .
根据本申请的一些实施例,运动路线优化模块150用于基于循环神经网络151,对相同地理范围内(例如,同一运动场地)的当前运动路线和至少一条历史运动路线的交点进行融合,以获得一条所述地理范围内的优化运动路线,并将其作为所述地理范围内的默认运动路线存储在数据中心130中。其中,当前运动路线指的是通过运动路线提取模块140从用户在当前时间段(例如,一天、三天、一周、两周、一个月或其他时间段)内生成的当前运动轨迹集合中提取的运动路线,至少一条历史运动路线中的每条历史运动路线指的是通过运动路线提取模块140从用户在当前时间段之前的历史时间段(例如,一天、三天、一周、两周、一个月或其他时间段)内生成的历史运动轨迹集合中提取的运动路线。其中,循环神经网络151是一类具有记忆能力的深度学习网络,循环神经网络151的一个神经元的输出不仅与该神经元的输入相关,还和上一个神经元的输出相关,循环神经网络151的示例可以包括,但不限于LSTM(long short-term memory,长短时记忆)网络和GRU(gated recurrent unit,门控循环单元) 网络,在一种示例中,循环神经网络151的各个神经元可以与不同时刻的运动路线相关。其中,所述融合包括使用循环神经网络151确定当前运动路线和各条历史运动路线的哪些交点可以被保留下来构成优化运动路线,因此优化运动路线包括当前运动路线以及各条历史运动路线的一个或多个交点。其中,当前运动路线的生成用户以及各条历史运动路线的生成用户可以相同,也可以不同,在不同的情况下,终端设备100可以例如通过网络,向服务器获取相同地理范围内的其他用户的运动路线。According to some embodiments of the present application, the exercise route optimization module 150 is used to merge the intersection of the current exercise route and at least one historical exercise route in the same geographic area (for example, the same sports venue) based on the cyclic neural network 151 to obtain An optimized exercise route in the geographic range is stored in the data center 130 as a default exercise route in the geographic range. Wherein, the current exercise route refers to the exercise route extraction module 140 extracted from the current exercise trajectory set generated by the user in the current time period (for example, one day, three days, one week, two weeks, one month, or other time periods). Sports routes, each historical exercise route in at least one historical exercise route refers to the historical time period (for example, one day, three days, one week, two weeks, one month) from the user before the current time period through the exercise route extraction module 140 Or other time periods). 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. The recurrent neural network 151 Examples of may include, but are not limited to, an LSTM (long short-term memory) network and a GRU (gated recurrent unit, gated recurrent unit) network. In one example, each neuron of the recurrent neural network 151 may Related to the movement route at different times. Wherein, the fusion includes using the cyclic 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. Therefore, the optimized movement route includes the current movement route and one or the other of each historical movement route. Multiple intersections. Among them, the current exercise route generation user and the historical exercise route generation users may be the same or different. In different situations, the terminal device 100 may obtain the exercises of other users in the same geographic area from the server, for example, through the network. route.
根据本申请的一些实施例,运动路线推荐模块160用于接收用户对运动路线的推荐请求,获取用户的GPS坐标,并根据用户的GPS坐标向用户推荐与用户相近的运动路线。According to some embodiments of the present application, the sports route recommendation module 160 is configured to receive a user's recommendation request for a sports route, obtain the user's GPS coordinates, and recommend a sports route close to the user according to the user's GPS coordinates.
以下将参考图2,进一步描述终端设备100的运动路线提取模块140、运动路线优化模块150以及运动路线推荐模块160的功能。The following will further describe the functions of the exercise route extraction module 140, the exercise route optimization module 150, and the exercise route recommendation module 160 of the terminal device 100 with reference to FIG. 2.
如图2所示,运动路线提取模块140可以包括,但不限于轨迹分割单元141、轨迹聚类单元142、轨迹抽析单元143以及模型要素确定单元144。其中,运动路线提取模块140的一个或多个组件(例如,轨迹分割单元141、轨迹聚类单元142、轨迹抽析单元143以及模型要素确定单元144中的一个或多个),可以由专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的(共享、专用或组)处理器和/或存储器、组合逻辑电路、提供所描述的功能的其他合适的组件的任意组合构成。根据一个方面,处理器可以是微处理器、数字信号处理器、微控制器等,和/或其任何组合。根据另一个方面,所述处理器可以是单核处理器,多核处理器等,和/或其任何组合。As shown in FIG. 2, 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) can be integrated by dedicated Any combination of circuits (ASIC), 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.
根据本申请的一些实施例,轨迹分割单元141可以用于从数据中心130获取通过运动轨迹记录模块120记录的多条运动轨迹,并将每条运动轨迹分割为多个轨迹段。According to some embodiments of the present application, the trajectory segmentation unit 141 may be used to obtain multiple motion trajectories recorded by the motion trajectory recording module 120 from the data center 130, and divide each motion trajectory into multiple trajectory segments.
具体地,可以将每条运动轨迹表示为Specifically, each trajectory can be expressed as
Figure PCTCN2020132333-appb-000007
Figure PCTCN2020132333-appb-000007
其中,TR m表示第m条运动轨迹,n m表示第m条运动轨迹包括的轨迹点的数量,
Figure PCTCN2020132333-appb-000008
表示第m条运动轨迹的第i个轨迹点,
Figure PCTCN2020132333-appb-000009
表示第m条运动轨迹的第i个轨迹点的GPS坐标,
Figure PCTCN2020132333-appb-000010
表示第m条运动轨迹的第i个轨迹点的GPS坐标对应的时间。
Among them, TR m represents the m-th motion trajectory, n m represents the number of trajectory points included in the m-th motion trajectory,
Figure PCTCN2020132333-appb-000008
Represents the i-th trajectory point of the m-th motion trajectory,
Figure PCTCN2020132333-appb-000009
Represents the GPS coordinates of the i-th trajectory point of the m-th motion trajectory,
Figure PCTCN2020132333-appb-000010
Represents the time corresponding to the GPS coordinates of the i-th trajectory point of the m-th motion trajectory.
对于每条运动轨迹,轨迹分割单元141可以将在时间上相邻的两个轨迹点表示为一个轨迹段,其中所述轨迹段的方向由时间较早的轨迹点(即,起始轨迹点)指向时间较晚的轨迹点(即,终止轨迹点),所述轨迹段的大小为两个轨迹点之间的距离。图3示出了3条运动轨迹TR 1~TR 3的示例,需要说明的是图中仅示出了运动轨迹TR 1~TR 3的一部分,其中,每条运动轨迹都被分割为多个轨迹段。 For each motion trajectory, the trajectory dividing unit 141 may represent two trajectory points that are adjacent in time as a trajectory segment, wherein the direction of the trajectory segment is determined by the earlier trajectory point (ie, the starting trajectory point). Point to a later track point (ie, end track point), and the size of the track segment is the distance between two track points. Figure 3 shows an example of three motion trajectories TR 1 to TR 3 , it should be noted that only a part of the motion trajectories TR 1 to TR 3 are shown in the figure, where each motion trajectory is divided into multiple trajectories segment.
根据本申请的一些实施例,轨迹聚类单元142可以将各条运动轨迹的轨迹段按顺序聚类为多个轨迹段簇,其中,在一个轨迹段簇内,相邻的轨迹段之间的间距小于预定值,其中,相邻轨迹段分别属于所述多个跑步轨迹中的不同跑步轨迹。作为一种示例,将两个轨迹段表示为ts i和ts j,其中轨迹段ts i的起点为s i,终点为e i,轨迹段ts j的起点为s j,终点为e j,那么可以基于以下公式计算轨迹段ts i和ts j之间的间距: According to some embodiments of the present application, the trajectory clustering unit 142 may sequentially cluster the trajectory segments of each motion trajectory into a plurality of trajectory segment clusters. Among them, in a trajectory segment cluster, the trajectory segments between adjacent trajectory segments The distance is less than a predetermined value, wherein the adjacent track segments respectively belong to different running tracks in the plurality of running tracks. As an example, two trajectory segments are represented as ts i and ts j , where the starting point of the trajectory segment ts i is si , the end point is e i , the starting point of the trajectory segment ts j is s j , and the end point is e j , then The distance between trajectory segments ts i and ts j can be calculated based on the following formula:
Figure PCTCN2020132333-appb-000011
Figure PCTCN2020132333-appb-000011
d ||=MIN(l ||1,l ||2)                     公式3 d || = MIN(l ||1 , l ||2 ) Formula 3
Figure PCTCN2020132333-appb-000012
Figure PCTCN2020132333-appb-000012
其中,l ⊥1表示轨迹段ts j的起点s j到轨迹段ts i的垂直距离,l ⊥2表示轨迹段ts j的终点e j到轨迹段ts i的垂直距离,l ||1表示轨迹段ts i的起点s i到轨迹段ts j的起点s j在轨迹段ts i上的投影点的距离,l ||2表示轨迹段ts i的终点e i到轨迹段ts j的终点e j在轨迹段ts i上的投影点的距离,d表示轨迹段ts i和ts j之间的间距。 Wherein, l ⊥1 J represents a path section starting point ts to the track segment s j i is the vertical distance ts, l ⊥2 represents the end of the track period ts J e j to the track segment i is the vertical distance ts, l || 1 represents a locus I starting period ts in the track section s i ts s j J starting from the projection point in the track period ts of I, l || 2 indicates the end of the track segment e i i ts to ts track segment endpoint e j J The distance of the projection point on the trajectory segment ts i , d represents the distance between the trajectory segment ts i and ts j .
例如,在图3所示的示例中,图2的轨迹聚类单元142可以首先确定第一个轨迹段簇以及第一个轨迹段簇的基准轨迹段,图2的轨迹聚类单元142将在各个运动轨迹的轨迹段中确定能够与基准轨迹段聚类的轨迹段。在一种示例中,图2的轨迹聚类单元142可以将第一个轨迹段簇的基准轨迹段确定为TR 1的轨迹段P11,并在其他轨迹段中确定能够与TR 1的轨迹段P11聚类的轨迹段,具体地,图2的轨迹聚类单元142可以首先确定在运动轨迹TR 2~TR 3中,轨迹段P31和P32与TR 1的轨迹段P11之间的间距小于预定值并因此可以作为与TR 1的轨迹段P11相邻的轨迹段与TR 1的轨迹段P11聚类;图2的轨迹聚类单元142可以继续确定TR 2的轨迹段P21与TR 3的轨迹段P31和P32之间的间距小于预定值并因此可以作为与TR 3的轨迹段P31和P32相邻的轨迹段与TR 3的轨迹段P31和P32聚类,那么最终,轨迹聚类单元142可以将TR 1的轨迹段P11、TR 3的轨迹段P31和P32以及TR 2的轨迹段P21聚类为第一个轨迹段簇。 For example, in the example shown in FIG. 3, the trajectory clustering unit 142 of FIG. 2 may first determine the first trajectory segment cluster and the reference trajectory segment of the first trajectory segment cluster, and the trajectory clustering unit 142 of FIG. Determine the trajectory segment that can be clustered with the reference trajectory segment among the trajectory segments of each motion trajectory. In an example, the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P11 of TR 1 , and determine that it can be compatible with the trajectory segment P11 of TR 1 in other trajectory segments. To cluster the trajectory segments, specifically, the trajectory clustering unit 142 of FIG. 2 may first determine that in the motion trajectories TR 2 to TR 3 , the distance between the trajectory segments P31 and P32 and the trajectory segment P11 of TR 1 is less than a predetermined value. Thus as with the track TR P11 segment 1 and segment adjacent tracks TR track segment P11 cluster 1; FIG track clustering unit 1422 may continue to determine the track segment of P21 TR 2 and TR track segment 3 and P31 the spacing between the predetermined value smaller than P32 and thus can be used as the track TR 3 segments P31 and P32 adjacent tracks TR track segment clustering section 3 P31 and P32, then finally, the clustering unit 142 may track TR. 1 trajectory segment P11, TR track segment P31 and P32 3 and cluster TR 2 P21 path sections for the first track segment cluster.
在另一种示例中,图2的轨迹聚类单元142可以将第一个轨迹段簇的基准轨迹段确定为TR 3的轨迹段P31,并在其他轨迹段中确能够与TR 3的轨迹段P31聚类的轨迹段,具体地,轨迹聚类单元142可以确定TR 1的轨迹段P11以及TR 2的轨迹段P21与TR 3的轨迹段P31之间的间距小于预定值,因此可以将TR 1的轨迹段P11以及TR 2的轨迹段P21作为与TR 3的轨迹段P31相邻的轨迹段与TR 3的轨迹段P31聚类为第一个轨迹段簇。需要说明的是,图2的轨迹聚类单元142也可将其他轨迹段确定为第一个轨迹段簇的基准轨迹段。 In another example, the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P31 of TR 3 , and it can be matched with the trajectory segment of TR 3 in other trajectory segments. P31 cluster path sections, in particular, the trajectory clustering unit may determine the track segment P11 142 tracks TR 1 and TR 2 and the segment of P21 spacing between the tracks TR 3 is less than the predetermined value P31 segment, it is possible to TR 1 TR trajectory segment P11 and P21 of a track section 2 and section 3 of the track TR P31 adjacent tracks TR track segment P31 clustering section 3 for the first track segment cluster. It should be noted that the trajectory clustering unit 142 in FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the first trajectory segment cluster.
然后,轨迹聚类单元142可以确定第二个轨迹段簇以及第二个轨迹段簇的基准轨迹段。在一种示例中,图2的轨迹聚类单元142可以将第二个轨迹段簇的基准轨迹段确定为TR 1的轨迹段P12,并在其他轨迹段中确定能够与TR 1的轨迹段P12聚类的轨迹段,具体地,图2的轨迹聚类单元142可以确定TR 3的轨迹段P33与TR 1的轨迹段P12之间的间距小于预定值并因此可以作为与TR 1的轨迹段P12相邻的轨迹段与TR 1的轨迹段P12聚类,而TR 2的轨迹段P22与TR 3的轨迹段P33之间的间距小于预定值并因此可以作为与TR 3的轨迹段P33相邻的轨迹段与TR 3的轨迹段P33聚类,那么最终,轨迹聚类单元142可以将TR 1的轨迹段P12、TR 3的轨迹段P33以及TR 2的轨迹段P22聚类为第二个轨迹段簇。需要说明的是,图2的轨迹聚类单元142也可将其他轨迹段确定为第二个轨迹段簇的基准轨迹段。 Then, the trajectory clustering unit 142 may determine the second trajectory segment cluster and the reference trajectory segment of the second trajectory segment cluster. In an example, the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the second trajectory segment cluster as the trajectory segment P12 of TR 1 , and determine that it can be compatible with the trajectory segment P12 of TR 1 in other trajectory segments. cluster path section, in particular, FIG. 2 locus clustering unit 142 can determine the distance between the track segments P33 TR 3 and TR track segment 1 is less than the predetermined value P12, and thus may be used as the trajectory of a segment P12 TR adjacent tracks segment P12 of the track segment TR. 1 cluster, and the path section 2 P22 TR spacing between the tracks TR section 3 is smaller than the predetermined value P33, and thus may be used as the adjacent tracks TR section 3 of P33 P33 track TR track segment clustering section 3, then the final trajectory clustering unit 142 may track TR. 1 segment of P12, P33 TR track segment 3 and segment track TR 2 P22 cluster for the second trail segment cluster. It should be noted that the trajectory clustering unit 142 of FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the second trajectory segment cluster.
依次类推,图2的轨迹聚类单元142可以确定运动轨迹的其他轨迹段簇。需要说明的是,对于不同于图3示出的运动轨迹,可以以与前述类似的原理确定运动轨迹的各 个轨迹段簇。By analogy, the trajectory clustering unit 142 of FIG. 2 can determine other trajectory segment clusters of the motion trajectory. It should be noted that, for the motion trajectory that is different from that shown in FIG. 3, the trajectory segment clusters of the motion trajectory can be determined based on the principle similar to the foregoing.
根据本申请的一些实施例,对于每个轨迹段簇,轨迹抽析单元143可以基于簇内的各个轨迹段计算一个簇向量。作为一种示例,轨迹抽析单元143可以以轨迹段簇内各个轨迹段的起始轨迹点的GPS坐标的均值作为簇向量的起点的GPS坐标,以各个轨迹段的终止轨迹点的GPS坐标的均值作为簇向量的终点的GPS坐标。作为另一种示例,轨迹抽析单元143可以以轨迹段簇内的任意一个轨迹段作为簇向量。需要说明的是,也可以基于其他任何合适的方式确定簇向量。According to some embodiments of the present application, for each trajectory segment cluster, the trajectory extraction unit 143 may calculate a cluster vector based on each trajectory segment in the cluster. As an example, the trajectory extraction unit 143 may use the average value of the GPS coordinates of the starting trajectory point of each trajectory segment in the trajectory segment cluster as the GPS coordinates of the starting point of the cluster vector, and the GPS coordinates of the ending trajectory point of each trajectory segment The mean value is used as the GPS coordinates of the end 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 can also be determined based on any other suitable method.
根据本申请的一些实施例,轨迹聚类单元142还用于确定异常轨迹段,并确定异常轨迹段在所有轨迹段中的占比,即异常段偏差。具体地,轨迹聚类单元142可以通过层次聚类算法、K均值聚类算法或其他聚类算法,对多条跑步轨迹的各轨迹段的中心点进行聚类,并获得多个轨迹段中心点的类别以及各个类别的类中心,轨迹聚类单元142可以计算多条跑步轨迹的各轨迹段的中心点与各个类中心的距离,并将其中心点与各个类中心之间的最小距离大于预定值(该预定值和上述与轨迹段之间的间距相关的预定值相同或者不同)的轨迹段标记为异常轨迹段。例如,在图3的示例中,TR 1的轨迹段P15和TR 3的轨迹段P35可以被标记为异常轨迹段。在一些情况下,较高的异常段偏差可以指示运动期间GPS信号的质量较差。 According to some embodiments of the present application, the trajectory clustering unit 142 is also used to determine the abnormal trajectory segment and determine the proportion of the abnormal trajectory segment in all the trajectory segments, that is, the deviation of the abnormal segment. Specifically, the trajectory clustering unit 142 may use a hierarchical clustering algorithm, a K-means clustering algorithm or other clustering algorithms to cluster the center points of each trajectory segment of the multiple running trajectories, and obtain multiple trajectory segment center points. The trajectory clustering unit 142 can calculate the distance between the center point of each trajectory segment of multiple running trajectories and the center of each category, and the minimum distance between the center point and the center of each category is greater than a predetermined A trajectory segment with a value (the predetermined value is the same as or different from the aforementioned predetermined value related to the distance between trajectory segments) is marked as an abnormal trajectory segment. For example, in the example of FIG. 3, the trajectory segment P15 of TR 1 and the trajectory segment P35 of TR 3 may be marked as abnormal trajectory segments. In some cases, a higher abnormal segment deviation can indicate poor GPS signal quality during movement.
根据本申请的一些实施例,模型要素确定单元144可以用于根据运动路线模型,确定从运动轨迹中提取的简化的运动路线的模型要素。具体地,运动路线模型可以包括相邻轨迹段簇的相邻簇向量的交点的集合。作为一种示例,在相邻轨迹段簇的相邻簇向量首尾不相接的情况下,模型要素确定单元144可以延长该相邻簇向量中的一个或两个,以确定该相邻簇向量之间的交点的GPS坐标;在相邻的簇向量已经相交的情况下,模型要素确定单元144可以直接确定相邻簇向量之间的交点的GPS坐标。运动路线模型还可以包括运动路线的起点,以及运动路线的终点。模型要素确定单元144可以以运动轨迹的第一个轨迹段簇的簇向量的起点作为运动路线的起点,将最后一个轨迹段簇的簇向量的终点作为运动路线的终点。运动路线模型还可以包括指示簇向量的交点集合中的每个交点与其他至少一个交点之间的链接关系的交点链接表格,其中,交点集合包括运动路线的起点和终点。作为一种示例,模型要素确定单元144可以确定如图4所示的交点之间的双向链表,其中,起点可以是运动路线的起点,交点1可以是运动轨迹的第一个轨迹段簇的簇向量和第二个轨迹段簇的簇向量之间的交点,交点2可以是运动轨迹的第二个轨迹段簇的簇向量和第三个轨迹段簇的簇向量之间的交点,依次类推,终点可以是运动路线的终点。另外,图4中示出的每个交点可以包括该交点的GPS坐标、到前一交点的链接(例如,但不限于,指针)以及到后一交点的链接(例如,但不限于,指针),而起点可以包括起点的GPS坐标、到后一交点的链接(例如,但不限于,指针),终点可以包括终点的GPS坐标、到前一交点的链接(例如,但不限于,指针)。图4所示的双向链表能够使得用户可以沿运动路线的正向(例如,由图4所示的起点指向图4所示的终点)运动,也可以沿运动路线的反向(例如,由图4所示的终点指向图4所示的起点)运动。需要说明的是,模型要素确定单元144也可以确定交点之间的单向链表,即图4中示出的每个交点可以包括该交点的GPS坐标、 到前一交点的链接(例如,但不限于,指针)或者到后一交点的链接(例如,但不限于,指针)。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, in the case where the adjacent cluster vectors of adjacent trajectory segment clusters do not meet end to end, the model element determining unit 144 may extend one or two of the adjacent cluster vectors to determine the adjacent cluster vector The GPS coordinates of the intersection between the adjacent cluster vectors; in the case where the adjacent cluster vectors have intersected, the model element determination unit 144 can directly determine the GPS coordinates of the intersection between the adjacent cluster vectors. The sports route model can also include the starting point of the sports route and the end of the sports route. The model element determining unit 144 may use the start 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 further include an intersection link table indicating the link relationship between each intersection point in the intersection point set of the cluster vector and the other at least one intersection point, wherein the intersection point set includes the start point and the end point of the motion route. As an example, the model element determining unit 144 may determine the doubly linked list between the intersection points as shown in FIG. 4, where the starting point may be the starting point of the motion route, and the intersection point 1 may be the cluster of the first trajectory segment cluster of the motion trajectory. The intersection point between the vector and the cluster vector of the second trajectory segment cluster. Intersection point 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, The end point can be the end point of the movement route. In addition, each intersection shown in FIG. 4 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 and a link to the next point of intersection (for example, but not limited to, a pointer), and the end point may include the GPS coordinates of the ending point, and a link to the previous point of intersection (for example, but not limited to, a pointer). The doubly linked list shown in FIG. 4 enables the user to move along the forward direction of the movement route (for example, from the starting point shown in FIG. 4 to the end point shown in FIG. 4), or along the reverse direction of the movement route (for example, from the figure The end point shown in 4 points to the starting point shown in Fig. 4) to move. It should be noted that the model element determining unit 144 may also determine a one-way linked list between intersections, that is, each intersection shown in FIG. 4 may include the GPS coordinates of the intersection and the link to the previous intersection (for example, but not Limited to pointers) or links to the next intersection (for example, but not limited to pointers).
为了提高在向用户推荐运动路线时对运动路线的检索效率,运动路线模型还可以包括运动路线的索引,即表征运动路线所处地理范围的多个栅格的geohash编码值,其中,geohash编码是一种地址编码,它可以把二维的经纬度坐标编码成一维的字符串,例如,base32编码字符串,以提高对地理位置的检索效率。图5示出了表征运动路线所处地理范围的四个栅格及其geohash编码值,如图所示,模型要素确定单元144可以确定运动路线的最小外接矩形,其中,最小外接矩形的其中两条边与纬线平行并且由运动路线的交点集合中最南和最北交点的纬度坐标确定,另外两条边与经线平行并且由运动路线的交点集合中最东和最西交点的经度坐标确定,并且模型要素确定单元144可以将运动路线的最小外接矩形的中心点作为运动路线的中心位置,例如,图中所示的运动路线的中心位置的GPS坐标为(121.623,29.855)。In order to improve the retrieval efficiency of the sports route when recommending the sports route to the user, the sports route model can also include the index of the sports route, that is, the geohash code value of multiple grids representing the geographic range of the sports route, where the geohash code is An address encoding 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 geographic locations. Figure 5 shows four grids representing the geographic range of the movement route and their geohash code values. As shown in the figure, the model element determination unit 144 can determine the smallest bounding rectangle of the movement route, wherein two of the smallest bounding rectangles One edge is parallel to the line of latitude and is determined by the latitude coordinates of the southernmost and northernmost intersection points in the set of intersection points of the movement route, and the other two edges are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the movement route. In addition, the model element determining unit 144 may use the center point of the minimum circumscribed 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).
如图5所示,图2的模型要素确定单元144可以以中心位置为中心,将运动路线的最小外接矩形均分为四个栅格,并确定每个栅格的地理范围对应的geohash编码值,其中geohash编码值的位数可以例如是,但不限于,7位base32编码,例如,如图5所示,四个栅格的编码值分别为wx4g340、wx4g341、wx4g342以及wx4g343。As shown in FIG. 5, the model element determination unit 144 of FIG. 2 can take the center position as the center, divide the minimum bounding rectangle of the motion route into four grids, and determine the geohash code value corresponding to the geographic range of each grid. The number of bits of the geohash encoding value may be, for example, but not limited to, 7-bit base32 encoding. For example, as shown in FIG. 5, the encoding values of the four grids are wx4g340, wx4g341, wx4g342, and wx4g343, respectively.
需要说明的是,图5只是表征运动路线所处地理范围的栅格的一个示例,由各个交点构成的运动路线不限于图5中所示的运动路线,中心位置的GPS坐标也不限于图中所示出的GPS坐标。It should be noted that Fig. 5 is only an example of a grid that characterizes the geographic range of the movement route. The movement route formed by each intersection is not limited to the movement route shown in Fig. 5, and the GPS coordinates of the center position are not limited to the figure. GPS coordinates shown.
另外,为了保护用户的隐私,运动路线模型还可以包括运动路线的中心位置的GPS坐标,并且运动路线的各个交点的坐标是相对于中心位置的相对坐标。作为一种示例,模型要素确定单元144可以以上述中心位置为原点,构建相对坐标系,将运动路线的各个交点的绝对GPS坐标(例如,经度和纬度)转换为在该相对坐标系中的相对坐标,如此,可以消除与用户相关的敏感数据。In addition, in order to protect the privacy of the user, the sports route model may also include the GPS coordinates of the center position of the sports route, and the coordinates of each intersection point of the sports route are relative coordinates with respect to the center position. As an example, the model element determination unit 144 may use the aforementioned center position as the origin to construct a relative coordinate system, and convert the absolute GPS coordinates (for example, longitude and latitude) of each intersection of the movement route into relative coordinates in the relative coordinate system. Coordinates, in this way, can eliminate sensitive data related to users.
模型要素确定单元144还可以将根据运动路线模型确定的、从运动轨迹中提取的简化运动路线的各个要素保存在数据中心130中,以作为要向用户推荐的候选运动路线。The model element determination unit 144 may also save each element 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.
根据本申请的一些实施例,为了进一步地提高向用户推荐的运动路线的质量,运动路线优化模块150可以基于循环神经网络151,对相同地理范围内(例如,同一运动场地)的当前运动路线和至少一条历史运动路线的交点进行融合,以获得一条该地理范围内的优化运动路线。具体地,以循环神经网络151为LSTM网络作为示例说明当前运动路线和至少一条历史运动路线的融合过程,图6示出了LSTM网络的一种模型示意图,如图6所示,LSTM网络可以包括多个神经元A 1~A t,每个神经元与一条运动路线相关,例如,神经元A 1与初始时刻的运动路线相关,神经元A t-1与第t-1个时刻的运动路线相关,神经元A t与第t个时刻的运动路线(例如,当前运动路线)相关,各个神经元按照各条运动路线的生成时间(例如,运动路线提取模块140从运动轨迹集合中提取运动路线的时间,或者运动路线提取模块140将提取的运动路线存储在数据中心130的时间)依序排列。在LSTM网络中,运动路线的交点的融合是随时间逐步 进行的。 According to some embodiments of the present application, in order to further improve the quality of the exercise route recommended to the user, the exercise route optimization module 150 may be based on the recurrent neural network 151 to compare the current exercise route in the same geographic area (for example, the same sports venue) and The intersections of at least one historical movement route are merged to obtain an optimized movement route within the geographic range. Specifically, taking the recurrent neural network 151 as the LSTM network as an example to illustrate the fusion process of the current movement route and at least one historical movement route, FIG. 6 shows a schematic diagram of a model of the LSTM network. As shown in FIG. 6, the LSTM network may include a plurality of neurons a 1 ~ a t, each neuron associated with a movement route, e.g., neuron a 1 associated with the initial time course of motion, the movement route a neuron t-1 and the first time of t-1 Related neuron a movement route t to t-th time (e.g., current motion path) related to each neuron in accordance with the generation time pieces movement route (e.g., movement route extracting module 140 extracts from the trajectory set movement route Or the time at which the exercise route extraction module 140 stores the extracted exercise route in the data center 130). In the LSTM network, the fusion of the intersection points of the motion routes is gradually carried out over time.
如图6所示,每个神经元都包括输入和输出,以神经元A t和神经元A t-1为例,X t表示神经元A t的输入,其包括与神经元A t相关的运动路线(例如,当前运动路线)的交点集合,h t表示神经元A t的输出,其包括由神经元A t确定的优化运动路线的交点集合,X t-1表示神经元A t-1的输入,其包括与神经元A t-1相关的运动路线(例如,当前运动路线之前的一条历史运动路线)的交点集合,h t-1表示神经元A t-1的输出,其包括由神经元A t-1确定的优化运动路线的交点集合。另外,前一个时刻的神经元可以向下一个时刻的神经元传递其细胞状态以及输出,其中,细胞状态即LSTM网络的记忆,传递到一个神经元的细胞状态可以包括与该神经元之前的各个神经元相关的多条运动路线的交点的集合,而一个神经元传递到下一个神经元的细胞状态可以包括与该神经元以及该神经元之前的各个神经元相关的多条运动路线的交点的集合。例如,神经元A t-1可以向神经元A t传递神经元A t-1的输出h t-1以及细胞状态C t-1。因此,每个神经元的输出和细胞状态不仅与该神经元的输入有关,还与上一个神经元的输出和细胞状态有关,例如,神经元A t-1的输出h t-1,即由神经元A t-1确定的优化运动路线的交点集合将包括第1个时刻至第t-1个时刻的历史运动路线的一个或多个交点,神经元A t的输出h t,即由神经元A t确定的优化运动路线的交点集合可以包括第1个时刻至第t-1个时刻的历史运动路线以及第t个时刻的当前运动路线的一个或多个交点。 6, each neuron comprises input and output, to neurons and neurons A t A t-1 as an example, X t denotes an input neuron A t, which includes information related to the neuronal A t motion path (e.g., the current movement path) of the intersection set, h t represents the output neuron a t, which comprises determining by neurons a t optimized movement path set intersection, X t-1 represents neurons a t-1 The input of neuron A t-1 , which includes the set of intersection points of the movement route related to neuron A t-1 (for example, a historical movement route before the current movement route), h t-1 represents the output of neuron A t-1, which includes The set of intersection points of the optimized motion route determined by the neuron At -1. In addition, the neuron at the previous moment can transmit its cell state and output to the neuron at the next moment. Among them, the cell state is the memory of the LSTM network, and the cell state transmitted to a neuron can include the state and output of the neuron before the neuron. A collection of intersection points of multiple motor routes related to a neuron, and the cell state transmitted from one neuron to the next neuron may include the intersection of multiple motor routes related to the neuron and the neurons before the neuron. set. For example, neurons A t-1 can be transmitted to the neurons neurons A A t t-1 t-1 h, the output state of the cell, and C t-1. Therefore, the output and cell state of each neuron is not only related to the input of the neuron, but also related to the output and cell state of the previous neuron. For example, the output h t-1 of neuron A t-1 is determined by The set of intersection points of the optimized motion route determined by the neuron At -1 will include one or more intersection points of the historical motion route from the 1st moment to the t-1th moment. The output h t of the neuron A t is determined by the neuron movement route optimization set intersection membered t a determination may include a history of the current course of motion and the movement route of the first time t 1 to time t-1 the first time or a plurality of intersections.
LSTM网络的每个神经元的输出和细胞状态通过遗忘门、输入门以及输出门来控制,如图6所示,以神经元A t为例,遗忘门f t决定从神经元A t-1的细胞状态C t-1中丢弃哪些交点,输入门i t决定向神经元A t-1的细胞状态C t-1中增加哪些交点,输出门o t决定从神经元A t的细胞状态C t中输出哪些交点以获得输出h t。其中,遗忘门f t的计算公式如下: Each neuron output LSTM network and forgotten cell state controlled by the gate, an input gate and an output gate, shown in Figure 6, an example in neurons A t, f t forgotten door decided neurons A t-1 Which intersection points are discarded in the cell state C t-1 , the input gate i t determines which intersection points are added to the cell state C t-1 of the neuron A t-1 , and the output gate o t determines the cell state C from the neuron A t which intersection t output to obtain an output h t. Among them, the calculation formula of the forget gate f t is as follows:
f t=σ(W f·[h t-1,X t]+b f)                  公式5 f t =σ(W f ·[h t-1 ,X t ]+b f ) Formula 5
b f=1+b m                        公式6 b f =1+b m formula 6
其中,σ表示sigmoid函数;W f表示遗忘门的权重矩阵;[h t-1,X t]表示将h t-1和X t拼接形成的长向量;b f表示遗忘门的偏置值;b m表示在确定当前运动路线的模型要素时计算的异常段偏差,需要说明的是其他各神经元的b m表示在确定与各神经元相关的历史运动路线的模型要素时计算的异常段偏差。 Among them, σ represents the sigmoid function; W f represents the weight matrix of the forgetting gate; [h t-1 ,X t ] represents the long vector formed by splicing h t-1 and X t ; b f represents the offset value of the forgetting gate; b m represents the abnormal segment deviation calculated when determining the model element of the current motion route. It should be noted that b m of each neuron represents the abnormal segment deviation calculated when determining the model element of the historical motion route related to each neuron. .
神经元A t的输入门i t的计算公式如下 Neurons formula A t i t input gate follows
i t=σ(W i·[h t-1,X t]+b i)                  公式7 i t =σ(W i ·[h t-1 ,X t ]+b i ) Formula 7
其中,σ表示sigmoid函数;W i表示输入门的权重矩阵;[h t-1,X t]表示将h t-1和X t拼接形成的长向量;b i表示输入门的偏置值。 Among them, σ represents the sigmoid function; W i represents the weight matrix of the input gate; [h t-1 ,X t ] represents the long vector formed by splicing h t-1 and X t ; b i represents the bias value of the input gate.
在神经元A t中,可以经由遗忘门f t和输入门i t获得神经元A t的细胞状态C t,具体的计算公式如下: A t neurons, the cell state can be obtained i t C t A t neurons via forgetting input gate door and f t, the specific calculation formula is as follows:
Figure PCTCN2020132333-appb-000013
Figure PCTCN2020132333-appb-000013
Figure PCTCN2020132333-appb-000014
Figure PCTCN2020132333-appb-000014
其中,
Figure PCTCN2020132333-appb-000015
表示输入细胞状态;W c表示输入细胞状态的权重矩阵;b c表示输入细胞 状态的偏置值;
Figure PCTCN2020132333-appb-000016
表示输入门i t控制
Figure PCTCN2020132333-appb-000017
的哪些交点将被更新到C t中;f t·C t-1表示遗忘门f t控制神经元A t-1的细胞状态C t-1中的哪些交点将被丢弃,bm的值越高,表示当前运动路线的GPS信号质量越差,那么神经元A t-1的细胞状态C t-1中通过遗忘门f t丢弃的交点将会越少。
among them,
Figure PCTCN2020132333-appb-000015
Represents the input cell state; W c represents the weight matrix of the input cell state; b c represents the bias value of the input cell state;
Figure PCTCN2020132333-appb-000016
Represents the input gate i t control
Figure PCTCN2020132333-appb-000017
Which intersection points will be updated to C t ; f t ·C t-1 indicates which intersection points in the cell state C t-1 of the forgetting gate f t control neuron A t-1 will be discarded, the higher the value of bm indicates the current GPS movement route worse signal quality, then the neuronal cells a t-1 state C t-1 by forgetting gate f t discarded intersection will be less.
神经元A t的输出门o t的计算公式如下: A neuron output gate o t t is calculated as follows:
o t=σ(W o·[h t-1,X t]+b o)                公式10 o t =σ(W o ·[h t-1 ,X t ]+b o ) Formula 10
其中,W o表示输出门的权重矩阵;b o表示所述输出门的偏置值。 Wherein, W o represents the weight matrix of the output gate; b o represents the bias value of the output gate.
在神经元A t中,可以经由输出门o t控制细胞状态C t的哪些交点将被输出以获得输出h t,具体计算公式如下: A t the neurons, the output of the gate which may be the intersection point C t o t to be output via the control state of the cell to obtain an output h t, specifically calculated as follows:
h t=o t·tanh(C t)                   公式11 h t =o t ·tanh(C t ) Formula 11
需要说明的是,虽然在图6中以LSTM网络作为示例描述了当前运动路线和各条历史运动路线的交点的融合,但图2的运动路线优化模块150可以使用GRU网络,基于类似的原理实现当前运动路线和各条历史运动路线的交点的融合。It should be noted that although the LSTM network is taken as an example in FIG. 6 to describe the fusion of the intersection of the current movement route and each historical movement route, the movement route optimization module 150 of FIG. 2 can use the GRU network and implement it based on similar principles. The fusion of the current movement route and the intersection of each historical movement route.
回到图2,模型要素确定单元144还可以用于根据运动路线模型,确定神经元A t输出的优化运动路线的模型要素。具体地,模型要素确定单元144可以确定在神经元A t输出的优化运动路线的交点集合中的每个交点与其他至少一个交点之间的链接关系的交点链接表格,例如,但不限于,如图4所示的交点之间的双向链表。由于运动路线优化模块150对当前运动路线和至少一条历史运动路线的交点进行了融合,因此各条运动路线原有的交点之间的链接关系被打破,模型要素确定单元144可以从神经元A t输出的优化运动路线的交点集合中,选择一个交点作为优化运动路线的起点,计算剩余的交点与起点之间的距离(例如,但不限于,两点之间的欧式距离),并确定离起点最近的一个交点作为优化运动路线的第二个交点,然后从剩余的交点中确定离第二个交点最近的一个交点作为优化运动路线的第三个交点,以此类推,直到将最后一个交点确定为优化运动路线的终点。在神经元A t输出的优化运动路线的交点链接表格中,除起点和终点之外的每个交点可以包括该交点的GPS坐标、到前一交点的链接(例如,但不限于,指针)以及到后一交点的链接(例如,但不限于,指针),而起点可以包括起点的GPS坐标、到后一交点的链接(例如,但不限于,指针),终点可以包括终点的GPS坐标、到前一交点的链接(例如,但不限于,指针)。 Returning to Figure 2, the model feature determination unit 144 may also be used in accordance with the movement route model to determine the movement route optimization model element A t neuron output. In particular, the model feature determination unit 144 may determine the intersection of the link table link relationship between each intersection in the intersection set a movement route optimization neuron output in A t least one other point of intersection, for example, but not limited to, such as Figure 4 shows the doubly linked list between the intersection points. Since the movement of the intersection of the route optimization module 150 of the current history of the movement route and at least one course of motion were fused, and therefore the relationship between the link pieces of the original motion path intersection is broken, the model determination unit 144 may feature A t from neural element In the set of intersection points of the output optimized motion route, select an intersection point as the starting point of the optimized motion route, calculate the distance between the remaining intersection points and the starting point (for example, but not limited to the Euclidean distance between two points), and determine the distance from the starting point The nearest intersection is used as the second intersection of the optimized movement route, and then the intersection closest to the second intersection is determined from the remaining intersections as the third intersection of the optimized movement route, and so on, until the last intersection is determined To optimize the end point of the exercise route. Intersection link movement route optimization table A t the output neurons, each of the intersections other than the start and end points may include GPS coordinates of the intersection, the intersection of a front link (e.g., but not limited to, a pointer) and The link to the next point of intersection (for example, but not limited to, pointer), and the starting point may include the GPS coordinates of the starting point, the link to the next point of intersection (for example, but not limited to, pointer), and the end point may include the GPS coordinates of the end point, to The link to the previous intersection (for example, but not limited to, pointer).
模型要素确定单元144还可以确定表征由神经元A t输出的优化运动路线所处地理范围的多个栅格的geohash编码值。具体地,模型要素确定单元144可以确定由神经元A t输出的优化运动路线的最小外接矩形,其中,最小外接矩形的其中两条边与纬线平行并且由优化运动路线的交点集合中最南和最北交点的纬度坐标确定,另外两条边与经线平行并且由优化运动路线的交点集合中最东和最西交点的经度坐标确定,模型要素确定单元144可以将优化运动路线的最小外接矩形的中心点作为由神经元A t输出的优化运动路线的中心位置。 Model element determination unit 144 may also determine which value is characterized by the optimized coding geohash movement route A t neuron output raster plurality of geographical range. In particular, the model feature determination unit 144 may determine the minimum bounding rectangle of the movement route optimization output neuron A t, wherein, the smallest circumscribed rectangle in which two parallel sides and a set of weft intersections movement route optimization most South The latitude coordinates of the northernmost point of intersection are determined, and the other two sides are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the optimized motion route. The model element determination unit 144 can determine the minimum circumscribed rectangle of the optimized motion route. center as the movement route optimization by the output neuron a t the center position.
模型要素确定单元144可以以由神经元A t输出的优化运动路线的中心位置为中心,将优化运动路线的最小外接矩形均分为四个栅格,然后确定每个栅格的地理范围对应的geohash编码值。 Model determination unit 144 may be elements of minimum bounding rectangle center position of the movement route optimization neuron output A t the center, the movement route optimization divided into four grid, each grid is then determined corresponding to the geographical range geohash encoding value.
模型要素确定单元144还可以以由神经元A t输出的优化运动路线的中心位置为原点,构建相对坐标系,将由神经元A t输出的优化运动路线的各个交点的绝对GPS坐标(例如,经度和纬度)转换为在该相对坐标系中的相对坐标。 Model element determination unit 144 may also be in a central location of neurons A t outputted movement route optimization origin construct relative coordinate system, by the absolute GPS coordinates of each intersection optimized movement route neuron A t output (e.g., longitude And latitude) are converted to relative coordinates in the relative coordinate system.
模型要素确定单元144还可以将根据运动路线模型确定的、由神经元A t输出的优化运动路线的各个要素保存在数据中心130中,作为当前运动路线和各条历史运动路线所处地理范围内的默认运动路线,以及要向用户推荐的候选运动路线。 Model element determination unit 144 may also be determined according to the motion path model, each element of the movement route optimization A t neuron output stored in the data center 130, as the range of the current geographic movement route and the pieces of the history of the movement route which The default exercise route for and the candidate exercise route to be recommended to the user.
根据本申请的一些实施例,运动路线推荐模块160可以接收用户对运动路线的推荐请求,获取用户的当前GPS坐标,并计算用户的GPS坐标的geohash编码值。然后,运动路线推荐模块160可以在数据中心130存储的多条运动路线的多个栅格geohash编码值中,确定与用户的GPS坐标的geohash编码值差距最小的栅格geohash编码值,由于相近的geohash编码值可以表示相近的地理位置,因此,与用户的GPS坐标的geohash编码值差距最小的栅格geohash编码值对应的运动路线与用户的地理位置最近,并且运动路线推荐模块160可以向用户推荐该条运动路线。在一种示例中,在推荐运动路线的交点的坐标是GPS坐标的情况下,运动路线推荐模块160可以根据推荐运动路线的交点链接表格将推荐运动路线呈现在地图上;在推荐运动路线的交点的坐标是相对于中心位置的相对坐标的情况下,运动路线推荐模块160可以根据中心位置的GPS坐标以及推荐运动路线的交点链接表格将推荐运动路线呈现在地图上。According to some embodiments of the present application, the sports route recommendation module 160 may receive a user's recommendation request for a sports route, obtain the user's current GPS coordinates, and calculate the geohash code value of the user's GPS coordinates. Then, the sports 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 sports routes stored in the data center 130. The geohash code value can represent a similar geographic location. Therefore, the grid geohash code value corresponding to the grid geohash code value with the smallest gap with the user’s GPS coordinate geohash code value is closest to the user’s geographic location, and the exercise route recommendation module 160 can recommend to the user The movement route. In an example, when the coordinates of the intersection of the recommended exercise route are GPS coordinates, the exercise route recommendation module 160 may present the recommended exercise route on the map according to the intersection link table of the recommended exercise route; at the intersection of the recommended exercise route In the case where the coordinates of are relative to the center position, the exercise route recommendation module 160 can present the recommended exercise route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended exercise route.
在本申请的实施例中,通过对用户在一段时间内生成的多条运动轨迹进行分割、聚类、抽析,并提取一条简化的运动路线,可以降低运动轨迹的存储和处理成本,提高运动轨迹的处理效率。In the embodiment of the present application, by segmenting, clustering, and extracting multiple motion trajectories generated by the user over a period of time, and extracting a simplified motion route, the storage and processing cost of the motion trajectory can be reduced, and the motion can be improved. The processing efficiency of the trajectory.
进一步地,通过将包含运动路线的地理范围划分为多个栅格,并且该多个栅格共享一个中心位置,可以进一步降低运动轨迹的存储和处理成本,并且通过利用多个栅格的geohash编码值索引运动路线,可以提高运动路线的检索效率。Further, by dividing the geographic area containing the movement route into multiple grids, and the multiple grids share a central position, the storage and processing cost of the movement track can be further reduced, and the geohash encoding of multiple grids can be used. The value index of the sports route can improve the retrieval efficiency of the sports route.
进一步地,通过以运动路线的中心位置为原点,对运动路线的各个交点进行相对坐标转换,可以保护用户的隐私,消除与用户相关的敏感数据。Further, by taking the center position of the movement route as the origin, and performing relative coordinate conversion on each intersection of the movement route, the privacy of the user can be protected and the sensitive data related to the user can be eliminated.
进一步地,在通过循环神经网络融合当前运动路线和历史运动路线的交点时,考虑了当前运动路线的异常段偏差,即考虑了记录与当前运动路线相关的运动轨迹时的GPS信号的质量,当GPS信号质量较差时,丢弃的历史运动路线的交点会较少,因此可以更准确地控制融合误差,也可以提高优化运动路线的质量。Further, when fusing the intersection of the current movement route and the historical movement route through the cyclic neural network, the abnormal segment deviation of the current movement route is considered, that is, the quality of the GPS signal when recording the movement trajectory related to the current movement route is considered. When the GPS signal quality is poor, the discarded historical movement routes will have fewer intersections, so the fusion error can be controlled more accurately, and the quality of the optimized movement route can also be improved.
进一步地,在本申请的实施例中,终端设备100是用户侧设备,相对于现有技术中在云侧服务器进行运动路线的处理,本申请的实施例可以降低因网络和云侧故障导致不能处理运动路线的风险,并且可以降低对用户的路线推荐请求的响应延迟。Further, in the embodiment of the present application, the terminal device 100 is a user-side device. Compared with the processing of the movement route on the cloud-side server in the prior art, the embodiment of the present application can reduce the inability to cause network and cloud-side failures. Deal with the risk of the sports route, and can reduce the response delay to the user's route recommendation request.
图7示出了根据本发明实施例的运动路线的提取方法的一种流程示意图。图2中的终端设备100的运动路线提取模块140可以实施方法的不同块或其他部分。对于上述装置实施例中未描述的内容,可以参见下述方法实施例,同样,对于方法实施例中未描述的内容,可参见上述装置实施例。如图7所示,运动路线的提取方法可以包括:Fig. 7 shows a schematic flowchart of a method for extracting a movement route according to an embodiment of the present invention. The motion route extraction module 140 of the terminal device 100 in FIG. 2 may implement different blocks or other parts of the method. For the content not described in the foregoing device embodiment, refer to the following method embodiment, and similarly, for the content not described in the method embodiment, refer to the foregoing device embodiment. As shown in Fig. 7, the method for extracting the movement route may include:
S701,通过轨迹分割单元141,从数据中心130获取通过运动轨迹记录模块120记录的用户在一段时间内(例如,一天、三天、一周、两周、一个月或其他时间段)在 相同地理范围内(例如,相同的运动场地)生成的多条运动轨迹。S701. Through the track segmentation unit 141, obtain from the data center 130 that the user recorded by the motion track recording module 120 is in the same geographic area within a period of time (for example, one day, three days, one week, two weeks, one month, or other time period) Multiple trajectories generated within (for example, the same sports field).
多条运动轨迹的示例可以是,但不限于,用户分别在今天、昨天、前天生成的运动轨迹,或者将用户在一次运动中生成的运动轨迹进行分割得到的多条运动轨迹,例如,将用户沿运动场地跑多圈生成的运动轨迹按照每一圈进行分割得到的多条运动轨迹,。Examples of multiple motion trajectories may be, but are not limited to, the motion trajectories generated by the user today, yesterday, and the day before, or multiple motion trajectories obtained by dividing the motion trajectory generated by the user in one exercise, for example, the user The motion trajectory generated by running multiple laps along the sports field is divided into multiple motion trajectories according to each lap.
S702,通过轨迹分割单元141,将多条运动轨迹中的每条运动轨迹分割为多个轨迹段。S702: Using the trajectory dividing unit 141, each of the multiple movement trajectories is divided into multiple trajectory segments.
具体地,可以将每条运动轨迹表示为Specifically, each trajectory can be expressed as
Figure PCTCN2020132333-appb-000018
Figure PCTCN2020132333-appb-000018
其中,TR m表示第m条运动轨迹,n m表示第m条运动轨迹包括的轨迹点的数量,
Figure PCTCN2020132333-appb-000019
表示第m条运动轨迹的第i个轨迹点,
Figure PCTCN2020132333-appb-000020
表示第m条运动轨迹的第i个轨迹点的GPS坐标,
Figure PCTCN2020132333-appb-000021
表示第m条运动轨迹的第i个轨迹点的GPS坐标对应的时间。
Among them, TR m represents the m-th motion trajectory, n m represents the number of trajectory points included in the m-th motion trajectory,
Figure PCTCN2020132333-appb-000019
Represents the i-th trajectory point of the m-th motion trajectory,
Figure PCTCN2020132333-appb-000020
Represents the GPS coordinates of the i-th trajectory point of the m-th motion trajectory,
Figure PCTCN2020132333-appb-000021
Represents the time corresponding to the GPS coordinates of the i-th trajectory point of the m-th motion trajectory.
对于每条运动轨迹,轨迹分割单元141可以将在时间上相邻的两个轨迹点表示为一个轨迹段,其中所述轨迹段的方向由时间较早的轨迹点(即,起始轨迹点)指向时间较晚的轨迹点(即,终止轨迹点),所述轨迹段的大小为两个轨迹点之间的距离。图3示出了3条运动轨迹TR 1~TR 3的示例,需要说明的是图中仅示出了运动轨迹TR 1~TR 3的一部分,其中,每条运动轨迹都被分割为多个轨迹段。 For each motion trajectory, the trajectory dividing unit 141 may represent two trajectory points that are adjacent in time as a trajectory segment, wherein the direction of the trajectory segment is determined by the earlier trajectory point (ie, the starting trajectory point). Point to a later track point (ie, end track point), and the size of the track segment is the distance between two track points. Figure 3 shows an example of three motion trajectories TR 1 to TR 3 , it should be noted that only a part of the motion trajectories TR 1 to TR 3 are shown in the figure, where each motion trajectory is divided into multiple trajectories segment.
S703,通过轨迹聚类单元142,将各个运动轨迹的轨迹段按顺序聚类为多个轨迹段簇,其中,在一个轨迹段簇内,相邻的轨迹段之间的间距小于预定值,其中,在一个轨迹段簇内,相邻的轨迹段之间的间距小于预定值,其中,相邻轨迹段分别属于所述多个跑步轨迹中的不同跑步轨迹。S703: Through the trajectory clustering unit 142, the trajectory segments of each motion trajectory are sequentially clustered into a plurality of trajectory segment clusters, wherein, within a trajectory segment cluster, the distance between adjacent trajectory segments is less than a predetermined value, wherein In a cluster of trajectory segments, the distance between adjacent trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different running trajectories of the multiple running trajectories.
作为一种示例,将两个轨迹段表示为ts i和ts j,其中轨迹段ts i的起点为s i,终点为e i,轨迹段ts j的起点为s j,终点为e j,那么可以基于以下公式计算轨迹段ts i和ts j之间的间距: As an example, two trajectory segments are represented as ts i and ts j , where the starting point of the trajectory segment ts i is si , the end point is e i , the starting point of the trajectory segment ts j is s j , and the end point is e j , then The distance between trajectory segments ts i and ts j can be calculated based on the following formula:
Figure PCTCN2020132333-appb-000022
Figure PCTCN2020132333-appb-000022
d ||=MIN(l ||1,l ||2)                     公式14 d || = MIN(l ||1 , l ||2 ) Formula 14
Figure PCTCN2020132333-appb-000023
Figure PCTCN2020132333-appb-000023
其中,l ⊥1表示轨迹段ts j的起点s j到轨迹段ts i的垂直距离,l ⊥2表示轨迹段ts j的终点e j到轨迹段ts i的垂直距离,l ||1表示轨迹段ts i的起点s i到轨迹段ts j的起点s j在轨迹段ts i上的投影点的距离,l ||2表示轨迹段ts i的终点e i到轨迹段ts j的终点e j在轨迹段ts i上的投影点的距离,d表示轨迹段ts i和ts j之间的间距。 Wherein, l ⊥1 J represents a path section starting point ts to the track segment s j i is the vertical distance ts, l ⊥2 represents the end of the track period ts J e j to the track segment i is the vertical distance ts, l || 1 represents a locus I starting period ts in the track section s i ts s j J starting from the projection point in the track period ts of I, l || 2 indicates the end of the track segment e i i ts to ts track segment endpoint e j J The distance of the projection point on the trajectory segment ts i , d represents the distance between the trajectory segment ts i and ts j .
例如,在图3所示的示例中,图2的轨迹聚类单元142可以首先确定第一个轨迹段簇以及第一个轨迹段簇的基准轨迹段,图2的轨迹聚类单元142将在各个运动轨迹的轨迹段中确定能够与基准轨迹段聚类的轨迹段。在一种示例中,图2的轨迹聚类单元142 可以将第一个轨迹段簇的基准轨迹段确定为TR 1的轨迹段P11,并在其他轨迹段中确定能够与TR 1的轨迹段P11聚类的轨迹段,具体地,图2的轨迹聚类单元142可以首先确定在运动轨迹TR 2~TR 3中,轨迹段P31和P32与TR 1的轨迹段P11之间的间距小于预定值并因此可以作为与TR 1的轨迹段P11相邻的轨迹段与TR 1的轨迹段P11聚类;图2的轨迹聚类单元142可以继续确定TR 2的轨迹段P21与TR 3的轨迹段P31和P32之间的间距小于预定值并因此可以作为与TR 3的轨迹段P31和P32相邻的轨迹段与TR 3的轨迹段P31和P32聚类,那么最终,轨迹聚类单元142可以将TR 1的轨迹段P11、TR 3的轨迹段P31和P32以及TR 2的轨迹段P21聚类为第一个轨迹段簇。 For example, in the example shown in FIG. 3, the trajectory clustering unit 142 of FIG. 2 may first determine the first trajectory segment cluster and the reference trajectory segment of the first trajectory segment cluster, and the trajectory clustering unit 142 of FIG. Determine the trajectory segment that can be clustered with the reference trajectory segment among the trajectory segments of each motion trajectory. In an example, the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P11 of TR 1 , and determine that it can be compatible with the trajectory segment P11 of TR 1 in other trajectory segments. To cluster the trajectory segments, specifically, the trajectory clustering unit 142 of FIG. 2 may first determine that in the motion trajectories TR 2 to TR 3 , the distance between the trajectory segments P31 and P32 and the trajectory segment P11 of TR 1 is less than a predetermined value. Thus as with the track TR P11 segment 1 and segment adjacent tracks TR track segment P11 cluster 1; FIG track clustering unit 1422 may continue to determine the track segment of P21 TR 2 and TR track segment 3 and P31 the spacing between the predetermined value smaller than P32 and thus can be used as the track TR 3 segments P31 and P32 adjacent tracks TR track segment clustering section 3 P31 and P32, then finally, the clustering unit 142 may track TR. 1 trajectory segment P11, TR track segment P31 and P32 3 and cluster TR 2 P21 path sections for the first track segment cluster.
在另一种示例中,图2的轨迹聚类单元142可以将第一个轨迹段簇的基准轨迹段确定为TR 3的轨迹段P31,并在其他轨迹段中确能够与TR 3的轨迹段P31聚类的轨迹段,具体地,轨迹聚类单元142可以确定TR 1的轨迹段P11以及TR 2的轨迹段P21与TR 3的轨迹段P31之间的间距小于预定值,因此可以将TR 1的轨迹段P11以及TR 2的轨迹段P21作为与TR 3的轨迹段P31相邻的轨迹段与TR 3的轨迹段P31聚类为第一个轨迹段簇。需要说明的是,图2的轨迹聚类单元142也可将其他轨迹段确定为第一个轨迹段簇的基准轨迹段。 In another example, the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the first trajectory segment cluster as the trajectory segment P31 of TR 3 , and it can be matched with the trajectory segment of TR 3 in other trajectory segments. P31 cluster path sections, in particular, the trajectory clustering unit may determine the track segment P11 142 tracks TR 1 and TR 2 and the segment of P21 spacing between the tracks TR 3 is less than the predetermined value P31 segment, it is possible to TR 1 TR trajectory segment P11 and P21 of a track section 2 and section 3 of the track TR P31 adjacent tracks TR track segment P31 clustering section 3 for the first track segment cluster. It should be noted that the trajectory clustering unit 142 in FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the first trajectory segment cluster.
然后,轨迹聚类单元142可以确定第二个轨迹段簇以及第二个轨迹段簇的基准轨迹段。在一种示例中,图2的轨迹聚类单元142可以将第二个轨迹段簇的基准轨迹段确定为TR 1的轨迹段P12,并在其他轨迹段中确定能够与TR 1的轨迹段P12聚类的轨迹段,具体地,图2的轨迹聚类单元142可以确定TR 3的轨迹段P33与TR 1的轨迹段P12之间的间距小于预定值并因此可以作为与TR 1的轨迹段P12相邻的轨迹段与TR 1的轨迹段P12聚类,而TR 2的轨迹段P22与TR 3的轨迹段P33之间的间距小于预定值并因此可以作为与TR 3的轨迹段P33相邻的轨迹段与TR 3的轨迹段P33聚类,那么最终,轨迹聚类单元142可以将TR 1的轨迹段P12、TR 3的轨迹段P33以及TR 2的轨迹段P22聚类为第二个轨迹段簇。需要说明的是,图2的轨迹聚类单元142也可将其他轨迹段确定为第二个轨迹段簇的基准轨迹段。 Then, the trajectory clustering unit 142 may determine the second trajectory segment cluster and the reference trajectory segment of the second trajectory segment cluster. In an example, the trajectory clustering unit 142 of FIG. 2 may determine the reference trajectory segment of the second trajectory segment cluster as the trajectory segment P12 of TR 1 , and determine that it can be compatible with the trajectory segment P12 of TR 1 in other trajectory segments. cluster path section, in particular, FIG. 2 locus clustering unit 142 can determine the distance between the track segments P33 TR 3 and TR track segment 1 is less than the predetermined value P12, and thus may be used as the trajectory of a segment P12 TR adjacent tracks segment P12 of the track segment TR. 1 cluster, and the path section 2 P22 TR spacing between the tracks TR section 3 is smaller than the predetermined value P33, and thus may be used as the adjacent tracks TR section 3 of P33 P33 track TR track segment clustering section 3, then the final trajectory clustering unit 142 may track TR. 1 segment of P12, P33 TR track segment 3 and segment track TR 2 P22 cluster for the second trail segment cluster. It should be noted that the trajectory clustering unit 142 of FIG. 2 may also determine other trajectory segments as the reference trajectory segment of the second trajectory segment cluster.
依次类推,图2的轨迹聚类单元142可以确定运动轨迹的其他轨迹段簇。需要说明的是,对于不同于图3示出的运动轨迹,可以以与前述类似的原理确定运动轨迹的各个轨迹段簇。By analogy, the trajectory clustering unit 142 of FIG. 2 can determine other trajectory segment clusters of the motion trajectory. It should be noted that, for the motion trajectory that is different from that shown in FIG. 3, each trajectory segment cluster of the motion trajectory can be determined based on the principle similar to the foregoing.
S704,对于每个轨迹段簇,通过轨迹抽析单元143,基于簇内的各个轨迹段计算一个簇向量。S704: For each trajectory segment cluster, the trajectory extraction unit 143 calculates a cluster vector based on each trajectory segment in the cluster.
作为一种示例,轨迹抽析单元143可以以轨迹段簇内各个轨迹段的起始轨迹点的GPS坐标的均值作为簇向量的起点的GPS坐标,以各个轨迹段的终止轨迹点的GPS坐标的均值作为簇向量的终点的GPS坐标。作为另一种示例,轨迹抽析单元143可以以轨迹段簇内的任意一个轨迹段作为簇向量。需要说明的是,也可以基于其他任何合适的方式确定簇向量。As an example, the trajectory extraction unit 143 may use the average value of the GPS coordinates of the starting trajectory point of each trajectory segment in the trajectory segment cluster as the GPS coordinates of the starting point of the cluster vector, and the GPS coordinates of the ending trajectory point of each trajectory segment The mean value is used as the GPS coordinates of the end 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 can also be determined based on any other suitable method.
S705,通过轨迹聚类单元142,确定多条运动轨迹中的异常轨迹段,并确定异常轨迹段在所有轨迹段中的占比,即异常段偏差。S705: Through the trajectory clustering unit 142, determine the abnormal trajectory segments in the multiple motion trajectories, and determine the proportion of the abnormal trajectory segments in all the trajectory segments, that is, the abnormal segment deviation.
具体地,轨迹聚类单元142可以通过层次聚类算法、K均值聚类算法或其他聚类 算法,对多条跑步轨迹的各轨迹段的中心点进行聚类,并获得多个轨迹段中心点的类别以及各个类别的类中心,轨迹聚类单元142可以计算多条跑步轨迹的各轨迹段的中心点与各个类中心的距离,并将其中心点与各个类中心之间的最小距离大于预定值(该预定值和上述与轨迹段之间的间距相关的预定值相同或者不同)的轨迹段标记为异常轨迹段。例如,在图3的示例中,TR 1的轨迹段P15和TR 3的轨迹段P35可以被标记为异常轨迹段。在一些情况下,较高的异常段偏差可以指示运动期间GPS信号的质量较差。 Specifically, the trajectory clustering unit 142 may use a hierarchical clustering algorithm, a K-means clustering algorithm or other clustering algorithms to cluster the center points of each trajectory segment of the multiple running trajectories, and obtain multiple trajectory segment center points. The trajectory clustering unit 142 can calculate the distance between the center point of each trajectory segment of multiple running trajectories and the center of each category, and the minimum distance between the center point and the center of each category is greater than a predetermined A trajectory segment with a value (the predetermined value is the same as or different from the aforementioned predetermined value related to the distance between trajectory segments) is marked as an abnormal trajectory segment. For example, in the example of FIG. 3, the trajectory segment P15 of TR 1 and the trajectory segment P35 of TR 3 may be marked as abnormal trajectory segments. In some cases, a higher abnormal segment deviation can indicate poor GPS signal quality during movement.
S706,通过模型要素确定单元144,确定相邻轨迹段簇的相邻簇向量的交点,以确定从运动轨迹中提取的简化的运动路线的交点的集合。In S706, the model element determining unit 144 determines the intersection of the adjacent cluster vectors of the adjacent trajectory segment clusters to determine the set of intersections of the simplified motion routes extracted from the motion trajectory.
作为一种示例,在相邻轨迹段簇的相邻簇向量首尾不相接的情况下,模型要素确定单元144可以延长该相邻簇向量中的一个或两个,以确定该相邻簇向量之间的交点的GPS坐标;在相邻的簇向量已经相交的情况下,模型要素确定单元144可以直接确定相邻簇向量之间的交点的GPS坐标。As an example, in the case where the adjacent cluster vectors of adjacent trajectory segment clusters do not meet end to end, the model element determining unit 144 may extend one or two of the adjacent cluster vectors to determine the adjacent cluster vector The GPS coordinates of the intersection between the adjacent cluster vectors; in the case where the adjacent cluster vectors have intersected, the model element determination unit 144 can directly determine the GPS coordinates of the intersection between the adjacent cluster vectors.
S707,通过模型要素确定单元144,在运动路线的交点集合中,确定运动路线的起点和终点。In S707, the model element determining unit 144 determines the start point and the end point of the motion route in the set of intersections of the motion route.
作为一种示例,模型要素确定单元144可以以运动轨迹的第一个轨迹段簇的簇向量的起点作为运动路线的起点,以最后一个轨迹段簇的簇向量的终点作为运动路线的终点。As an example, the model element determining 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.
S708,通过模型要素确定单元144,确定指示运动路线的交点集合中的每个交点与其他至少一个交点之间的链接关系的交点链接表格,其中,交点集合包括运动路线的起点和终点。S708: Determine, through the model element determining unit 144, an intersection link table indicating a link relationship between each intersection in the set of intersections of the motion route and at least one other intersection, where the set of intersections includes the start and end points of the motion route.
作为一种示例,模型要素确定单元144可以确定如图4所示的交点之间的双向链表,其中,起点可以是运动路线的起点,交点1可以是运动轨迹的第一个轨迹段簇的簇向量和第二个轨迹段簇的簇向量之间的交点,交点2可以是运动轨迹的第二个轨迹段簇的簇向量和第三个轨迹段簇的簇向量之间的交点,依次类推,终点可以是运动路线的终点。另外,图4中示出的每个交点可以包括该交点的GPS坐标、到前一交点的链接(例如,但不限于,指针)以及到后一交点的链接(例如,但不限于,指针),而起点可以包括起点的GPS坐标、到后一交点的链接(例如,但不限于,指针),终点可以包括终点的GPS坐标、到前一交点的链接(例如,但不限于,指针)。图4所示的双向链表能够使得用户可以沿运动路线的正向(例如,由图4所示的起点指向图4所示的终点)运动,也可以沿运动路线的反向(例如,由图4所示的终点指向图4所示的起点)运动。需要说明的是,模型要素确定单元144也可以确定交点之间的单向链表,即图4中示出的每个交点可以包括该交点的GPS坐标、到前一交点的链接(例如,但不限于,指针)或者到后一交点的链接(例如,但不限于,指针)。As an example, the model element determining unit 144 may determine the doubly linked list between the intersection points as shown in FIG. 4, where the starting point may be the starting point of the motion route, and the intersection point 1 may be the cluster of the first trajectory segment cluster of the motion trajectory. The intersection point between the vector and the cluster vector of the second trajectory segment cluster. Intersection point 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, The end point can be the end point of the movement route. In addition, each intersection shown in FIG. 4 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 and a link to the next point of intersection (for example, but not limited to, a pointer), and the end point may include the GPS coordinates of the ending point, and a link to the previous point of intersection (for example, but not limited to, a pointer). The doubly linked list shown in FIG. 4 enables the user to move along the forward direction of the movement route (for example, from the starting point shown in FIG. 4 to the end point shown in FIG. 4), or along the reverse direction of the movement route (for example, from the figure The end point shown in 4 points to the starting point shown in Fig. 4) to move. It should be noted that the model element determining unit 144 may also determine a one-way linked list between intersections, that is, each intersection shown in FIG. 4 may include the GPS coordinates of the intersection and the link to the previous intersection (for example, but not Limited to pointers) or links to the next intersection (for example, but not limited to pointers).
S709,通过模型要素确定单元144,确定运动路线的中心位置。S709: Determine the center position of the motion route through the model element determination unit 144.
在一种示例中,模型要素确定单元144可以确定运动路线的最小外接矩形,其中,最小外接矩形的其中两条边与纬线平行并且由运动路线的交点集合中最南和最北交点的纬度坐标确定,另外两条边与经线平行并且由运动路线的交点集合中最东和最西 交点的经度坐标确定,并且模型要素确定单元144可以将运动路线的最小外接矩形的中心点作为运动路线的中心位置,例如,图5中所示的运动路线的中心位置的GPS坐标为(121.623,29.855)。In an example, the model element determination unit 144 may determine the minimum circumscribed rectangle of the movement route, where two sides of the minimum circumscribed rectangle are parallel to the latitude and are determined by the latitude coordinates of the southernmost and northernmost intersection points in the set of intersection points of the movement route. It is determined that the other two sides are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the movement route, and the model element determination unit 144 may use the center point of the smallest bounding rectangle of the movement route as the center of the movement route. The position, for example, the GPS coordinates of the center position of the movement route shown in FIG. 5 are (121.623, 29.855).
S710,通过模型要素确定单元144,确定表征运动路线所处地理范围的多个栅格的geohash编码值。In S710, the model element determining unit 144 determines geohash coding values of multiple grids representing the geographic range of the movement route.
在一种示例中,如图5所示,图2的模型要素确定单元144可以以中心位置为中心,将运动路线的最小外接矩形均分为四个栅格,并确定每个栅格的地理范围对应的geohash编码值,其中geohash编码值的位数可以例如是,但不限于,7位base32编码,例如,如图5所示,四个栅格的编码值分别为wx4g340、wx4g341、wx4g342以及wx4g343。In an example, as shown in FIG. 5, the model element determining unit 144 of FIG. 2 may take the center position as the center, divide the minimum bounding rectangle of the movement route into four grids, and determine the geographic location of each grid. The geohash code value corresponding to the range, where the number of bits of the geohash code value can be, for example, but not limited to, 7-bit base32 coding. For example, as shown in FIG. 5, the coding values of the four grids are wx4g340, wx4g341, wx4g342, and wx4g343.
需要说明的是,图5只是表征运动路线所处地理范围的栅格的一个示例,由各个交点构成的运动路线不限于图5中所示的运动路线,中心位置的GPS坐标也不限于图中所示出的GPS坐标。It should be noted that Fig. 5 is only an example of a grid that characterizes the geographic range of the movement route. The movement route formed by each intersection is not limited to the movement route shown in Fig. 5, and the GPS coordinates of the center position are not limited to the figure. GPS coordinates shown.
S711,通过模型要素确定单元144,确定运动路线的各个交点相对于中心位置的相对坐标。S711: The model element determining unit 144 determines the relative coordinates of each intersection of the motion route with respect to the center position.
作为一种示例,模型要素确定单元144可以以上述中心位置为原点,构建相对坐标系,将运动路线的各个交点的绝对GPS坐标(例如,经度和纬度)转换为在该相对坐标系中的相对坐标,如此,可以消除与用户相关的敏感数据。As an example, the model element determination unit 144 may use the aforementioned center position as the origin to construct a relative coordinate system, and convert the absolute GPS coordinates (for example, longitude and latitude) of each intersection of the movement route into relative coordinates in the relative coordinate system. Coordinates, in this way, can eliminate sensitive data related to users.
S712,通过模型要素确定单元144,将根据运动路线模型确定的、从运动轨迹中提取的简化运动路线的各个要素保存在数据中心130中,以作为要向用户推荐的候选运动路线。S712, through the model element determining unit 144, save each element 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.
图8示出了根据本发明实施例的运动路线的优化方法的一种流程示意图。图2中的终端设备100的运动路线优化模块150和运动路线提取模块140可以实施方法的不同块或其他部分。对于上述装置实施例中未描述的内容,可以参见下述方法实施例,同样,对于方法实施例中未描述的内容,可参见上述装置实施例。如图8所示,运动路线的优化方法可以包括:Fig. 8 shows a schematic flowchart of a method for optimizing a movement route according to an embodiment of the present invention. The motion route optimization module 150 and the motion route extraction module 140 of the terminal device 100 in FIG. 2 may implement different blocks or other parts of the method. For the content not described in the foregoing device embodiment, refer to the following method embodiment, and similarly, for the content not described in the method embodiment, refer to the foregoing device embodiment. As shown in Figure 8, the optimization method of the movement route may include:
S801,通过运动路线优化模块150,获取位于同一地理范围内(例如,同一运动场地)的当前运动路线和至少一条历史运动路线。S801, through the sports route optimization module 150, obtain a current sports route and at least one historical sports route located in the same geographic area (for example, the same sports field).
其中,当前运动路线指的是通过图7中所示的方法从用户在当前时间段(例如,但不限于,一天、三天、一周、两周、一个月或其他时间段)内生成的当前运动轨迹集合中提取的运动路线,至少一条历史运动路线中的每条历史运动路线指的是通过图7中所示的方法从用户在当前时间段之前的历史时间段(例如,但不限于,一天、三天、一周、两周、一个月或其他时间段)内生成的历史运动轨迹集合中提取的运动路线。Among them, the current exercise route refers to the current route generated by the user in the current time period (for example, but not limited to, one day, three days, one week, two weeks, one month, or other time periods) by the method shown in FIG. The exercise route extracted from the exercise track set, each historical exercise route in at least one historical exercise route refers to the historical time period from the user before the current time period (for example, but not limited to, One day, three days, one week, two weeks, one month, or other time period) generated in the historical movement trajectory set extracted from the movement route.
S802,通过运动路线优化模块150,将当前运动路线的交点集合和至少一条历史运动路线中每条历史运动路线的交点集合分别输入循环神经网络的不同的神经元,以获得优化运动路线的交点集合。其中,对于循环神经网络可以参照以上与图6相关的描述,在此不再赘述。S802, through the exercise route optimization module 150, input the intersection set of the current exercise route and the intersection set of each historical exercise route in the at least one historical exercise route into different neurons of the cyclic neural network to obtain the intersection set of the optimized exercise route . Among them, the recurrent neural network can refer to the above description related to FIG. 6, which will not be repeated here.
S803,通过模型要素确定单元144,确定由循环神经网络的最后一个神经元输出 的优化运动路线的交点链接表格。In S803, the model element determining unit 144 determines the intersection link table of the optimized motion route output by the last neuron of the recurrent neural network.
在图6的示例中,通过模型要素确定单元144,可以根据运动路线模型,确定神经元A t输出的优化运动路线的交点链接表格。具体地,模型要素确定单元144可以确定在神经元A t输出的优化运动路线的交点集合中的每个交点与其他至少一个交点之间的链接关系的交点链接表格,例如,但不限于,如图4所示的交点之间的双向链表。由于运动路线优化模块150对当前运动路线和至少一条历史运动路线的交点进行了融合,因此各条运动路线原有的交点之间的链接关系被打破,模型要素确定单元144可以从神经元A t输出的优化运动路线的交点集合中,选择一个交点作为优化运动路线的起点,计算剩余的交点与起点之间的距离(例如,但不限于,两点之间的欧式距离),并确定离起点最近的一个交点作为优化运动路线的第二个交点,然后从剩余的交点中确定离第二个交点最近的一个交点作为优化运动路线的第三个交点,以此类推,直到将最后一个交点确定为优化运动路线的终点。在神经元A t输出的优化运动路线的交点链接表格中,除起点和终点之外的每个交点可以包括该交点的GPS坐标、到前一交点的链接(例如,但不限于,指针)以及到后一交点的链接(例如,但不限于,指针),而起点可以包括起点的GPS坐标、到后一交点的链接(例如,但不限于,指针),终点可以包括终点的GPS坐标、到前一交点的链接(例如,但不限于,指针)。 In the example of Figure 6, the unit 144 is determined by the model elements, model according to the movement route, the movement route optimization is determined neuron output A t intersection link table. In particular, the model feature determination unit 144 may determine the intersection of the link table link relationship between each intersection in the intersection set a movement route optimization neuron output in A t least one other point of intersection, for example, but not limited to, such as Figure 4 shows the doubly linked list between the intersection points. Since the movement of the intersection of the route optimization module 150 of the current history of the movement route and at least one course of motion were fused, and therefore the relationship between the link pieces of the original motion path intersection is broken, the model determination unit 144 may feature A t from neural element In the set of intersection points of the output optimized motion route, select an intersection point as the starting point of the optimized motion route, calculate the distance between the remaining intersection points and the starting point (for example, but not limited to the Euclidean distance between two points), and determine the distance from the starting point The nearest intersection is used as the second intersection of the optimized movement route, and then the intersection closest to the second intersection is determined from the remaining intersections as the third intersection of the optimized movement route, and so on, until the last intersection is determined To optimize the end point of the exercise route. Intersection link movement route optimization table A t the output neurons, each of the intersections other than the start and end points may include GPS coordinates of the intersection, the intersection of a front link (e.g., but not limited to, a pointer) and The link to the next point of intersection (for example, but not limited to, pointer), and the starting point may include the GPS coordinates of the starting point, the link to the next point of intersection (for example, but not limited to, pointer), and the end point may include the GPS coordinates of the end point, to The link to the previous intersection (for example, but not limited to, pointer).
S804,可选地,通过模型要素确定单元144,确定表征由循环神经网络的最后一个神经元输出的优化运动路线所处地理范围的多个栅格的geohash编码值。S804: Optionally, the model element determining unit 144 determines the geohash encoding values of multiple grids representing the geographic range of the optimized motion route output by the last neuron of the recurrent neural network.
在图6的示例中,模型要素确定单元144可以确定由神经元A t输出的优化运动路线的最小外接矩形,其中,最小外接矩形的其中两条边与纬线平行并且由优化运动路线的交点集合中最南和最北交点的纬度坐标确定,另外两条边与经线平行并且由优化运动路线的交点集合中最东和最西交点的经度坐标确定,模型要素确定单元144可以将优化运动路线的最小外接矩形的中心点作为由神经元A t输出的优化运动路线的中心位置。 In the example of Figure 6, the elements of the model determination unit 144 may determine the minimum bounding rectangle of the movement route optimization output neuron A t, wherein two of the smallest circumscribed rectangle sides parallel to weft and the movement route optimization by the intersection of a set of The latitude coordinates of the southernmost and northernmost intersection points in the middle are determined, and the other two sides are parallel to the meridian and are determined by the longitude coordinates of the easternmost and westernmost intersection points in the set of intersection points of the optimized motion route. The model element determination unit 144 can determine the optimal motion route's latitude coordinates. the center point of the smallest circumscribed rectangle as the center position of the movement route optimization a t neuron output.
模型要素确定单元144可以以由神经元A t输出的优化运动路线的中心位置为中心,将优化运动路线的最小外接矩形均分为四个栅格,然后确定每个栅格的地理范围对应的geohash编码值。 Model determination unit 144 may be elements of minimum bounding rectangle center position of the movement route optimization neuron output A t the center, the movement route optimization divided into four grid, each grid is then determined corresponding to the geographical range geohash encoding value.
S805,可选地,通过模型要素确定单元144,确定由循环神经网络的最后一个神经元输出的优化运动路线的各个交点的相对坐标。In S805, optionally, the model element determining unit 144 determines the relative coordinates of each intersection of the optimized motion route output by the last neuron of the cyclic neural network.
在图6的示例中,通过模型要素确定单元144,可以以由神经元A t输出的优化运动路线的中心位置为原点,构建相对坐标系,将由神经元A t输出的优化运动路线的各个交点的绝对GPS坐标(例如,经度和纬度)转换为在该相对坐标系中的相对坐标。 In the example of Figure 6, the determination unit 144 by the model elements, it may be the center position of neurons A t outputted movement route optimization origin construct relative coordinate system, the respective intersections optimized movement route by neurons A t output The absolute GPS coordinates (for example, longitude and latitude) of is converted to relative coordinates in the relative coordinate system.
S806,通过模型要素确定单元144,存储由循环神经网络的最后一个神经元输出的优化运动路线的模型要素。In S806, the model element determining unit 144 stores the model element of the optimized motion route output by the last neuron of the recurrent neural network.
在图6的示例中,通过模型要素确定单元144,可以将由神经元A t输出的优化运动路线的各个模型要素保存在数据中心130中,作为当前运动路线和各条历史运动路线所处地理范围内的默认运动路线。 In the example of Figure 6, the unit 144 is determined by the model elements can be stored by the respective elements of the model movement route optimization A t the output neuron in the data center 130, and the movement route as the current history of the course of motion in which the pieces of geographical range The default exercise route within.
图9示出了根据本发明实施例的运动路线的推荐方法的一种流程示意图。图2中的 终端设备100的运动路线推荐模块160可以实施方法的不同块或其他部分。对于上述装置实施例中未描述的内容,可以参见下述方法实施例,同样,对于方法实施例中未描述的内容,可参见上述装置实施例。如图7所示,运动路线的推荐方法可以包括:Fig. 9 shows a schematic flowchart of a method for recommending a sports route according to an embodiment of the present invention. The motion route recommendation module 160 of the terminal device 100 in FIG. 2 may implement different blocks or other parts of the method. For the content not described in the foregoing device embodiment, refer to the following method embodiment, and similarly, for the content not described in the method embodiment, refer to the foregoing device embodiment. As shown in Figure 7, the recommended method of exercise route may include:
S901,通过运动路线推荐模块160,接收用户对运动路线的推荐请求。S901: Through the sports route recommendation module 160, a user's recommendation request for a sports route is received.
S902,通过运动路线推荐模块160,从GPS定位模块120获取用户的当前GPS坐标。S902: Obtain the current GPS coordinates of the user from the GPS positioning module 120 through the exercise route recommendation module 160.
S903,通过运动路线推荐模块160,计算用户的GPS坐标的geohash编码值。S903: Calculate the geohash code value of the GPS coordinates of the user through the exercise route recommendation module 160.
S904,通过运动路线推荐模块160,在数据中心130存储的多条运动路线的多个栅格geohash编码值中,确定与用户的GPS坐标的geohash编码值差距最小的栅格geohash编码值;S904, through the exercise route recommendation module 160, among the multiple raster geohash code values of the multiple exercise routes stored in the data center 130, determine the raster geohash code value with the smallest difference with the geohash code value of the user's GPS coordinates;
S905,通过运动路线推荐模块160,向用户推荐与用户的GPS坐标的geohash编码值差距最小的栅格geohash编码值对应的运动路线。S905, through the exercise route recommendation module 160, recommend to the user the exercise route corresponding to the grid geohash code value with the smallest difference between the geohash code value of the GPS coordinates of the user.
由于相近的geohash编码值可以表示相近的地理位置,因此,与用户的GPS坐标的geohash编码值差距最小的栅格geohash编码值对应的运动路线与用户的地理位置最近,运动路线推荐模块160可以向用户推荐该条运动路线。在一种示例中,在推荐运动路线的交点的坐标是GPS坐标的情况下,运动路线推荐模块160可以根据推荐运动路线的交点链接表格将推荐运动路线呈现在地图上;在推荐运动路线的交点的坐标是相对于中心位置的相对坐标的情况下,运动路线推荐模块160可以根据中心位置的GPS坐标以及推荐运动路线的交点链接表格将推荐运动路线呈现在地图上。Since similar geohash code values can indicate similar geographic locations, the motion route corresponding to the grid geohash code value with the smallest gap between the geohash code value of the user’s GPS coordinates and the user’s geographic location is closest to the user’s geographic location, and the motion route recommendation module 160 can The user recommends the exercise route. In an example, when the coordinates of the intersection of the recommended exercise route are GPS coordinates, the exercise route recommendation module 160 may present the recommended exercise route on the map according to the intersection link table of the recommended exercise route; at the intersection of the recommended exercise route In the case where the coordinates of are relative to the center position, the exercise route recommendation module 160 can present the recommended exercise route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended exercise route.
在本申请的实施例中,通过对用户在一段时间内生成的运动轨迹进行分割、聚类、抽析,并提取一条简化的运动路线,可以降低运动轨迹的存储和处理成本,提高运动轨迹的处理效率。In the embodiment of the present application, by segmenting, clustering, and extracting the motion trajectory generated by the user over a period of time, and extracting a simplified motion route, the storage and processing cost of the motion trajectory can be reduced, and the performance of the motion trajectory can be improved. Processing efficiency.
进一步地,通过将包含运动路线的地理范围划分为多个栅格,并且该多个栅格共享一个中心位置,可以进一步降低运动轨迹的存储和处理成本,并且通过利用多个栅格的geohash编码值索引运动路线,可以提高运动路线的检索效率。Further, by dividing the geographic area containing the movement route into multiple grids, and the multiple grids share a central position, the storage and processing cost of the movement track can be further reduced, and the geohash encoding of multiple grids can be used. The value index of the sports route can improve the retrieval efficiency of the sports route.
进一步地,通过以运动路线的中心位置为原点,对运动路线的各个交点进行相对坐标转换,可以保护用户的隐私,消除与用户相关的敏感数据。Further, by taking the center position of the movement route as the origin, and performing relative coordinate conversion on each intersection of the movement route, the privacy of the user can be protected and the sensitive data related to the user can be eliminated.
进一步地,在通过循环神经网络融合当前运动路线和历史运动路线的交点时,考虑了当前运动路线的异常段偏差,即考虑了记录与当前运动路线相关的运动轨迹时的GPS信号的质量,当GPS信号质量较差时,丢弃的历史运动路线的交点会较少,因此可以更准确地控制融合误差,也可以提高优化运动路线的质量。Further, when fusing the intersection of the current movement route and the historical movement route through the cyclic neural network, the abnormal segment deviation of the current movement route is considered, that is, the quality of the GPS signal when recording the movement trajectory related to the current movement route is considered. When the GPS signal quality is poor, the discarded historical movement routes will have fewer intersections, so the fusion error can be controlled more accurately, and the quality of the optimized movement route can also be improved.
图10示出了根据本申请实施例的运动路线处理装置1000的一种结构示意图。装置1000可以包括一个或多个处理器1002,与处理器1002中的至少一个连接的系统控制逻辑1008,与系统控制逻辑1008连接的系统内存1004,与系统控制逻辑1008连接的非易失性存储器(NVM)1006,以及与系统控制逻辑1008连接的网络接口1010。FIG. 10 shows a schematic structural diagram of a movement route processing device 1000 according to an embodiment of the present application. 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, and a non-volatile memory connected to the system control logic 1008 (NVM) 1006, and a network interface 1010 connected to the system control logic 1008.
处理器1002可以包括一个或多个单核或多核处理器。处理器1002可以包括通用处理器和专用处理器(例如,图形处理器,应用处理器,基带处理器等)的任何组合。在本申请的实施例中,处理器1002可以被配置为执行根据如图7-9所示的各种实施例的一个或多个实施例。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 (for example, a graphics processor, an application processor, a baseband processor, etc.). In the embodiment of the present application, the processor 1002 may be configured to execute one or more embodiments according to the various embodiments shown in FIGS. 7-9.
在一些实施例中,系统控制逻辑1008可以包括任意合适的接口控制器,以向处理器1002中的至少一个和/或与系统控制逻辑1008通信的任意合适的设备或组件提供任意合适的接口。In some embodiments, the system control logic 1008 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1002 and/or any suitable device or component in communication with the system control logic 1008.
在一些实施例中,系统控制逻辑1008可以包括一个或多个存储器控制器,以提供连接到系统内存1004的接口。系统内存1004可以用于加载以及存储数据和/或指令。在一些实施例中装置1000的内存1004可以包括任意合适的易失性存储器,例如合适的动态随机存取存储器(DRAM)。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 can 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).
NVM/存储器1006可以包括用于存储数据和/或指令的一个或多个有形的、非暂时性的计算机可读介质。在一些实施例中,NVM/存储器1006可以包括闪存等任意合适的非易失性存储器和/或任意合适的非易失性存储设备,例如HDD(Hard Disk Drive,硬盘驱动器),CD(Compact Disc,光盘)驱动器,DVD(Digital Versatile Disc,数字通用光盘)驱动器中的至少一个。The NVM/memory 1006 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions. In some embodiments, the NVM/memory 1006 may include any suitable non-volatile memory such as flash memory and/or any suitable non-volatile storage device, such as HDD (Hard Disk Drive, hard disk drive), CD (Compact Disc , At least one of an optical disc drive and a DVD (Digital Versatile Disc, Digital Versatile Disc) drive.
NVM/存储器1006可以包括安装在装置1000的装置上的一部分存储资源,或者它可以由设备访问,但不一定是设备的一部分。例如,可以经由网络接口1010通过网络访问NVM/存储1006。The NVM/memory 1006 may include a part of storage resources installed on the apparatus of the apparatus 1000, or it may be accessed by the device, but not necessarily a part of the device. For example, the NVM/storage 1006 can be accessed through the network via the network interface 1010.
特别地,系统内存1004和NVM/存储器1006可以分别包括:指令1020的暂时副本和永久副本。指令1020可以包括:由处理器1002中的至少一个执行时导致装置1000实施如图7-9所示的方法的指令。在一些实施例中,指令1020、硬件、固件和/或其软件组件可另外地/替代地置于系统控制逻辑1008,网络接口1010和/或处理器1002中。In particular, the system memory 1004 and the NVM/memory 1006 may respectively include: a temporary copy and a permanent copy of the instruction 1020. The instructions 1020 may include instructions that, when executed by at least one of the processors 1002, cause the apparatus 1000 to implement the method shown in FIGS. 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.
网络接口1010可以包括收发器,用于为装置1000提供无线电接口,进而通过一个或多个网络与任意其他合适的设备(如前端模块,天线等)进行通信。在一些实施例中,网络接口1010可以集成于装置1000的其他组件。例如,网络接口1010可以集成于处理器1002的,系统内存1004,NVM/存储器1006,和具有指令的固件设备(未示出)中的至少一种,当处理器1002中的至少一个执行所述指令时,装置1000实现图7-9所示的各种实施例的一个或多个实施例。The network interface 1010 may include a transceiver to provide a radio interface for the device 1000, and then communicate with any other suitable equipment (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 device 1000. For example, the network interface 1010 may be integrated in at least one of the processor 1002, the system memory 1004, the NVM/storage 1006, and a firmware device with instructions (not shown), when at least one of the processor 1002 executes the When instructed, the device 1000 implements one or more of the various embodiments shown in FIGS. 7-9.
网络接口1010可以进一步包括任意合适的硬件和/或固件,以提供多输入多输出无线电接口。例如,网络接口1010可以是网络适配器,无线网络适配器,电话调制解调器和/或无线调制解调器。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.
在一个实施例中,处理器1002中的至少一个可以与用于系统控制逻辑1008的一个或多个控制器的逻辑封装在一起,以形成系统封装(SiP)。在一个实施例中,处理器1002中的至少一个可以与用于系统控制逻辑1008的一个或多个控制器的逻辑集成在同一管芯上,以形成片上系统(SoC)。In one embodiment, at least one of the processors 1002 may be packaged with the logic of one or more controllers used for 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 with the logic of one or more controllers used for the system control logic 1008 on the same die to form a system on chip (SoC).
装置1000可以进一步包括:输入/输出(I/O)接口1012。I/O接口1012可以包括用户界面,使得用户能够与装置1000进行交互;外围组件接口的设计使得外围组件也能够与装置1000交互。在一些实施例中,装置1000还包括传感器,用于确定与装置1000相关的环境条件和位置信息的至少一种。The device 1000 may further include: an input/output (I/O) interface 1012. The I/O interface 1012 may include a user interface to enable the user to interact with the device 1000; the design of the peripheral component interface enables the 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 environmental conditions and location information related to the device 1000.
在一些实施例中,用户界面可包括但不限于显示器(例如,液晶显示器,触摸屏显示器等),扬声器,麦克风,一个或多个相机(例如,静止图像照相机和/或摄像 机),手电筒(例如,发光二极管闪光灯)和键盘。In some embodiments, the user interface may include, but is not limited to, a display (e.g., liquid crystal display, touch screen display, etc.), speakers, microphones, one or more cameras (e.g., still image cameras and/or video cameras), flashlights (e.g., LED flash) and keyboard.
在一些实施例中,外围组件接口可以包括但不限于非易失性存储器端口、音频插孔和电源接口。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.
在一些实施例中,传感器可包括但不限于陀螺仪传感器,加速度计,近程传感器,环境光线传感器和定位单元。定位单元还可以是网络接口1010的一部分或与网络接口1010交互,以与定位网络的组件(例如,全球定位系统(GPS)卫星)进行通信。In some embodiments, the sensor may include, but is not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of or interact with the network interface 1010 to communicate with components of the positioning network (eg, global positioning system (GPS) satellites).
虽然本申请的描述将结合较佳实施例一起介绍,但这并不代表此发明的特征仅限于该实施方式。恰恰相反,结合实施方式作发明介绍的目的是为了覆盖基于本申请的权利要求而有可能延伸出的其它选择或改造。为了提供对本申请的深度了解,以下描述中将包含许多具体的细节。本申请也可以不使用这些细节实施。此外,为了避免混乱或模糊本申请的重点,有些具体细节将在描述中被省略。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Although the description of this application will be introduced in conjunction with the preferred embodiments, this does not mean that the features of the invention are limited to this embodiment. On the contrary, the purpose of introducing the invention in combination with the embodiments is to cover other options or modifications that may be extended based on the claims of this application. In order to provide an in-depth understanding of the application, the following description will contain many specific details. This application can also be implemented without using these details. In addition, in order to avoid confusion or obscuring the focus of this application, some specific details will be omitted in the description. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other if there is no conflict.
此外,各种操作将以最有助于理解说明性实施例的方式被描述为多个离散操作;然而,描述的顺序不应被解释为暗示这些操作必须依赖于顺序。特别是,这些操作不需要按呈现顺序执行。In addition, various operations will be described as a plurality of 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 must depend on the order. In particular, these operations need not be performed in the order of presentation.
除非上下文另有规定,否则术语“包含”,“具有”和“包括”是同义词。短语“A/B”表示“A或B”。短语“A和/或B”表示“(A和B)或者(A或B)”。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)".
如这里所使用的,术语“模块”或“单元”可以指代、是或者包括:专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的(共享、专用或组)处理器和/或存储器、组合逻辑电路和/或提供所描述的功能的其他合适的组件。As used herein, the term "module" or "unit" can refer to, be, or include: application specific integrated circuit (ASIC), electronic circuit, (shared, dedicated, or group) processing that executes one or more software or firmware programs And/or memory, combinatorial logic circuits, and/or other suitable components that provide the described functions.
在附图中,以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可以不需要这样的特定布置和/或排序。在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包含结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the 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 ordering may not be required. In some embodiments, these features may be arranged in a different manner and/or order than shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not imply 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.
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。The various embodiments of the mechanism disclosed in this application may 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 including at least one processor and a storage system (including volatile and non-volatile memory and/or storage elements) , At least one input device and at least one output device.
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(DSP)、微控制器、专用集成电路(ASIC)或微处理器之类的处理器的任何系统。Program codes 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.
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。The program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with the processing system. When needed, assembly language or machine language can also be used to implement the program code. In fact, the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。 在一些情况下,至少一些实施例的一个或多个方面可以由存储在计算机可读存储介质上的表示性指令来实现,指令表示处理器中的各种逻辑,指令在被机器读取时使得该机器制作用于执行本申请所述的技术的逻辑。被称为“IP核”的这些表示可以被存储在有形的计算机可读存储介质上,并被提供给多个客户或生产设施以加载到实际制造该逻辑或处理器的制造机器中。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. The instructions represent various logics in the processor, and the instructions, when read by a machine, cause This machine makes the logic used to execute the techniques described in this application. These representations called "IP cores" can be stored on a tangible computer-readable storage medium and provided to multiple customers or production facilities to be loaded into the manufacturing machine that actually manufactures the logic or processor.
这样的计算机可读存储介质可以包括但不限于通过机器或设备制造或形成的物品的非瞬态的有形安排,其包括存储介质,诸如:硬盘任何其它类型的盘,包括软盘、光盘、紧致盘只读存储器(CD-ROM)、紧致盘可重写(CD-RW)以及磁光盘;半导体器件,例如只读存储器(ROM)、诸如动态随机存取存储器(DRAM)和静态随机存取存储器(SRAM)之类的随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、闪存、电可擦除可编程只读存储器(EEPROM);相变存储器(PCM);磁卡或光卡;或适于存储电子指令的任何其它类型的介质。Such computer-readable storage media may include, but are not limited to, non-transitory tangible arrangements of objects manufactured or formed by machines or equipment, including storage media, such as hard disks, any other types of disks, including floppy disks, optical disks, compact disks, etc. Disk read only memory (CD-ROM), compact disk rewritable (CD-RW), and magneto-optical disk; semiconductor devices such as read only memory (ROM), such as dynamic random access memory (DRAM) and static random access Random access memory (RAM) such as memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); magnetic card Or optical card; or any other type of medium suitable for storing electronic instructions.
因此,本申请的各实施例还包括非瞬态的计算机可读存储介质,该介质包含指令或包含设计数据,诸如硬件描述语言(HDL),它定义本申请中描述的结构、电路、装置、处理器和/或系统特征。Therefore, each embodiment of the present application also includes a non-transitory computer-readable storage medium, which contains instructions or contains design data, such as hardware description language (HDL), which defines the structures, circuits, devices, etc. described in the present application. Processor and/or system characteristics.

Claims (39)

  1. 一种运动轨迹处理方法,其特征在于,包括:A method for processing motion trajectory, which is characterized in that it comprises:
    获取运动轨迹集合,其中所述运动轨迹集合包括多个运动轨迹;和Acquiring a set of motion trajectories, wherein the set of motion trajectories includes a plurality of motion trajectories; and
    根据所述运动轨迹集合确定运动路线要素,其中所述运动路线要素包括中心位置和交点集合中的至少一个,Determining a movement route element according to the movement trajectory set, wherein the movement 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 set of motion trajectories is contained within the geographic range of the multiple grids; and
    其中,所述交点集合包括与多个轨迹段簇相关的多个交点,其中所述多个轨迹段簇中的每个轨迹段簇包括所述多个运动轨迹的多个轨迹段,并且所述多个轨迹段中的相邻轨迹段之间的间距小于预定值,其中所述相邻轨迹段分别属于所述多个运动轨迹中的不同运动轨迹。Wherein, the set of intersection points includes a plurality of intersection points related to a plurality of trajectory segment clusters, wherein each trajectory segment cluster in the plurality of trajectory segment clusters includes a plurality of trajectory segments of the multiple motion trajectories, and the The distance between adjacent trajectory segments in the plurality of trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different trajectories of the multiple trajectories.
  2. 如权利要求1所述的运动轨迹处理方法,其特征在于,所述运动路线要素还包括:8. The motion track processing method of claim 1, wherein the motion route element further comprises:
    与所述多个栅格中的每个栅格对应的Geohash编码,用于索引所述每个栅格对应的所述地理范围。The Geohash code corresponding to each grid of the plurality of grids is used to index the geographic range corresponding to each grid.
  3. 如权利要求2所述的运动轨迹处理方法,其特征在于,所述Geohash编码包括至少7位Base32编码字符。The motion track processing method according to claim 2, wherein the Geohash code includes at least 7-bit Base32 coded characters.
  4. 如权利要求1所述的运动轨迹处理方法,其特征在于,所述运动路线要素还包括:指示所述多个交点中的每个交点与所述多个交点中的其他至少一个交点之间的链接关系的交点链接表格。The motion trajectory processing method according to claim 1, wherein the motion route element further comprises: indicating the distance between each intersection of the plurality of intersections and at least one other intersection of the plurality of intersections. Intersection link table of link relationship.
  5. 如权利要求1所述的运动轨迹处理方法,其特征在于,所述中心位置包括所述中心位置的GPS坐标,所述多个交点中的所述每个交点包括以所述中心位置为原点的相对坐标系中的相对坐标。The motion track processing method according to claim 1, wherein the center position includes the GPS coordinates of the center position, and each of the multiple intersection points includes an origin with the center position as the origin. Relative coordinates in the relative coordinate system.
  6. 如权利要求1所述的运动轨迹处理方法,其特征在于,所述根据运动轨迹集合确定运动路线要素,包括:The method for processing motion trajectory according to claim 1, wherein the determining the motion route element according to the motion trajectory set comprises:
    从所述多个交点中选择最东、最南、最西、最北的四个交点;Selecting the four most east, south, west, and northest intersections from the multiple intersections;
    根据所述四个交点确定所述多个栅格的地理范围,并确定所述地理范围的中心点作为所述中心位置。The geographic range of the multiple grids is determined according to the four intersection points, and the center point of the geographic range is determined as the center position.
  7. 如权利要求1所述的运动轨迹处理方法,其特征在于,所述根据运动轨迹集合确定运动路线要素,包括:The method for processing motion trajectory according to claim 1, wherein the determining the motion route element according to the motion trajectory set comprises:
    将所述运动轨迹集合中的每条运动轨迹分割为多个轨迹段;Dividing each motion trajectory in the motion trajectory set into multiple trajectory segments;
    将所述相邻轨迹段之间的间距小于所述预定值的所述多个所述轨迹段聚类为所述多个轨迹段簇中的一个轨迹段簇;Clustering the plurality of trajectory segments whose distance between the adjacent trajectory segments is less than the predetermined value into one trajectory segment cluster among the plurality of trajectory segment clusters;
    根据所述多个轨迹簇中的所述每个轨迹段簇内的所述多个轨迹段,确定对应于所述每个轨迹段簇的簇向量从而形成对应于所述多个轨迹段簇的多个簇向量;According to the 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 a cluster vector corresponding to the multiple trajectory segment clusters. Multiple cluster vectors;
    确定所述多个簇向量中相邻簇向量之间的所述交点。Determine the intersection point between adjacent cluster vectors in the plurality of cluster vectors.
  8. 如权利要求7所述的运动轨迹处理方法,其特征在于,所述簇向量的起点坐标为所述轨迹段簇内的所述多个轨迹段的起点坐标的平均值,所述簇向量的终点坐标为所述轨迹段簇内的所述多个轨迹段的终点坐标的平均值。8. The motion trajectory processing method of claim 7, wherein the starting point coordinates of the cluster vector are the average value of the starting point coordinates of the multiple trajectory segments in the trajectory segment cluster, and the end point of the cluster vector The coordinate is the average value of the end point coordinates of the multiple trajectory segments in the trajectory segment cluster.
  9. 一种运动轨迹处理方法,其特征在于,包括:A method for processing motion trajectory, which is characterized in that it comprises:
    获取与当前运动轨迹集合相关的多个当前运动轨迹交点以及与历史运动轨迹集合相关的多个历史运动轨迹交点;和Acquiring multiple current motion trajectory intersections related to the current motion trajectory set and multiple historical motion trajectory intersections related to the historical motion trajectory set; and
    至少部分地根据异常段偏差,确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,从而获得优化的运动路线;Determine whether to retain at least one current motion trajectory intersection of the multiple current motion trajectory intersections and/or at least one historical motion trajectory intersection of the multiple historical motion trajectory intersections at least partially based on the abnormal segment deviation, so as to obtain optimization Route of motion;
    其中,所述异常段偏差至少部分地指定所述当前运动轨迹集合的多个运动轨迹的多个轨迹段中出现异常轨迹段的比例,其中所述异常轨迹段距离所述多个轨迹段的至少一个类中心超出第一预定值。Wherein, the abnormal segment deviation at least partly specifies the proportion of abnormal trajectory segments in the multiple trajectory segments of the multiple trajectories in the current trajectory set, wherein the distance between the abnormal trajectory segment and the multiple trajectory segments at least A class center exceeds the first predetermined value.
  10. 如权利要求9所述的运动轨迹处理方法,其特征在于,所述当前运动轨迹集合和所述历史运动轨迹集合被包含在相同的地理范围内。9. The motion trajectory processing method according to claim 9, wherein the current motion trajectory set and the historical motion trajectory set are contained in the same geographic range.
  11. 如权利要求9所述的运动轨迹处理方法,其特征在于,所述确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,包括利用LSTM(Long short-term memory,长短时记忆)模型确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点。9. The motion trajectory processing method according to claim 9, wherein the determining whether to retain at least one current motion trajectory intersection point among the multiple current motion trajectory intersection points and/or one of the multiple historical motion trajectory intersection points At least one historical motion trajectory intersection point, including using an LSTM (Long short-term memory) model to determine whether to retain at least one current motion trajectory intersection point and/or the multiple historical motions among the multiple current motion trajectory intersection points At least one historical movement trajectory intersection in the trajectory intersection.
  12. 如权利要求9至11中任一项所述的运动轨迹处理方法,其特征在于,所述确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括:利用LSTM模型,根据以下公式计算用于确定是否保留所述多个历史运动轨迹交点中的所述至少一个历史运动轨迹交点的遗忘门:The motion trajectory processing method according to any one of claims 9 to 11, wherein the determining whether to retain at least one current motion trajectory intersection point and/or the multiple current motion trajectory intersection points At least one historical motion trajectory intersection point among the historical motion trajectory intersection points further includes: using an LSTM model to calculate a forgetting 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 :
    f t=σ(W f·[h t-1,X t]+b f) f t =σ(W f ·[h t-1 ,X t ]+b f )
    b f=1+b m b f =1+b m
    其中,f t表示所述LSTM模型的第t个时刻的神经元的所述遗忘门,σ表示sigmoid 函数,W f表示所述遗忘门的权重矩阵,X t表示所述LSTM模型的第t个时刻的神经元的输入并且包括所述多个当前运动轨迹交点,h t-1表示所述LSTM模型的第t-1个时刻的神经元的输出并且包括所述多个历史运动轨迹交点,[h t-1,X t]表示将h t-1和X t拼接形成的长向量,b f表示所述遗忘门的偏置值,b m表示所述异常段偏差。 Wherein, f t represents the forgetting gate of the neuron at the t-th moment of the LSTM model, σ represents the sigmoid function, W f represents the weight matrix of the forgetting gate, and X t represents the t-th neuron of the LSTM model The input of the neuron at time and includes the intersection of the multiple current motion trajectories, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes the intersection of the multiple historical motion trajectories, [ h t-1 , X t ] represents a long vector formed by splicing h t-1 and X t , b f represents the offset value of the forgetting gate, and b m represents the deviation of the abnormal segment.
  13. 如权利要求9至12中任一项所述的运动轨迹处理方法,其特征在于,所述确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点还包括,利用LSTM模型,根据以下公式计算用于确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点的输入门:The motion trajectory processing method according to any one of claims 9 to 12, wherein the determining whether to retain at least one current motion trajectory intersection point and/or the multiple current motion trajectory intersection points At least one historical motion trajectory intersection point in the historical motion trajectory intersection points further includes using an 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:
    i t=σ(W i·[h t-1,X t]+b i) i t =σ(W i ·[h t-1 ,X t ]+b i )
    其中,i t表示所述LSTM模型的第t个时刻的神经元的所述输入门,σ表示sigmoid函数,W i表示所述输入门的权重矩阵,X t表示所述LSTM模型的第t个时刻的神经元的输入并且包括所述多个当前运动轨迹交点,h t-1表示所述LSTM模型的第t-1个时刻的神经元的输出并且包括所述多个历史运动轨迹交点,[h t-1,X t]表示将h t-1和X t拼接形成的长向量,b i表示所述输入门的偏置值。 Wherein, i t t represents the time of the model of the input gate LSTM neuron, σ represents a sigmoid function, W i represents the weight of the weight matrix input gate, X t denotes the t-th model LSTM The input of the neuron at time and includes the intersection of the multiple current motion trajectories, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes the intersection of the multiple historical motion trajectories, [ h t-1 , X t ] represents a long vector formed by splicing h t-1 and X t , and b i represents the bias value of the input gate.
  14. 如权利要求9至13中任一项所述的运动轨迹处理方法,其特征在于,所述确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点还包括,利用LSTM模型,根据以下公式确定是否输出所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点以及所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,从而获得所述优化的运动路线:The motion trajectory processing method according to any one of claims 9 to 13, wherein the determining whether to retain at least one current motion trajectory intersection point and/or the multiple current motion trajectory intersection points The at least one historical motion trajectory intersection point in the historical motion trajectory intersection further includes: using an LSTM model to determine whether to output at least one of the multiple current motion trajectory intersection points and the multiple historical motion trajectory intersection points according to the following formula At least one of the historical motion trajectory intersection points in, so as to obtain the optimized motion route:
    Figure PCTCN2020132333-appb-100001
    Figure PCTCN2020132333-appb-100001
    Figure PCTCN2020132333-appb-100002
    Figure PCTCN2020132333-appb-100002
    o t=σ(W o·[h t-1,X t]+b o) o t =σ(W o ·[h t-1 ,X t ]+b o )
    h t=o t·tanh(C t) h t =o t ·tanh(C t )
    其中,X t表示所述LSTM模型的第t个时刻的神经元的输入并且包括所述多个当前运动轨迹交点,h t-1表示所述LSTM模型的第t-1个时刻的神经元的输出并且包括所述多个历史运动轨迹交点,
    Figure PCTCN2020132333-appb-100003
    表示所述LSTM模型的第t个时刻的神经元的输入细胞状态,W c表示所述LSTM模型的第t个时刻的神经元的输入细胞状态的权重矩阵,b c表示所述LSTM模型的第t个时刻的神经元的输入细胞状态的偏置值,C t表示所述LSTM模型的第t个时刻的神经元的细胞状态,C t-1表示所述LSTM模型的第t-1个时刻的神经元的细胞状态,f t表示所述LSTM模型的第t个时刻的神经元的遗忘门,i t表示所述LSTM模型的第t个时刻的神经元的输入门,o t表示所述LSTM模型的第t个时刻的神经元的输出门,W o表示所述输出门的权重矩阵,b o表示所述输出门的偏置值,h t表示所述LSTM模型的第t个时刻的神经元的输出并且可以包括所述优化的运动路线的多个交点。
    Wherein, X t represents the input of the neuron at the t-th time of the LSTM model and includes the intersection points of the multiple current motion trajectories, and h t-1 represents the input of the neuron at the t-1-th time of the LSTM model Output and include the intersection of the multiple historical motion trajectories,
    Figure PCTCN2020132333-appb-100003
    Represents the input cell state of the neuron at the t-th time of the LSTM model, W c represents the weight matrix of the input cell state of the neuron at the t-th time of the LSTM model, and b c represents the weight matrix of the neuron at the t-th time of the LSTM model. The bias value of the input cell state of the neuron at time t, C t represents the cell state of the neuron at the t time of the LSTM model, and C t-1 represents the t-1 time of the LSTM model the cell state neurons, f t t represents the time of the neuron model LSTM forgotten door, i t t represents the time of the neuron model LSTM input gate, o t represents the The output gate of the neuron at the t-th time of the LSTM model, W o represents the weight matrix of the output gate, b o represents the bias value of the output gate, and h t represents the t-th time of the LSTM model The output of the neuron may also include multiple intersections of the optimized movement route.
  15. 如权利要求14所述的运动轨迹处理方法,其特征在于,所述方法还包括,从 所述优化的运动路线的所述多个交点中,选择最东、最南、最西、最北的四个交点;The motion trajectory processing method according to claim 14, wherein the method further comprises selecting the most east, south, west, and north from the multiple intersection points of the optimized motion route Four intersections
    根据所述四个交点确定包含所述运动路线的地理范围,并确定所述地理范围的中心点作为所述优化的运动路线的中心位置。According to the four intersection points, the geographic range including the movement route is determined, and the center point of the geographic range is determined as the center position of the optimized movement route.
  16. 如权利要求15所述的运动轨迹处理方法,其特征在于,所述方法还包括,确定所述地理范围的多个栅格以及所述多个栅格的geohash编码值,其中所述多个栅格共享所述中心位置。The motion trajectory processing method according to claim 15, wherein the method further comprises determining the multiple grids of the geographic range and the geohash coding values of the multiple grids, wherein the multiple grids The grid shares the center position.
  17. 如权利要求15所述的运动轨迹处理方法,其特征在于,所述中心位置包括所述中心位置的GPS坐标,所述优化的运动路线的所述多个交点中的每个交点包括以所述中心位置为原点的相对坐标系中的相对坐标。The motion track processing method of claim 15, wherein the center position includes the GPS coordinates of the center position, and each of the multiple intersection points of the optimized motion route includes the The center position is the relative coordinate in the relative coordinate system of the origin.
  18. 如权利要求9所述的运动轨迹处理方法,其特征在于,所述方法还包括:9. The motion trajectory processing method of claim 9, wherein the method further comprises:
    对所述多个轨迹段的中心进行聚类并获得所述多个轨迹段的所述至少一个类中心。Clustering the centers of the plurality of trajectory segments and obtaining the at least one cluster center of the plurality of trajectory segments.
  19. 一种运动路线的推荐方法,其特征在于,包括:A method for recommending sports routes, which is characterized in that it includes:
    接收用户对运动路线的推荐请求;Receive user's recommendation request for sports route;
    获取所述用户的GPS坐标,并计算所述用户的GPS(Global Positioning System,全球定位系统)坐标的geohash编码值;Acquiring the GPS coordinates of the user, and calculating the geohash code value of the GPS (Global Positioning System, global positioning system) coordinates of the user;
    从多个栅格geohash编码值中,查询与所述用户的GPS坐标的geohash编码值的差距最小的栅格geohash编码值;From the multiple grid geohash code values, query the grid geohash code value with the smallest difference with the geohash code value of the GPS coordinates of the user;
    获取与所述用户的GPS坐标的geohash编码值的差距最小的所述栅格geohash编码值对应的运动路线以及所述运动路线的中心位置,其中,所述中心位置由包含所述运动路线的地理范围的多个栅格共享;和Obtain the movement route corresponding to the grid geohash code value with the smallest difference between the geohash code value of the GPS coordinates of the user and the center position of the movement route, wherein the center position is determined by the geographic location that contains the movement route. Multiple grid sharing of the range; and
    根据所述中心位置向用户推荐所述运动路线。Recommend the exercise route to the user according to the center position.
  20. 一种计算机可读存储介质,其特征在于,在所述计算机可读存储上存储有指令,当所述指令在所述机器上运行时,使得所述机器执行权利要求1至19中任意一项所述的方法。A computer-readable storage medium, characterized in that instructions are stored on the computer-readable storage, and when the instructions are executed on the machine, the machine executes any one of claims 1 to 19 The method described.
  21. 一种运动轨迹处理装置,其特征在于,包括:A motion trajectory processing device, characterized in that it comprises:
    处理器;processor;
    存储器,在所述存储器上存储有指令,当所述指令被所述处理器运行时,使得所述处理器执行权利要求1至19中任意一项所述的方法。A memory, where instructions are stored on the memory, and when the instructions are executed by the processor, the processor is caused to execute the method according to any one of claims 1 to 19.
  22. 一种运动轨迹处理设备,其特征在于,包括:A motion trajectory processing device, characterized in that it comprises:
    运动轨迹记录模块,用于获取运动轨迹集合,其中所述运动轨迹集合包括多个运 动轨迹;和The motion track recording module is used to obtain a motion track set, wherein the motion track set includes a plurality of motion tracks; and
    运动路线提取模块,用于根据所述运动轨迹集合确定运动路线要素,其中所述运动路线要素包括中心位置和交点集合中的至少一个,The movement route extraction module is configured to determine movement route elements according to the movement trajectory set, wherein the movement 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 set of motion trajectories is contained within the geographic range of the multiple grids; and
    其中,所述交点集合包括与多个轨迹段簇相关的多个交点,其中所述多个轨迹段簇中的每个轨迹段簇包括所述多个运动轨迹的多个轨迹段,并且所述多个轨迹段中的相邻轨迹段之间的间距小于预定值,其中所述相邻轨迹段分别属于所述多个运动轨迹中的不同运动轨迹。Wherein, the set of intersection points includes a plurality of intersection points related to a plurality of trajectory segment clusters, wherein each trajectory segment cluster in the plurality of trajectory segment clusters includes a plurality of trajectory segments of the multiple motion trajectories, and the The distance between adjacent trajectory segments in the plurality of trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different trajectories of the multiple trajectories.
  23. 如权利要求22所述的运动轨迹处理设备,其特征在于,所述运动路线要素还包括:The motion trajectory processing device according to claim 22, wherein the motion route element further comprises:
    与所述多个栅格中的每个栅格对应的Geohash编码,用于索引所述每个栅格对应的所述地理范围。The Geohash code corresponding to each grid of the plurality of grids is used to index the geographic range corresponding to each grid.
  24. 如权利要求23所述的运动轨迹处理设备,其特征在于,所述Geohash编码包括至少7位Base32编码字符。The motion track processing device of claim 23, wherein the Geohash code includes at least 7-bit Base32 coded characters.
  25. 如权利要求22所述的运动轨迹处理设备,其特征在于,所述运动路线要素还包括:The motion trajectory processing device according to claim 22, wherein the motion route element further comprises:
    指示所述多个交点中的每个交点与所述多个交点中的其他至少一个交点之间的链接关系的交点链接表格。An intersection link table indicating a link relationship between each intersection of the plurality of intersections and at least one other intersection of the plurality of intersections.
  26. 如权利要求22所述的运动轨迹处理设备,其特征在于,所述运动路线提取模块还用于,确定所述多个交点中的所述每个交点在以所述中心位置为原点的相对坐标系中的相对坐标。The motion trajectory processing device according to claim 22, wherein the motion route extraction module is further configured to determine the relative coordinates of each of the multiple intersection points with the center position as the origin. Relative coordinates in the system.
  27. 如权利要求22所述的运动轨迹处理设备,其特征在于,所述运动路线提取模块用于根据运动轨迹集合确定运动路线要素,包括用于:The motion trajectory processing device according to claim 22, wherein the motion route extraction module is configured to determine the motion route element according to the motion trajectory set, including:
    从所述多个交点中选择最东、最南、最西、最北的四个交点;Selecting the four most east, south, west, and northest intersections from the multiple intersections;
    根据所述四个交点确定所述多个栅格的地理范围,并确定所述地理范围的中心点作为所述中心位置。The geographic range of the multiple grids is determined according to the four intersection points, and the center point of the geographic range is determined as the center position.
  28. 如权利要求22所述的运动轨迹处理设备,其特征在于,所述运动路线提取模块用于根据运动轨迹集合确定运动路线要素,包括用于:The motion trajectory processing device according to claim 22, wherein the motion route extraction module is configured to determine the motion route element according to the motion trajectory set, including:
    将所述运动轨迹集合中的每条运动轨迹分割为多个轨迹段;Dividing each motion trajectory in the motion trajectory set into multiple trajectory segments;
    将所述相邻轨迹段之间的间距小于所述预定值的所述多个所述轨迹段聚类为所述多个轨迹段簇中的一个轨迹段簇;Clustering the plurality of trajectory segments whose distance between the adjacent trajectory segments is less than the predetermined value into one trajectory segment cluster among the plurality of trajectory segment clusters;
    根据所述多个轨迹簇中的所述每个轨迹段簇内的所述多个轨迹段,确定对应于所 述每个轨迹段簇的簇向量从而形成对应于所述多个轨迹段簇的多个簇向量;According to the 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 a cluster vector corresponding to the multiple trajectory segment clusters. Multiple cluster vectors;
    确定所述多个簇向量中相邻簇向量之间的所述交点。Determine the intersection point between adjacent cluster vectors in the plurality of cluster vectors.
  29. 如权利要求28所述的运动轨迹处理设备,其特征在于,所述簇向量的起点坐标为所述轨迹段簇内的所述多个轨迹段的起点坐标的平均值,所述簇向量的终点坐标为所述轨迹段簇内的所述多个轨迹段的终点坐标的平均值。The motion trajectory processing device according to claim 28, wherein the start point coordinates of the cluster vector are the average value of the start point coordinates of the multiple trajectory segments in the trajectory segment cluster, and the end point of the cluster vector The coordinate is the average value of the end point coordinates of the multiple trajectory segments in the trajectory segment cluster.
  30. 一种运动轨迹处理设备,其特征在于,包括:A motion trajectory processing device, characterized in that it comprises:
    运动路线提取模块,用于获取与当前运动轨迹集合相关的多个当前运动轨迹交点以及与历史运动轨迹集合相关的多个历史运动轨迹交点;和The motion route extraction module is used to obtain multiple current motion trajectory intersection points related to the current motion trajectory set and multiple historical motion trajectory intersection points related to the historical motion trajectory set; and
    运动路线优化模块,至少部分地根据异常段偏差,确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,从而获得优化的运动路线;The motion route optimization module determines whether to retain at least one current motion trajectory intersection of the multiple current motion trajectory intersections and/or at least one historical motion trajectory of the multiple historical motion trajectory intersections at least partially based on the abnormal segment deviation Intersection point, so as to obtain an optimized movement route;
    其中,所述异常段偏差至少部分地指定所述当前运动轨迹集合的多个运动轨迹的多个轨迹段中出现异常轨迹段的比例,其中所述异常轨迹段距离所述多个轨迹段的至少一个类中心超出第一预定值。Wherein, the abnormal segment deviation at least partially specifies the proportion of abnormal trajectory segments in the multiple trajectory segments of the multiple motion trajectories in the current motion trajectory set, wherein the distance from the abnormal trajectory segment to at least A class center exceeds the first predetermined value.
  31. 如权利要求30所述的运动轨迹处理设备,其特征在于,所述当前运动轨迹集合和所述历史运动轨迹集合被包含在相同的地理范围内。The motion trajectory processing device according to claim 30, wherein the current motion trajectory set and the historical motion trajectory set are contained in the same geographic range.
  32. 如权利要求30所述的运动轨迹处理设备,其特征在于,所述运动路线优化模块用于确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,包括用于利用LSTM(Long short-term memory,长短时记忆)模型确定是否是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点。The motion trajectory processing device according to claim 30, wherein the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection point and/or the multiple current motion trajectory intersection points. At least one historical motion trajectory intersection in the historical motion trajectory intersection includes a method for determining whether to retain at least one current motion trajectory intersection among the multiple current motion trajectory intersections by using an LSTM (Long short-term memory) model And/or at least one historical motion trajectory intersection among the multiple historical motion trajectory intersections.
  33. 如权利要求30至32中任一项所述的运动轨迹处理设备,其特征在于,所述运动路线优化模块用于确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括用于:利用LSTM模型,根据以下公式计算用于确定是否保留所述多个历史运动轨迹交点中的所述至少一个历史运动轨迹交点的遗忘门:The motion trajectory processing device according to any one of claims 30 to 32, wherein the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection and /Or at least one historical motion trajectory intersection point among the multiple historical motion trajectory intersection points, further comprising: using an LSTM model to calculate according to the following formula for determining whether to retain the at least one historical motion trajectory intersection A forgotten door at the intersection of historical motion trajectories:
    f t=σ(W f·[h t-1,X t]+b f) f t =σ(W f ·[h t-1 ,X t ]+b f )
    b f=1+b m b f =1+b m
    其中,f t表示所述LSTM模型的第t个时刻的神经元的所述遗忘门,σ表示sigmoid函数,W f表示所述遗忘门的权重矩阵,X t表示所述LSTM模型的第t个时刻的神经元的输入并且包括所述多个当前运动轨迹交点,h t-1表示所述LSTM模型的第t-1个时刻的神经元的输出并且包括所述多个历史运动轨迹交点,[h t-1,X t]表示将h t-1和X t拼接形 成的长向量,b f表示所述遗忘门的偏置值,b m表示所述异常段偏差。 Wherein, f t represents the forgetting gate of the neuron at the t-th moment of the LSTM model, σ represents the sigmoid function, W f represents the weight matrix of the forgetting gate, and X t represents the t-th neuron of the LSTM model The input of the neuron at time and includes the intersection of the multiple current motion trajectories, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes the intersection of the multiple historical motion trajectories, [ h t-1 , X t ] represents a long vector formed by splicing h t-1 and X t , b f represents the offset value of the forgetting gate, and b m represents the deviation of the abnormal segment.
  34. 如权利要求30至33中任一项所述的运动轨迹处理设备,其特征在于,所述运动路线优化模块用于确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括用于:利用LSTM模型,根据以下公式计算用于确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点的输入门:The motion trajectory processing device according to any one of claims 30 to 33, wherein the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection and /Or at least one historical motion trajectory intersection among the multiple historical motion trajectory intersections, further comprising: using an LSTM model to calculate according to the following formula for determining whether to retain at least one current of the multiple current motion trajectory intersections The input gate at the intersection of the motion trajectory:
    i t=σ(W i·[h t-1,X t]+b i) i t =σ(W i ·[h t-1 ,X t ]+b i )
    其中,i t表示所述LSTM模型的第t个时刻的神经元的所述输入门,σ表示sigmoid函数,W i表示所述输入门的权重矩阵,X t表示所述LSTM模型的第t个时刻的神经元的输入并且包括所述多个当前运动轨迹交点,h t-1表示所述LSTM模型的第t-1个时刻的神经元的输出并且包括所述多个历史运动轨迹交点,[h t-1,X t]表示将h t-1和X t拼接形成的长向量,b i表示所述输入门的偏置值。 Wherein, i t t represents the time of the model of the input gate LSTM neuron, σ represents a sigmoid function, W i represents the weight of the weight matrix input gate, X t denotes the t-th model LSTM The input of the neuron at time and includes the intersection of the multiple current motion trajectories, h t-1 represents the output of the neuron at the t-1 time of the LSTM model and includes the intersection of the multiple historical motion trajectories, [ h t-1 , X t ] represents a long vector formed by splicing h t-1 and X t , and b i represents the bias value of the input gate.
  35. 如权利要求30至34中任一项所述的运动轨迹处理设备,其特征在于,所述运动路线优化模块用于确定是否保留所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点和/或所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,还包括用于:利用LSTM模型,根据以下公式确定是否输出所述多个当前运动轨迹交点中的至少一个当前运动轨迹交点以及所述多个历史运动轨迹交点中的至少一个历史运动轨迹交点,从而获得所述优化的运动路线:The motion trajectory processing device according to any one of claims 30 to 34, wherein the motion route optimization module is used to determine whether to retain at least one current motion trajectory intersection and /Or at least one historical motion trajectory intersection of the multiple historical motion trajectory intersections, further comprising: using an LSTM model to determine whether to output at least one current motion trajectory intersection of the multiple current motion trajectory intersections according to the following formula 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:
    Figure PCTCN2020132333-appb-100004
    Figure PCTCN2020132333-appb-100004
    Figure PCTCN2020132333-appb-100005
    Figure PCTCN2020132333-appb-100005
    o t=σ(W o·[h t-1,X t]+b o) o t =σ(W o ·[h t-1 ,X t ]+b o )
    h t=o t·tanh(C t) h t =o t ·tanh(C t )
    其中,X t表示所述LSTM模型的第t个时刻的神经元的输入并且包括所述多个当前运动轨迹交点,h t-1表示所述LSTM模型的第t-1个时刻的神经元的输出并且包括所述多个历史运动轨迹交点,
    Figure PCTCN2020132333-appb-100006
    表示所述LSTM模型的第t个时刻的神经元的输入细胞状态,W c表示所述LSTM模型的第t个时刻的神经元的输入细胞状态的权重矩阵,b c表示所述LSTM模型的第t个时刻的神经元的输入细胞状态的偏置值,C t表示所述LSTM模型的第t个时刻的神经元的细胞状态,C t-1表示所述LSTM模型的第t-1个时刻的神经元的细胞状态,f t表示所述LSTM模型的第t个时刻的神经元的遗忘门,i t表示所述LSTM模型的第t个时刻的神经元的输入门,o t表示所述LSTM模型的第t个时刻的神经元的输出门,W o表示所述输出门的权重矩阵,b o表示所述输出门的偏置值,h t表示所述LSTM模型的第t个时刻的神经元的输出并且可以包括所述优化的运动路线的多个交点。
    Wherein, X t represents the input of the neuron at the t-th time of the LSTM model and includes the intersection points of the multiple current motion trajectories, and h t-1 represents the input of the neuron at the t-1-th time of the LSTM model Output and include the intersection of the multiple historical motion trajectories,
    Figure PCTCN2020132333-appb-100006
    Represents the input cell state of the neuron at the t-th time of the LSTM model, W c represents the weight matrix of the input cell state of the neuron at the t-th time of the LSTM model, and b c represents the weight matrix of the neuron at the t-th time of the LSTM model. The bias value of the input cell state of the neuron at time t, C t represents the cell state of the neuron at the t time of the LSTM model, and C t-1 represents the t-1 time of the LSTM model the cell state neurons, f t t represents the time of the neuron model LSTM forgotten door, i t t represents the time of the neuron model LSTM input gate, o t represents the The output gate of the neuron at the t-th time of the LSTM model, W o represents the weight matrix of the output gate, b o represents the bias value of the output gate, and h t represents the t-th time of the LSTM model The output of the neuron may also include multiple intersections of the optimized movement route.
  36. 如权利要求35所述的运动轨迹处理设备,其特征在于,所述运动路线提取模块还用于,从所述优化的运动路线的所述多个交点中,选择最东、最南、最西、最北的四个交点;The motion trajectory processing device according to claim 35, wherein the motion route extraction module is further configured to select the easternmost, the southernmost, and the westernmost from the multiple intersection points of the optimized motion route. , The four northernmost intersections;
    根据所述四个交点确定包含所述运动路线的地理范围,并确定所述地理范围的中 心点作为所述优化的运动路线的中心位置。According to the four intersection points, the geographic range including the movement route is determined, and the center point of the geographic range is determined as the center position of the optimized movement route.
  37. 如权利要求36所述的运动轨迹处理设备,其特征在于,所述运动路线提取模块还用于,确定所述地理范围的多个栅格以及所述多个栅格的geohash编码值,其中所述多个栅格共享所述中心位置。The motion trajectory processing device according to claim 36, wherein the motion route extraction module is further configured to determine multiple grids of the geographic range and geohash coding values of the multiple grids, wherein The multiple grids share the center position.
  38. 如权利要求36所述的运动轨迹处理设备,其特征在于,所述运动路线提取模块还用于,确定所述优化的运动路线的所述多个交点中的每个交点在以所述中心位置为原点的相对坐标系中的相对坐标。The motion trajectory processing device of claim 36, wherein the motion route extraction module is further configured to determine that each of the multiple intersection points of the optimized motion route is at the center position. It is the relative coordinate in the relative coordinate system of the origin.
  39. 如权利要求30所述的运动轨迹处理设备,其特征在于,所述运动路线提取模块还用于:The motion trajectory processing device of claim 30, wherein the motion route extraction module is further configured to:
    对所述多个轨迹段的中心进行聚类并获得所述多个轨迹段的所述至少一个类中心。Clustering the centers of the multiple trajectory segments and obtaining the at least one cluster center of the multiple trajectory segments.
PCT/CN2020/132333 2019-12-13 2020-11-27 Motion trajectory processing method, medium, apparatus, and device WO2021115143A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911283885.XA CN112989220A (en) 2019-12-13 2019-12-13 Motion trajectory processing method, medium, device and equipment
CN201911283885.X 2019-12-13

Publications (1)

Publication Number Publication Date
WO2021115143A1 true WO2021115143A1 (en) 2021-06-17

Family

ID=76329504

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132333 WO2021115143A1 (en) 2019-12-13 2020-11-27 Motion trajectory processing method, medium, apparatus, and device

Country Status (2)

Country Link
CN (1) CN112989220A (en)
WO (1) WO2021115143A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705858A (en) * 2021-08-02 2021-11-26 西安交通大学 Shortest path planning method, system, equipment and storage medium for multi-target area
CN114155391A (en) * 2022-01-30 2022-03-08 浙江口碑网络技术有限公司 Trajectory processing method and device and computer equipment
CN114202561A (en) * 2021-12-03 2022-03-18 广东海聊科技有限公司 Long-distance running motion track abnormity detection method
CN115952364A (en) * 2023-03-07 2023-04-11 之江实验室 Route recommendation method and device, storage medium and electronic equipment
CN116146190A (en) * 2023-02-24 2023-05-23 西南石油大学 Underground leakage or overflow early warning device and method based on bidirectional flow measurement
CN116484309A (en) * 2023-03-09 2023-07-25 重庆市规划和自然资源信息中心 Household registration population data and real estate registration data fusion method
CN117523382A (en) * 2023-07-19 2024-02-06 石河子大学 Abnormal track detection method based on improved GRU neural network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120221237A1 (en) * 2011-02-25 2012-08-30 Dongguk University Industry-Academic Cooperation Foundation Apparatus and method of cell-based path planning for mobile body
CN103838846A (en) * 2014-03-06 2014-06-04 中国科学院软件研究所 Emergency guiding method and emergency guiding system for individual on basis of big data
CN104239556A (en) * 2014-09-25 2014-12-24 西安理工大学 Density clustering-based self-adaptive trajectory prediction method
CN108804539A (en) * 2018-05-08 2018-11-13 山西大学 A kind of track method for detecting abnormality under time and space double-visual angle
CN109000645A (en) * 2018-04-26 2018-12-14 西南电子技术研究所(中国电子科技集团公司第十研究所) Complex environment target classics track extracting method
CN109241138A (en) * 2018-08-30 2019-01-18 跨越速运集团有限公司 A kind of motion track construction method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9251277B2 (en) * 2012-12-07 2016-02-02 International Business Machines Corporation Mining trajectory for spatial temporal analytics
CN107590268A (en) * 2017-09-25 2018-01-16 咪咕互动娱乐有限公司 A kind of moving line recommends method, apparatus and computer-readable recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120221237A1 (en) * 2011-02-25 2012-08-30 Dongguk University Industry-Academic Cooperation Foundation Apparatus and method of cell-based path planning for mobile body
CN103838846A (en) * 2014-03-06 2014-06-04 中国科学院软件研究所 Emergency guiding method and emergency guiding system for individual on basis of big data
CN104239556A (en) * 2014-09-25 2014-12-24 西安理工大学 Density clustering-based self-adaptive trajectory prediction method
CN109000645A (en) * 2018-04-26 2018-12-14 西南电子技术研究所(中国电子科技集团公司第十研究所) Complex environment target classics track extracting method
CN108804539A (en) * 2018-05-08 2018-11-13 山西大学 A kind of track method for detecting abnormality under time and space double-visual angle
CN109241138A (en) * 2018-08-30 2019-01-18 跨越速运集团有限公司 A kind of motion track construction method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705858A (en) * 2021-08-02 2021-11-26 西安交通大学 Shortest path planning method, system, equipment and storage medium for multi-target area
CN113705858B (en) * 2021-08-02 2023-07-11 西安交通大学 Shortest path planning method, system, equipment and storage medium for multiple target areas
CN114202561A (en) * 2021-12-03 2022-03-18 广东海聊科技有限公司 Long-distance running motion track abnormity detection method
CN114155391A (en) * 2022-01-30 2022-03-08 浙江口碑网络技术有限公司 Trajectory processing method and device and computer equipment
CN116146190A (en) * 2023-02-24 2023-05-23 西南石油大学 Underground leakage or overflow early warning device and method based on bidirectional flow measurement
CN115952364A (en) * 2023-03-07 2023-04-11 之江实验室 Route recommendation method and device, storage medium and electronic equipment
CN115952364B (en) * 2023-03-07 2023-05-23 之江实验室 Route recommendation method and device, storage medium and electronic equipment
CN116484309A (en) * 2023-03-09 2023-07-25 重庆市规划和自然资源信息中心 Household registration population data and real estate registration data fusion method
CN116484309B (en) * 2023-03-09 2023-09-29 重庆市规划和自然资源信息中心 Household registration population data and real estate registration data fusion method
CN117523382A (en) * 2023-07-19 2024-02-06 石河子大学 Abnormal track detection method based on improved GRU neural network
CN117523382B (en) * 2023-07-19 2024-06-04 石河子大学 Abnormal track detection method based on improved GRU neural network

Also Published As

Publication number Publication date
CN112989220A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
WO2021115143A1 (en) Motion trajectory processing method, medium, apparatus, and device
Joe et al. Location-based orientation context dependent recommender system for users
Seo et al. Cplanet: Enhancing image geolocalization by combinatorial partitioning of maps
US9280849B2 (en) Augmented reality interface for video tagging and sharing
US9235906B2 (en) Scalable processing for associating geometries with map tiles
CN113406682B (en) Positioning method, positioning device, electronic equipment and storage medium
CN103697882A (en) Geographical three-dimensional space positioning method and geographical three-dimensional space positioning device based on image identification
US8848983B1 (en) System and method for ranking geographic features using viewshed analysis
CN113918837B (en) Method and system for generating city interest point category representation
US20130261961A1 (en) Method for increasing waypoint accuracies for crowd-sourced routes
KR20090018402A (en) Method for providing three dimensional map service and geographic information system
Yan et al. xnet+ sc: Classifying places based on images by incorporating spatial contexts
JP2015132539A (en) Sunshine quantity calculating apparatus, route proposing apparatus, and sunshine quantity calculating method
CN108549649B (en) Rural tourism recommendation method and system based on seasonal characteristics and position characteristics
Wilson et al. Image and object Geo-localization
Zhou et al. Self-supervised saliency estimation for pixel embedding in road detection
CN107766881B (en) Way finding method and device based on basic classifier and storage device
CN113869366B (en) Model training method, relative relationship classifying method, searching method and related device
EP3304001B1 (en) Crowd-sourced interaction of browsing behavior in a 3d map
Gu et al. Deep learning-based image geolocation for travel recommendation via multi-task learning
Mor et al. Enriching walking routes with tourism attractions retrieved from crowdsourced user generated data
Niu The effect of intelligent tour guide system based on attraction positioning and recommendation to improve the experience of tourists visiting scenic spots
CN114372736A (en) Route recommendation method and device, storage medium and electronic equipment
Chai et al. Tourist Street View Navigation and Tourist Positioning Based on Multimodal Wireless Virtual Reality
Ma et al. Multi-source fusion based geo-tagging for web images

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20897906

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20897906

Country of ref document: EP

Kind code of ref document: A1