CN114428888A - Track restoration method and device, storage medium and electronic equipment - Google Patents

Track restoration method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114428888A
CN114428888A CN202210023475.7A CN202210023475A CN114428888A CN 114428888 A CN114428888 A CN 114428888A CN 202210023475 A CN202210023475 A CN 202210023475A CN 114428888 A CN114428888 A CN 114428888A
Authority
CN
China
Prior art keywords
target
movement
track
determining
positions
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
CN202210023475.7A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Publication of CN114428888A publication Critical patent/CN114428888A/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/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination
    • 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/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • 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/903Querying
    • G06F16/9038Presentation of query results

Abstract

The invention discloses a track restoration method and device, a storage medium and electronic equipment. The method can be applied to the map field and comprises the following steps: acquiring a target position set of target equipment; aggregating positions in the target position set, and obtaining a first target moving track of the target equipment through a multi-head attention mechanism model; acquiring target road network information, and adsorbing positions in a target position set onto a plurality of roads in the target road network information to obtain a second target moving track of target equipment; and determining the target moving track according to the first target moving track and the second target moving track. The invention solves the technical problem of low accuracy of track reduction.

Description

Track restoration method and device, storage medium and electronic equipment
Technical Field
The invention relates to the field of computers, in particular to a track restoration method and device, a storage medium and electronic equipment.
Background
In the related art, in the vehicle trajectory restoration, the vehicle is usually located by the vehicle position information (for example, GPS information), and the vehicle trajectory is restored based on the vehicle position information. The method has better accuracy for restoring more dense position information tracks, and has poorer performance and accuracy under the condition of sparse position information.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a track reduction method and device, a storage medium and electronic equipment, and aims to at least solve the technical problem of low track reduction accuracy.
According to an aspect of the embodiments of the present invention, there is provided a trajectory restoration method, including: acquiring a target position set of target equipment; aggregating positions in the target position set, and obtaining a first target moving track of the target equipment through a multi-head attention mechanism model; acquiring target road network information, and adsorbing positions in a target position set onto a plurality of roads in the target road network information to obtain a second target movement track of the target equipment; and determining the target moving track according to the first target moving track and the second target moving track.
Optionally, the aggregating the positions in the target position set and obtaining the first movement trajectory of the target device through a multi-head attention mechanism model includes: aggregating positions in the target position set to obtain a first movement track, wherein the first movement track comprises part of positions in the target position set; searching a movement track corresponding to each position in a first position subset in pre-recorded historical position corresponding information to obtain a first movement track set, wherein the first position subset comprises positions except the partial positions in the target position set, multiple groups of historical positions and movement tracks with corresponding relations are recorded in the historical position corresponding information, and the positions in the historical position corresponding information comprise the historical positions of the target equipment or comprise the historical positions of multiple pieces of equipment; determining the first movement track and the first movement track set as the first target movement track.
Optionally, the searching for a movement track corresponding to each position in the first position subset in the pre-recorded historical position corresponding information to obtain a first movement track set includes: finding a movement trajectory corresponding to a current position in the first subset of positions in the historical position correspondence information by: determining a historical position set with the similarity degree of the current position being greater than or equal to a preset value in the historical position corresponding information, and determining a moving track with a corresponding relation to each historical position in the historical position set to obtain a second moving track set; and determining a movement track corresponding to the current position in the second movement track set.
Optionally, the determining a movement track corresponding to the current position in the second movement track set includes: determining the weight of each movement track in the second movement track set according to a multi-head attention mechanism model, wherein the multi-head attention mechanism model is obtained by using the historical position corresponding information through autonomous learning; and determining the movement track with the maximum weight in the second movement track set as the movement track corresponding to the current position.
Optionally, the adsorbing the positions in the target position set to multiple roads included in the target road network information to obtain a second target movement track of the target device includes: determining, as the second target movement trajectory, a trajectory formed by the roads in which the positions in the target position set are located, when the positions in the target position set are all located on the plurality of roads.
Optionally, the adsorbing the positions in the target position set to multiple roads included in the target road network information to obtain a second target movement trajectory of the target device further includes: determining a track formed by the roads in which the part positions are located as a second movement track if the part positions in the target position set are located on the plurality of roads; determining the second movement track set according to each position in a second position subset and the adjacent position of each position in the second position subset, wherein the second position subset comprises the positions except the partial position in the target position set, and the adjacent position of each position in the second position subset is the position adjacent to each position after being sorted according to the positioning time sequence in the target position set; determining the second movement trajectory and the second movement trajectory set as the second target movement trajectory.
Optionally, the determining the second set of movement trajectories according to each position in the second subset of positions and an adjacent position of each position in the second subset of positions includes: performing the following steps for each location in the second subset of locations, each location in the second subset of locations being a current location when performing the following steps: determining a first set of roads of the plurality of roads that are less than or equal to a first distance threshold from the current location; determining a second set of roads of the plurality of roads for which a neighboring location distance to the current location is less than or equal to a second distance threshold; and determining a movement track corresponding to the current position according to the first road set and the second road set, wherein the second movement track set comprises the movement track corresponding to the current position.
Optionally, the determining a movement track corresponding to the current position according to the first road set and the second road set includes: determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the moving distance from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to a first preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the number of turns from the current position to a connecting position of the current position along the moving track corresponding to the current position is less than or equal to a second preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein a turning angle from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to a third preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the moving distance from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to the first preset value, the turning times are less than or equal to the second preset value, and the turning angle is less than or equal to a third preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the speed limit of the moving track corresponding to the current position is matched with the speed of the target device moving from the current position to the position adjacent to the current position.
Optionally, the determining the target movement trajectory according to the first target movement trajectory and the second target movement trajectory includes: determining a movement track containing the maximum number of positions in the target position set in the first target movement track and the second target movement track as the target movement track; or determining the weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained by autonomous learning by using a historical movement track, and the historical movement track comprises the historical movement track of the target device or comprises the historical movement tracks of a plurality of devices; determining a movement track with the largest weight in the first target movement track and the second target movement track as the target movement track; or determining the weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained by autonomous learning by using a historical movement track, and the historical movement track comprises the historical movement track of the target device or comprises the historical movement tracks of a plurality of devices; and performing weighted fusion on the first target movement track and the second target movement track according to the weight of the first target movement track and the weight of the second target movement track to obtain the target movement track.
Optionally, after determining the target movement trajectory according to the first target movement trajectory and the second target movement trajectory, the method further includes: and under the condition that the target offline media information is located in the preset range of the target moving track, determining the target equipment as an exposure object of the target offline media information.
According to another aspect of the embodiments of the present invention, there is also provided a trajectory restoration device, including: the acquisition module is used for acquiring a target position set of the target equipment; the aggregation module is used for aggregating the positions in the target position set and obtaining a first target moving track of the target equipment through a multi-head attention mechanism; the adsorption module is used for aggregating positions in the target position set and obtaining a second target moving track of the target equipment through a multi-head attention mechanism; and the determining module is used for determining the target moving track according to the first target moving track and the second target moving track.
According to another aspect of the embodiments of the present invention, there is also provided a trajectory reduction system, which is applied to the trajectory reduction method, and includes: the system comprises a preprocessing unit, a route restoring module and a commuting route module, wherein the route restoring module is connected with a positioning log module and is used for acquiring a target position set of target equipment, and the positioning log module records the position of the target equipment; the path restoration module is further configured to aggregate positions in the target position set, and obtain a first target movement trajectory of the target device through a multi-head attention mechanism; acquiring target road network information, and adsorbing positions in a target position set onto a plurality of roads included in the target road network information to obtain a second target movement track of the target equipment; determining the target moving track according to the first target moving track and the second target moving track; and the commuting path module is connected with the path restoration module and is used for storing the target moving track of the target equipment.
Optionally, the system further comprises: and the exposure counting module is connected with the offline media information point location module and the commuting path module, and is used for determining the target equipment as an exposure object of the target offline media information under the condition of determining that the target offline media information is located in the preset range of the target moving track, wherein the offline media information point location module records the position of the target offline media information.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above-mentioned trajectory restoration method when running.
According to yet another aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the trajectory restoration method as above.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the trajectory restoration method through the computer program.
In an embodiment of the invention, the target location set of the target device is targeted by the target device. The positions in the target position set are aggregated, a first target moving track is obtained by combining a multi-head attention mechanism, and the positions in the target position set are adsorbed to a plurality of roads in the target road network information by combining the target road network information. The problem of lower track reduction rate of accuracy among the prior art is solved, the effect of improving the track reduction rate of accuracy has been reached.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative trajectory reduction method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative trajectory reduction method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative movement trajectory according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative movement trajectory according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of yet another alternative movement trajectory according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of yet another alternative movement trajectory according to an embodiment of the present invention;
FIG. 7 is an alternative road diagram according to an embodiment of the invention;
FIG. 8 is a schematic illustration of an alternative road according to an embodiment of the invention;
FIG. 9 is a schematic illustration of an alternative road according to an embodiment of the invention;
FIG. 10 is an alternative block diagram of an architecture according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of yet another alternative movement trajectory according to an embodiment of the present invention;
FIG. 12 is a block diagram of an alternative configuration according to an embodiment of the present invention;
FIG. 13 is a schematic diagram of an alternative trajectory reduction device according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of an alternative electronic device according to an embodiment of the invention;
FIG. 15 is a block diagram of a computer system architecture for an alternative electronic device, according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is understood that in the specific implementation of the present application, the information of the target device, such as the location of the target device, and related data, when the above embodiments of the present application are applied to specific products or technologies, the permission or approval of the target device needs to be obtained, and the collection, use and processing of the related data need to comply with the relevant laws and regulations and standards of the relevant country and region.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, there is provided a trajectory restoration method, which may be, but is not limited to, applied in the application environment shown in fig. 1 as an optional implementation manner. The application environment includes a mobile terminal 102, and the mobile terminal 102 may be a terminal device, such as the target device. The mobile terminal includes: memory 104, processor 106, and display 108. Wherein the display 108 is used to display pictures including, but not limited to, video pictures, game pictures, and display pictures of various applications. The processor may include a positioning device, which may be configured to position the mobile terminal. The memory 104 is used for storing data, including but not limited to, positioning data of the mobile terminal, such as the positions in the target position set.
Optionally, in this embodiment, the terminal device may be a terminal device configured with a target client, and may include, but is not limited to, at least one of the following: the Mobile phone (such as an Android Mobile phone, an iOS Mobile phone, etc.), a notebook computer, a tablet computer, a palm computer, an MID (Mobile Internet Devices), a PAD, a desktop computer, an intelligent voice interaction device, an intelligent household appliance, a vehicle-mounted terminal, etc. If the mobile terminal is turned on for positioning (for example, the global positioning system GPS is turned on), the mobile terminal may be positioned to obtain the location of the target device. The target client may be a video client, an instant messaging client, a browser client, a game client, etc.
The network 110 may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication.
The server includes a database 114 and a processing engine 116, wherein the data path 114 is used for storing data including, but not limited to, locations in the set of target locations, and the processing engine can process the data including, but not limited to, performing the following steps:
step S102, acquiring a target position set of target equipment;
the target device may be a vehicle, an onboard terminal on the vehicle, or a mobile terminal, such as a mobile phone, a computer, or the like.
Step S104, aggregating the positions in the target position set, and obtaining a first target moving track of the target equipment through a multi-head attention mechanism model;
step S106, acquiring target road network information, and adsorbing positions in a target position set to a plurality of roads in the target road network information to obtain a second target movement track of the target equipment;
step S108, determining the target moving track according to the first target moving track and the second target moving track.
The server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and this is not limited in this embodiment.
Optionally, as an optional implementation manner, as shown in fig. 2, the trajectory restoration method includes:
step S202, a target position set of target equipment is obtained;
alternatively, the target device may be a vehicle-mounted terminal or a mobile terminal. The target equipment is provided with a global positioning system, and the target equipment is positioned through the global positioning system. For example, the vehicle can be located by GPS location.
Step S204, aggregating the positions in the target position set, and obtaining a first target moving track of the target equipment through a multi-head attention mechanism model;
step S206, acquiring target road network information, and adsorbing positions in a target position set to a plurality of roads in the target road network information to obtain a second target movement track of the target equipment;
step S208, determining the target movement trajectory according to the first target movement trajectory and the second target movement trajectory.
Optionally, the aggregating the positions in the target position set and obtaining the first movement trajectory of the target device through a multi-head attention mechanism model includes: aggregating positions in the target position set to obtain a first movement track, wherein the first movement track comprises part of positions in the target position set; searching a movement track corresponding to each position in a first position subset in pre-recorded historical position corresponding information to obtain a first movement track set, wherein the first position subset comprises positions except the partial positions in the target position set, multiple groups of historical positions and movement tracks with corresponding relations are recorded in the historical position corresponding information, and the positions in the historical position corresponding information comprise the historical positions of the target equipment or comprise the historical positions of multiple pieces of equipment; determining the first movement track and the first movement track set as the first target movement track.
As an optional implementation manner, the target location set may include a location obtained by n-day positioning of the target device, the location data obtained by n-day positioning may include a movement track or may include a location point, and n is greater than or equal to 1. For example, if the target device can obtain a movement track by using navigation positioning, and if the target device is turned off after positioning at a certain position, the position point is obtained by positioning. Through multi-track aggregation, the n-day positions of the target equipment can be aggregated to obtain tracks with dense positions. The polymerization can be carried out by:
Figure BDA0003463441400000101
wherein the content of the first and second substances,
Figure BDA0003463441400000102
indicating that the location with higher frequency is located within n days,
Figure BDA0003463441400000103
representing the trajectory that y target device u was positioned on day n. Taking the target position set obtained by 3-day positioning as an example, as shown in fig. 3, positioning the target device on day 1 results in the position obtained by the positioning on day 1 shown in the figure, and the position obtained by the positioning is represented by a circle. The target device is positioned on day 2 to obtain the position obtained by positioning on day 2 shown in the figure, and the position obtained by positioning is represented by a triangle. The target device is located on day 3 to obtain the location obtained by the location on day 3 shown in the figure, and the location obtained by the location is represented by a rectangle. It can be seen from the figure that the positions obtained by positioning every day are sparse, the positions obtained by positioning three days are aggregated to obtain dense positions, and the first movement track of the target device shown in the figure can be obtained through the dense positions shown in the figure.
As an alternative embodiment, the above is implemented in a computer, since the computer processes the feature data
Figure BDA0003463441400000104
The spatial mapping matrix of (a) is:
Figure BDA0003463441400000105
wherein e isl∈RdIs a trainable d-dimensional vector, and all positions in the target position set can pass through a matrix E in a computerl∈R|Γ+1|×dAnd (4) performing representation.
Figure BDA0003463441400000111
The time mapping is:
Figure BDA0003463441400000112
where i represents the ith dimension, and both the time dimension and the space dimension are d-dimensional vectors.
As an alternative embodiment, the partial positions in the target position set shown in fig. 4 are aggregated into the first movement trajectory shown in the figure, but are not located on the first movement trajectory for position a, position B and position C. In this embodiment, the first subset of locations includes location a, location B, and location C described above.
The essence of the multi-head attention mechanism is to store historical data as Key-Value, wherein the Key corresponds to a historical location, the historical location may be a historical location of a target device or a historical location of other devices, and the Value corresponds to a movement track. The Key-Value is used to indicate the above-mentioned historical corresponding position information, and the historical position corresponding information is used to indicate that, in the historical travel track of the equipment, the general travel track at the historical position Key is the corresponding Value.
Taking the location a, the location B, and the location C shown in fig. 4 as an example, taking the location a as a Key to search for a corresponding Value in the history corresponding information as the movement track 1, taking the location B as a Key to search for a corresponding Value in the history corresponding information as the movement track 1, and taking the location C as a Key to search for a corresponding Value in the history corresponding information as the movement track 2, the first movement track set includes the movement track 1 and the movement track 2 in this embodiment. As shown in fig. 4, the first movement trajectory and movement trajectories 1 and 2 in the first movement trajectory set are first target movement trajectories of the target device.
Optionally, the searching for a movement track corresponding to each position in the first position subset in the pre-recorded historical position corresponding information to obtain a first movement track set includes: finding a movement trajectory corresponding to a current position in the first subset of positions in the historical position correspondence information by: determining a historical position set with the similarity degree of the current position being greater than or equal to a preset value in the historical position corresponding information, and determining a moving track with a corresponding relation to each historical position in the historical position set to obtain a second moving track set; and determining a movement track corresponding to the current position in the second movement track set.
As an optional embodiment, a large number of corresponding relationships between the historical positions and the movement tracks are recorded in the historical position corresponding information. The historical positions with the similarity greater than or equal to the preset value can be searched in the historical position corresponding information. In this embodiment, the similarity may be determined by distance, surrounding building type, or nearby street type. In this embodiment, taking the distance measure similarity as an example, the closer the distance is, the greater the similarity is, and the preset value may be a distance threshold, for example, 3 meters, 4 meters, 5 meters, and the like. The concrete can be determined according to actual conditions. Take position a, position B and position C in the first subset of positions as an example. Assume that the current position is position a as described above. And searching for a position with a distance smaller than or equal to a preset value (assuming that the preset value is 3 meters) from the position A in the historical position corresponding information. It is assumed that the distance between the position F and the position a in the history position correspondence information is smaller than the above-mentioned preset value. The position F in the historical position correspondence information is a similar position to the position a, and only the position F is included in the historical position set. The history position correspondence information records a movement trajectory corresponding to the position F, and if the movement trajectory is the movement trajectory 1, the second movement trajectory set includes only the movement trajectory 1. The movement track corresponding to the current position a can be determined to be the movement track 1 through the historical position corresponding information.
It is assumed that the distances from the position F, the position T, and the position J in the history position correspondence information to the position a are smaller than the above-described preset values. The position F, the position T and the position J in the historical position correspondence information are similar to the position a, and the historical position set includes the position F, the position T and the position J. The historical position correspondence information records movement tracks corresponding to the position F, the position T, and the position J, and if the position F corresponds to the movement track 1, the position T corresponds to the movement track 8, and the position J corresponds to the movement track 16 in the historical position correspondence information, the second movement track set includes the movement track 1, the movement track 8, and the movement track 16. The movement locus corresponding to the current position a can be determined among the above-described movement locus 1, movement locus 8, and movement locus 16 by multi-head attention.
Optionally, the determining a movement track corresponding to the current position in the second movement track set includes: determining the weight of each movement track in the second movement track set according to a multi-head attention mechanism model, wherein the multi-head attention mechanism model is obtained by autonomous learning by using the historical position corresponding information; and determining the movement track with the maximum weight in the second movement track set as the movement track corresponding to the current position.
As an alternative embodiment, the multi-head attention mechanism is a model obtained by autonomous learning using the historical position correspondence information. The multi-head attention mechanism model is specifically realized as follows:
Figure BDA0003463441400000131
Figure BDA0003463441400000132
Figure BDA0003463441400000133
Figure BDA0003463441400000134
Figure BDA0003463441400000135
w in the above formula is a parameter obtained by the multi-head attention mechanism through autonomous learning training. The essence of the multi-head attention is to store the historical data as Key-Value, where the Key corresponds to a historical location, the historical location may be a historical location of a target device or historical locations of other devices, and the Value corresponds to a movement track. The Key-Value is used to indicate the above-mentioned historical corresponding position information, and the historical position corresponding information is used to indicate that, in the historical travel track of the equipment, the general travel track at the historical position Key is the corresponding Value.
For the above-described embodiment, it is assumed that only the movement locus 1, the movement locus 8, and the movement locus 16 are included in the above-described second movement locus set. The weights of the above-described movement locus 1, movement locus 8, and movement locus 16 can be determined by multi-head attention. Assuming that the weight of the movement track 2 is 0.8, the weight of the movement track 8 is 0.4, and the weight of the movement track 16 is 0.2 through the multi-head attention mechanism autonomous learning, it is determined that the movement track 1 is the movement track corresponding to the current position a.
As an alternative embodiment, the weights of the movement trajectory 1, the movement trajectory 8, and the movement trajectory 16 may be determined by historical experience, and the historical experience is obtained based on the historical position correspondence information. The historical correspondence information records the correspondence between the position and the movement trajectory. The higher the frequency of occurrence of the movement trajectory in the history correspondence information, which indicates that the target device normally moves on the movement trajectory, the higher the weight of the movement trajectory. It is assumed that only the movement locus 1, the movement locus 8, and the movement locus 16 are included in the second movement locus set. The weight of each movement trace can be determined by the frequency of occurrence of the movement trace 1, the movement trace 8, and the movement trace 16 recorded in the history position correspondence information. Assuming that the frequency of occurrence of the movement trajectory 1 is the highest in the history position correspondence information, the weight of the movement trajectory 1 is the largest among the movement trajectories 1, 8, and 16. It is determined that the movement trajectory 1 is the movement trajectory corresponding to the current position a.
Optionally, the adsorbing the positions in the target position set to multiple roads included in the target road network information to obtain a second target movement trajectory of the target device includes: determining, as the second target movement trajectory, a trajectory formed by the roads in which the positions in the target position set are located, when the positions in the target position set are all located on the plurality of roads.
As an optional implementation, the movement trajectory of the target device may be obtained by combining road network information matching. The road network includes a plurality of roads, and the solid black line shown in fig. 5 is a plurality of roads in the road network information. The target device is located to obtain the position shown in the figure. And adsorbing the positions according to the nearest distance by combining a plurality of roads in the road network information, adsorbing the positioned positions to the nearest road, adsorbing the positioned positions to the roads as shown in fig. 5, and obtaining a second target movement track of the target device according to the roads in the road network information.
As an optional embodiment, the positions in the target position set are subjected to trajectory reduction using the road network information, positions near the roads are attracted to the roads, and the missing part of the target movement trajectory is supplemented using the road network information. The triangles, rectangles and circles shown in fig. 6 represent positions in the set of target positions obtained by positioning, and the black lines in the figure represent roads in the road network information. As shown in the figure, the positions in the target position set are all located on the roads in the road network information, and then the track formed on the road where the position is located is taken as the second target movement track of the target device.
Optionally, the adsorbing the positions in the target position set to multiple roads included in the target road network information to obtain a second target movement trajectory of the target device further includes: determining a track formed by the roads in which the part positions are located as a second movement track if the part positions in the target position set are located on the plurality of roads; determining the second movement track set according to each position in a second position subset and the adjacent position of each position in the second position subset, wherein the second position subset comprises the positions except the partial position in the target position set, and the adjacent position of each position in the second position subset is the position adjacent to each position after being sorted according to the positioning time sequence in the target position set; determining the second movement trajectory and the second movement trajectory set as the second target movement trajectory.
As an alternative implementation, as shown in fig. 7, in the road network information, some positions obtained by positioning are located on roads, and the position B is not located on a road in the road network information, that is, the second position subset includes the position B in this embodiment. When each position is obtained by positioning, the positioning time of each position is also recorded, that is, the target position set may further include the positioning time corresponding to each position. With the positioning time of position a being 1/13: 01/2021, the positioning time of position B being 1/13: 10/2021, and the positioning time of position C being 1/13: 15/2021, as shown in fig. 7, the adjacent positions of position B in the target position set include the above-mentioned position a and position C. The road is sucked according to the distance-first principle, and the position B shown in fig. 7 is sucked on the road in the road network information. The road with the highest score can be determined as the matched road according to any one or more influence factors such as positioning accuracy, distance deviation, deviation angle, speed, road type and the like, wherein the score calculation may involve the distance between the road and the adjacent position, the moving speed determined according to the adjacent position, the turning cost of the road and the adjacent position, the score of the matched road at the adjacent position, the deviation stability of the matched road and the like.
Optionally, the determining the second set of movement trajectories according to each position in the second subset of positions and an adjacent position of each position in the second subset of positions includes: performing the following steps for each location in the second subset of locations, each location in the second subset of locations being a current location when performing the following steps: determining a first set of roads of the plurality of roads that are less than or equal to a first distance threshold from the current location; determining a second set of roads of the plurality of roads for which a neighboring location distance to the current location is less than or equal to a second distance threshold; and determining a movement track corresponding to the current position according to the first road set and the second road set, wherein the second movement track set comprises the movement track corresponding to the current position.
As an alternative embodiment, taking the example that the second subset of locations shown in fig. 7 includes location B and location C, it is assumed that the current location is location B. Roads with the distance from the position B being less than or equal to a first distance threshold value are determined in a plurality of road networks according to the road network information, and the first distance threshold value can be set according to actual conditions, such as 0.3 meter, 0.4 meter, 0.8 meter, 1 meter and the like. In the present embodiment, it is assumed that roads having a distance from the position B smaller than or equal to the first distance threshold among the plurality of roads shown in fig. 7 are a road 1 and a road 2 shown in the figure, and the first road set includes the road 1 and the road 2. A link matching the position B is determined in the links 1 and 2 in association with the position B and its adjacent position (position a or position C), and an index of the matching link is returned.
Take the example of determining a road matching position B from the previous position (position a) of position B among road 1 and road 2. The position a shown in fig. 7 is on the road of the road network information, i.e., on the road 2, and only the road 2 is included in the second position set. Mapping position B to road 1 and road 2 respectively, mapping position B to road 1 as shown in the figure results in position B1, and mapping position B to road results in position B2. The road matching the position B may be determined in the road 1 and the road 2 according to the distance between B1 and B2 and the position a, or the turning cost between B1 and B2 and the position a, respectively.
Take the example of determining a road matching position B from the next position (position C) of position B among road 1 and road 2. And if the position C is not on the road as shown in the figure, determining roads which are less than or equal to the first distance threshold from the position C among a plurality of road networks of the road network information, such as the road 2 and the road 3 as shown in the figure, wherein the second road set comprises the road 2 and the road 3. The position C is mapped to the road 2 and the road 3 respectively, the position C is mapped to the road 2 to obtain C2 as shown in the figure, and the position C is mapped to the road 3 to obtain a position C1. The second target movement trajectory may be determined in road 1 and road 2 in the first location set, and road 2 and road 3 in the second location set.
Optionally, the determining a movement track corresponding to the current position according to the first road set and the second road set includes: determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the moving distance from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to a first preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the number of turns from the current position to a connecting position of the current position along the moving track corresponding to the current position is less than or equal to a second preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein a turning angle from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to a third preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the moving distance from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to the first preset value, the turning times are less than or equal to the second preset value, and the turning angle is less than or equal to a third preset value; or determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the speed limit of the moving track corresponding to the current position is matched with the speed of the target device moving from the current position to the position adjacent to the current position.
As an alternative embodiment, the moving track of the target device can be determined in a plurality of roads according to the length of the connecting road and the turning cost. Taking the length of the connecting road as an example, as shown in fig. 8, moving from position B to position B1 to position a along the road in the road network information obtains a moving track 1 as shown in the figure, and moving from position B to position B2 to position a along the road in the road network information obtains a moving track 2 as shown in the figure, comparing the moving distances of the moving tracks 1 and 2, and determining the moving track with the moving distance smaller than a first preset value in the moving tracks 1 and 2 as the moving track corresponding to the position B, where the first preset value may be determined according to the actual situation, and may be, for example, 0.5 meter, 1 meter, and the like. Or the movement track with the shortest movement distance can be determined as the movement track corresponding to the position B, and as can be seen from the figure, the distance of the movement track 2 is the shortest, the movement track 2 is determined as the movement track corresponding to the position B.
As an optional implementation manner, taking the example of determining the moving track corresponding to the position B by using the turning cost, the turning cost may be the number of turns, and the second preset value may be determined according to an actual situation, and may be, for example, 1, 2, 3, and the like. As shown in fig. 8, moving from position B to position B1 to position a along the road in the road network information results in moving track 1 as shown in the figure, and moving from position B to position B2 to position a along the road in the road network information results in moving track 2 as shown in the figure, comparing the number of turns of moving track 1 and moving track 2, and determining that moving track 2 is the moving track corresponding to position B if the number of turns of moving track 2 is the least.
As an optional implementation manner, since each position in the target position set has a corresponding positioning time, a moving track corresponding to the current position may be determined in a plurality of roads according to the positioning time and the speed limit on each road in the road network information. As shown in fig. 9, it is assumed that the current position is position B, and the adjacent position to position B is position a shown in the figure. The movement locus 1 is formed by moving from the mapping position B1 to the position a along the road 1 and the road 2 in the road network information from the position B. And moving from the position B to the position a from the mapping position B2 along the road 3 in the road network information, forming a moving track 2. There is a speed limit for each road in the road information. According to the moving distances of the moving track 1 and the moving track 2, the positioning time of the position A and the position B, and the speed limit of the road 1, the road 2 and the road 3, the road matched with the position can be determined. It can be seen from fig. 9 that the movement trace 2 is the best matching movement trace in terms of movement distance and turning times. However, the speed limit movement trajectory 2 according to the road is not necessarily a movement trajectory corresponding to the position B. Assuming that the speed limit of the road 3 is not more than 30 km/h at the highest, the moving distance of the moving track 2 is 60 km, and the positioning time difference between the position B and the position a is half an hour. According to the speed limit of the road 3, if the target device moves from the position a to the position B along the moving track 2 for at least two hours, the positioning time difference between the position B and the position a is half an hour, which is obviously inconsistent. And if the speed limit on the moving track 1 is consistent with the positioning time difference between the position B and the position A, determining that the moving track 1 is the moving track corresponding to the position B. The road network information and the road speed limit mentioned in the above embodiments are examples, and the details are determined according to actual situations.
Optionally, the determining the target movement trajectory according to the first target movement trajectory and the second target movement trajectory includes: determining a movement track containing the maximum number of positions in the target position set in the first target movement track and the second target movement track as the target movement track; or determining the weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained by autonomous learning by using a historical movement track, and the historical movement track comprises the historical movement track of the target device or comprises the historical movement tracks of a plurality of devices; determining a movement track with the largest weight in the first target movement track and the second target movement track as the target movement track; or determining the weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained by autonomous learning by using a historical movement track, and the historical movement track comprises the historical movement track of the target device or comprises the historical movement tracks of a plurality of devices; and performing weighted fusion on the first target movement track and the second target movement track according to the weight of the first target movement track and the weight of the second target movement track to obtain the target movement tracks.
As an alternative embodiment, as shown in fig. 10, the first target movement trajectory may be obtained by trajectory aggregation, and the second target movement trajectory may be obtained by road network matching. And combining the first target movement track and the second target movement track to obtain a target movement track of the target equipment. In this embodiment, the target movement trajectory may be determined in the first target movement trajectory and the second target movement trajectory, specifically, the target movement trajectory may be determined according to the number of positions included in the first target movement trajectory and the second target movement trajectory, and the movement trajectory including the largest number of positions may be determined as the target movement trajectory. For example, the target position set includes 100 positions, 900 positions are included in a first target movement track obtained through track aggregation, and 800 positions are included in a second target movement track obtained through road network matching, so that it is determined that the first target movement track is the target movement track of the target device.
As another alternative, the weights of the first target movement trajectory and the second target movement trajectory may also be determined through an attention mechanism, and the movement trajectory with the largest weight may be determined as the target movement trajectory of the target device. The attention mechanism is a model obtained by autonomous learning using a historical movement trajectory, and the historical movement trajectory may include a movement trajectory of the target device or a movement trajectory of another device. The essence of the attention mechanism is that the weight of each movement track is obtained through historical movement tracks, and the weight is larger for the movement tracks frequently selected by a large number of target devices.
As another optional implementation, the weights of the first target movement trajectory and the second target movement trajectory may also be determined through an attention mechanism, and the first target movement trajectory is fused according to the weights of the first target movement trajectory and the second target movement trajectory to obtain the target movement trajectory. As shown in fig. 11, the first target movement trajectory and the second target movement trajectory are fused to obtain a target movement trajectory.
Assuming that the first target moving track is
Figure BDA0003463441400000201
The second target moving track is
Figure BDA0003463441400000202
Carrying out track fusion to obtain a target moving track
Figure BDA0003463441400000203
Figure BDA0003463441400000204
Figure BDA0003463441400000205
Figure BDA0003463441400000206
Figure BDA0003463441400000207
Figure BDA0003463441400000208
Extracting the most probable positions on the first target movement track and the second target movement track through weighted fusion to serve as enhanced preset tracks
Figure BDA0003463441400000209
A Hidden Markov Model (HMM) can be used to ensure that all predicted points are positioned on a real road with actual physical meaning to obtain a prediction result tauUIn HMM slow join process, cross entropy and regularization are used as loss functions:
Figure BDA00034634414000002010
Figure BDA00034634414000002011
is the predicted position
Figure BDA00034634414000002012
And an arbitrary position elThe position with the highest probability is taken as the predicted position. The parameter set theta in the loss function contains input, a mapping matrix of Key-Value and a mapping matrix of place
Figure BDA00034634414000002013
Figure BDA00034634414000002014
The one-hot coding vector of the position of the target device u in the current day n and the time period t is obtained, and the possible values of u, n and t can be sequentially cycled by adopting an Adam optimizer in the training process.
As an alternative, for the position obtained by positioning, the position with poor precision can be filtered out, and the position with repeated positioning time is ignored. And if the position obtained by positioning has errors in time sequence, the position can be automatically reordered. If the distance between the current position and the adjacent position is smaller than a preset value (for example, 1 meter, 2 meters and the like), the information of the adjacent position can be directly given to the current position, and the calculation speed is accelerated.
The preset range may be set according to actual conditions, for example, 3 meters, 2 meters, 1 meter, and the like from the target moving track. The target offline media information may be advertisements, images, videos, and the like. Taking the advertisement as an example, if the advertisement A, B, C, D is within the preset range of the target moving track, the target device is the exposure device of the advertisement A, B, C, D. Taking advertisement a as an example, if the number of exposure devices is taken as the exposure amount of the advertisement, if 1 ten thousand devices are the exposure devices of advertisement a, the exposure amount of advertisement a is 1 ten thousand.
As an alternative embodiment, the system framework diagram shown in fig. 12 includes a location log module, where the location log includes a location obtained by locating the target device and a corresponding location time. And the path restoration module is used for restoring a target moving track of the target equipment based on the positions in the target position set, and the commuting path module is used for determining a daily commuting route of each equipment. The offline media information spots are used to obtain locations of offline media information, such as advertising spots. The exposure counting module is used for counting the exposure times of the off-line media information and the number of exposure devices, and the off-line media information exposure module is used for outputting the exposure condition of the off-line media information. In this embodiment, the route restoration module that takes the longest time is extracted, the calculation is performed at the idle time of the calculation cluster, and the result is stored in the commuting route module. When the exposure degree of each specific offline media information needs to be calculated, the exposure result of the offline media information can be quickly obtained only by taking the position of the offline media information, the positioning log and the commuting path which is calculated in advance as input.
Optionally, after determining the target movement trajectory according to the first target movement trajectory and the second target movement trajectory, the method further includes: and under the condition that the target offline media information is located in the preset range of the target moving track, determining the target equipment as an exposure object of the target offline media information.
As an optional implementation manner, the preset range may be set according to actual situations, for example, 3 meters, 2 meters, 1 meter, and the like from the target moving track. The target offline media information may be advertisements, images, videos, and the like. Taking the advertisement as an example, if the advertisement A, B, C, D is within the preset range of the target moving track, the target device is the exposure object of the advertisement A, B, C, D. Taking advertisement a as an example, if the number of exposure targets is taken as the exposure amount of the advertisement, if there are 1 ten thousand devices that are exposure targets of advertisement a, the exposure amount of advertisement a is 1 ten thousand.
As an optional implementation mode, the exposure of media information which is put down under the line is counted. A common statistical approach is to use a video probe for statistics. For example, a camera is installed near an advertisement which is placed on line, and the exposure of the advertisement is counted through a video collected by the camera. However, the video acquisition range of the video probe is limited, and the advertisement exposure amount is counted by the video acquired by the video probe, and a certain error exists between the advertisement exposure amount and the actual advertisement exposure amount. In addition, the video probe is expensive to erect. In the embodiment of the invention, the target position set of the target equipment is obtained by positioning the use of the target equipment. And performing track reduction processing on the acquired target position set to obtain the moving track of the target equipment. And if the target offline media information is located in the moving track range of the target equipment, the target equipment is an exposure object of the target offline media information. The exposure of the media information under the line can be counted through the moving track of the target device, and a video probe is not needed. Therefore, the technical problem that track reduction accuracy is low due to the fact that the coverage area of a video probe is limited in the prior art is solved, exposure of the media information under the line can be counted without using the video probe, and cost is saved.
It should be noted that for simplicity of description, the above-mentioned method embodiments are shown as a series of combinations of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, there is also provided a trajectory reduction device for implementing the trajectory reduction method. As shown in fig. 13, the apparatus includes: an obtaining module 1302, configured to obtain a target location set of a target device; an aggregation module 1304, configured to aggregate the positions in the target position set, and obtain a first target movement trajectory of the target device through a multi-head attention mechanism; an adsorption module 1306, configured to aggregate positions in the target position set, and obtain a second target movement trajectory of the target device through a multi-head attention mechanism; a determining module 1308, configured to determine the target movement trajectory according to the first target movement trajectory and the second target movement trajectory.
Optionally, the apparatus is further configured to aggregate positions in the target position set to obtain a first movement track, where the first movement track includes a part of positions in the target position set; searching a movement track corresponding to each position in a first position subset in pre-recorded historical position corresponding information to obtain a first movement track set, wherein the first position subset comprises positions except the partial positions in the target position set, multiple groups of historical positions and movement tracks with corresponding relations are recorded in the historical position corresponding information, and the positions in the historical position corresponding information comprise the historical positions of the target equipment or comprise the historical positions of multiple pieces of equipment; determining the first movement track and the first movement track set as the first target movement track.
Optionally, the apparatus is further configured to search the historical location correspondence information for a movement track corresponding to the current location in the first subset of locations by: determining a historical position set with the similarity degree of the current position being greater than or equal to a preset value in the historical position corresponding information, and determining a moving track with a corresponding relation to each historical position in the historical position set to obtain a second moving track set; and determining a movement track corresponding to the current position in the second movement track set.
Optionally, the apparatus is further configured to determine a weight of each movement trajectory in the second movement trajectory set according to a multi-head attention mechanism model, where the multi-head attention mechanism model is a model obtained through autonomous learning by using the historical position correspondence information; and determining the movement track with the maximum weight in the second movement track set as the movement track corresponding to the current position.
Optionally, the apparatus is further configured to determine, as the second target movement trajectory, a trajectory formed by a road on which the positions in the target position set are located, when the positions in the target position set are all located on the plurality of roads.
Optionally, the apparatus is further configured to, in a case where a part of the positions in the set of target positions are located on the plurality of roads, determine a trajectory formed by the roads where the part of the positions are located as a second movement trajectory; determining the second movement track set according to each position in a second position subset and the adjacent position of each position in the second position subset, wherein the second position subset comprises the positions except the partial position in the target position set, and the adjacent position of each position in the second position subset is the position adjacent to each position after being sorted according to the positioning time sequence in the target position set; determining the second movement trajectory and the second movement trajectory set as the second target movement trajectory.
Optionally, the apparatus is further configured to perform the following steps for each location in the second subset of locations, and when performing the following steps, each location in the second subset of locations is a current location: determining a first set of roads of the plurality of roads that are less than or equal to a first distance threshold from the current location; determining a second set of roads of the plurality of roads for which a neighboring location distance to the current location is less than or equal to a second distance threshold; and determining a movement track corresponding to the current position according to the first road set and the second road set, wherein the second movement track set comprises the movement track corresponding to the current position.
Optionally, the apparatus is further configured to determine a movement track corresponding to the current location in a movement track set formed by the first road set and the second road set, where a movement distance from the current location to a position adjacent to the current location along the movement track corresponding to the current location is less than or equal to a first preset value; determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the turning times of the moving from the current position to the connecting position of the current position along the moving track corresponding to the current position are less than or equal to a second preset value; determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein a turning angle from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to a third preset value; determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the moving distance from the current position to the position adjacent to the current position along the moving track corresponding to the current position is less than or equal to the first preset value, the turning times are less than or equal to the second preset value, and the turning angle is less than or equal to a third preset value; and determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the speed limit of the moving track corresponding to the current position is matched with the speed of the target device moving from the current position to the position adjacent to the current position.
Optionally, the apparatus is further configured to determine, as the target movement trajectory, a movement trajectory, which includes the largest number of positions in the target position set, in the first target movement trajectory and the second target movement trajectory; determining weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained through autonomous learning by using a historical movement track, and the historical movement track comprises a historical movement track of the target device or comprises historical movement tracks of a plurality of devices; determining a movement track with the largest weight in the first target movement track and the second target movement track as the target movement track; determining weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained through autonomous learning by using a historical movement track, and the historical movement track comprises a historical movement track of the target device or comprises historical movement tracks of a plurality of devices; and performing weighted fusion on the first target movement track and the second target movement track according to the weight of the first target movement track and the weight of the second target movement track to obtain the target movement tracks.
Optionally, the apparatus is further configured to, after determining the target movement trajectory according to the first target movement trajectory and the second target movement trajectory, determine the target device as an exposure object of the target offline media information when the target offline media information is within a preset range of the target movement trajectory.
According to another aspect of the embodiments of the present invention, there is also provided a trajectory reduction system for implementing the trajectory reduction method, as shown in fig. 12, including: the system comprises a preprocessing unit, a route restoring module and a commuting route module, wherein the route restoring module is connected with a positioning log module and is used for acquiring a target position set of target equipment, and the positioning log module records the position of the target equipment; the path restoration module is further configured to aggregate positions in the target position set, and obtain a first target movement trajectory of the target device through a multi-head attention mechanism; acquiring target road network information, and adsorbing positions in a target position set onto a plurality of roads included in the target road network information to obtain a second target movement track of the target equipment; determining the target moving track according to the first target moving track and the second target moving track; and the commuting path module is connected with the path restoration module and is used for storing the target moving track of the target equipment.
Optionally, the system further comprises: and the exposure counting module is connected with the offline media information point location module and the commuting path module, and is used for determining the target equipment as an exposure object of the target offline media information under the condition of determining that the target offline media information is located in the preset range of the target moving track, wherein the offline media information point location module records the position of the target offline media information.
Optionally, the system further comprises: and the offline media information point location module stores the position of the media information. Such as the location of the advertisement. The system further comprises: and the exposure of the offline media information is used for counting the exposure of the media information, such as the exposure of advertisements.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the trajectory restoration method, where the electronic device may be the terminal device or the server shown in fig. 1. The present embodiment takes the electronic device as a server as an example for explanation. As shown in fig. 14, the electronic device comprises a memory 1402 and a processor 1404, the memory 1402 having stored therein a computer program, the processor 1404 being arranged to execute the steps of any of the method embodiments described above by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a target position set of the target equipment;
s2, aggregating the positions in the target position set, and obtaining a first target moving track of the target equipment through a multi-head attention mechanism model;
s3, acquiring target road network information, and adsorbing positions in a target position set to a plurality of roads in the target road network information to obtain a second target movement track of the target equipment;
and S4, determining the target movement track according to the first target movement track and the second target movement track.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 14 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 14 is a diagram illustrating a structure of the electronic device. For example, the electronics may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 14, or have a different configuration than shown in FIG. 14.
The memory 1402 may be configured to store software programs and modules, such as program instructions/modules corresponding to the trajectory recovery method and apparatus in the embodiments of the present invention, and the processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, so as to implement the trajectory recovery method. Memory 1402 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1402 may further include memory located remotely from the processor 1404, which may be connected to a terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The storage 1402 may be specifically, but not limited to, used for storing information such as sample characteristics of an item and a target virtual resource account number. As an example, as shown in fig. 14, the memory 1402 may include, but is not limited to, an obtaining module 1302, an aggregating module 1304, an adsorbing module 1306, and a determining module 1308 of the trajectory reduction apparatus. In addition, the device may further include, but is not limited to, other module units in the trajectory restoration device, which is not described in this example again.
Optionally, the transmitting device 1406 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1406 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmitting device 1406 is a Radio Frequency (RF) module, which is used to communicate with the internet by wireless means.
In addition, the electronic device further includes: a display 1408 for displaying the location of the target device; and a connection bus 1410 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the application, there is provided a computer program product comprising a computer program/instructions containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1509, and/or installed from the removable medium 1511. When executed by the central processing unit 1501, the computer programs perform various functions provided by the embodiments of the present application.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Fig. 15 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the present application.
It should be noted that the computer system 1500 of the electronic device shown in fig. 15 is only an example, and should not bring any limitation to the functions and the application scope of the embodiments of the present application.
As shown in fig. 15, the computer system 1500 includes a Central Processing Unit (CPU) 1501 which can perform various appropriate actions and processes in accordance with a program stored in a Read-Only Memory (ROM) 1502 or a program loaded from a storage section 1508 into a Random Access Memory (RAM) 1503. In the random access memory 1503, various programs and data necessary for system operation are also stored. The cpu 1501, the rom 1502, and the ram 1503 are connected to each other by a bus 1504. An Input/Output interface 1505 (an Input/Output interface, i.e., an I/O interface) is also connected to bus 1504.
The following components are connected to the input/output interface 1505: an input portion 1506 including a keyboard, a mouse, and the like; an output section 1507 including a Display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 1508 including a hard disk and the like; and a communication section 1509 including a network interface card such as a local area network card, a modem, and the like. The communication section 1509 performs communication processing via a network such as the internet. A driver 1510 is also connected to the input/output interface 1505 as needed. A removable medium 1511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1510 as necessary, so that a computer program read out therefrom is mounted into the storage section 1508 as necessary.
In particular, according to embodiments of the present application, the processes described in the various method flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1509, and/or installed from the removable medium 1511. When executed by the central processor 1501, the computer programs perform the various functions defined in the system of the present application.
According to an aspect of the present application, there is provided a computer-readable storage medium from which a processor of a computer device reads computer instructions, the processor executing the computer instructions to cause the computer device to perform the method provided in the above-mentioned various alternative implementations.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring a target position set of the target equipment;
s2, aggregating the positions in the target position set, and obtaining a first target moving track of the target equipment through a multi-head attention mechanism model;
s3, acquiring target road network information, and adsorbing positions in a target position set to a plurality of roads in the target road network information to obtain a second target movement track of the target equipment;
and S4, determining the target movement track according to the first target movement track and the second target movement track.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (16)

