CN110688435A - Similar track searching method and system - Google Patents
Similar track searching method and system Download PDFInfo
- Publication number
- CN110688435A CN110688435A CN201810725065.0A CN201810725065A CN110688435A CN 110688435 A CN110688435 A CN 110688435A CN 201810725065 A CN201810725065 A CN 201810725065A CN 110688435 A CN110688435 A CN 110688435A
- Authority
- CN
- China
- Prior art keywords
- target
- length
- similar
- fixed
- feature vector
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 239000013598 vector Substances 0.000 claims abstract description 93
- 238000013507 mapping Methods 0.000 claims abstract description 58
- 238000003860 storage Methods 0.000 claims abstract description 6
- 230000006870 function Effects 0.000 claims description 32
- 238000010801 machine learning Methods 0.000 claims description 13
- 239000011159 matrix material Substances 0.000 description 13
- 238000010586 diagram Methods 0.000 description 7
- 238000012360 testing method Methods 0.000 description 7
- 230000001788 irregular Effects 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0639—Item locations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0645—Rental transactions; Leasing transactions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/40—Business processes related to the transportation industry
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- General Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Primary Health Care (AREA)
- Tourism & Hospitality (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a similar track searching method, a system, a device and a storage medium. The method mainly comprises a similar track searching method, and the method comprises the following steps: determining grid division of a geographic area based on a preset grid size; mapping the target track into a target grid sequence with a fixed length based on the grids and the sequence of the target track points in the geographic area; mapping the fixed-length target mesh sequence into a shortened fixed-length target feature vector; based on the shortened fixed-length target feature vector, a set of trajectories similar to the target trajectory is determined. The invention can realize the function of searching similar tracks.
Description
Technical Field
The technology relates to the field of internet, in particular to a method and a system for searching similar tracks.
Background
In recent years, with the rapid development of communication networks, car networking technologies and mobile internet of things, it has become a very common phenomenon to collect the moving track of a vehicle by using a sensor built in a car or a mobile phone. The similarity analysis of the travel track is a big hotspot in recent years, and the traditional track analysis mode only analyzes the starting point and the ending point of the track and is not enough to meet the requirement of the current vehicle sharing business.
Disclosure of Invention
Additional features of the invention will be set forth in part in the description which follows. Additional features of some aspects of the invention will become apparent to those skilled in the art upon examination of the following description and accompanying drawings or may be learned by the manufacture or operation of the embodiments. The features of the present invention may be realized and attained by practice or use of the methodologies, instrumentalities and combinations of the various aspects of the particular embodiments described below.
In one aspect, an embodiment of the present invention provides a similar trajectory searching method, which may include: determining grid division of a geographic area based on a preset grid size; mapping the target track into a target grid sequence with a fixed length based on the grids and the sequence of the target track points in the geographic area; mapping the fixed-length target mesh sequence into a shortened fixed-length target feature vector; based on the shortened fixed-length target feature vector, a set of trajectories similar to the target trajectory is determined.
In the present invention, said determining a set of trajectories similar to said target trajectory based on said shortened fixed-length target feature vector further comprises: converting all tracks in the database into a shortened fixed-length characteristic vector set; generating an index database based on the shortened fixed-length feature vector set; determining a set of trajectories similar to the target trajectory based on a similarity of the shortened fixed-length target feature vector to feature vectors in the index database.
In the present invention, the determining a trajectory set similar to the target trajectory based on the similarity between the shortened fixed-length target feature vector and the feature vector in the index database may further include determining a trajectory set similar to the target trajectory based on a distance algorithm and the shortened fixed-length target feature vector.
In the present invention, the distance may include a hamming distance.
In the present invention, the generating of the index database based on the feature vector set with a fixed length may be performed offline.
In the present invention, the index database may be updated periodically.
In the present invention, the mapping the target grid sequence to the target feature vector may specifically be mapping the target grid sequence to the target feature vector based on an n-gram.
In the present invention, n is 2.
In the present invention, the mapping the target feature vector to be a shortened fixed-length target feature vector may specifically be mapping the target feature vector to be a shortened fixed-length target feature vector based on a hash function.
In the present invention, the mapping the target feature vector to the shortened fixed-length target feature vector based on the hash function may further include finding a reasonable hash function based on a machine learning model.
In the present invention, the objective function of the machine learning model may include an empirical risk minimization objective function.
On the other hand, an embodiment of the present invention provides a similar trajectory searching system, which may include a mesh division module, a first mapping module, a second mapping module, and a determination module: the grid division module is used for determining the grid division of the area based on the preset grid size; the first mapping module is used for mapping the target track into a target grid sequence with a fixed length based on the sequence of the target track points in the grid and the region; the second mapping module is used for mapping the fixed-length target grid sequence into a shortened fixed-length target feature vector; the determining module is configured to determine a set of trajectories similar to the target trajectory based on the shortened fixed-length target feature vector.
In another aspect, an apparatus for searching similar tracks according to an embodiment of the present invention may include a processor, where the processor runs a search program, and the search program runs to execute any one of the above methods for searching similar tracks.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, which can store computer instructions, and when the computer reads the computer instructions in the storage medium, the computer executes the method for searching for similar tracks as described in any one of the above.
Drawings
FIG. 1 is a block diagram of a similar trajectory searching system shown in accordance with some embodiments of the present disclosure;
FIG. 2 is a schematic diagram illustrating the division of an area into a grid in accordance with some embodiments of the present disclosure;
FIG. 3 is an exemplary flow diagram illustrating the determination of similar trajectories according to some embodiments of the present disclosure;
FIG. 4 is an exemplary flow diagram for determining a set of trajectories similar to a target trajectory based on fixed-length target feature vectors, according to some embodiments of the present disclosure;
FIG. 5 is a recall test result shown in accordance with some embodiments of the present disclosure;
FIG. 6 is a graph showing precision rate test results according to some embodiments of the present disclosure.
Detailed Description
FIG. 1 is a block diagram of a similar trajectory searching system 100 shown in accordance with some embodiments of the present disclosure. The similar trajectory searching system 100 may be an online service platform for taxi taking/sharing car services. In some embodiments, the similar trajectory searching system 100 may provide taxi appointment services, such as taxi calls, express calls, special calls, mini-bus calls, car pool, bus service, driver hiring and pickup services, and the like. In some embodiments, the similar trajectory searching system 100 may also provide designated driving services, courier delivery, take-away, and the like. The similar trajectory searching system 100 may include a meshing module 110, a first mapping module 120, a second mapping module 130, and a determination module 140.
The meshing module 110 may determine the meshing of the geographic area based on a size of a preset mesh. The geographic region may include a region of geographic extent such as a city, town, street divided according to geographic conditions, and the like. In some embodiments, the geographic regions may also include map regions, such as meshing certain regions in a map. In some embodiments, the meshing of the geographic region may be determined based on a preset mesh size, e.g., 250 x 250 square meters. For example, a square area of 562500 square meters in size can be divided into 3X3 grid areas of 250X 250 square meters in grid size. In other embodiments, the size of the grid may be selected according to actual requirements, such as 100 × 100 square meters, 500 × 500 square meters, etc. The smaller the grid, the more the number of grids divided into the geographical area, and the longer the mapping target track to the target grid sequence. In some embodiments, the geographic region may be any shape. For example, the geographic region may be an irregular polygon, and a square region that completely contains the irregular polygon may be determined based on vertices of the irregular polygon and may be tessellated.
The first mapping module 120 may map the target trajectory to a target grid sequence based on the order of target trajectory points within the grid and the geographic region. The target track points within the geographic region may include a user's target travel track points. The sequence of the target track points can be determined based on the timestamps. For example, when the timestamp of track point a is 9 in 2018, 4 and 9 am, and the timestamp of track point B is 10 in 2018, 4 and 9 am, it can be determined that the track points from a to B. In some embodiments, the target trajectory may be described based on an n-gram mapping, mapping trajectories of indefinite length to n-gram feature vectors of definite length. In some embodiments, the n-gram may be a 2-gram.
For example, when a region is divided into 9 regions, C1, C2, …, and C9, the combination between two adjacent grids through which a track passes may be determined based on the precedence order of the tracks. For example, when a track passes through C1, C2, C5, C8, C9, the combination between two adjacent grids where the track passes through can be determined as C1C2, C2C5, C5C8, C8C 9. In the case where the area and the size of the mesh are determined, the combination between two adjacent meshes is limited and fixed. Therefore, it may be determined that a combination (e.g., C1C2, C2C5) between two adjacent grids passed by the trajectory has a value of 1, and a combination (e.g., C1C3, C3C5) between two adjacent grids not passed by the trajectory has a value of 0, so as to convert the trajectory into a target grid sequence of fixed length. See figure 2 in particular.
The second mapping module 130 may map the fixed-length target mesh sequence into a shortened fixed-length target feature vector. The fixed-length target mesh sequence may be considered a fixed-length target feature vector. In some embodiments, the region may be divided into a large number of meshes, and the fixed-length target mesh sequence may be too long, i.e. the fixed-length target feature vector length may be too long. Accordingly, the fixed-length target mesh sequence may contain a large number of 0 values. For example, when a region is divided into 20000 grids, the number of adjacent grids in each grid located in the middle of the region is 8, and the length of the feature vector of the fixed length corresponding to the fixed-length target grid sequence is up to about 20000 × 8 (i.e., 160000 dimensions). Meanwhile, the fixed-length feature vector contains a large number of 0 values. To shorten the fixed-length target trellis sequence length, the fixed-length target trellis sequence may be mapped to a shortened fixed-length feature vector.
In some embodiments, the second mapping module 130 may map the fixed-length target mesh sequence to a shortened fixed-length feature vector based on a hash function.
In some embodiments, a reasonable hash function may be found based on a machine learning approach. The reasonable hash function can keep the distance and the neighbor relation between the mapped shortened fixed-length feature vector and the original track. In some embodiments, a reasonable hash function may be found based on a machine learning model of an empirical risk minimization objective function. The loss function of the empirical risk minimization function target machine learning model may be:
dH(yi,yj)~‖yi-yj‖2,
wherein L represents a loss function; sijRepresenting a similarity function for thinning the Sign function; y isiRepresenting the mapped track; x is the number ofiRepresenting the original trajectory before mapping; p represents a mapping matrix; t represents a correction term at the time of mapping; dHRepresenting two post-mapping vectors (y)iAnd yj) The second order norm of the distance is used here. Equation 1 represents the loss function of the machine learning model. Wherein the original feature matrix is the definiteA matrix composed of long grid sequences. The mapping matrix P is obtained by performing eigen decomposition on the original feature matrix and selecting the largest k feature values, wherein the matrix formed by the feature vectors corresponding to the k feature values is the mapping matrix P. In some embodiments, a reasonable hash function may be obtained by machine learning the raw feature matrix samples. The original characteristic matrix sample is a matrix formed by a fixed-length grid sequence set obtained by mapping the track.
In some embodiments, the fixed-length mesh sequence may be mapped by a reasonable hash function as a shortened fixed-length target feature vector, which may be k in length. In some embodiments, k may be much smaller than the number of original trajectory points. In some embodiments, k may be 32 or 64.
In some embodiments, the index database may be generated based on multiplying the mapping matrix P by a fixed-length grid sequence mapped by all tracks in the database. The index database may store shortened fixed-length feature vectors formed by mapping all of the tracks. In some embodiments, the index database may be generated in batches while offline. In some embodiments, the index database may be updated periodically, for example, once a day or once every three days.
The determination module 140 may determine a set of trajectories similar to the target trajectory based on the shortened fixed-length target feature vector. The set of tracks similar to the target track may be a set of tracks with a target distance similarity higher than a set threshold. In some embodiments, the determination module 140 may determine a shortened fixed-length feature vector similar to the shortened fixed-length feature vector formed by the target trajectory mapping based on a distance algorithm and determine a trajectory similar to the target trajectory based on the similar shortened fixed-length feature vector. In some embodiments, one or more tracks similar to the target track may be returned. In some embodiments, the similarity between the vectors may be determined based on a distance algorithm between the vectors, thereby determining the similarity between the trajectories. In some embodiments, the distance algorithm may include a distance algorithm that utilizes hamming distances. In some embodiments, the distance algorithm may further include a euclidean distance, a manhattan distance, a chebyshev distance, a minkowski distance, a euclidean distance, a mahalanobis distance, an included angle cosine, a jaccard distance, a correlation entropy, and the like vector similarity algorithm. Based on the distance algorithm, the track corresponding to the target track where the shortened fixed-length feature vector hamming distance is the smallest may be a distance similar to the target track.
FIG. 2 is a schematic diagram illustrating the division of an area into a grid in accordance with some embodiments of the present disclosure.
In fig. 2, the locus AB is located in a square area, which is divided into 9 grids of C1, C2, …, and C9. Based on the n-gram mapping, the trajectory may be mapped into various feature vectors. Since, by definition in an n-gram, a 1-gram feature describes a sequence of grids, two adjacent grids are represented by a 2-gram feature and are slid back 1 grid at a time, a 3-gram feature represents 3 consecutive grids and are slid back 1 grid at a time, and so on. Since the properties of the trajectory are better described using a 2-gram, the grid sequence is described using 2-gram features. Based on the 2-gram mapping, the trajectory AB may be mapped as a vector consisting of 1 and 0, which may be considered as a grid sequence formed by the trajectory AB mapping. The trajectory AB passes through the grids of C1, C2, C5, C8 and C9 in turn. Based on the sequence of the track passing and the grids passed by the track, the grid sequence can be described as a grid sequence in which the values corresponding to C1-C2, C2-C5, C5-C8 and C8-C9 are 1, and the values corresponding to other two adjacent grids (e.g., C2-C1, C2-C3, etc.) are 0. Since the square region is divided into 9 grids, and the combination of two adjacent grids has 40 kinds (there are 3 neighboring grids at four corners C1, C3, C7, C9, 5 neighboring grids at middle C2, C4, C6, C8, and 8 neighboring grids at C5, so there are 4 × 3+4 × 5+8 × 40), the length of the grid sequence is 40.
In other embodiments, the geographic area may be divided into 4 grids, and the length of the grid sequence formed by the trajectory map in the geographic area is 12.
FIG. 3 is an exemplary flow chart 300 illustrating the determination of similar trajectories according to some embodiments of the present disclosure.
In 310, a meshing of the regions may be determined based on a preset mesh size. Operation 310 may be performed by meshing module 110. The area may include a geographic area such as a city, town, street divided according to geographic conditions, etc. In some embodiments, the meshing of the regions may be determined based on a preset mesh size, e.g., 250 x 250 square meters. For example, a square area of 562500 square meters in size can be divided into 3X3 grid areas of 250X 250 square meters in grid size. In other embodiments, the size of the grid may be selected according to actual requirements. The smaller the grid is, the more the number of grids for area division is, and the longer the target grid sequence is mapped to the target track. In some embodiments, the region may be of any shape. For example, the region may be an irregular polygon, and a square region completely containing the irregular polygon may be determined based on vertices of the irregular polygon and mesh-divided.
In 320, the target track may be mapped to a target grid sequence of a fixed length based on the order of the target track points in the grid and the region. Operation 320 may be performed by a first mapping module.
In some embodiments, the target trajectory points within the region may comprise a target travel trajectory of the user. The sequence of the target track points can be determined based on the timestamps. In some embodiments, the target trajectory may be described based on an n-gram mapping, mapping the trajectory of the side length to a fixed-length n-gram feature vector. In some embodiments, the n-gram may be a 2-gram.
For example, when a region is divided into 9 regions, C1, C2, …, and C9, the combination between two adjacent grids through which a track passes may be determined based on the precedence order of the tracks. In the case where the area and the size of the mesh are determined, the combination between two adjacent meshes is limited and fixed. Therefore, it can be determined that the combination between two adjacent grids passed by the track corresponds to a value of 1, and the combination between two adjacent grids not passed by the track corresponds to a value of 0, so that the track is converted into a target grid sequence with a fixed length. See figure 2 in particular.
In 330, the fixed-length target mesh sequence may be mapped to a shortened fixed-length target feature vector. Operation 330 may be performed by the second mapping module 130.
In some embodiments, the second mapping module 130 may map the fixed-length target mesh sequence to a shortened fixed-length feature vector based on a hash function.
In some embodiments, a reasonable hash function may be found based on a machine learning approach. The reasonable hash function can keep the distance and the neighbor relation between the mapped shortened fixed-length feature vector and the original track. In some embodiments, a reasonable hash function may be found based on a machine learning model of an empirical risk minimization objective function. The empirical risk minimization function target loss function of the machine learning model may be as shown in equation (1). In some embodiments, a reasonable hash function may be obtained by machine learning the raw feature matrix samples.
In some embodiments, the fixed-length mesh sequence may be mapped by a reasonable hash function as a shortened fixed-length target feature vector, which may be k in length. In some embodiments, k may be much smaller than the number of original trajectory points. In some embodiments, k may be 32 or 64. In practical tests, when the value of k ranges from 12 to 128, the effect is better when the value of k is larger, but the mapping time is longer.
In some embodiments, the index database may be generated based on multiplying the mapping matrix P by a fixed-length grid sequence mapped by all tracks in the database. In some embodiments, the index database may be generated in batches while offline. In some embodiments, the index database may be updated periodically, for example, once a day or once every three days.
In 340, a set of trajectories similar to the target trajectory may be determined based on the shortened fixed-length target feature vector. Operation 340 may be performed by the determination module 140.
In some embodiments, the determining module 140 may determine a shortened fixed-length feature vector similar to the shortened fixed-length feature vector formed by the target trajectory mapping based on a preset distance algorithm, and determine a trajectory similar to the target trajectory based on the similar shortened fixed-length feature vector. In some embodiments, one or more tracks similar to the target track may be returned. In some embodiments, the distance algorithm may include a distance algorithm that utilizes hamming distances. Based on the distance algorithm, the track corresponding to the target track where the shortened fixed-length feature vector hamming distance is the smallest may be a track similar to the target track. See figure 4 in particular.
For example, in a windward application, when a user (e.g., a windward owner) periodically issues a driving route, such as an on-off route, the on-off route can be viewed as a trajectory. The trajectory may be mapped into a shortened fixed-length feature vector and stored in an index database. After a travel route is issued by a user (e.g., a passenger), the route of the travel route can be regarded as a target route and mapped to a fixed-length feature vector of target shortening. Based on the hamming distance, the system 100 may find similar tracks in the index database, for example, m tracks with the minimum hamming distance may be selected and regarded as similar tracks. Based on the hamming distance, the similarity between the target track and other tracks can be generated and arranged from high to low according to the similarity.
FIG. 4 is an exemplary flow diagram 400 for determining a set of trajectories similar to a target trajectory based on fixed-length target feature vectors, according to some embodiments of the present disclosure.
In 410, all traces in the database may be translated into a shortened fixed-length feature vector set. In some embodiments, a method of converting a trajectory into a shortened fixed-length feature vector may be found in fig. 3 and described herein.
In some embodiments, the database may comprise a database external to system 100. In some embodiments, the database may comprise an internal storage database of the system 100. The database may be used to store traces associated with the system 100. The trajectory may include a travel trajectory, a taxi trajectory, a transport trajectory, a walking trajectory, or any combination thereof. All traces of the database can be converted into shortened fixed-length feature vectors based on the procedure shown in fig. 3.
At 420, an index database may be generated based on the shortened fixed-length feature vector set. A set of shortened fixed-length feature vectors corresponding to all tracks in the database may generate an index database.
At 430, a set of tracks that are similar to the target track may be determined based on the similarity of the fixed-length target feature vector to the feature vectors in the index database.
In some embodiments, the similarity may be determined based on a distance algorithm. For example, a trajectory similar to the target trajectory may be determined based on the distance between the shortened fixed-length feature vector corresponding to the target trajectory and the shortened fixed-length feature vectors corresponding to other trajectories. For example, the trajectory in which the distance between the shortened fixed-length feature vectors is the smallest may be determined to be a similar trajectory. In some embodiments, the distance used in the distance algorithm is a hamming distance. In some embodiments, the number of tracks in the set of tracks similar to the target track may be preset. For example, it may be preset that the track set includes 5 similar tracks. The system 100 may determine the set of trajectories similar to the target trajectory based on the 5 trajectories corresponding to the target trajectory having the smallest distance between the shortened fixed-length feature vectors.
FIG. 5 is a recall test result shown in accordance with some embodiments of the present disclosure. The recall rate of similar track queries by the methods provided in this disclosure was tested using the disclosed taxi track in fig. 5. The disclosed taxi track comprises 10 ten thousand historical tracks, the number of training samples is 95000, and the number of testing tracks is 5000. In fig. 5, the abscissa represents the number of return traces after query, and the ordinate represents the recall ratio. Curve B is the number of tracks returned when querying tracks similar to the target track. Curve a is the recall ratio when returning the corresponding (same abscissa) number of return traces as in curve B. The recall rate is the proportion of the number of tracks which are truly similar to the target track in the returned tracks after query and the number of all tracks which are similar to the target track in the database.
FIG. 6 is a graph showing precision rate test results according to some embodiments of the present disclosure. The recall rate of similar track queries by the methods provided in this disclosure was tested in fig. 6, also using the disclosed taxi track. The disclosed taxi track comprises 10 ten thousand historical tracks, the number of training samples is 95000, and the number of testing tracks is 5000. In fig. 6, the abscissa represents the number of returned tracks after the query, and the ordinate represents the precision rate. And the precision rate is the proportion of the real track similar to the target track in the returned track after query.
By adopting the above embodiment, the embodiment of the present invention has at least the following technical effects:
by means of the method of mapping the tracks into shortened fixed-length feature vectors, similarity between the tracks is determined based on a distance algorithm, and the tracks similar to the target tracks can be searched on the premise that original neighbor relations of the tracks are kept. Compared with the prior art, the comparison time can be saved while fine comparison is carried out, and higher accuracy and recall rate are ensured.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (14)
1. A similar track searching method is characterized by comprising the following steps:
determining grid division of a geographic area based on a preset grid size;
mapping the target track into a target grid sequence with a fixed length based on the grids and the sequence of the target track points in the geographic area;
mapping the fixed-length target mesh sequence into a shortened fixed-length target feature vector;
based on the shortened fixed-length target feature vector, a set of trajectories similar to the target trajectory is determined.
2. A similar trajectory searching method as in claim 1, wherein said determining a set of trajectories similar to said target trajectory based on said shortened fixed-length target feature vector further comprises:
converting all tracks in the database into a shortened fixed-length characteristic vector set;
generating an index database based on the shortened fixed-length feature vector set;
determining a set of trajectories similar to the target trajectory based on a similarity of the shortened fixed-length target feature vector to feature vectors in the index database.
3. A similar trajectory searching method as in claim 2, wherein said determining a set of trajectories similar to said target trajectory based on a similarity of said shortened fixed-length target feature vector to feature vectors in said index database further comprises determining a set of trajectories similar to said target trajectory based on a distance algorithm and said shortened fixed-length target feature vector.
4. A similar trajectory searching method as described in claim 3, wherein said distance comprises a hamming distance.
5. A similar trajectory searching method as described in claim 2, wherein said generating an index database based on said fixed-length set of feature vectors is done offline.
6. A similar trajectory searching method as described in claim 2, wherein said index database is updated periodically.
7. A similar trajectory searching method as claimed in claim 1, wherein said mapping said target grid sequence to target feature vectors is specifically based on n-gram mapping said target grid sequence to target feature vectors.
8. A similar trajectory searching method as defined in claim 7, wherein said n-2.
9. A similar trajectory searching method as claimed in claim 1, wherein said mapping said target feature vector to a shortened fixed-length target feature vector is specifically based on a hash function mapping said target feature vector to a shortened fixed-length target feature vector.
10. A similar trajectory searching method as in claim 9, wherein said mapping said target feature vector to a shortened fixed-length target feature vector based on a hash function further comprises finding a reasonable hash function based on a machine learning model.
11. A similar trajectory searching method as described in claim 10, wherein said objective function of said machine learning model comprises an empirical risk minimization objective function.
12. A similar trajectory searching system, characterized in that the system comprises a meshing module, a first mapping module, a second mapping module and a determining module:
the grid division module is used for determining the grid division of the area based on the preset grid size;
the first mapping module is used for mapping the target track into a target grid sequence with a fixed length based on the sequence of the target track points in the grid and the region;
the second mapping module is used for mapping the fixed-length target grid sequence into a shortened fixed-length target feature vector;
the determining module is configured to determine a set of trajectories similar to the target trajectory based on the shortened fixed-length target feature vector.
13. An apparatus for similar trajectory searching, the apparatus comprising a processor, the processor running a search program, the search program running a similar trajectory searching method according to any one of claims 1 to 11.
14. A computer-readable storage medium storing computer instructions, wherein when the computer instructions in the storage medium are read by a computer, the computer performs the similar trajectory searching method according to any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810725065.0A CN110688435B (en) | 2018-07-04 | 2018-07-04 | Similar track searching method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810725065.0A CN110688435B (en) | 2018-07-04 | 2018-07-04 | Similar track searching method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110688435A true CN110688435A (en) | 2020-01-14 |
CN110688435B CN110688435B (en) | 2022-04-05 |
Family
ID=69106619
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810725065.0A Active CN110688435B (en) | 2018-07-04 | 2018-07-04 | Similar track searching method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110688435B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111274345A (en) * | 2020-01-21 | 2020-06-12 | 成都智库二八六一信息技术有限公司 | Similar area retrieval method and system based on grid division and value taking |
CN111831765A (en) * | 2020-03-10 | 2020-10-27 | 北京嘀嘀无限科技发展有限公司 | Data processing method and device, electronic equipment and readable storage medium |
CN112102357A (en) * | 2020-09-08 | 2020-12-18 | 杭州海康威视数字技术股份有限公司 | Track adjusting method, device and equipment and storage medium |
CN113554678A (en) * | 2020-04-24 | 2021-10-26 | 杭州海康威视数字技术股份有限公司 | Method and device for detecting loitering behavior of moving target and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6185722B1 (en) * | 1997-03-20 | 2001-02-06 | International Business Machines Corporation | Three dimensional track-based parasitic extraction |
US20050259737A1 (en) * | 2004-05-18 | 2005-11-24 | Sunplus Technology Co., Ltd. | Optimal correlation matching method and system for determining track behavior |
US20080126278A1 (en) * | 2006-11-29 | 2008-05-29 | Alexander Bronstein | Parallel processing motion estimation for H.264 video codec |
CN102298649A (en) * | 2011-10-09 | 2011-12-28 | 南京大学 | Space trajectory retrieval method of body movement data |
CN102646070A (en) * | 2012-02-29 | 2012-08-22 | 武汉大学 | Space-time trajectory data storage method based on area |
CN103996292A (en) * | 2014-05-29 | 2014-08-20 | 南京新奕天科技有限公司 | Moving vehicle tracking method based on corner matching |
CN104112018A (en) * | 2014-07-21 | 2014-10-22 | 南京大学 | Large-scale image retrieval method |
CN104657746A (en) * | 2015-01-29 | 2015-05-27 | 电子科技大学 | Anomaly detection method based on vehicle trajectory similarity |
CN106153031A (en) * | 2015-04-13 | 2016-11-23 | 骑记(厦门)科技有限公司 | Movement locus method for expressing and device |
CN107976705A (en) * | 2017-08-10 | 2018-05-01 | 深圳市悦动天下科技有限公司 | A kind of track calculating method based on high in the clouds, system |
CN108734325A (en) * | 2017-04-13 | 2018-11-02 | 北京嘀嘀无限科技发展有限公司 | The evaluation method and device of planning path |
CN112288029A (en) * | 2020-11-06 | 2021-01-29 | 电子科技大学 | Method for classifying vehicle tracks in urban road network |
-
2018
- 2018-07-04 CN CN201810725065.0A patent/CN110688435B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6185722B1 (en) * | 1997-03-20 | 2001-02-06 | International Business Machines Corporation | Three dimensional track-based parasitic extraction |
US20050259737A1 (en) * | 2004-05-18 | 2005-11-24 | Sunplus Technology Co., Ltd. | Optimal correlation matching method and system for determining track behavior |
US20080126278A1 (en) * | 2006-11-29 | 2008-05-29 | Alexander Bronstein | Parallel processing motion estimation for H.264 video codec |
CN102298649A (en) * | 2011-10-09 | 2011-12-28 | 南京大学 | Space trajectory retrieval method of body movement data |
CN102646070A (en) * | 2012-02-29 | 2012-08-22 | 武汉大学 | Space-time trajectory data storage method based on area |
CN103996292A (en) * | 2014-05-29 | 2014-08-20 | 南京新奕天科技有限公司 | Moving vehicle tracking method based on corner matching |
CN104112018A (en) * | 2014-07-21 | 2014-10-22 | 南京大学 | Large-scale image retrieval method |
CN104657746A (en) * | 2015-01-29 | 2015-05-27 | 电子科技大学 | Anomaly detection method based on vehicle trajectory similarity |
CN106153031A (en) * | 2015-04-13 | 2016-11-23 | 骑记(厦门)科技有限公司 | Movement locus method for expressing and device |
CN108734325A (en) * | 2017-04-13 | 2018-11-02 | 北京嘀嘀无限科技发展有限公司 | The evaluation method and device of planning path |
CN107976705A (en) * | 2017-08-10 | 2018-05-01 | 深圳市悦动天下科技有限公司 | A kind of track calculating method based on high in the clouds, system |
CN112288029A (en) * | 2020-11-06 | 2021-01-29 | 电子科技大学 | Method for classifying vehicle tracks in urban road network |
Non-Patent Citations (2)
Title |
---|
CHRISTODOULOPOULOS K 等: ""Statistical Analysis and Modeling of Jobs in a Grid Environment"", 《JOURNAL OF GRID COMPUTING》 * |
朱进 等: ""基于多重运动特征的轨迹相似性度量模型"", <武汉大学学报:信息科学版> * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111274345A (en) * | 2020-01-21 | 2020-06-12 | 成都智库二八六一信息技术有限公司 | Similar area retrieval method and system based on grid division and value taking |
CN111831765A (en) * | 2020-03-10 | 2020-10-27 | 北京嘀嘀无限科技发展有限公司 | Data processing method and device, electronic equipment and readable storage medium |
CN111831765B (en) * | 2020-03-10 | 2024-05-31 | 北京嘀嘀无限科技发展有限公司 | Data processing method, device, electronic equipment and readable storage medium |
CN113554678A (en) * | 2020-04-24 | 2021-10-26 | 杭州海康威视数字技术股份有限公司 | Method and device for detecting loitering behavior of moving target and storage medium |
CN113554678B (en) * | 2020-04-24 | 2023-09-12 | 杭州海康威视数字技术股份有限公司 | Method, device and storage medium for detecting loitering behavior of moving object |
CN112102357A (en) * | 2020-09-08 | 2020-12-18 | 杭州海康威视数字技术股份有限公司 | Track adjusting method, device and equipment and storage medium |
CN112102357B (en) * | 2020-09-08 | 2023-07-25 | 杭州海康威视数字技术股份有限公司 | Track adjustment method, track adjustment device, track adjustment equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110688435B (en) | 2022-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110688435B (en) | Similar track searching method and system | |
Han et al. | Model rubik’s cube: Twisting resolution, depth and width for tinynets | |
KR20100068468A (en) | Method, apparatus and computer program product for performing a visual search using grid-based feature organization | |
CN104469932B (en) | A kind of location fingerprint localization method based on support vector machines | |
CN106227884B (en) | A kind of recommended method of calling a taxi online based on collaborative filtering | |
CN109255042B (en) | Real-time picture matching geographic positioning method and system based on large-scale street view data | |
CN111159317B (en) | System and method for determining path topology relationships | |
CN106990395A (en) | The calibration method and device of a kind of radar target | |
CN111931077B (en) | Data processing method, device, electronic equipment and storage medium | |
Yang et al. | An enhanced weight-based topological map matching algorithm for intricate urban road network | |
CN111159451B (en) | Power line point cloud dynamic monomer method based on spatial database | |
CN109858951A (en) | New-energy automobile is powered on or changes the prediction of electricity demanding | |
Chandio et al. | An approach for map-matching strategy of GPS-trajectories based on the locality of road networks | |
CN117036373A (en) | Large-scale point cloud segmentation method based on round function bilinear regular coding and decoding network | |
Huang | Indexing and querying moving objects with uncertain speed and direction in spatiotemporal databases | |
CN112130166A (en) | AGV positioning method and device based on reflector network | |
CN116403071A (en) | Method and device for detecting few-sample concrete defects based on feature reconstruction | |
US9436715B2 (en) | Data management apparatus and data management method | |
Huang et al. | Processing continuous K-nearest skyline query with uncertainty in spatio-temporal databases | |
CN111737374B (en) | Position coordinate determination method, device, electronic equipment and storage medium | |
CN107766407A (en) | A kind of track similarity join querying method searched for using two benches | |
CN112749565B (en) | Semantic recognition method and device based on artificial intelligence and semantic recognition equipment | |
CN110856253B (en) | Positioning method, positioning device, server and storage medium | |
CN113487013B (en) | Attention mechanism-based sorting grouping convolution method | |
CN117689001B (en) | Neural network multi-granularity pruning compression method and system based on zero data search |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |