CN112989220A - Motion trajectory processing method, medium, device and equipment - Google Patents

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

Info

Publication number
CN112989220A
CN112989220A CN201911283885.XA CN201911283885A CN112989220A CN 112989220 A CN112989220 A CN 112989220A CN 201911283885 A CN201911283885 A CN 201911283885A CN 112989220 A CN112989220 A CN 112989220A
Authority
CN
China
Prior art keywords
motion
trajectory
intersections
track
representing
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201911283885.XA
Other languages
Chinese (zh)
Inventor
刘亘轶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911283885.XA priority Critical patent/CN112989220A/en
Priority to PCT/CN2020/132333 priority patent/WO2021115143A1/en
Publication of CN112989220A publication Critical patent/CN112989220A/en
Pending legal-status Critical Current

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

Abstract

The application relates to a motion trail processing method, which comprises the following steps: acquiring a motion trail set, wherein the motion trail set comprises a plurality of motion trails; and determining a movement route element from the set of movement trajectories, wherein the movement route element comprises at least one of a center position and a set of intersections, wherein the center position is shared by the plurality of grids and the set of movement trajectories is contained within a geographic range of the plurality of grids; wherein the intersection set comprises a plurality of intersections associated with a plurality of trajectory segment clusters, wherein each trajectory segment cluster of the plurality of trajectory segment clusters comprises a plurality of trajectory segments of the plurality of motion trajectories, and a spacing between adjacent trajectory segments of the plurality of trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories of the plurality of motion trajectories. In the application, the central positions and/or intersection point sets of a plurality of motion tracks are determined, so that the storage and processing cost of the motion tracks can be reduced, and the processing efficiency of the motion tracks can be improved.

Description