1. A trajectory reduction method, comprising:
acquiring a target position set of target equipment;
aggregating positions in the target position set, and obtaining a first target moving track of the target equipment through a multi-head attention mechanism model;
acquiring target road network information, and adsorbing positions in a target position set onto a plurality of roads in the target road network information to obtain a second target movement track of the target equipment;
and determining the target moving track according to the first target moving track and the second target moving track.
2. The method of claim 1, wherein the aggregating the locations in the target location set and obtaining a first movement trajectory of the target device through a multi-head attention mechanism model comprises:
aggregating positions in the target position set to obtain a first movement track, wherein the first movement track comprises part of positions in the target position set;
searching a movement track corresponding to each position in a first position subset in pre-recorded historical position corresponding information to obtain a first movement track set, wherein the first position subset comprises positions except the partial positions in the target position set, multiple groups of historical positions and movement tracks with corresponding relations are recorded in the historical position corresponding information, and the positions in the historical position corresponding information comprise the historical positions of the target equipment or comprise the historical positions of multiple pieces of equipment;
determining the first movement track and the first movement track set as the first target movement track.
3. The method according to claim 2, wherein the searching for the movement track corresponding to each position in the first position subset in the pre-recorded historical position correspondence information to obtain a first movement track set comprises:
finding a movement trajectory corresponding to a current position in the first subset of positions in the historical position correspondence information by:
determining a historical position set with the similarity degree of the current position being greater than or equal to a preset value in the historical position corresponding information, and determining a moving track with a corresponding relation to each historical position in the historical position set to obtain a second moving track set;
and determining a movement track corresponding to the current position in the second movement track set.
4. The method of claim 3, wherein determining a movement trajectory corresponding to the current location in the second set of movement trajectories comprises:
determining the weight of each movement track in the second movement track set according to a multi-head attention mechanism model, wherein the multi-head attention mechanism model is obtained by autonomous learning by using the historical position corresponding information;
and determining the movement track with the maximum weight in the second movement track set as the movement track corresponding to the current position.
5. The method according to claim 2, wherein the adsorbing the positions in the target position set to a plurality of roads included in the target road network information to obtain a second target moving track of the target device comprises:
determining, as the second target movement trajectory, a trajectory formed by the roads in which the positions in the target position set are located, when the positions in the target position set are all located on the plurality of roads.
6. The method according to claim 1, wherein the adsorbing locations in the target location set to a plurality of roads included in the target road network information to obtain a second target moving track of the target device, further comprises:
determining a track formed by the roads in which the part positions are located as a second movement track if the part positions in the target position set are located on the plurality of roads;
determining the second movement track set according to each position in a second position subset and the adjacent position of each position in the second position subset, wherein the second position subset comprises the positions except the partial position in the target position set, and the adjacent position of each position in the second position subset is the position adjacent to each position after being sorted according to the positioning time sequence in the target position set;
determining the second movement trajectory and the second movement trajectory set as the second target movement trajectory.
7. The method of claim 6, wherein determining the second set of movement trajectories according to each location in the second subset of locations and a neighboring location of each location in the second subset of locations comprises:
performing the following steps for each location in the second subset of locations, each location in the second subset of locations being a current location when performing the following steps:
determining a first set of roads from the plurality of roads that are less than or equal to a first distance threshold from the current location;
determining a second set of roads of the plurality of roads for which a neighboring location distance to the current location is less than or equal to a second distance threshold;
and determining a movement track corresponding to the current position according to the first road set and the second road set, wherein the second movement track set comprises the movement track corresponding to the current position.
8. The method of claim 7, wherein determining the movement track corresponding to the current position according to the first road set and the second road set comprises:
determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the moving distance from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to a first preset value; alternatively, the first and second electrodes may be,
determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the turning times of the moving from the current position to the connecting position of the current position along the moving track corresponding to the current position are less than or equal to a second preset value; alternatively, the first and second liquid crystal display panels may be,
determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein a turning angle from the current position to a position adjacent to the current position along the moving track corresponding to the current position is less than or equal to a third preset value; alternatively, the first and second electrodes may be,
determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the moving distance from the current position to the position adjacent to the current position along the moving track corresponding to the current position is less than or equal to the first preset value, the turning times are less than or equal to the second preset value, and the turning angle is less than or equal to a third preset value; alternatively, the first and second electrodes may be,
and determining a moving track corresponding to the current position in a moving track set formed by the first road set and the second road set, wherein the speed limit of the moving track corresponding to the current position is matched with the speed of the target device moving from the current position to the position adjacent to the current position.
9. The method of claim 1, wherein determining the target movement trajectory from the first target movement trajectory and the second target movement trajectory comprises:
determining a movement track containing the maximum number of positions in the target position set in the first target movement track and the second target movement track as the target movement track; alternatively, the first and second electrodes may be,
determining weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained through autonomous learning by using a historical movement track, and the historical movement track comprises a historical movement track of the target device or comprises historical movement tracks of a plurality of devices; determining a movement track with the largest weight in the first target movement track and the second target movement track as the target movement track; alternatively, the first and second electrodes may be,
determining weights of the first target movement track and the second target movement track according to an attention mechanism model, wherein the attention mechanism model is a model obtained through autonomous learning by using historical movement tracks, and the historical movement tracks comprise historical movement tracks of the target equipment or historical movement tracks of a plurality of equipment; and performing weighted fusion on the first target movement track and the second target movement track according to the weight of the first target movement track and the weight of the second target movement track to obtain the target movement tracks.
10. The method of any of claims 1 to 9, wherein after determining the target movement trajectory from the first target movement trajectory and the second target movement trajectory, the method further comprises:
and under the condition that the target offline media information is located in the preset range of the target moving track, determining the target equipment as an exposure object of the target offline media information.
11. A trajectory restoration device, comprising:
the acquisition module is used for acquiring a target position set of the target equipment;
the aggregation module is used for aggregating the positions in the target position set and obtaining a first target moving track of the target equipment through a multi-head attention mechanism;
the adsorption module is used for aggregating positions in the target position set and obtaining a second target moving track of the target equipment through a multi-head attention mechanism;
and the determining module is used for determining the target moving track according to the first target moving track and the second target moving track.
12. A trajectory reduction system, applied to the trajectory reduction method according to any one of claims 1 to 10, comprising:
a preprocessing unit including a path restoration module and a commute path module, wherein,
the path restoration module is connected with the positioning log module and is used for acquiring a target position set of the target equipment, wherein the positioning log module records the position of the target equipment;
the path restoration module is further configured to aggregate positions in the target position set, and obtain a first target movement trajectory of the target device through a multi-head attention mechanism; acquiring target road network information, and adsorbing positions in a target position set onto a plurality of roads included in the target road network information to obtain a second target movement track of the target equipment; determining the target moving track according to the first target moving track and the second target moving track;
and the commuting path module is connected with the path restoration module and is used for storing the target moving track of the target equipment.
13. The system of claim 12, further comprising:
an exposure statistic module connected with the offline media information point location module and the commuting path module, wherein,
the exposure counting module is used for determining the target equipment as an exposure object of the target offline media information under the condition that the target offline media information is determined to be located within the preset range of the target moving track, wherein the position of the target offline media information is recorded in the offline media information point location module.
14. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any one of claims 1 to 10.
15. A computer program product comprising computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of the method of any of claims 1 to 10.
16. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 10 by means of the computer program.
CN202210023475.7A 2021-12-16 2022-01-10 Track restoration method and device, storage medium and electronic equipment Pending CN114428888A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111537201 2021-12-16
CN2021115372011 2021-12-16

Publications (1)

Publication Number Publication Date
CN114428888A true CN114428888A (en) 2022-05-03

Family

ID=81311913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210023475.7A Pending CN114428888A (en) 2021-12-16 2022-01-10 Track restoration method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114428888A (en)

Similar Documents

Publication Publication Date Title
US11580755B2 (en) Method, apparatus, and system for determining polyline homogeneity
US10281284B2 (en) Hybrid road network and grid based spatial-temporal indexing under missing road links
Yuan et al. An interactive-voting based map matching algorithm
CN108170793B (en) Vehicle semantic track data-based dwell point analysis method and system
US20200082561A1 (en) Mapping objects detected in images to geographic positions
CN110413905B (en) Method, device and equipment for acquiring road alignment and storage medium
CN111212383B (en) Method, device, server and medium for determining number of regional permanent population
CN104408043A (en) Information processing method and server
US11255678B2 (en) Classifying entities in digital maps using discrete non-trace positioning data
CN111683134A (en) Distributed Internet of vehicles data transmission system and method based on block chain technology
CN112380462A (en) Method, device, server and computer readable storage medium for planning participation path
CN112258254B (en) Internet advertisement risk monitoring method and system based on big data architecture
CN109949063A (en) A kind of address determines method, apparatus, electronic equipment and readable storage medium storing program for executing
CN112214677B (en) Point of interest recommendation method and device, electronic equipment and storage medium
CN113899355A (en) Map updating method and device, cloud server and shared riding equipment
CN105575155A (en) Method and equipment for determining vehicle driving information
CN110704491B (en) Data query method and device
CN113704373B (en) User identification method, device and storage medium based on movement track data
CN114596709A (en) Data processing method, device, equipment and storage medium
CN110196440B (en) Method and device for identifying coincident track, electronic equipment and storage medium
CN112527945A (en) Method and device for processing geographic space big data
CN110619090B (en) Regional attraction assessment method and device
CN114428888A (en) Track restoration method and device, storage medium and electronic equipment
Zhu et al. Mining large-scale GPS streams for connectivity refinement of road maps
CN112732446B (en) Task processing method and device and storage medium

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