Motion trajectory processing method, medium, device and equipment
Technical Field
One or more embodiments of the present application relate generally to the field of artificial intelligence, and in particular, to a motion trajectory processing method, medium, apparatus, and device.
Background
In the prior art, when a movement route is recommended, a mobile terminal is generally used for collecting a plurality of movement track data of a plurality of users, the movement track data including a plurality of GPS coordinate points are sent to a cloud-side server through a network, and the server directly stores the movement track data as the movement route, or stores the movement track data and the GPS coordinates of a centroid as the movement route by a centroid solving algorithm in a regular track shape. And finally, when other users request the movement route, searching the movement route close to the requesting user from the cloud side database according to the GPS coordinates of the requesting user, and returning the movement route to the requesting user.
Disclosure of Invention
The present application is described below in terms of several aspects, embodiments and advantages of which are mutually referenced.
In a first aspect, an embodiment of the present application provides a motion trajectory processing method, where the method includes: acquiring a motion trail set, wherein the motion trail set comprises a plurality of motion trails; and determining a movement route element from the set of movement trajectories, wherein the movement route element comprises at least one of a center position and a set of intersections, wherein the center position is shared by the plurality of grids and the set of movement trajectories is contained within a geographic range of the plurality of grids; wherein the intersection set comprises a plurality of intersections associated with a plurality of trajectory segment clusters, wherein each trajectory segment cluster of the plurality of trajectory segment clusters comprises a plurality of trajectory segments of the plurality of motion trajectories, and a spacing between adjacent trajectory segments of the plurality of trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different motion trajectories of the plurality of motion trajectories.
According to the embodiment of the application, compared with the method for directly storing and processing the plurality of motion tracks, the storage and processing cost of the motion tracks can be reduced and the processing efficiency of the motion tracks can be improved by clustering a plurality of track segments of the plurality of motion tracks of the user and obtaining a plurality of intersection points related to the plurality of track segment clusters as elements of the running route extracted from the plurality of motion tracks of the user; compared with the method that each grid corresponds to one central position, the method that a plurality of grids share one central position can reduce the storage and processing cost of the motion trail and improve the processing efficiency of the motion trail.
In some embodiments, the movement path element further comprises: a Geohash code corresponding to each of the plurality of grids for indexing the geographic range corresponding to each grid.
According to the embodiment of the present application, by indexing a movement route using a plurality of geohash code values of a grid, the retrieval efficiency of the movement route can be improved.
In some embodiments, the Geohash code includes at least a 7-bit Base32 code character.
In some embodiments, the movement path element further comprises: and an intersection link table indicating a link relationship between each of the plurality of intersections and at least one other of the plurality of intersections.
In some embodiments, the center position includes GPS coordinates of the center position, and each of the plurality of intersection points includes relative coordinates in a relative coordinate system with the center position as an origin.
According to some embodiments of the application, relative coordinate conversion is performed on each intersection point of the movement route by taking the central position as an origin, so that the privacy of a user can be protected, and sensitive data related to the user can be eliminated.
In some embodiments, determining the movement route element from the set of movement trajectories includes: selecting four intersection points of the east, south, west and north from the plurality of intersection points; and determining the geographic range of the grids according to the four intersection points, and determining the central point of the geographic range as the central position.
In some embodiments, determining the movement route element from the set of movement trajectories includes: dividing each motion track in the motion track set into a plurality of track segments; clustering a plurality of track segments with the distance between the adjacent track segments smaller than a preset value into one of a plurality of track segment clusters;
in some embodiments, from a plurality of track segments within each of a plurality of track segment clusters, determining a cluster vector corresponding to each track segment cluster to form a plurality of cluster vectors corresponding to the plurality of track segment clusters; an intersection between adjacent cluster vectors of the plurality of cluster vectors is determined.
In some embodiments, the start coordinate of the cluster vector is an average of the start coordinates of a plurality of track segments within a track segment cluster, and the end coordinate of the cluster vector is an average of the end coordinates of a plurality of track segments within a track segment cluster.
In a second aspect, an embodiment of the present application provides a motion trajectory processing method, where the method includes: acquiring a plurality of current motion track intersections related to a current motion track set and a plurality of historical motion track intersections related to a historical motion track set; and determining whether to retain at least one current motion trajectory intersection point of the plurality of current motion trajectory intersection points and/or at least one historical motion trajectory intersection point of the plurality of historical motion trajectory intersection points based at least in part on an abnormal segment deviation, thereby obtaining an optimized motion route, wherein the abnormal segment deviation specifies at least in part a proportion of abnormal trajectory segments that occur in a plurality of trajectory segments of a plurality of motion trajectories of the current motion trajectory set, wherein the abnormal trajectory segments are beyond a first predetermined value from at least one class center of the plurality of trajectory segments.
According to the embodiment of the application, when the current motion track set and the historical motion track set are fused, the abnormal section deviation of the current motion track set is considered, and the abnormal section deviation is related to the quality of a GPS signal when a plurality of motion tracks in the current motion track set are generated, so that whether at least one current motion track intersection point in a plurality of current motion track intersection points and/or at least one historical motion track intersection point in a plurality of historical motion track intersection points are reserved or not is determined by using the abnormal section deviation of the current motion track set, the fusion error can be controlled more accurately, and the fusion quality can be improved.
In some embodiments, the current set of motion trajectories and the historical set of motion trajectories are contained within the same geographic scope.
In some embodiments, determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections includes determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections using a LSTM (Long short-term memory) model.
In some embodiments, determining whether to retain at least one current motion trajectory intersection of the plurality of current motion trajectory intersections and/or at least one historical motion trajectory intersection of the plurality of historical motion trajectory intersections further comprises: using the LSTM model, a forgetting gate for determining whether to retain at least one historical motion trajectory intersection of the plurality of historical motion trajectory intersections is calculated according to the following formula:
ft=σ(Wf·[ht-1,Xt]+bf)
bf=1+bm
wherein f istRepresenting the forgetting gate of the neuron at the t-th moment of the LSTM model, sigma representing the sigmoid function, WfWeight matrix representing forgetting gate, XtRepresenting the input of neurons at the t-th moment of the LSTM model and comprising a plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising a plurality of historical motion trajectory intersections, [ h [ [ h ]t-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing, bfBias value representing forgetting gate, bmIndicating an anomalous segment deviation.
In some embodiments, determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections further comprises, using the LSTM model, calculating an input gate for determining whether to retain at least one of the plurality of current motion trajectory intersections according to the following formula:
it=σ(Wi·[ht-1,Xt]+bi)
wherein itRepresenting the input gate of the neuron at time t of the LSTM model, σ represents the sigmoid function, WiWeight matrix representing input gates, XtRepresenting the input of the neurons at time t of the LSTM model and comprising a plurality of inputsFront movement locus intersection point, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising a plurality of historical motion trajectory intersections, [ h [ [ h ]t-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing, biIndicating the offset value of the input gate.
In some embodiments, determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections further comprises determining whether to output at least one of the plurality of current motion trajectory intersections and at least one of the plurality of historical motion trajectory intersections using the LSTM model according to the following formula to obtain the optimized motion route:
Figure BDA0002317494020000031
Figure BDA0002317494020000032
ot=σ(Wo·[ht-1,Xt]+bo)
ht=ot·tanh(Ct)
wherein, XtRepresenting the input of neurons at the t-th moment of the LSTM model and comprising a plurality of current motion trajectory intersections, ht-1Represents the output of the neurons at time t-1 of the LSTM model and includes a plurality of historical motion trajectory intersections,
Figure BDA0002317494020000033
representing the input cell state, W, of the neuron at time t of the LSTM modelcWeight matrix representing the input cell state of the neurons at time t of the LSTM model, bcBias value, C, representing the input cell state of neurons at time t of the LSTM modeltRepresenting the t-th moment of the LSTM modelOf the neuron, Ct-1Representing the cellular state of the neurons at time t-1 of the LSTM model, ftForgetting gate, i, representing neurons at time t of the LSTM modeltInput gate of neuron representing t-th time of LSTM model, otOutput gate, W, representing the neuron at time t of the LSTM modeloWeight matrix representing output gates, boRepresents the offset value of the output gate, htRepresents the output of the neurons at time t of the LSTM model and may include a plurality of intersections of the optimized motion path.
In some embodiments, the method further comprises selecting four intersections of the optimized movement path that are the east, south, west, and north most;
and determining a geographical range containing the optimized movement route according to the four intersection points, and determining a central point of the geographical range as the central position of the optimized movement route.
In some embodiments, the method further includes determining a plurality of grids of the geographic region and a geohash code value for the plurality of grids, wherein the plurality of grids share a center location.
According to the embodiment of the application, compared with the method that each grid corresponds to one central position, the grids share one central position, the storage and processing cost of the optimized movement route can be reduced, and the processing efficiency of the optimized movement route is improved; in addition, by indexing the optimized motion course using the geohash code values of the plurality of grids, the retrieval efficiency of the optimized motion course may be improved.
In some embodiments, the central location comprises GPS coordinates of the central location, and each of the plurality of intersections of the optimized movement path comprises relative coordinates in a relative coordinate system with the central location as an origin.
According to the embodiment of the application, the relative coordinate conversion is carried out on each intersection point of the optimized movement route by taking the central position as the origin, so that the privacy of a user can be protected, and sensitive data related to the user can be eliminated.
In some embodiments, the method further comprises: the centers of the plurality of trajectory segments are clustered and at least one class center of the plurality of trajectory segments is obtained.
In a third aspect, an embodiment of the present application provides a method for recommending a movement route, where the method includes: receiving a recommendation request of a user for a movement route; acquiring a GPS (Global Positioning System) coordinate of a user, and calculating a geohash code value of the GPS coordinate of the user; inquiring a grid geohash code value with the minimum difference with the geohash code value of the GPS coordinates of the user from a plurality of grid geohash code values; acquiring a movement route corresponding to a grid geohash code value with the minimum difference with a geohash code value of a GPS coordinate of a user and a central position of the movement route, wherein the central position is shared by a plurality of grids of a geographical range containing the movement route; and recommending a movement route to the user according to the center position.
According to the embodiment of the application, compared with the method that each grid corresponds to one central position, the grids share one central position, the storage and processing cost of the movement route can be reduced, and the processing efficiency of the movement route is improved; in addition, by indexing the motion route using the geohash code values of the plurality of grids, the retrieval efficiency of the motion route can be improved.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon instructions that, when executed on a machine, cause the machine to perform any one of the methods described above.
In a fifth aspect, an embodiment of the present application provides a movement route processing apparatus, including: a processor; a memory having instructions stored thereon that, when executed by the processor, cause the processor to perform any of the methods described above.
In a sixth aspect, an embodiment of the present application provides a motion trajectory processing device, where the device includes a motion trajectory recording module, configured to obtain a motion trajectory set, where the motion trajectory set includes multiple motion trajectories; and a motion route extraction module for determining a motion route element from the set of motion trajectories, wherein the motion route element comprises at least one of a center position and a set of intersections, wherein the center position is shared by the plurality of grids and the set of motion trajectories is contained within a geographic range of the plurality of grids; and wherein the set of intersections includes a plurality of intersections associated with a plurality of track segment clusters, wherein each of the plurality of track segment clusters includes a plurality of track segments of the plurality of motion tracks, and a spacing between adjacent ones of the plurality of track segments is less than a predetermined value, wherein the adjacent track segments respectively belong to different ones of the plurality of motion tracks.
According to the embodiment of the application, compared with the method for directly storing and processing the plurality of motion tracks, the storage and processing cost of the motion tracks can be reduced and the processing efficiency of the motion tracks can be improved by clustering a plurality of track segments of the plurality of motion tracks of the user and obtaining a plurality of intersection points related to the plurality of track segment clusters as the elements of the plurality of motion tracks of the user; compared with the method that each grid corresponds to one central position, the method that a plurality of grids share one central position can reduce the storage and processing cost of the motion trail and improve the processing efficiency of the motion trail.
In some embodiments, the movement path element further comprises: a Geohash code corresponding to each of the plurality of grids for indexing the geographic range corresponding to each grid.
According to the embodiment of the present application, by indexing a movement route using a plurality of geohash code values of a grid, the retrieval efficiency of the movement route can be improved.
In some embodiments, the Geohash code includes at least a 7-bit Base32 code character.
In some embodiments, the movement path element further comprises: and an intersection link table indicating a link relationship between each of the plurality of intersections and at least one other of the plurality of intersections.
In some embodiments, the movement route extraction module is further configured to determine relative coordinates of each of the plurality of intersection points in a relative coordinate system with the center position as an origin.
According to some embodiments of the application, relative coordinate conversion is performed on each intersection point of the movement route by taking the central position as an origin, so that the privacy of a user can be protected, and sensitive data related to the user can be eliminated.
In some embodiments, the motion route extraction module is configured to determine the motion route element from the set of motion trajectories, including being configured to: selecting four intersection points of the east, south, west and north from the plurality of intersection points; and determining the geographic range of the grids according to the four intersection points, and determining the central point of the geographic range as the central position.
In some embodiments, the motion route extraction module is configured to determine the motion route element from the set of motion trajectories, including being configured to: dividing each motion track in the motion track set into a plurality of track segments; clustering a plurality of track segments with the distance between the adjacent track segments smaller than a preset value into one of a plurality of track segment clusters; determining a cluster vector corresponding to each track segment cluster to form a plurality of cluster vectors corresponding to the plurality of track segment clusters based on a plurality of track segments within each of the plurality of track clusters; an intersection between adjacent cluster vectors of the plurality of cluster vectors is determined.
In some embodiments, the start coordinate of the cluster vector is an average of the start coordinates of a plurality of track segments within a track segment cluster, and the end coordinate of the cluster vector is an average of the end coordinates of a plurality of track segments within a track segment cluster.
In a seventh aspect, an embodiment of the present application provides a motion trajectory processing apparatus, including: the motion route extraction module is used for acquiring a plurality of current motion track intersections related to the current motion track set and a plurality of historical motion track intersections related to the historical motion track set; and a motion route optimization module that determines whether to retain at least one current motion trajectory intersection of the plurality of current motion trajectory intersections and/or at least one historical motion trajectory intersection of the plurality of historical motion trajectory intersections based at least in part on the abnormal section deviation, thereby obtaining an optimized motion route; wherein the abnormal segment deviation at least partially specifies a proportion of abnormal track segments occurring in a plurality of track segments of a plurality of motion tracks of the current motion track set, wherein the abnormal track segments exceed a first predetermined value from at least one class center of the plurality of track segments.
According to the embodiment of the application, when the current motion track set and the historical motion track set are fused, the abnormal section deviation of the current motion track set is considered, and the abnormal section deviation is related to the quality of a GPS signal when a plurality of motion tracks in the current motion track set are generated, so that whether a plurality of historical motion track intersection points are discarded or not is determined by using the abnormal section deviation of the current motion track set, the fusion error can be controlled more accurately, and the fusion quality can be improved.
In some embodiments, the current set of motion trajectories and the historical set of motion trajectories are contained within the same geographic scope.
In some embodiments, the motion route optimization module is configured to determine whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections, including using a LSTM (Long short-term memory) model to determine whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections.
In some embodiments, the motion route optimization module is configured to determine whether to retain at least one current motion trajectory intersection point of the plurality of current motion trajectory intersection points and/or at least one historical motion trajectory intersection point of the plurality of historical motion trajectory intersection points, and further comprises: using the LSTM model, a forgetting gate for determining whether to retain at least one historical motion trajectory intersection of the plurality of historical motion trajectory intersections is calculated according to the following formula:
ft=σ(Wf·[ht-1,Xt]+bf)
bf=1+bm
wherein f istRepresenting the forgetting gate of the neuron at the t-th moment of the LSTM model, sigma representing the sigmoid function, WfWeight matrix representing forgetting gate, XtRepresenting the input of neurons at the t-th moment of the LSTM model and comprising a plurality of current motion trajectory intersections, ht-1Representing LSTM modelsAnd includes a plurality of historical motion trajectory intersections, [ h ] of the neuron at the t-1 th time pointt-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing, bfBias value representing forgetting gate, bmIndicating an anomalous segment deviation.
In some embodiments, the motion route optimization module is configured to determine whether to retain at least one current motion trajectory intersection point of the plurality of current motion trajectory intersection points and/or at least one historical motion trajectory intersection point of the plurality of historical motion trajectory intersection points, and further comprises: using the LSTM model, an input gate for determining whether to retain at least one of the plurality of current motion trajectory intersections is calculated according to the following formula:
it=σ(Wi·[ht-1,Xt]+bi)
wherein itRepresenting the input gate of the neuron at time t of the LSTM model, σ represents the sigmoid function, WiWeight matrix representing input gates, XtRepresenting the input of neurons at the t-th moment of the LSTM model and comprising a plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising a plurality of historical motion trajectory intersections, [ h [ [ h ]t-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing, biIndicating the offset value of the input gate.
In some embodiments, the motion route optimization module is configured to determine whether to retain at least one current motion trajectory intersection point of the plurality of current motion trajectory intersection points and/or at least one historical motion trajectory intersection point of the plurality of historical motion trajectory intersection points, and further comprises: determining whether to output at least one current motion track intersection point of a plurality of current motion track intersection points and at least one historical motion track intersection point of a plurality of historical motion track intersection points according to the following formula by using an LSTM model, thereby obtaining an optimized motion route:
Figure BDA0002317494020000061
Figure BDA0002317494020000062
ot=σ(Wo·[ht-1,Xt]+bo)
ht=ot·tanh(Ct)
wherein, XtRepresenting the input of neurons at the t-th moment of the LSTM model and comprising a plurality of current motion trajectory intersections, ht-1Represents the output of the neurons at time t-1 of the LSTM model and includes a plurality of historical motion trajectory intersections,
Figure BDA0002317494020000071
representing the input cell state, W, of the neuron at time t of the LSTM modelcWeight matrix representing the input cell state of the neurons at time t of the LSTM model, bcBias value, C, representing the input cell state of neurons at time t of the LSTM modeltRepresenting the cellular state of the neurons at time t, C, of the LSTM modelt-1Representing the cellular state of the neurons at time t-1 of the LSTM model, ftForgetting gate, i, representing neurons at time t of the LSTM modeltInput gate of neuron representing t-th time of LSTM model, otOutput gate, W, representing the neuron at time t of the LSTM modeloWeight matrix representing output gates, boRepresents the offset value of the output gate, htRepresents the output of the neurons at time t of the LSTM model and may include a plurality of intersections of the optimized motion path.
In some embodiments, the movement route extraction module is further configured to select four intersections of the most eastern, south-most, west-most, and north-most from the plurality of intersections of the optimized movement route; and determining a geographical range containing the movement route according to the four intersection points, and determining a central point of the geographical range as the central position of the optimized movement route.
In some embodiments, the motion route extraction module is further configured to determine a plurality of grids of the geographic area and a geohash code value for the plurality of grids, wherein the plurality of grids share the center position.
According to the embodiment of the application, compared with the method that each grid corresponds to one central position, the grids share one central position, the storage and processing cost of the movement route can be reduced, and the processing efficiency of the movement route is improved; in addition, by indexing the motion route using the geohash code values of the plurality of grids, the retrieval efficiency of the motion route can be improved.
In some embodiments, the movement route extraction module is further configured to determine relative coordinates of each of the plurality of intersection points of the optimized movement route in a relative coordinate system with the center position as an origin.
According to the embodiment of the application, the relative coordinate conversion is carried out on each intersection point of the movement route by taking the central position as the origin, so that the privacy of a user can be protected, and sensitive data related to the user can be eliminated.
In some embodiments, the movement route extraction module is further to:
the centers of the plurality of trajectory segments are clustered and at least one class center of the plurality of trajectory segments is obtained.
Drawings
Fig. 1 is a schematic diagram illustrating a scene in which a motion trail of a user is recorded by 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 is a diagram illustrating track segmentation and clustering during motion route extraction according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a doubly linked list of intersections of movement routes in accordance with an embodiment of the present application;
FIG. 5 illustrates a schematic diagram of a geohash encoding of a movement path according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a model of a long term memory network according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a method for extracting a movement route according to an embodiment of the present application;
FIG. 8 is a flow chart diagram illustrating a method for optimizing a movement path according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a method for recommending a movement route according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a movement route processing device according to an embodiment of the present application.
Detailed Description
The present application is further described with reference to the following detailed description and the accompanying drawings. The specific embodiments described herein are merely illustrative of the present application and are not intended to be limiting of the present application. In addition, for convenience of description, only a part of structures or processes related to the present application, not all of them, is illustrated in the drawings. It should be noted that in this specification, like reference numerals and letters refer to like items in the following drawings, and thus, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.
Fig. 1 illustrates a schematic view of a scene of recording a motion trajectory of a user through a terminal device according to an embodiment of the present application, where the terminal device, such as the terminal device 100 in fig. 2, may include, but is not limited to, a portable or mobile device, a mobile phone, a personal digital assistant, a cellular phone, a handheld PC, a portable media player, a handheld device, a wearable device (e.g., a watch, a bracelet, display glasses or goggles, a head-mounted display, a head-mounted device), a navigation device, a server, a network device, a graphics device, a video game device, a set-top box, a laptop device, a virtual reality and/or augmented reality device, an internet of things device, an industrial control device, an in-vehicle infotainment device, a streaming media client device, an electronic book, a reading device, a POS machine, and other devices. As shown in fig. 1, during a user's motion (e.g., without limitation, running, fast walking, etc.) along a sports field (e.g., without limitation, a playground, a park, a cell, a square, a road, or other field), a terminal device, such as the terminal device 100 in fig. 2, may determine GPS (global positioning system) coordinates of the user from received satellite signals in real time, thereby recording the user's motion trajectory in real time.
Fig. 2 shows a schematic structural diagram of the terminal device 100 according to an embodiment of the present application, and as shown in fig. 2, the terminal device 100 may include, but is not limited to, a GPS positioning module 110, a movement track recording module 120, a data center 130, a movement route extracting module 140, a movement route optimizing module 150, and a movement route recommending module 160. One or more components of the terminal device 100 (e.g., one or more of the GPS location module 110, the motion trajectory recording module 120, the data center 130, the motion route extraction module 140, the motion route optimization module 150, and the motion route recommendation module 160) may be comprised of, inter alia, any combination of Application Specific Integrated Circuits (ASICs), electronic circuits, processors (shared, dedicated, or group) and/or memory that execute one or more software or firmware programs, combinational logic circuits, or other suitable components that provide the described functionality. According to one aspect, the processor may be a microprocessor, a digital signal processor, a microcontroller, or the like, and/or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, the like, and/or any combination thereof.
It should be noted that, although fig. 2 shows that the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 are all located on the terminal device 100 on the user side, one or more of the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 may be located on other devices, such as, but not limited to, a cloud-side server, and therefore, in the embodiments of the present application, the terminal device 100, the cloud-side server, and the like are collectively referred to as a movement track processing device. In addition, although fig. 2 shows that the movement trace recording module 120 and the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 are independent modules, one or more of the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 may be a part of the movement trace recording module 120.
According to some embodiments of the present application, the GPS positioning module 110 is configured to determine GPS coordinates of the user (or the terminal device 100) according to received satellite signals, and the movement track recording module 120 is configured to record a movement track of the user during movement of the user, specifically, the movement APP may obtain the GPS coordinates of the user from the GPS positioning module 110 at a certain frequency (i.e., a dotting frequency), and the GPS coordinates and a corresponding time will form a track point, and a movement track may include a plurality of track points.
According to some embodiments of the present application, the motion profile recorded by the motion profile recording module 120 may be stored in a data center 130, which data center 130 may include, but is not limited to, a non-transitory tangible arrangement of articles manufactured or formed by machines or devices that includes a storage medium, such as a hard disk or any other type of disk including floppy disks, optical disks, compact disk read-only memories (CD-ROMs), compact disk rewritables (CD-RWs), 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 cards; or any other type of media suitable for storing data.
According to some embodiments of the present application, the athletic route extraction module 140 is configured to extract a simplified athletic route from a plurality of athletic trajectories recorded by the athletic trajectory recording module 120 that are generated by the user within the same geographic area (e.g., the same athletic field) over a period of time (e.g., one day, three days, one week, two weeks, one month, or other time period) according to the athletic route model. Examples of the plurality of motion trajectories include, but are not limited to, motion trajectories generated by the user at today, yesterday, and the previous day, or a plurality of motion trajectories obtained by dividing a motion trajectory generated by the user in one motion, for example, a plurality of motion trajectories obtained by dividing a motion trajectory generated by the user running a plurality of turns along a motion field by each turn. Wherein the movement route model may include, but is not limited to, a set of a plurality of intersection points constituting the movement route, the set of intersection points including a plurality of intersection points associated with a plurality of track segment clusters, wherein each track segment cluster of the plurality of track segment clusters includes a plurality of track segments of the movement route, and a spacing between adjacent track segments of the plurality of track segments is less than a predetermined value, wherein the adjacent track segments respectively belong to different running tracks of the plurality of running tracks.
According to some embodiments of the present application, the athletic route optimization module 150 is configured to merge intersections of a current athletic route and at least one historical athletic route within the same geographic area (e.g., the same athletic field) based on the recurrent neural network 151 to obtain an optimized athletic route within the geographic area, and store the optimized athletic route as a default athletic route within the geographic area in the data center 130. Wherein, the current movement route refers to a movement route extracted from a current movement track set generated by the user within a current time period (e.g., one day, three days, one week, two weeks, one month or other time periods) through the movement route extraction module 140, and each historical movement route of the at least one historical movement route refers to a movement route extracted from a historical movement track set generated by the user within a historical time period (e.g., one day, three days, one week, two weeks, one month or other time periods) before the current time period through the movement route extraction module 140. Where the recurrent neural network 151 is a deep learning network with memory, the output of a neuron of the recurrent neural network 151 is not only related to the input of the neuron, but also related to the output of the previous neuron, examples of the recurrent neural network 151 may include, but are not limited to, LSTM (long-short-term memory) networks and GRU (gated recurrent unit) networks, and in one example, each neuron of the recurrent neural network 151 may be related to a motion path at different time instants. Wherein the merging includes determining, using the recurrent neural network 151, which intersections of the current movement route and each of the historical movement routes can be retained to constitute the optimized movement route, and thus the optimized movement route includes the current movement route and one or more intersections of each of the historical movement routes. The generation user of the current movement route and the generation user of each historical movement route may be the same or different, and in different cases, the terminal device 100 may obtain the movement routes of other users in the same geographic range from the server through a network, for example.
According to some embodiments of the present application, the movement route recommending module 160 is configured to receive a request for recommending a movement route from a user, obtain GPS coordinates of the user, and recommend a movement route similar to the user according to the GPS coordinates of the user.
The functions of the movement route extraction module 140, the movement route optimization module 150, and the movement route recommendation module 160 of the terminal device 100 will be further described below with reference to fig. 2.
As shown in fig. 2, the movement 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. Wherein one or more components of the movement route extraction module 140 (e.g., one or more of the trajectory segmentation unit 141, the trajectory clustering unit 142, the trajectory extraction unit 143, and the model element determination unit 144) may be comprised of any combination of Application Specific Integrated Circuits (ASICs), electronic circuits, processors (shared, dedicated, or group) and/or memory that execute one or more software or firmware programs, combinational logic circuits, or other suitable components that provide the described functionality. According to one aspect, the processor may be a microprocessor, a digital signal processor, a microcontroller, or the like, and/or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, the like, and/or any combination thereof.
According to some embodiments of the present application, the trajectory segmentation unit 141 may be configured to acquire a plurality of motion trajectories recorded by the motion trajectory recording module 120 from the data center 130 and segment each motion trajectory into a plurality of trajectory segments.
In particular, each motion trajectory may be represented as
Figure BDA0002317494020000101
Wherein, TRmRepresents the mth motion track, nmIndicating the number of trace points included in the mth motion trace,
Figure BDA0002317494020000102
an ith track point representing the mth motion track,
Figure BDA0002317494020000103
the GPS coordinates of the ith trajectory point representing the mth motion trajectory,
Figure BDA0002317494020000104
and the time corresponding to the GPS coordinate of the ith track point of the mth motion track is shown.
For each motion trajectory, the trajectory segmentation unit 141 may represent two trajectory points that are adjacent in time as one trajectory segment whose direction is directed from a trajectory point that is earlier in time (i.e., the start trajectory point) to a trajectory point that is later in time (i.e., the end trajectory point), and whose size is the distance between the two trajectory points. FIG. 3 shows 3 motion trajectories TR1~TR3It should be noted that only the motion trajectory TR is shown in the figure1~TR3Wherein each motion trajectory is divided into a plurality of trajectory segments.
According to some embodiments of the present application, the trajectory clustering unit 142 may sequentially cluster trajectory segments of each motion trajectory into a plurality of trajectory segment clusters, wherein within one trajectory segment cluster, a distance between adjacent trajectory segments is smaller than a predetermined value, wherein the adjacent trajectory segments respectively belong to different running trajectories of the plurality of running trajectories. As an example, two track segments are denoted as tsiAnd tsjWherein the track segment tsiStarting point of (1) is siEnd point is eiTrack segment tsjStarting point of (1) is sjEnd point is ejThen the track segment ts can be calculated based on the following formulaiAnd tsjThe spacing therebetween:
Figure BDA0002317494020000105
d||=MIN(l||1,l||2) Equation 3
Figure BDA0002317494020000106
Wherein l⊥1Representing track segments tsjS starting point ofjTo the track section tsiPerpendicular distance of l⊥2Representing track segments tsjEnd point e ofjTo the track section tsiPerpendicular distance of l||1Representing track segments tsiS starting point ofiTo the track section tsjS starting point ofjIn the track section tsiDistance of projected point on, l||2Representing track segments tsiEnd point e ofiTo the track section tsjEnd point e ofjIn the track section tsiD represents the trajectory segment tsiAnd tsjThe spacing therebetween.
For example, in the example shown in fig. 3, the trajectory clustering unit 142 of fig. 2 may first determine a first trajectory segment cluster and a reference trajectory segment of the first trajectory segment cluster, and the trajectory clustering unit 142 of fig. 2 will determine, among trajectory segments of respective motion trajectories, trajectory segments that can be clustered with the reference trajectory segment. In one example, the track clustering unit 142 of FIG. 2 may determine a reference track segment of the first track segment cluster as TR1And determining that TR can be matched with the track segment P11 in other track segments1The track segment P11, in particular, the track clustering unit 142 of fig. 2 may first determine the track TR of the motion2~TR3Middle, track segments P31 and P32 and TR1Is less than a predetermined value and thus may be referred to as TR1Track segment P11 and the track segment adjacent to TR1Track segment P11 cluster; the trajectory clustering unit 142 of FIG. 2 may continue to determine TR2Track segments P21 and TR3Is smaller than a predetermined value and can therefore be taken as the sum of TR and P31 and P323And the track segments adjacent to the track segments P31 and P32 are TR3P31 and P32, then finally the track clustering unit 142 may cluster the TR1Track segments P11, TR3Track segments P31 and P32 and TR2Is clustered into a first track segment cluster.
In another example, the track clustering unit 142 of fig. 2 may determine a reference track segment of the first track segment cluster as TR3And can be surely matched with TR in other track segments3The track segment P31, in particular, the track clustering unit 142 may determine TR1Track segments P11 and TR2Track segments P21 and TR3Is less than a predetermined value, and thus TR can be set1Track segments P11 and TR2As and TR, the track segment P213Track segment P31 and the track segment adjacent to TR3Is clustered into a first track segment cluster. It should be noted that the track clustering unit 142 in fig. 2 may also determine other track segments as the reference track segment of the first track segment cluster.
The track clustering unit 142 may then determine a second track segment cluster and a reference track segment for the second track segment cluster. In one example, the track clustering unit 142 of FIG. 2 may determine a reference track segment of a second track segment cluster as TR1And determining that TR can be matched with the track segment P12 in other track segments1The track segment P12 cluster, in particular, the track clustering unit 142 of FIG. 2 may determine TR3Track segments P33 and TR1Is less than a predetermined value and thus may be referred to as TR1Track segment P12 and the track segment adjacent to TR1P12 cluster, and TR2Track segments P22 and TR3Is less than a predetermined value and thus may be referred to as TR3Track segment P33 and the track segment adjacent to TR3P33, then finally, the track clustering unit 142 may cluster the TRs1Track segments P12, TR3Track segments P33 and TR2Is clustered into a second track segment cluster. It should be noted that the track clustering unit 142 of fig. 2 may also determine other track segments as the reference track segment of the second track segment cluster.
By analogy, the trajectory clustering unit 142 of fig. 2 may determine other trajectory segment clusters of the motion trajectory. It should be noted that for a motion trajectory different from that shown in fig. 3, each trajectory segment cluster of the motion trajectory may be determined in a similar principle as described above.
According to some embodiments of the present application, for each track segment cluster, the track decimation unit 143 can calculate a cluster vector based on the individual track segments within the cluster. As an example, the trajectory extraction unit 143 may use the mean of the GPS coordinates of the start trace point of each trajectory segment within the trajectory segment cluster as the GPS coordinate of the start point of the cluster vector, and use the mean of the GPS coordinates of the end trace point of each trajectory segment as the GPS coordinate of the end point of the cluster vector. As another example, the track decimation unit 143 may use any one track segment within a track segment cluster as a cluster vector. It should be noted that the cluster vector may also be determined based on any other suitable manner.
According to some embodiments of the present application, the trajectory clustering unit 142 is further configured to determine abnormal trajectory segments and determine the proportion of the abnormal trajectory segments in all trajectory segments, i.e., abnormal segment deviations. Specifically, the trajectory clustering unit 142 may cluster the center points of each trajectory segment of the multiple running trajectories by using a hierarchical clustering algorithm, a K-means clustering algorithm, or another clustering algorithm, and obtain categories of the center points of the multiple trajectory segments and class centers of the categories, and the trajectory clustering unit 142 may calculate distances between the center points of each trajectory segment of the multiple running trajectories and the class centers, and mark a trajectory segment whose minimum distance between the center point and the class centers is greater than a predetermined value (the predetermined value is the same as or different from the predetermined value related to the distance between the trajectory segments) as an abnormal trajectory segment. For example, in the example of FIG. 3, TR1Track segments P15 and TR3Track segment P35 of (a) may be marked as an abnormal track segment. In some cases, a higher outlier bias may indicate a poor quality GPS signal during motion.
According to some embodiments of the present application, the model element determination unit 144 may be configured to determine the model elements of the simplified movement route extracted from the movement trajectory according to the movement route model. In particular, the motion path model may include a set of intersections of neighboring cluster vectors of neighboring trajectory segment clusters. As an example, in the case where adjacent cluster vectors of adjacent track segment clusters do not end-to-end, the model element determination unit 144 may extend one or both of the adjacent cluster vectors to determine GPS coordinates of an intersection between the adjacent cluster vectors; in the case where adjacent cluster vectors have intersected, the model element determination unit 144 may directly determine the GPS coordinates of the intersection between the adjacent cluster vectors. The movement route model may further include a start point of the movement route, and an end point of the movement route. The model element determination unit 144 may take the start point of the cluster vector of the first track segment cluster of the motion track as the start point of the motion route and the end point of the cluster vector of the last track segment cluster as the end point of the motion route. The movement route model may further include an intersection link table indicating a link relationship between each intersection and at least one other intersection in an intersection set of the cluster vectors, wherein the intersection set includes a start point and an end point of the movement route. As an example, the model element determining unit 144 may determine a doubly linked list between the intersection points as shown in fig. 4, wherein the starting point may be a starting point of the motion route, the intersection point 1 may be an intersection point between a cluster vector of a first track segment cluster and a cluster vector of a second track segment cluster of the motion track, the intersection point 2 may be an intersection point between a cluster vector of a second track segment cluster and a cluster vector of a third track segment cluster of the motion track, and so on, and the ending point may be an ending point of the motion route. In addition, each intersection shown in FIG. 4 may include the GPS coordinates of the intersection, a link (e.g., without limitation, a pointer) to a previous intersection, and a link (e.g., without limitation, a pointer) to a subsequent intersection, while the start point may include the GPS coordinates of the start point, a link (e.g., without limitation, a pointer) to a subsequent intersection, and the end point may include the GPS coordinates of the end point, a link (e.g., without limitation, a pointer) to a previous intersection. The doubly linked list shown in fig. 4 enables a user to move in a forward direction of the movement path (e.g., from the start point shown in fig. 4 to the end point shown in fig. 4) and also in a reverse direction of the movement path (e.g., from the end point shown in fig. 4 to the start point shown in fig. 4). It should be noted that the model element determining unit 144 may also determine a singly linked list between the intersections, i.e., each intersection shown in fig. 4 may include the GPS coordinates of the intersection, a link (e.g., without limitation, a pointer) to a previous intersection, or a link (e.g., without limitation, a pointer) to a subsequent intersection.
In order to improve the retrieval efficiency of the movement route when the movement route is recommended to the user, the movement route model may further include an index of the movement route, that is, a geohash code value of a plurality of grids representing a geographical range in which the movement route is located, wherein the geohash code is an address code that can encode two-dimensional longitude and latitude coordinates into a one-dimensional character string, for example, a base32 code character string, so as to improve the retrieval efficiency of the geographical position. Fig. 5 illustrates four grids representing a geographical range in which the movement route is located and a geohash code value thereof, and as shown in the drawing, the model element determination unit 144 may determine a minimum circumscribed rectangle of the movement route, wherein two sides of the minimum circumscribed rectangle are parallel to the latitude lines and are determined by latitude coordinates of the most south and most north intersections in the intersection set of the movement route, and the other two sides are parallel to the longitude lines and are determined by longitude coordinates of the most east and most west intersections in the intersection set of the movement route, and the model element determination unit 144 may take a center point of the minimum circumscribed rectangle of the movement route as a center position of the movement route, for example, the GPS coordinates of the center position of the movement route shown in the drawing are (121.623, 29.855).
As shown in fig. 5, the model element determining unit 144 of fig. 2 may equally divide the minimum bounding rectangle of the motion route into four grids centering on the center position, and determine a geohash code value corresponding to the geographical range of each grid, wherein the number of bits of the geohash code value may be, for example, but not limited to, 7-bit base32 codes, for example, as shown in fig. 5, the code values of the four grids are wx4g340, wx4g341, wx4g342, and wx4g343, respectively.
It should be noted that fig. 5 is only one example of the grid representing the geographical range where the movement route is located, the movement route formed by the respective intersection points is not limited to the movement route shown in fig. 5, and the GPS coordinate of the center position is not limited to the GPS coordinate shown in the figure.
In addition, in order to protect the privacy of the user, the movement route model may further include GPS coordinates of a center position of the movement route, and coordinates of respective intersections of the movement route are relative coordinates with respect to the center position. As an example, the model element determination unit 144 may construct a relative coordinate system with the above-described central position as an origin, convert absolute GPS coordinates (e.g., longitude and latitude) of each intersection of the movement route into relative coordinates in the relative coordinate system, and thus may eliminate sensitive data related to the user.
The model element determination unit 144 may also save the respective elements of the simplified movement route extracted from the movement locus determined according to the movement route model in the data center 130 as candidate movement routes to be recommended to the user.
According to some embodiments of the present application, in order to further improve the quality of the movement route recommended to the user, the movement route optimization module 150 may merge the intersection points of the current movement route and at least one historical movement route within the same geographic range (e.g., the same sports field) based on the recurrent neural network 151 to obtain an optimized movement route within the geographic range. Specifically, the recurrent neural network 151 is an 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 model diagram of the LSTM network, and as shown in fig. 6, the LSTM network may include a plurality of neurons a1~AtEach neuron being associated with a movement path, e.g. neuron A1Neuron A, related to the movement path at the initial momentt-1Neuron A associated with the movement path at time t-1tThe movement route from the t-th time (e.g. current)Movement routes) are associated, and the respective neurons are arranged in order according to the generation time of the respective movement routes (e.g., the time at which the movement route extraction module 140 extracts the movement route from the movement track set, or the time at which the movement route extraction module 140 stores the extracted movement route in the data center 130). In LSTM networks, the fusion of the intersections of the movement paths is performed gradually over time.
As shown in FIG. 6, each neuron includes an input and an output, as neuron AtAnd neuron At-1For example, XtRepresents neuron AtIncluding with neuron AtSet of intersections of the relevant movement route (e.g. current movement route), htRepresents neuron AtIncluding the output of neuron AtSet of intersections, X, of the determined optimized movement patht-1Represents neuron At-1Including with neuron At-1Set of intersections of related movement routes (e.g., a historical movement route prior to the current movement route), ht-1Represents neuron At-1Including the output of neuron At-1And determining an intersection set of the optimized motion routes. In addition, a neuron at a previous time may transmit its cell state and output to a neuron at a next time, wherein the cell state, i.e., the memory of the LSTM network, the cell state transmitted to one neuron may include a set of intersections of a plurality of movement routes associated with each neuron before the neuron, and the cell state transmitted to a next neuron by one neuron may include a set of intersections of a plurality of movement routes associated with the neuron and each neuron before the neuron. For example, neuron At-1Can be directed to neuron AtTransfer neuron At-1Output h oft-1And cell state Ct-1. Thus, the output and cellular state of each neuron is related not only to the input of that neuron, but also to the output and cellular state of the previous neuron, e.g., neuron At-1Output h oft-1I.e. by neuron At-1The determined set of intersections of the optimized movement path will include the 1 st time toOne or more intersections of the historical movement path at time t-1, neuron AtOutput h oftI.e. by neuron AtThe determined intersection set of the optimized movement route may include one or more intersections of the historical movement route from the 1 st time point to the t-1 st time point and the current movement route at the t time point.
The output and cell state of each neuron of the LSTM network is controlled by a forgetting gate, an input gate, and an output gate, as shown in fig. 6, with neuron atAs an example, forget door ftDetermining the slave neuron At-1Cell state C oft-1Which intersections are discarded, input gate itDetermining to neuron At-1Cell state C oft-1Which cross points are added in, the output gate otDetermining the slave neuron AtCell state C oftWhich intersections to obtain an output ht. Wherein, forget the door ftThe calculation formula of (a) is as follows:
ft=σ(Wf·[ht-1,Xt]+bf) Equation 5
bf=1+bmEquation 6
Wherein σ represents a sigmoid function; wfA weight matrix representing a forgetting gate; [ h ] oft-1,Xt]Denotes a reaction oft-1And XtSplicing to form a long vector; bfA bias value representing a forgetting gate; bmB representing the abnormal segment deviation calculated when determining the model elements of the current movement path, and b of each of the other neuronsmRepresenting the outlier bias calculated when determining the model elements of the historical motion path associated with each neuron.
Neuron AtInput gate itIs calculated as follows
it=σ(Wi·[ht-1,Xt]+bi) Equation 7
Wherein σ represents a sigmoid function; wiA weight matrix representing the input gate; [ h ] oft-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing;biIndicating the offset value of the input gate.
In neuron AtIn, can pass through forget door ftAnd an input gate itObtaining neuron AtCell state C oftThe specific calculation formula is as follows:
Figure BDA0002317494020000141
Figure BDA0002317494020000142
wherein the content of the first and second substances,
Figure BDA0002317494020000143
representing the status of the input cell; wcA weight matrix representing the state of the input cells; bcA bias value representing a state of the input cell;
Figure BDA0002317494020000144
representation input gate itControl of
Figure BDA0002317494020000145
Which intersections of C will be updated to CtPerforming the following steps; f. oft·Ct-1Door f for indicating forgettingtControl of neuron At-1Cell state C oft-1Which intersections in (b) will be discarded, the higher the value of bm, the worse the GPS signal quality representing the current course of motion, and neuron at-1Cell state C oft-1Middle passing forgetting door ftThe fewer intersections will be discarded.
Neuron AtOutput gate otThe calculation formula of (a) is as follows:
ot=σ(Wo·[ht-1,Xt]+bo) Equation 10
Wherein, WoA weight matrix representing the output gates; boRepresenting the offset value of the output gate.
In neuron AtCan be via an output gate otControl of cell State CtWhich intersections of which are to be output to obtain an output htThe specific calculation formula is as follows:
ht=ot·tanh(Ct) Equation 11
It should be noted that, although the LSTM network is taken as an example in fig. 6 to describe the fusion of the intersection points of the current movement route and each historical movement route, the movement route optimization module 150 of fig. 2 may use the GRU network to implement the fusion of the intersection points of the current movement route and each historical movement route based on a similar principle.
Returning to fig. 2, the model element determination unit 144 may also be configured to determine the neuron a according to the movement path modeltAnd outputting model elements for optimizing the movement route. Specifically, the model element determination unit 144 may determine that neuron a is presenttAnd an intersection point link table for linking relationships between each intersection point and at least one other intersection point in the output intersection point set of the optimized movement route, such as, but not limited to, a doubly linked list between the intersection points as shown in fig. 4. Since the movement route optimization module 150 fuses the intersection points of the current movement route and the at least one historical movement route, the link relationship between the original intersection points of the movement routes is broken, and the model element determination unit 144 can determine the model element from the neuron atSelecting one intersection point from the output intersection point set of the optimized movement route as a starting point of the optimized movement route, calculating the distance (such as, but not limited to, the Euclidean distance between two points) between the remaining intersection points and the starting point, determining an intersection point closest to the starting point as a second intersection point of the optimized movement route, then determining an intersection point closest to the second intersection point from the remaining intersection points as a third intersection point of the optimized movement route, and so on until the last intersection point is determined as an end point of the optimized movement route. In neuron AtIn the output intersection link table of the optimized movement route, each intersection other than the start point and the end point may include the GPS coordinates of the intersection, a link (for example, but not limited to, a pointer) to a previous intersection, and a link (for example, a pointer) to a next intersectionBut not limited to, a pointer), and the start point may include the GPS coordinates of the start point, a link to a subsequent intersection point (e.g., but not limited to, a pointer), and the end point may include the GPS coordinates of the end point, a link to a previous intersection point (e.g., but not limited to, a pointer).
The model element determination unit 144 may also determine that the characterization is by neuron atAnd outputting the geohash coding values of a plurality of grids of the geographical range where the optimized motion route is located. Specifically, the model element determination unit 144 may determine that the neuron a is a neurontThe minimum bounding rectangle of the outputted optimized movement route, wherein two sides of the minimum bounding rectangle are parallel to the latitude line and are determined by latitude coordinates of the most south and most north intersections in the set of intersections of the optimized movement route, and the other two sides are parallel to the longitude line and are determined by longitude coordinates of the most east and most west intersections in the set of intersections of the optimized movement route, the model element determining unit 144 may regard the center point of the minimum bounding rectangle of the optimized movement route as the minimum bounding rectangle by the neuron atAnd outputting the central position of the optimized movement route.
The model element determination unit 144 may be configured to determine the model element from the neuron atAnd taking the center position of the output optimized motion route as the center, equally dividing the minimum circumscribed rectangle of the optimized motion route into four grids, and then determining the geohash code value corresponding to the geographic range of each grid.
The model element determination unit 144 may also be configured to determine the model element from neuron atThe central position of the output optimized motion route is taken as an origin, a relative coordinate system is constructed, and a neuron A is used for calculating the central position of the output optimized motion routetAbsolute GPS coordinates (e.g., longitude and latitude) of each intersection of the output optimized movement route are converted into relative coordinates in the relative coordinate system.
The model element determination unit 144 may also determine the model of the movement path from the neuron atThe respective elements of the output optimized movement route are stored in the data center 130 as a default movement route within the geographic range where the current movement route and the respective historical movement routes are located, and a candidate movement route to be recommended to the user.
According to some embodiments of the present application, the movement route recommendation module 160 may receive a recommendation request of a user for a movement route, acquire a current GPS coordinate of the user, and calculate a geohash code value of the GPS coordinate of the user. Then, the movement route recommendation module 160 may determine a grid geohash code value having a smallest difference from the geohash code value of the GPS coordinate of the user among the plurality of grid geohash code values of the plurality of movement routes stored in the data center 130, and since the neighboring geohash code values may represent neighboring geographical locations, the movement route corresponding to the grid geohash code value having the smallest difference from the geohash code value of the GPS coordinate of the user is closest to the geographical location of the user, and the movement route recommendation module 160 may recommend the movement route to the user. In one example, in a case where the coordinates of the intersection of the recommended movement route are GPS coordinates, the movement route recommendation module 160 may present the recommended movement route on a map according to an intersection link table of the recommended movement route; in the case where the coordinates of the intersection of the recommended movement route are relative coordinates with respect to the center position, the movement route recommendation module 160 may present the recommended movement route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended movement route.
In the embodiment of the application, a plurality of motion tracks generated by a user within a period of time are segmented, clustered and analyzed, and a simplified motion route is extracted, so that the storage and processing cost of the motion tracks can be reduced, and the processing efficiency of the motion tracks is improved.
Further, by dividing a geographical range including the movement route into a plurality of grids sharing one center position, the storage and processing costs of the movement trajectory can be further reduced, and by indexing the movement route using the geohash code values of the plurality of grids, the retrieval efficiency of the movement route can be improved.
Furthermore, relative coordinate conversion is carried out on each intersection point of the movement route by taking the central position of the movement route as an origin, so that the privacy of the user can be protected, and sensitive data related to the user can be eliminated.
Furthermore, when the intersection points of the current movement route and the historical movement route are fused through the cyclic neural network, the abnormal section deviation of the current movement route is considered, namely the quality of a GPS signal when the movement track related to the current movement route is recorded is considered, and when the quality of the GPS signal is poor, the discarded intersection points of the historical movement route are fewer, so that the fusion error can be controlled more accurately, and the quality of the optimized movement route can also be improved.
Further, in the embodiment of the present application, the terminal device 100 is a user-side device, and compared with the prior art in which a moving route is processed at a cloud-side server, the embodiment of the present application may reduce a risk that the moving route cannot be processed due to a network and cloud-side failure, and may reduce a response delay to a route recommendation request of a user.
Fig. 7 is a flowchart illustrating a method for extracting a movement route according to an embodiment of the present invention. The movement route extraction module 140 of the terminal device 100 in fig. 2 may implement different blocks or other parts of the method. For what is not described in the above-described apparatus embodiments, reference may be made to the following method embodiments, and likewise, for what is not described in the method embodiments, reference may be made to the above-described apparatus embodiments. As shown in fig. 7, the method for extracting the movement route may include:
s701, a plurality of motion trajectories, which are generated by the user within the same geographical range (for example, the same athletic field) within a certain period of time (for example, one day, three days, one week, two weeks, one month or other time period) and recorded by the motion trajectory recording module 120, are acquired from the data center 130 through the trajectory segmentation unit 141.
Examples of the plurality of motion trajectories may be, but are not limited to, motion trajectories generated by the user at today, yesterday, and the previous day, respectively, or a plurality of motion trajectories obtained by dividing a motion trajectory generated by the user in one motion, for example, a plurality of motion trajectories obtained by dividing a motion trajectory generated by the user for a plurality of turns along a sports field by each turn.
S702, each of the plurality of motion trajectories is divided into a plurality of trajectory segments by the trajectory dividing unit 141.
In particular, each motion trajectory may be represented as
Figure BDA0002317494020000171
Wherein, TRmRepresents the mth motion track, nmIndicating the number of trace points included in the mth motion trace,
Figure BDA0002317494020000172
an ith track point representing the mth motion track,
Figure BDA0002317494020000173
the GPS coordinates of the ith trajectory point representing the mth motion trajectory,
Figure BDA0002317494020000174
and the time corresponding to the GPS coordinate of the ith track point of the mth motion track is shown.
For each motion trajectory, the trajectory segmentation unit 141 may represent two trajectory points that are adjacent in time as one trajectory segment whose direction is directed from a trajectory point that is earlier in time (i.e., the start trajectory point) to a trajectory point that is later in time (i.e., the end trajectory point), and whose size is the distance between the two trajectory points. FIG. 3 shows 3 motion trajectories TR1~TR3It should be noted that only the motion trajectory TR is shown in the figure1~TR3Wherein each motion trajectory is divided into a plurality of trajectory segments.
S703, sequentially clustering the track segments of each motion track into a plurality of track segment clusters through the track clustering unit 142, wherein in one track segment cluster, the distance between adjacent track segments is smaller than a predetermined value, wherein in one track segment cluster, the distance between adjacent track segments is smaller than the predetermined value, and wherein adjacent track segments belong to different running tracks of the plurality of running tracks, respectively.
As an example, two track segments are denoted as tsiAnd tsjWherein the trackSegment tsiStarting point of (1) is siEnd point is eiTrack segment tsjStarting point of (1) is sjEnd point is ejThen the track segment ts can be calculated based on the following formulaiAnd tsjThe spacing therebetween:
Figure BDA0002317494020000175
d||=MIN(l||1,l||2) Equation 14
Figure BDA0002317494020000176
Wherein l⊥1Representing track segments tsjS starting point ofjTo the track section tsiPerpendicular distance of l⊥2Representing track segments tsjEnd point e ofjTo the track section tsiPerpendicular distance of l||1Representing track segments tsiS starting point ofiTo the track section tsjS starting point ofjIn the track section tsiDistance of projected point on, l||2Representing track segments tsiEnd point e ofiTo the track section tsjEnd point e ofjIn the track section tsiD represents the trajectory segment tsiAnd tsjThe spacing therebetween.
For example, in the example shown in fig. 3, the trajectory clustering unit 142 of fig. 2 may first determine a first trajectory segment cluster and a reference trajectory segment of the first trajectory segment cluster, and the trajectory clustering unit 142 of fig. 2 will determine, among trajectory segments of respective motion trajectories, trajectory segments that can be clustered with the reference trajectory segment. In one example, the track clustering unit 142 of FIG. 2 may determine a reference track segment of the first track segment cluster as TR1And determining that TR can be matched with the track segment P11 in other track segments1The track segment P11, in particular, the track clustering unit 142 of fig. 2 may first determine the track TR of the motion2~TR3In (1), track segments P31 andp32 and TR1Is less than a predetermined value and thus may be referred to as TR1Track segment P11 and the track segment adjacent to TR1Track segment P11 cluster; the trajectory clustering unit 142 of FIG. 2 may continue to determine TR2Track segments P21 and TR3Is smaller than a predetermined value and can therefore be taken as the sum of TR and P31 and P323And the track segments adjacent to the track segments P31 and P32 are TR3P31 and P32, then finally the track clustering unit 142 may cluster the TR1Track segments P11, TR3Track segments P31 and P32 and TR2Is clustered into a first track segment cluster.
In another example, the track clustering unit 142 of fig. 2 may determine a reference track segment of the first track segment cluster as TR3And can be surely matched with TR in other track segments3The track segment P31, in particular, the track clustering unit 142 may determine TR1Track segments P11 and TR2Track segments P21 and TR3Is less than a predetermined value, and thus TR can be set1Track segments P11 and TR2As and TR, the track segment P213Track segment P31 and the track segment adjacent to TR3Is clustered into a first track segment cluster. It should be noted that the track clustering unit 142 in fig. 2 may also determine other track segments as the reference track segment of the first track segment cluster.
The track clustering unit 142 may then determine a second track segment cluster and a reference track segment for the second track segment cluster. In one example, the track clustering unit 142 of FIG. 2 may determine a reference track segment of a second track segment cluster as TR1And determining that TR can be matched with the track segment P12 in other track segments1The track segment P12 cluster, in particular, the track clustering unit 142 of FIG. 2 may determine TR3Track segments P33 and TR1Is less than a predetermined value and thus may be referred to as TR1Track segment P12 and the track segment adjacent to TR1P12 cluster, and TR2Track segments P22 andTR3is less than a predetermined value and thus may be referred to as TR3Track segment P33 and the track segment adjacent to TR3P33, then finally, the track clustering unit 142 may cluster the TRs1Track segments P12, TR3Track segments P33 and TR2Is clustered into a second track segment cluster. It should be noted that the track clustering unit 142 of fig. 2 may also determine other track segments as the reference track segment of the second track segment cluster.
By analogy, the trajectory clustering unit 142 of fig. 2 may determine other trajectory segment clusters of the motion trajectory. It should be noted that for a motion trajectory different from that shown in fig. 3, each trajectory segment cluster of the motion trajectory may be determined in a similar principle as described above.
S704, for each track segment cluster, a cluster vector is calculated based on each track segment in the cluster by the track extraction unit 143.
As an example, the trajectory extraction unit 143 may use the mean of the GPS coordinates of the start trace point of each trajectory segment within the trajectory segment cluster as the GPS coordinate of the start point of the cluster vector, and use the mean of the GPS coordinates of the end trace point of each trajectory segment as the GPS coordinate of the end point of the cluster vector. As another example, the track decimation unit 143 may use any one track segment within a track segment cluster as a cluster vector. It should be noted that the cluster vector may also be determined based on any other suitable manner.
S705, the trajectory clustering unit 142 determines an abnormal trajectory segment in the plurality of motion trajectories, and determines the proportion of the abnormal trajectory segment in all trajectory segments, i.e., the abnormal segment deviation.
Specifically, the track clustering unit 142 may cluster the center points of each track segment of the multiple running tracks by using a hierarchical clustering algorithm, a K-means clustering algorithm, or another clustering algorithm, and obtain categories of the center points of the multiple track segments and class centers of the categories, and the track clustering unit 142 may calculate distances between the center points of each track segment of the multiple running tracks and the class centers, and make the minimum distance between the center point and the class centers larger than a predetermined value (the predetermined value and the class centers)The above-described predetermined values related to the intervals between the track segments are the same or different) are marked as abnormal track segments. For example, in the example of FIG. 3, TR1Track segments P15 and TR3Track segment P35 of (a) may be marked as an abnormal track segment. In some cases, a higher outlier bias may indicate a poor quality GPS signal during motion.
S706, the model element determination unit 144 determines the intersection points of the adjacent cluster vectors of the adjacent track segment clusters to determine the set of intersection points of the simplified movement route extracted from the movement track.
As an example, in the case where adjacent cluster vectors of adjacent track segment clusters do not end-to-end, the model element determination unit 144 may extend one or both of the adjacent cluster vectors to determine GPS coordinates of an intersection between the adjacent cluster vectors; in the case where adjacent cluster vectors have intersected, the model element determination unit 144 may directly determine the GPS coordinates of the intersection between the adjacent cluster vectors.
S707, the model element determination unit 144 determines the start point and the end point of the movement route in the intersection set of the movement route.
As an example, the model element determination unit 144 may take a start point of a cluster vector of a first track segment cluster of the motion track as a start point of the motion route, and an end point of a cluster vector of a last track segment cluster as an end point of the motion route.
S708, by the model element determining unit 144, an intersection link table indicating a link relationship between each intersection and at least one other intersection in the intersection set of the movement route is determined, wherein the intersection set includes a start point and an end point of the movement route.
As an example, the model element determining unit 144 may determine a doubly linked list between the intersection points as shown in fig. 4, wherein the starting point may be a starting point of the motion route, the intersection point 1 may be an intersection point between a cluster vector of a first track segment cluster and a cluster vector of a second track segment cluster of the motion track, the intersection point 2 may be an intersection point between a cluster vector of a second track segment cluster and a cluster vector of a third track segment cluster of the motion track, and so on, and the ending point may be an ending point of the motion route. In addition, each intersection shown in FIG. 4 may include the GPS coordinates of the intersection, a link (e.g., without limitation, a pointer) to a previous intersection, and a link (e.g., without limitation, a pointer) to a subsequent intersection, while the start point may include the GPS coordinates of the start point, a link (e.g., without limitation, a pointer) to a subsequent intersection, and the end point may include the GPS coordinates of the end point, a link (e.g., without limitation, a pointer) to a previous intersection. The doubly linked list shown in fig. 4 enables a user to move in a forward direction of the movement path (e.g., from the start point shown in fig. 4 to the end point shown in fig. 4) and also in a reverse direction of the movement path (e.g., from the end point shown in fig. 4 to the start point shown in fig. 4). It should be noted that the model element determining unit 144 may also determine a singly linked list between the intersections, i.e., each intersection shown in fig. 4 may include the GPS coordinates of the intersection, a link (e.g., without limitation, a pointer) to a previous intersection, or a link (e.g., without limitation, a pointer) to a subsequent intersection.
S709, the model element determining unit 144 determines the center position of the movement route.
In one example, the model element determination unit 144 may determine a minimum bounding rectangle of the movement route, wherein two sides of the minimum bounding rectangle are parallel to the latitude lines and are determined by latitude coordinates of the most south and most north intersections in the intersection set of the movement route, and the other two sides are parallel to the longitude lines and are determined by longitude coordinates of the most east and most west intersections in the intersection set of the movement route, and the model element determination unit 144 may take a center point of the minimum bounding rectangle of the movement route as a center position of the movement route, for example, the GPS coordinate of the center position of the movement route shown in fig. 5 is (121.623, 29.855).
S710, determining, by the model element determining unit 144, geohash code values of a plurality of grids representing the geographic range in which the movement route is located.
In one example, as shown in fig. 5, the model element determining unit 144 of fig. 2 may equally divide the minimum bounding rectangle of the movement route into four grids centering on the center position, and determine a geohash code value corresponding to the geographical range of each grid, wherein the number of bits of the geohash code value may be, for example, but not limited to, 7-bit base32 codes, for example, as shown in fig. 5, the code values of the four grids are wx4g340, wx4g341, wx4g342, and wx4g343, respectively.
It should be noted that fig. 5 is only one example of the grid representing the geographical range where the movement route is located, the movement route formed by the respective intersection points is not limited to the movement route shown in fig. 5, and the GPS coordinate of the center position is not limited to the GPS coordinate shown in the figure.
S711, the model element determining unit 144 determines the relative coordinates of each intersection of the movement route with respect to the center position.
As an example, the model element determination unit 144 may construct a relative coordinate system with the above-described central position as an origin, convert absolute GPS coordinates (e.g., longitude and latitude) of each intersection of the movement route into relative coordinates in the relative coordinate system, and thus may eliminate sensitive data related to the user.
S712, the respective elements of the simplified movement route extracted from the movement locus determined according to the movement route model are saved in the data center 130 as candidate movement routes to be recommended to the user by the model element determination unit 144.
Fig. 8 is a flowchart illustrating an optimization method of a movement route according to an embodiment of the present invention. The movement route optimization module 150 and the movement route extraction module 140 of the terminal device 100 in fig. 2 may implement different blocks or other portions of the method. For what is not described in the above-described apparatus embodiments, reference may be made to the following method embodiments, and likewise, for what is not described in the method embodiments, reference may be made to the above-described apparatus embodiments. As shown in fig. 8, the method for optimizing a movement route may include:
s801, obtaining a current movement route and at least one historical movement route located in the same geographic area (e.g., the same movement field) through the movement route optimization module 150.
Wherein the current movement route refers to a movement route extracted from a current movement track set generated by the user within a current time period (for example, but not limited to, one day, three days, one week, two weeks, one month, or other time period) by the method shown in fig. 7, and each historical movement route of the at least one historical movement route refers to a movement route extracted from a historical movement track set generated by the user within a historical time period (for example, but not limited to, one day, three days, one week, two weeks, one month, or other time period) before the current time period by the method shown in fig. 7.
S802, the motion route optimization module 150 inputs the intersection point set of the current motion route and the intersection point set of each historical motion route in at least one historical motion route into different neurons of the recurrent neural network respectively to obtain the intersection point set of the optimized motion route. For the recurrent neural network, reference may be made to the description related to fig. 6 above, and details are not repeated here.
S803, the model element determining unit 144 determines the intersection point linkage table of the optimized movement route output by the last neuron of the recurrent neural network.
In the example of fig. 6, the neuron a can be determined from the movement route model by the model element determination unit 144tAnd the output intersection point of the optimized motion route links the table. Specifically, the model element determination unit 144 may determine that neuron a is presenttAnd an intersection point link table for linking relationships between each intersection point and at least one other intersection point in the output intersection point set of the optimized movement route, such as, but not limited to, a doubly linked list between the intersection points as shown in fig. 4. Since the movement route optimization module 150 fuses the intersection points of the current movement route and the at least one historical movement route, the link relationship between the original intersection points of the movement routes is broken, and the model element determination unit 144 can determine the model element from the neuron atSelecting one intersection point from the outputted set of intersection points of the optimized movement route as a starting point of the optimized movement route, calculating distances (for example, but not limited to, Euclidean distances between two points) between the remaining intersection points and the starting point, and determining an intersection point closest to the starting point as a second intersection point of the optimized movement routeAnd then determining one intersection point which is closest to the second intersection point from the rest of the intersection points as a third intersection point of the optimized motion route, and the like until the last intersection point is determined as the end point of the optimized motion route. In neuron AtIn the intersection link table of the outputted optimized exercise route, each intersection other than the start point and the end point may include the GPS coordinate of the intersection, a link (for example, but not limited to, a pointer) to a previous intersection, and a link (for example, but not limited to, a pointer) to a next intersection, and the start point may include the GPS coordinate of the start point, a link (for example, but not limited to, a pointer) to a next intersection, and the end point may include the GPS coordinate of the end point, a link (for example, but not limited to, a pointer) to a previous intersection.
S804, optionally, by the model element determining unit 144, a geohash code value of a plurality of grids characterizing a geographical range in which the optimized movement route output by the last neuron of the recurrent neural network is located is determined.
In the example of fig. 6, model element determination unit 144 may determine that neuron a is a neurontThe minimum bounding rectangle of the outputted optimized movement route, wherein two sides of the minimum bounding rectangle are parallel to the latitude line and are determined by latitude coordinates of the most south and most north intersections in the set of intersections of the optimized movement route, and the other two sides are parallel to the longitude line and are determined by longitude coordinates of the most east and most west intersections in the set of intersections of the optimized movement route, the model element determining unit 144 may regard the center point of the minimum bounding rectangle of the optimized movement route as the minimum bounding rectangle by the neuron atAnd outputting the central position of the optimized movement route.
The model element determination unit 144 may be configured to determine the model element from the neuron atAnd taking the center position of the output optimized motion route as the center, equally dividing the minimum circumscribed rectangle of the optimized motion route into four grids, and then determining the geohash code value corresponding to the geographic range of each grid.
S805, optionally, by the model element determining unit 144, the relative coordinates of the respective intersections of the optimized movement path output by the last neuron of the recurrent neural network are determined.
Shown in FIG. 6In this example, the model element determination unit 144 may determine the model element from neuron atThe central position of the output optimized motion route is taken as an origin, a relative coordinate system is constructed, and a neuron A is used for calculating the central position of the output optimized motion routetAbsolute GPS coordinates (e.g., longitude and latitude) of each intersection of the output optimized movement route are converted into relative coordinates in the relative coordinate system.
S806, the model element of the optimized movement route output by the last neuron of the recurrent neural network is stored by the model element determination unit 144.
In the example of fig. 6, the neuron a may be identified by the model element determination unit 144tEach model element of the outputted optimized movement route is stored in the data center 130 as a default movement route within the geographic range where the current movement route and each historical movement route are located.
Fig. 9 is a flowchart illustrating a method for recommending a movement route according to an embodiment of the present invention. The movement route recommendation module 160 of the terminal device 100 in fig. 2 may implement different blocks or other portions of the method. For what is not described in the above-described apparatus embodiments, reference may be made to the following method embodiments, and likewise, for what is not described in the method embodiments, reference may be made to the above-described apparatus embodiments. As shown in fig. 7, the recommendation method of the movement route may include:
s901, receiving a recommendation request of a user for a movement route through the movement route recommendation module 160.
S902, the current GPS coordinates of the user are acquired from the GPS positioning module 120 through the movement route recommending module 160.
S903, calculating a geohash code value of the GPS coordinate of the user through the movement route recommending module 160.
S904, determining, by the motion route recommending module 160, a grid geohash code value having a minimum difference from a geohash code value of a GPS coordinate of the user among the multiple grid geohash code values of the multiple motion routes stored in the data center 130;
s905 recommends, by the motion route recommendation module 160, a motion route corresponding to the grid geohash code value having the smallest difference from the geohash code value of the GPS coordinate of the user to the user.
Since the similar geohash code values may represent similar geographical locations, the movement route corresponding to the grid geohash code value having the smallest difference from the geohash code value of the GPS coordinates of the user is closest to the geographical location of the user, and the movement route recommendation module 160 may recommend the movement route to the user. In one example, in a case where the coordinates of the intersection of the recommended movement route are GPS coordinates, the movement route recommendation module 160 may present the recommended movement route on a map according to an intersection link table of the recommended movement route; in the case where the coordinates of the intersection of the recommended movement route are relative coordinates with respect to the center position, the movement route recommendation module 160 may present the recommended movement route on the map according to the GPS coordinates of the center position and the intersection link table of the recommended movement route.
In the embodiment of the application, the motion trail generated by the user in a period of time is segmented, clustered and analyzed, and a simplified motion route is extracted, so that the storage and processing cost of the motion trail can be reduced, and the processing efficiency of the motion trail is improved.
Further, by dividing a geographical range including the movement route into a plurality of grids sharing one center position, the storage and processing costs of the movement trajectory can be further reduced, and by indexing the movement route using the geohash code values of the plurality of grids, the retrieval efficiency of the movement route can be improved.
Furthermore, relative coordinate conversion is carried out on each intersection point of the movement route by taking the central position of the movement route as an origin, so that the privacy of the user can be protected, and sensitive data related to the user can be eliminated.
Furthermore, when the intersection points of the current movement route and the historical movement route are fused through the cyclic neural network, the abnormal section deviation of the current movement route is considered, namely the quality of a GPS signal when the movement track related to the current movement route is recorded is considered, and when the quality of the GPS signal is poor, the discarded intersection points of the historical movement route are fewer, so that the fusion error can be controlled more accurately, and the quality of the optimized movement route can also be improved.
Fig. 10 is a schematic structural diagram of a movement route processing device 1000 according to an embodiment of the present application. The apparatus 1000 may include one or more processors 1002, system control logic 1008 coupled to at least one of the processors 1002, system memory 1004 coupled to the system control logic 1008, non-volatile memory (NVM)1006 coupled to the system control logic 1008, and a network interface 1010 coupled to the system control logic 1008.
The processor 1002 may include one or more single-core or multi-core processors. The processor 1002 may include any combination of general-purpose processors and dedicated processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments of the application, the processor 1002 may be configured to perform one or more embodiments in accordance with the various embodiments shown in fig. 7-9.
In some embodiments, system control logic 1008 may include any suitable interface controllers to provide any suitable interface to at least one of processors 1002 and/or any suitable device or component in communication with system control logic 1008.
In some embodiments, system control logic 1008 may include one or more memory controllers to provide an interface to system memory 1004. System memory 1004 may be used to load and store data and/or instructions. Memory 1004 of device 1000 may include any suitable volatile memory, such as suitable Dynamic Random Access Memory (DRAM), in some embodiments.
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 at least one of a HDD (Hard Disk Drive), CD (Compact Disc) Drive, DVD (Digital Versatile Disc) Drive.
The NVM/memory 1006 may include a portion of a storage resource installed on a device of the apparatus 1000, or it may be accessible by, but not necessarily a part of, a device. For example, the NVM/storage 1006 may be accessed over a network via the network interface 1010.
In particular, the system memory 1004 and the NVM/storage 1006 may each include: a temporary copy and a permanent copy of the instructions 1020. The instructions 1020 may include: instructions that when executed by at least one of the processors 1002 cause the apparatus 1000 to perform a method as shown in fig. 7-9. In some embodiments, the instructions 1020, hardware, firmware, and/or software components thereof may additionally/alternatively be disposed in the system control logic 1008, the network interface 1010, and/or the processor 1002.
Network interface 1010 may include a transceiver to provide a radio interface for apparatus 1000 to communicate with any other suitable device (e.g., front end module, antenna, etc.) over one or more networks. In some embodiments, the network interface 1010 may be integrated with other components of the apparatus 1000. For example, the network interface 1010 may be integrated with at least one of the processor 1002, the system memory 1004, the NVM/storage 1006, and a firmware device (not shown) having instructions that, when executed by at least one of the processor 1002, the apparatus 1000 implements one or more of the various embodiments shown in fig. 7-9.
The network interface 1010 may further include any suitable hardware and/or firmware to provide a multiple-input multiple-output radio interface. For example, network interface 1010 may be a network adapter, a wireless network adapter, a telephone modem, and/or a wireless modem.
In one embodiment, at least one of the processors 1002 may be packaged together with logic for one or more controllers of system control logic 1008 to form a System In Package (SiP). In one embodiment, at least one of the processors 1002 may be integrated on the same die with logic for one or more controllers of system control logic 1008 to form a system on a chip (SoC).
The apparatus 1000 may further comprise: an input/output (I/O) interface 1012. I/O interface 1012 may include a user interface to enable a user to interact with device 1000; the design of the peripheral component interface enables peripheral components to also interact with the device 1000. In some embodiments, the apparatus 1000 further comprises a sensor for determining at least one of environmental conditions and location information associated with the apparatus 1000.
In some embodiments, the user interface may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., still image cameras and/or video cameras), a flashlight (e.g., a light emitting diode flash), and a keyboard.
In some embodiments, the peripheral component interfaces may include, but are not limited to, a non-volatile memory port, an audio jack, and a power interface.
In some embodiments, the sensors may include, but are 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 the network interface 1010 or interact with the network interface 1010 to communicate with components of a positioning network, such as Global Positioning System (GPS) satellites.
While the description of the present application will be described in conjunction with the preferred embodiments, it is not intended to limit the features of the present invention to that embodiment. Rather, the invention has been described in connection with embodiments for the purpose of covering alternatives and modifications as may be extended based on the claims of the present application. In the following description, numerous specific details are included to provide a thorough understanding of the present application. The present application may be practiced without these particulars. Moreover, some of the specific details have been omitted from the description in order to avoid obscuring or obscuring the focus of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Further, various operations will be described as multiple discrete operations, in a manner that is most helpful in understanding the illustrative embodiments; however, the order of description should not be construed as to imply that these operations are necessarily order dependent. In particular, these operations need not be performed in the order of presentation.
The terms "comprising," "having," and "including" are synonymous, unless the context dictates otherwise. The phrase "A/B" means "A or B". The phrase "A and/or B" means "(A and B) or (A or B)".
As used herein, the term "module" or "unit" may refer to, be, or include: an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and/or memory that executes one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
In the drawings, some features of the structures or methods are shown in a particular arrangement and/or order. However, it is to be understood that such specific arrangement and/or ordering may not be required. In some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative figures. Additionally, the inclusion of structural or methodical features in a particular figure is not meant to 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.
Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the application may be implemented as computer programs or program code executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For 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 may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code can also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in this application are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. In some cases, one or more aspects of at least some embodiments may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logic in a processor, which when read by a machine causes the machine to fabricate logic to perform the techniques described herein. These representations, known as "IP cores" may be stored on a tangible computer-readable storage medium and provided to a number of customers or manufacturing facilities to load into the manufacturing machines that actually make the logic or processor.
Such computer-readable storage media may include, but are not limited to, non-transitory tangible arrangements of articles of manufacture or formation by machines or devices that include storage media such as: hard disk any other type of disk including floppy disks, optical disks, compact disk read-only memories (CD-ROMs), compact disk rewritables (CD-RWs), 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 cards; or any other type of media suitable for storing electronic instructions.
Thus, embodiments of the present application also include non-transitory computer-readable storage media that contain instructions or that contain design data, such as Hardware Description Language (HDL), that define the structures, circuits, devices, processors, and/or system features described herein.

Claims (39)

1. A motion trail processing method is characterized by comprising the following steps:
acquiring a motion trail set, wherein the motion trail set comprises a plurality of motion trails; and
determining a movement route element from the set of movement trajectories, wherein the movement route element comprises at least one of a center position and a set of intersections,
wherein the center position is shared by a plurality of grids and the set of motion trajectories are contained within a geographic range of the plurality of grids; and
wherein the intersection set includes a plurality of intersections associated with a plurality of trajectory segment clusters, wherein each trajectory segment cluster of the plurality of trajectory segment clusters includes a plurality of trajectory segments of the plurality of motion trajectories, and a spacing between adjacent trajectory segments of the plurality of trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different ones of the plurality of motion trajectories.
2. The motion trail processing method according to claim 1, wherein said motion route element further comprises:
a Geohash code corresponding to each grid of the plurality of grids for indexing the geographic range corresponding to said each grid.
3. The motion trail processing method according to claim 2, wherein said Geohash code comprises at least 7-bit Base32 code characters.
4. The motion trail processing method according to claim 1, wherein said motion route element further comprises: an intersection link table indicating a link relationship between each of the plurality of intersections and at least one other of the plurality of intersections.
5. The motion trajectory processing method according to claim 1, wherein the center position includes GPS coordinates of the center position, and the each of the plurality of intersection points includes relative coordinates in a relative coordinate system with the center position as an origin.
6. The motion trail processing method according to claim 1, wherein said determining a motion route element from the motion trail set comprises:
selecting four intersection points of the east, south, west and north from the plurality of intersection points;
and determining the geographical ranges of the grids according to the four intersection points, and determining the central point of the geographical range as the central position.
7. The motion trail processing method according to claim 1, wherein said determining a motion route element from the motion trail set comprises:
dividing each motion track in the motion track set into a plurality of track segments;
clustering the plurality of track segments with the spacing between the adjacent track segments smaller than the predetermined value into one of the plurality of track segment clusters;
determining a cluster vector corresponding to said each track segment cluster from said plurality of track segments within said each track segment cluster of said plurality of track clusters to form a plurality of cluster vectors corresponding to said plurality of track segment clusters;
determining the intersection between adjacent cluster vectors of the plurality of cluster vectors.
8. The motion trajectory processing method according to claim 7, wherein a start coordinate of the cluster vector is an average of start coordinates of the plurality of trajectory segments within the trajectory segment cluster, and an end coordinate of the cluster vector is an average of end coordinates of the plurality of trajectory segments within the trajectory segment cluster.
9. A motion trail processing method is characterized by comprising the following steps:
acquiring a plurality of current motion track intersections related to a current motion track set and a plurality of historical motion track intersections related to a historical motion track set; and
determining whether to retain at least one current motion trajectory intersection point of the plurality of current motion trajectory intersection points and/or at least one historical motion trajectory intersection point of the plurality of historical motion trajectory intersection points based at least in part on the abnormal segment deviation, thereby obtaining an optimized motion route;
wherein the abnormal segment deviation specifies, at least in part, a proportion of abnormal track segments that occur in a plurality of track segments of a plurality of motion tracks of the current set of motion tracks, wherein the abnormal track segments exceed a first predetermined value from at least one class center of the plurality of track segments.
10. The motion trajectory processing method of claim 9, wherein the current set of motion trajectories and the historical set of motion trajectories are contained within the same geographic scope.
11. The motion trajectory processing method according to claim 9, wherein the determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections comprises determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections using a LSTM (Long short-term memory) model.
12. The motion trajectory processing method according to any one of claims 9 to 11, wherein the determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections further comprises: calculating, using the LSTM model, a forgetting gate for determining whether to retain the at least one of the plurality of historical motion trajectory intersections according to the following formula:
ft=σ(Wf·[ht-1,Xt]+bf)
bf=1+bm
wherein f istRepresenting the forgetting gate of a neuron at the t-th moment of the LSTM model, σ representing a sigmoid function, WfA weight matrix, X, representing said forgetting gatetRepresenting inputs of neurons of the LSTM model at a time t and comprising the plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising the plurality of historical motion trajectory intersections, [ h [t-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing, bfA bias value representing said forgetting gate, bmIndicating the anomalous section deviation.
13. The motion trajectory processing method according to any one of claims 9 to 12, wherein the determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections further comprises calculating, using an LSTM model, an input gate for determining whether to retain at least one of the plurality of current motion trajectory intersections according to the following formula:
it=σ(Wi·[ht-1,Xt]+bi)
wherein itRepresenting the input gate of a neuron at time t of the LSTM model, σ representing a sigmoid function, WiA weight matrix, X, representing the input gatetRepresenting inputs of neurons of the LSTM model at a time t and comprising the plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising the plurality of historical motion trajectory intersections, [ h [t-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing, biRepresenting the offset value of the input gate.
14. The motion trajectory processing method according to any one of claims 9 to 13, wherein the determining whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections further comprises determining whether to output at least one of the plurality of current motion trajectory intersections and at least one of the plurality of historical motion trajectory intersections using an LSTM model according to the following formula to obtain the optimized motion route:
Figure FDA0002317494010000031
Figure FDA0002317494010000032
ot=σ(Wo·[ht-1,Xt]+bo)
ht=ot·tanh(Ct)
wherein, XtRepresenting inputs of neurons of the LSTM model at a time t and comprising the plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising the plurality of historical motion trajectory intersections,
Figure FDA0002317494010000033
representing the input cell state, W, of the neuron at time t of the LSTM modelcA weight matrix representing the input cell state of the neurons at time t of the LSTM model, bcBias value, C, representing the input cell state of the neuron at time t of the LSTM modeltRepresenting the cellular state, C, of the neurons at the time t of the LSTM modelt-1T-th representing the LSTM model-cell status of neurons at 1 time, ftForgetting gate, i, representing a neuron at time t of said LSTM modeltInput gate representing the neuron at time t of the LSTM model, otOutput gate, W, representing a neuron at time t of the LSTM modeloA weight matrix representing the output gates, boRepresents the offset value of the output gate, htRepresents the output of the neurons at time t of the LSTM model and may include a plurality of intersections of the optimized motion path.
15. The motion trail processing method according to claim 14, further comprising selecting four intersections of the most eastern, southerst, westest, and northwest from the plurality of intersections of the optimized motion route;
and determining a geographical range containing the movement route according to the four intersection points, and determining a central point of the geographical range as the central position of the optimized movement route.
16. The motion trajectory processing method of claim 15, further comprising determining a plurality of grids of the geographic range and a geohash code value for the plurality of grids, wherein the plurality of grids share the center position.
17. The motion trail processing method according to claim 15, wherein the central position includes GPS coordinates of the central position, and each of the plurality of intersection points of the optimized motion course includes relative coordinates in a relative coordinate system with the central position as an origin.
18. The motion trajectory processing method of claim 9, wherein the method further comprises:
clustering centers of the plurality of trajectory segments and obtaining the at least one class center of the plurality of trajectory segments.
19. A method for recommending a movement route, comprising:
receiving a recommendation request of a user for a movement route;
acquiring the GPS coordinate of the user, and calculating a geohash code value of the GPS (Global Positioning System) coordinate of the user;
querying a grid geohash code value having a smallest difference from a geohash code value of the GPS coordinates of the user from among a plurality of grid geohash code values;
acquiring a movement route corresponding to the grid geohash code value having the smallest difference from the geohash code value of the GPS coordinates of the user and a center position of the movement route, wherein the center position is shared by a plurality of grids including a geographical range of the movement route; and
and recommending the movement route to the user according to the central position.
20. A computer readable storage medium having stored thereon instructions which, when executed on the machine, cause the machine to perform the method of any one of claims 1 to 19.
21. A motion trajectory processing device characterized by comprising:
a processor;
a memory having instructions stored thereon that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 19.
22. A motion trajectory processing device characterized by comprising:
the motion trail recording module is used for acquiring a motion trail set, wherein the motion trail set comprises a plurality of motion trails; and
a motion route extraction module for determining a motion route element according to the motion trail set, wherein the motion route element comprises at least one of a central position and an intersection set,
wherein the center position is shared by a plurality of grids and the set of motion trajectories are contained within a geographic range of the plurality of grids; and
wherein the intersection set includes a plurality of intersections associated with a plurality of trajectory segment clusters, wherein each trajectory segment cluster of the plurality of trajectory segment clusters includes a plurality of trajectory segments of the plurality of motion trajectories, and a spacing between adjacent trajectory segments of the plurality of trajectory segments is less than a predetermined value, wherein the adjacent trajectory segments respectively belong to different ones of the plurality of motion trajectories.
23. The motion trajectory processing device according to claim 22, wherein the movement route element further includes:
a Geohash code corresponding to each grid of the plurality of grids for indexing the geographic range corresponding to said each grid.
24. The motion trajectory processing device of claim 23, wherein the Geohash encoding includes at least 7-bit Base32 encoding characters.
25. The motion trajectory processing device according to claim 22, wherein the movement route element further includes:
an intersection link table indicating a link relationship between each of the plurality of intersections and at least one other of the plurality of intersections.
26. The motion trail processing device according to claim 22, wherein the motion course extraction module is further configured to determine relative coordinates of the each of the plurality of intersection points in a relative coordinate system with the central position as an origin.
27. The motion trail processing device according to claim 22, wherein said motion trail extraction module is configured to determine motion trail elements from the set of motion trails, including:
selecting four intersection points of the east, south, west and north from the plurality of intersection points;
and determining the geographical ranges of the grids according to the four intersection points, and determining the central point of the geographical range as the central position.
28. The motion trail processing device according to claim 22, wherein said motion trail extraction module is configured to determine motion trail elements from the set of motion trails, including:
dividing each motion track in the motion track set into a plurality of track segments;
clustering the plurality of track segments with the spacing between the adjacent track segments smaller than the predetermined value into one of the plurality of track segment clusters;
determining a cluster vector corresponding to said each track segment cluster from said plurality of track segments within said each track segment cluster of said plurality of track clusters to form a plurality of cluster vectors corresponding to said plurality of track segment clusters;
determining the intersection between adjacent cluster vectors of the plurality of cluster vectors.
29. The motion trajectory processing device of claim 28, wherein a start coordinate of the cluster vector is an average of start coordinates of the plurality of trajectory segments within the trajectory segment cluster, and an end coordinate of the cluster vector is an average of end coordinates of the plurality of trajectory segments within the trajectory segment cluster.
30. A motion trajectory processing device characterized by comprising:
the motion route extraction module is used for acquiring a plurality of current motion track intersections related to the current motion track set and a plurality of historical motion track intersections related to the historical motion track set; and
a motion route optimization module that determines whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections based at least in part on the abnormal section deviation, thereby obtaining an optimized motion route;
wherein the abnormal segment deviation specifies, at least in part, a proportion of abnormal track segments that occur in a plurality of track segments of a plurality of motion tracks of the current set of motion tracks, wherein the abnormal track segments exceed a first predetermined value from at least one class center of the plurality of track segments.
31. The motion trail processing device according to claim 30, wherein said current set of motion trail and said set of historical motion trail are contained within the same geographical range.
32. The motion trail processing device according to claim 30, wherein the motion trail optimization module is configured to determine whether to retain at least one of the plurality of current motion trail intersections and/or at least one of the plurality of historical motion trail intersections, including being configured to determine whether to retain at least one of the plurality of current motion trail intersections and/or at least one of the plurality of historical motion trail intersections using a LSTM (Long short-term memory) model.
33. The motion trajectory processing device according to any one of claims 30 to 32, wherein the motion route optimization module is configured to determine whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections, further comprising being configured to: calculating, using the LSTM model, a forgetting gate for determining whether to retain the at least one of the plurality of historical motion trajectory intersections according to the following formula:
ft=σ(Wf·[ht-1,Xt]+bf)
bf=1+bm
wherein f istRepresenting the forgetting gate of a neuron at the t-th moment of the LSTM model, σ representing a sigmoid function, WfA weight matrix, X, representing said forgetting gatetRepresenting inputs of neurons of the LSTM model at a time t and comprising the plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising the plurality of historical motion trajectory intersections, [ h [t-1,Xt]Denotes a reaction oft-1And XtLong vector formed by splicing, bfA bias value representing said forgetting gate, bmIndicating the anomalous section deviation.
34. The motion trajectory processing device according to any one of claims 30 to 33, wherein the motion route optimization module is configured to determine whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections, further comprising being configured to: using the LSTM model, an input gate for determining whether to retain at least one of the plurality of current motion trajectory intersections is calculated according to the following formula:
it=σ(Wi·[ht-1,Xt]+bi)
wherein itRepresenting the input gate of a neuron at time t of the LSTM model, σ representing a sigmoid function, WiA weight matrix, X, representing the input gatetRepresenting inputs of neurons of the LSTM model at a time t and comprising the plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising the plurality of historical motion trajectory intersections, [ h [t-1,Xt]Show thatht-1And XtLong vector formed by splicing, biRepresenting the offset value of the input gate.
35. The motion trajectory processing device according to any one of claims 30 to 34, wherein the motion route optimization module is configured to determine whether to retain at least one of the plurality of current motion trajectory intersections and/or at least one of the plurality of historical motion trajectory intersections, further comprising being configured to: determining whether to output at least one current motion trajectory intersection point of the plurality of current motion trajectory intersection points and at least one historical motion trajectory intersection point of the plurality of historical motion trajectory intersection points according to the following formula by using an LSTM model, thereby obtaining the optimized motion route:
Figure FDA0002317494010000071
Figure FDA0002317494010000072
ot=σ(Wo·[ht-1,Xt]+bo)
ht=ot·tanh(Ct)
wherein, XtRepresenting inputs of neurons of the LSTM model at a time t and comprising the plurality of current motion trajectory intersections, ht-1Representing the output of neurons at time t-1 of the LSTM model and comprising the plurality of historical motion trajectory intersections,
Figure FDA0002317494010000073
representing the input cell state, W, of the neuron at time t of the LSTM modelcA weight matrix representing the input cell state of the neurons at time t of the LSTM model, bcRepresenting the LSTM modelBias value of input cell state of neuron at t times, CtRepresenting the cellular state, C, of the neurons at the time t of the LSTM modelt-1Representing the cellular state of the neurons at time t-1 of the LSTM model, ftForgetting gate, i, representing a neuron at time t of said LSTM modeltInput gate representing the neuron at time t of the LSTM model, otOutput gate, W, representing a neuron at time t of the LSTM modeloA weight matrix representing the output gates, boRepresents the offset value of the output gate, htRepresents the output of the neurons at time t of the LSTM model and may include a plurality of intersections of the optimized motion path.
36. The motion trail processing device according to claim 35, wherein said motion course extraction module is further configured to select four intersections of the most eastern, south-most, west-most, and north-most from the plurality of intersections of the optimized motion course;
and determining a geographical range containing the movement route according to the four intersection points, and determining a central point of the geographical range as the central position of the optimized movement route.
37. The motion trail processing device according to claim 36, wherein the motion route extraction module is further configured to determine a plurality of grids of the geographic area and a geohash code value for the plurality of grids, wherein the plurality of grids share the central position.
38. The motion trajectory processing device of claim 36, wherein the motion route extraction module is further configured to determine relative coordinates of each of the plurality of intersection points of the optimized motion route in a relative coordinate system with the center position as an origin.
39. The motion trajectory processing device of claim 30, wherein the motion route extraction module is further configured to:
clustering centers of the plurality of trajectory segments and obtaining the at least one class center of the plurality of trajectory segments.
CN201911283885.XA 2019-12-13 2019-12-13 Motion trajectory processing method, medium, device and equipment Pending CN112989220A (en)

Priority Applications (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
PCT/CN2020/132333 WO2021115143A1 (en) 2019-12-13 2020-11-27 Motion trajectory processing method, medium, apparatus, and device

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN112989220A true CN112989220A (en) 2021-06-18

Family

ID=76329504

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705858B (en) * 2021-08-02 2023-07-11 西安交通大学 Shortest path planning method, system, equipment and storage medium for multiple target areas
CN114155391B (en) * 2022-01-30 2022-08-19 浙江口碑网络技术有限公司 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
CN115952364B (en) * 2023-03-07 2023-05-23 之江实验室 Route recommendation method and device, storage medium and electronic equipment
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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838846A (en) * 2014-03-06 2014-06-04 中国科学院软件研究所 Emergency guiding method and emergency guiding system for individual on basis of big data
US20140164390A1 (en) * 2012-12-07 2014-06-12 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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101203897B1 (en) * 2011-02-25 2012-11-23 동국대학교 산학협력단 Apparatus and method of cell-based path planning for a mobile body
CN104239556B (en) * 2014-09-25 2017-07-28 西安理工大学 Adaptive trajectory predictions method based on Density Clustering
CN109241138A (en) * 2018-08-30 2019-01-18 跨越速运集团有限公司 A kind of motion track construction method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140164390A1 (en) * 2012-12-07 2014-06-12 International Business Machines Corporation Mining trajectory for spatial temporal analytics
CN103838846A (en) * 2014-03-06 2014-06-04 中国科学院软件研究所 Emergency guiding method and emergency guiding system for individual on basis of big data
CN107590268A (en) * 2017-09-25 2018-01-16 咪咕互动娱乐有限公司 A kind of moving line recommends method, apparatus and computer-readable recording medium
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

Also Published As

Publication number Publication date
WO2021115143A1 (en) 2021-06-17

Similar Documents

Publication Publication Date Title
CN112989220A (en) Motion trajectory processing method, medium, device and equipment
Sun et al. Leveraging crowdsourced GPS data for road extraction from aerial imagery
Joe et al. Location-based orientation context dependent recommender system for users
US9483467B2 (en) Tagging geographical areas
CN109658445A (en) Network training method, increment build drawing method, localization method, device and equipment
CN111833600B (en) Method and device for predicting transit time and data processing equipment
CN109154502A (en) System, method and apparatus for geo-location
CN112415558B (en) Processing method of travel track and related equipment
CN113918837B (en) Method and system for generating city interest point category representation
CN110530371B (en) Indoor map matching method based on deep reinforcement learning
TW201738838A (en) Computing method for ridesharing path, computing apparatus and recording medium using the same
US20130261961A1 (en) Method for increasing waypoint accuracies for crowd-sourced routes
CN113068131B (en) Method, device, equipment and storage medium for predicting user movement mode and track
Yan et al. xnet+ sc: Classifying places based on images by incorporating spatial contexts
CN112598091A (en) Training model and small sample classification method and device
CN108549649B (en) Rural tourism recommendation method and system based on seasonal characteristics and position characteristics
CN116958267B (en) Pose processing method and device, electronic equipment and storage medium
CN117435819A (en) Method, system and storage medium for recommending interest points through space-time dynamic perception
CN116308738B (en) Model training method, business wind control method and device
Awang Salleh et al. Longitudinal error improvement by visual odometry trajectory trail and road segment matching
CN107766881B (en) Way finding method and device based on basic classifier and storage device
JP2023036795A (en) Image processing method, model training method, apparatus, electronic device, storage medium, computer program, and self-driving vehicle
CN110222056A (en) A kind of localization method, system and equipment
CN115797557A (en) Self-supervision 3D scene flow estimation method based on graph attention network
Milli et al. Multi-Modal Multi-Task (3MT) Road Segmentation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination