CN109063727B - Method and device for calculating track frequency, storage medium and electronic equipment - Google Patents

Method and device for calculating track frequency, storage medium and electronic equipment Download PDF

Info

Publication number
CN109063727B
CN109063727B CN201810631466.XA CN201810631466A CN109063727B CN 109063727 B CN109063727 B CN 109063727B CN 201810631466 A CN201810631466 A CN 201810631466A CN 109063727 B CN109063727 B CN 109063727B
Authority
CN
China
Prior art keywords
track
similarity
tracks
frequency
preset
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.)
Active
Application number
CN201810631466.XA
Other languages
Chinese (zh)
Other versions
CN109063727A (en
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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201810631466.XA priority Critical patent/CN109063727B/en
Publication of CN109063727A publication Critical patent/CN109063727A/en
Application granted granted Critical
Publication of CN109063727B publication Critical patent/CN109063727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Train Traffic Observation, Control, And Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a method and device for calculating track frequency, a storage medium and an electronic device. The method comprises the following steps: acquiring a track set of a moving object; the method comprises the steps of carrying out track similarity-based clustering division on each track in a track set to obtain track groups, obtaining the number of tracks which are not similar to any other track in the track set, calculating track frequency according to the positive correlation between the total number of tracks and the track frequency in the track set, the negative correlation between the group number of the track groups and the track frequency, and the negative correlation between the group number of the tracks which are not similar to any other track and the track frequency, accurately calculating the track frequency of a moving object on a frequent route represented by the groups, and providing new quantitative indexes for behavior analysis, safety risk evaluation and the like of the moving object.

Description

Method and device for calculating track frequency, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a method and an apparatus for calculating trajectory frequency, a storage medium, and an electronic device.
Background
With the rapid development of the internet of things technology, a large amount of travel data of the mobile object is accumulated. For example, in the field of car networking, a large amount of driving data of users is accumulated. At present, the behavior analysis and the safety risk assessment of the user are generally performed through the travel time, the mileage, the speed and the road state in the driving data.
For a moving object such as a private owner or a fleet of vehicles, the distribution of the trajectories may be concentrated on certain routes as the data is accumulated, which may be referred to as frequent routes. The frequency of the frequent routes is closely related to the travel rule of the mobile object, and is one of the factors determining the behavior and safety risk of the mobile object.
However, there is currently no method to quantify how often a moving object is coming in and out of a frequent route. Therefore, at present, the track frequency cannot be analyzed as a factor of behavior analysis and security risk, which brings great difficulty to behavior analysis and security risk evaluation of the mobile object.
Disclosure of Invention
In view of this, the present disclosure provides a method, an apparatus, a storage medium, and an electronic device for calculating a trajectory frequency, so as to achieve the purpose of accurately calculating the trajectory frequency of a moving object on a frequent route.
In a first aspect of embodiments of the present disclosure, a method of calculating trajectory frequency is provided. The method comprises the following steps: acquiring a track set of a moving object; clustering and dividing each track in the track set based on track similarity to obtain track groups, and acquiring the number of tracks which are not similar to any other tracks in the track set, wherein each track group at least comprises two similar tracks; and calculating the track frequency according to the positive correlation between the total number of the tracks and the track frequency, the negative correlation between the group number of the track groups and the track frequency, and the negative correlation between the number of the tracks which are not similar to any other tracks and the track frequency in the track set.
Optionally, before performing cluster division based on the track similarity on each track in the track set to obtain a track group, the method further includes: for each track in the track set, judging whether the distance between the starting point of the track to which the track is directed and the starting point of at least one track in other tracks meets the requirement of a preset starting point distance threshold value, and the distance between end points meets the requirement of a preset end point distance threshold value; if not, deleting the aimed track from the track set.
Optionally, the calculating the track frequency according to the positive correlation between the total number of tracks in the track set and the track frequency, the negative correlation between the number of track groups and the track frequency, and the negative correlation between the number of tracks that are not similar to any other tracks and the track frequency comprises: determining the track frequency according to a quotient obtained by dividing the total number of tracks in the track set by the sum of the group number of the track groups and the number of the tracks which are not similar to any other tracks.
Optionally, the performing, based on the track similarity, cluster division on each track in the track set to obtain a track group includes: calculating the one-to-one corresponding track similarity between each track in the track set and other tracks through any one of the following similarity calculation modes, wherein the track similarity comprises route geographical similarity, route geographical time similarity, cycle similarity or comprehensive similarity according to the adopted similarity calculation mode; dividing the tracks judged to be similar according to the calculated track similarity into the same track group; the similarity calculation mode includes: route geographical similarity calculation mode: the route geographical similarity is determined according to the proportion of adjacent important points of the two tracks in the two tracks; route geographical time similarity calculation mode: under the condition that the time error absolute value mean value of the adjacent important points of the two tracks after the route passes through meets the requirement of a preset time interval threshold, the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks; under the condition that the time error absolute value mean value of the adjacent important points of the two tracks passed by the trip does not meet the requirement of the preset time interval threshold, the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks and the proportion of the preset time interval threshold and the time error absolute value mean value of the adjacent important points of the two tracks passed by the trip; periodic similarity calculation mode: under the condition that the departure time of the two tracks is in accordance with the same period, the period similarity is a preset first similarity value, under the condition that the departure time of the two tracks is not in accordance with the same period, the period similarity is a preset second similarity value, and the preset first similarity value and the preset second similarity value are different values; route cycle integrated similarity calculation mode: the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity, or the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity.
In a second aspect of embodiments of the present disclosure, an apparatus for calculating trajectory frequency is provided. The device includes: an acquisition module configured to acquire a set of trajectories of a moving object. And the track division module is configured to perform clustering division based on track similarity on each track in the track set to obtain track groups, wherein each track group at least comprises two similar tracks. A noise calculation module configured to obtain a number of trajectories in the set of trajectories that are not similar to any other trajectory. The frequency calculation module is configured to calculate the track frequency according to the positive correlation between the total number of tracks and the track frequency, the negative correlation between the number of the track groups and the track frequency, and the negative correlation between the number of the tracks which are not similar to any other tracks and the track frequency in the track set.
Optionally, the apparatus further comprises: the judging module is configured to judge whether the distance between the starting point of the track to which the method aims and the starting point of at least one track in other tracks meets the requirement of a preset starting point distance threshold and the distance between the end points meets the requirement of a preset end point distance threshold or not according to each track in the track set before the track dividing module performs track similarity-based clustering division on each track in the track set to obtain the track group. And the deleting module is configured to delete the corresponding track from the track set if the judging module judges that the track set is not the target track set.
Optionally, the frequency calculation module is configured to determine the track frequency according to a quotient of a total number of tracks in the track set divided by a sum of a group number of the track groups and the number of tracks that are not similar to any other tracks.
Optionally, the trajectory dividing module includes: and the similarity operator module is configured to calculate the one-to-one corresponding track similarity between each track in the track set and other tracks through any one of the following similarity calculation modes, wherein the track similarity comprises route geographical similarity, route geographical time similarity, cycle similarity or comprehensive similarity according to the adopted similarity calculation mode. A group division submodule configured to divide the trajectories determined to be similar according to the calculated trajectory similarity into the same trajectory group. The similarity calculation mode includes: route geographical similarity calculation mode: the route geographical similarity is determined according to the proportion of adjacent important points of the two tracks in the two tracks; route geographical time similarity calculation mode: under the condition that the time error absolute value mean value of the adjacent important points of the two tracks after the route passes through meets the requirement of a preset time interval threshold, the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks; under the condition that the time error absolute value mean value of the adjacent important points of the two tracks passed by the trip does not meet the requirement of the preset time interval threshold, the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks and the proportion of the preset time interval threshold and the time error absolute value mean value of the adjacent important points of the two tracks passed by the trip; periodic similarity calculation mode: under the condition that the departure time of the two tracks is in accordance with the same period, the period similarity is a preset first similarity value, under the condition that the departure time of the two tracks is not in accordance with the same period, the period similarity is a preset second similarity value, and the preset first similarity value and the preset second similarity value are different values; route cycle integrated similarity calculation mode: the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity, or the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity.
In a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor, performs the steps of the method of any one of the first aspect of the present disclosure.
In a fourth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a computer-readable storage medium according to an embodiment of a third aspect of the present disclosure; and one or more processors for executing the program in the computer-readable storage medium.
Through the technical scheme, as the track group is obtained by clustering and dividing each track in the track set based on the track similarity, the number of the tracks which are not similar to any other track in the track set is obtained, the more the total number of the travel tracks is, the more frequent precondition for the route is obtained, the track group is positively correlated with the frequency value, the fewer the tracks which are not similar to any track are, the higher the track frequency is, the negative correlation is obtained, one track group represents one frequent route, the fewer the group number is, the higher the track concentration is shown, the more the tracks on the single frequent route are, the higher the track frequency is, the negative correlation is obtained, therefore, the track frequency calculated by positively correlating the total number of the tracks in the track set with the track frequency, negatively correlating the group number of the track group with the track frequency, and negatively correlating the number of the tracks which are not similar to any other track with the track frequency in the track set, the frequency of the moving object on the frequent routes represented by the groups can be accurately reflected. It can be seen that the method provided by the present disclosure is capable of quantifying the frequency of frequent routes. The track frequency of the frequent route is closely related to the travel rule of the mobile object, and is one of the factors determining the behavior and safety risk of the mobile object. Therefore, the method provides new quantitative indexes for behavior analysis, safety risk evaluation and the like of the mobile object, so that more accurate behavior analysis, safety risk evaluation and the like of the mobile object are realized.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is a flowchart illustrating a method of calculating track frequency according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a method of calculating track frequency according to another exemplary embodiment of the present disclosure.
Fig. 3 is a block diagram illustrating an apparatus for calculating trajectory frequency according to an exemplary embodiment of the present disclosure.
Fig. 4 is a block diagram illustrating an apparatus for calculating trajectory frequency according to another exemplary embodiment of the present disclosure.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart illustrating a method of calculating track frequency according to an exemplary embodiment of the present disclosure. As shown in fig. 1, the method may include the steps of:
in step 110, a set of trajectories of the moving object is obtained.
In the present disclosure, the moving object may refer to a vehicle, a user holding a mobile device, or the like. The trajectory may be, for example, a driving trajectory of a vehicle, and the data may be acquired by a GPS device, including information on longitude, latitude, time, etc. of a series of location points through which the vehicle passes. And forming a track by the continuous position points passing through in the driving process according to the time sequence, and identifying in the database through the unique track ID. For another example, in some scenarios, the trajectory formed from the time when the vehicle starts (data starts to be collected) to the time when the vehicle stops (data stops to be collected) may be regarded as a trajectory.
Because can contain a plurality of track points in the longer orbit of general distance, if every point all participates in the operation, can greatly increased calculation memory and reduces computational efficiency, consequently, this disclosure can draw the important point that can characterize orbit dominant position information and direction of motion in a plurality of orbits, and time information according to every important point constitutes a plurality of orbits are each from new orbit sequence Li={p1,p2,…,pn(i)Get the trace collection. n (i) represents the number of the important points of the ith track, and p is { longitude, latitude, time }, namely the collected longitude and latitude of the GPS and the time information. The important points may include, for example, a start point, an end point, and a turning point of the trajectory. Of course, the track set may also be obtained by extracting, for example, the next track point or points of the starting point and the previous track point or points of the ending point and the turning point as important points, which is not limited by the present disclosure.
The turning point identification can be realized based on GPS azimuth data, and turning judgment conditions can refer to a formula, wherein thres is a preset parameter, the size of the preset parameter thres depends on the curvature of the curve to be identified, if the curvature is larger, the thres value can be set to be larger, if the curvature is smaller, the thres value can be set to be smaller, namely, the smaller the preset value of thres is, the more turns are identified, the road similarity matching accuracy is higher, but the calculation efficiency is relatively lower, so the turning point identification can be preset according to actual needs; the Δ bearing is an azimuth angle variation, and when the Δ bearing is accumulated in a certain range section, it can be determined that the vehicle has turned. The formula is as follows:
Figure BDA0001699990060000071
in step 120, each track in the track set is subjected to clustering division based on track similarity to obtain track groups, and the number of tracks that are not similar to any other track in the track set is obtained, wherein each track group at least comprises two similar tracks.
It should be noted that the present disclosure does not limit the calculation mode of the trajectory similarity. For example, in one possible implementation, the one-to-one corresponding track similarity between each track in the track set and other tracks may be calculated through any one of the following similarity calculation modes, where the track similarity includes route geographical similarity, route geographical time similarity, cycle similarity, or comprehensive similarity according to the adopted similarity calculation mode. And dividing the tracks judged to be similar according to the calculated track similarity into the same track group.
Wherein the similarity calculation mode may include: the route geographical similarity calculation mode, the route geographical time similarity calculation mode, the cycle similarity calculation mode and the route cycle comprehensive similarity calculation mode. The following are described separately:
route geographical similarity calculation mode: the routes are geographically similarThe degree is determined according to the proportion of the adjacent important points of the two tracks in the two tracks. The adjacent important points refer to important points which are positioned on the same level in time sequence in the two tracks and are within a preset adjacent distance threshold range, and the preset adjacent distance threshold range can be set according to experience. The proportion of the adjacent important points in the two tracks can be obtained through various calculation methods, which is not limited by the disclosure. For example, the number of significant points of two tracks can be counted respectively, the number n of significant points of one track with the largest number of significant points is taken, every pair of adjacent significant points in the two tracks is counted as one group, the number m of groups of significant points adjacent to the two tracks is taken, and then the proportion of the adjacent significant points of the two tracks in the two tracks is calculated
Figure BDA0001699990060000081
For another example, the total number of the significant points of the two tracks may be counted, and the total number of the significant points adjacent to the two tracks may be counted, so that the proportion of the significant points adjacent to the two tracks in the two tracks may be a quotient obtained by dividing the total number of the significant points adjacent to the two tracks by the total number of the significant points of the two tracks.
Route geographical time similarity calculation mode: under the condition that the time error absolute value mean value of the adjacent important points of the two tracks after the route passes through meets the requirement of a preset time interval threshold, the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks; under the condition that the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey does not meet the requirement of the preset time interval threshold value, the geographical time similarity of the journey is determined according to the proportion of the adjacent important points of the two tracks in the two tracks and the proportion of the preset time interval threshold value and the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey.
For example, the route geo-temporal similarity calculation mode may be represented by the following formula:
Figure BDA0001699990060000082
wherein n is the maximum value of the number of the important points in the two tracks, for example, the number of the important points in the two tracks can be counted respectively, the number of the important points in one track with the largest number of the important points is taken as n, m is the number of the groups of the adjacent important points in the two tracks under the condition that each pair of adjacent important points in the two tracks calculate one group, E (delta T) is the time error absolute value mean value of the adjacent important points of the two tracks passing by the travel, and T (delta T) is the time error absolute value mean value of the adjacent importantCFor a preset time interval threshold (time unit, greater than 0, which may be set to 10 minutes, for example), an acceptable time difference between two adjacent significant points is characterized. The adjacent important points refer to important points which are positioned at the same position in time sequence in the two tracks and have a distance within a preset adjacent distance threshold range, and the preset adjacent distance threshold range can be set according to experience. The conditional expression that the distance between two adjacent important points of the two tracks needs to satisfy is d | | | pi-pj| | ≦ epsilon, epsilon: the adjacent distance threshold is preset and can be set according to experience. The distance between two adjacent important points can be calculated by the following formula (1):
Figure BDA0001699990060000091
assuming that longitude and latitude coordinates of two points in the geographic space are (starting, starting Lat), (end Lng, end Lat), respectively, converting the longitude and latitude value into an arc value through the following formula (2):
radian (phi/180 degree) angle (2)
After conversion, coordinates (slng, slat), (elng, elat) of two points are obtained. And substituting the two points into the formula (1) to obtain the distance between the two points. Where radius is the earth radius (KM), which has a value of about 6378.137.
As can be seen from the route geographic time similarity calculation mode, the route geographic time similarity comprises the similarity of two constraint dimensions of a road section and time, the similarity of two tracks in space and time is represented, and the numerical interval is [0,1 ]]. Which can reflect the similarity degree of two tracks in the spatial position of the important point and the similarity degree of the two tracks passing through the time of the important point of the tracks,the calculated track similarity can be divided into two similar conditions of the same road section, the same time, the same road section and different times under the condition that the two tracks are judged to be similar. When E (Δ T) is less than or equal to TCWhen the time interval meets the expectation, the two tracks are considered to meet the interval threshold value in the time dimension, and the time matching similarity is 1, namely the two tracks are completely similar in time. When E (Delta T) is greater than TCThe threshold range is already exceeded, the more the exceeding, the larger the error value, the smaller the similarity value. T isCAs a constant, E (delta T) is taken as a variable, and a monotone decreasing function formed by the ratio of the E (delta T) can most directly and simply characterize the relation. Therefore, the route similarity calculation mode provided by the disclosure can accurately calculate the similarity of the route in the constraint dimensions of the road section and the time.
Periodic similarity calculation mode: the method comprises the steps that when the departure time of two tracks is in accordance with the same period, the period similarity is a preset first similarity value, when the departure time of the two tracks is not in accordance with the same period, the period similarity is a preset second similarity value, and the preset first similarity value and the preset second similarity value are different values.
For example, the periodic similarity calculation mode can be expressed by the following formula:
Figure BDA0001699990060000101
wherein, T (L)iT(start),LjT(start)) Refers to departure time, and R is a rule for determining whether departure times are in the same period.
The period similarity calculation mode can be a constraint extension on the route geographic time similarity calculation mode, and the similarity calculated by the period similarity calculation mode has two conditions, namely within one period or not within one period. For example, the preset first similarity value and the preset second similarity value may be represented by values of 0 and 1, the same period being 1, and the different period being 0.
For example, the rule for determining whether the departure times are the same period may include:
(1) starting at a fixed time period during the day.
The departure time is the same period, namely: may not be the same day but for the same period, e.g., all starting at 2 pm, the same period.
(2) Set off at a fixed week during the week.
The departure time is the same period, namely: it may not be the same day, but the same week, e.g., all on thursday, the same period.
(3) A fixed date in the middle of a month.
The departure time is the same period, which means that the dates may be the same instead of the same day, and for example, the departure times are all No. 2 in one month, which means the same period.
According to the period similarity calculation mode, the period similarity can accurately reflect the similarity of the travel time of the moving object from the periodicity of the track.
Route cycle integrated similarity calculation mode: the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity, or the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity.
The route period integrated similarity calculation mode can be expressed by the following formula:
S*=S'·S
according to the route period comprehensive similarity calculation mode, the calculated track similarity can be divided into three similar conditions of a fixed line fixed period, a fixed line unfixed period and an unfixed line fixed period under the condition that the similarity of the two tracks is judged, the similarity of the tracks is measured from two dimensions of the similarity of the route geographical time and the similarity of the trip period, and the calculation of the track similarity is more accurate.
It should be noted that, the implementation manner of the present disclosure to obtain the number of tracks in the track set that are not similar to any other tracks is not limited. For example, tracks that are not similar to any other track, i.e. tracks that do not belong to any group, may be accumulated when group division is performed. For another example, after the group division is completed, the number of tracks in all the groups is accumulated to obtain the total number of all the tracks with similar tracks, and then the total number of the tracks with similar tracks is subtracted from the total number of the tracks in the track set to obtain the number of the tracks in the track set that are not similar to any other tracks.
In step 130, the track frequency is calculated according to the positive correlation between the total number of tracks in the track set and the track frequency, the negative correlation between the number of the track groups and the track frequency, and the negative correlation between the number of the tracks which are not similar to any other tracks and the track frequency.
In a possible implementation, the track frequency may be determined according to a quotient obtained by dividing the total number of tracks in the track set by the sum of the group number of the track groups and the number of the tracks that are not similar to any other tracks. According to the embodiment, the positive and negative correlation relation is accurately, directly and simply represented by the ratio of the total number of the tracks in the track set to the sum of the group number of the track groups and the number of the tracks which are not similar to any other tracks, so that the track frequency is obtained, and the efficiency is high. Of course, the above-mentioned positive and negative correlation relationships may be characterized by other expressions, which are not limited by the present disclosure.
For example, the trajectory frequency in this embodiment may be calculated by the following equation:
Figure BDA0001699990060000121
m is the total number of tracks in the track set, l is the number of groups, and f is the number of tracks in a certain category i.
According to the technical scheme, the track groups are obtained by clustering and dividing each track in the track set based on the track similarity, the number of tracks which are not similar to any other track in the track set is obtained, the more the total number of travel tracks is, the precondition that the route can be more frequent is obtained, the track groups are positively correlated with the frequency value, the fewer the tracks which are not similar to any track are, the higher the track frequency is, the track frequency belongs to negative correlation, one track group represents one frequent route, the fewer the group number indicates that the track concentration is higher, the more the tracks on the single frequent route are, the higher the track frequency is, the track frequency belongs to negative correlation, therefore, the track group is calculated according to the positive correlation between the total number of tracks and the track frequency in the track set, the negative correlation between the group number of track groups and the track frequency, and the negative correlation between the number of tracks which are not similar to any other track and the track frequency, the track frequency of the moving object on the frequent routes represented by the groups can be accurately reflected. The track frequency of the frequent route is closely related to the travel rule of the mobile object, and is one of the factors determining the behavior and safety risk of the mobile object. For example, in the driving safety risk evaluation, the track frequency of the frequent route and the driving characteristics such as the driving duration, the mileage, the speed, the bad driving behavior, the road state and the like can be jointly used as independent variable characteristic vectors for data analysis, so that the driving risk factor of the driving safety risk evaluation function is perfected, and the accuracy of the driving safety risk evaluation, namely the accuracy of risk identification, is improved. Therefore, the method and the device provide new quantitative indexes for behavior analysis, safety risk evaluation and the like of the mobile object, so that more accurate behavior analysis, safety risk evaluation and the like of the mobile object are realized.
In order to improve the calculation efficiency of the track frequency, in a possible embodiment, before performing cluster division based on the track similarity on each track in the track set to obtain the track group, it may also be determined, for each track in the track set, whether a distance between a start point of the track to which the cluster is directed and a start point of at least one track in the other tracks meets a requirement of a preset start point distance threshold, and a distance between end points meets a requirement of a preset end point distance threshold. If not, deleting the aimed track from the track set. In order to make the embodiment easier to understand, a possible implementation flow of the embodiment will be described in detail below with reference to fig. 2.
Fig. 2 is a flowchart illustrating a method of calculating track frequency according to an exemplary embodiment of the present disclosure. As shown in fig. 2, the method may include the steps of:
in step 210, a set of trajectories D of the moving object is obtained, all trajectories being of an unlabeled group.
Wherein the content of the first and second substances,
Figure BDA0001699990060000131
m is the number of tracks
In step 220, any trajectory L from the set D is taken, and the remaining trajectories in D are traversed.
In step 220a, it is determined whether the distance between the currently traversed track and the starting point of the track L is smaller than a preset starting point distance threshold, and the distance between the ending point is smaller than a preset ending point distance threshold.
In step 220b, if the distance between the currently traversed track and the starting point of the track L is greater than or equal to the preset starting point distance threshold or the distance between the end point of the track L is greater than or equal to the preset end point distance threshold, it is determined whether the D set still has remaining tracks that are not traversed. If not, go to step 220 k.
In step 220c, if so, traversal continues and returns to step 220 a.
In step 220d, if the distance between the currently traversed track and the starting point of the track L is smaller than the preset starting point distance threshold, and the distance between the end point is smaller than the preset end point distance threshold, the track similarity between the currently traversed track and the track L is calculated to obtain the track similarity.
In step 220e, it is determined whether the calculated track similarity is greater than a preset similarity threshold. If not, go to step 220 f. If so, go to step 220 h.
In step 220f, it is determined whether there are still traces in the D set that have not been traversed.
In step 220g, if the D set still has the remaining traces not traversed, the traversal is continued, and the step 220a is returned. If the D set of remaining traces has completed traversing, step 220k is entered.
In step 220h, if the calculated track similarity is greater than the preset similarity threshold, it is determined that the two tracks are similar.
In step 220i, if the currently traversed trajectory is similar to the trajectory L and the trajectory L is not marked by a group, a new trajectory group is created, the trajectory L and the trajectory determined to be similar to the trajectory L are added to the newly created trajectory group, and the process goes to step 220f to continue the traversal.
It should be noted that, after the trajectory L and the trajectory determined to be similar to the trajectory L are added to the newly created trajectory group in step 220i, the traversal may be continued or may be terminated. Because when adding the trajectory L and the trajectory determined to be similar to L to the newly created trajectory group, the trajectory similar to L is not deleted from the D set, that is, the trajectory similar to L still exists in the D set. Namely: under the condition of finishing traversal, other similar tracks can be classified into the same category due to similarity with the tracks of the same category of the L in subsequent similar comparison, classification is not influenced, but efficiency is low; under the condition of not finishing the traversal, the path can be traversed to the last path all the time, so that the paths similar to the path L are completely divided into the same category in one-time traversal, and the efficiency is higher.
In step 220j, if the two tracks are similar and the track L has a group mark, the track determined to be similar to L is added to the track group to which L belongs, and the similar track is marked, and the process returns to step 220f to continue the traversal.
It is understood that the effect of the subsequent traversal after step 220j is similar to the effect of the subsequent traversal after step 220i, and the description is not repeated here.
In step 220k, the trajectory L is deleted from the set D, and it is determined whether the set D is empty. If set D is not empty, step 220 is re-entered.
In step 220l, if the set D is empty, one or more trajectory groups are obtained, the number of trajectories in all trajectory groups is accumulated to obtain the total number of trajectories with similar trajectories, and the total number of trajectories with similar trajectories is subtracted from the total number of trajectories in the trajectory set to obtain the number of trajectories that are not similar to any other trajectory.
In step 230, the total number of tracks in the track set is divided by the sum of the group number of the track groups and the number of the tracks that are not similar to any other tracks, so as to obtain the track frequency.
In the embodiment, the tracks which are not similar to any track are roughly screened out through the distance between the starting point and the end point of the tracks, the number of the tracks needing to be subjected to track similarity calculation is reduced, and the calculation efficiency of the track frequency is improved.
Fig. 3 is a block diagram illustrating an apparatus 300 for calculating trajectory frequency according to an exemplary embodiment of the present disclosure. As shown in fig. 3, the apparatus may include: an acquisition module 310, a trajectory division module 320, a noise calculation module 330, and a frequency calculation module 340.
The obtaining module 310 may be configured to obtain a set of trajectories of a moving object.
The track division module 320 may be configured to perform track similarity-based clustering division on each track in the track set to obtain track groups, where each track group at least includes two similar tracks.
The noise calculation module 330 may be configured to obtain a number of trajectories in the set of trajectories that are not similar to any other trajectory.
The frequency calculation module 340 may be configured to calculate the track frequency according to that the total number of tracks in the track set is positively correlated with the track frequency, the number of the track groups is negatively correlated with the track frequency, and the number of the tracks that are not similar to any other tracks is negatively correlated with the track frequency.
According to the technical scheme, the track groups are obtained by clustering and dividing each track in the track set based on the track similarity, the number of tracks which are not similar to any other track in the track set is obtained, the more the total number of travel tracks is, the precondition that the route can be more frequent is obtained, the track groups are positively correlated with the frequency value, the fewer the tracks which are not similar to any track are, the higher the track frequency is, the track frequency belongs to negative correlation, one track group represents one frequent route, the fewer the group number indicates that the track concentration is higher, the more the tracks on the single frequent route are, the higher the track frequency is, the track frequency belongs to negative correlation, therefore, the track group is calculated according to the positive correlation between the total number of tracks and the track frequency in the track set, the negative correlation between the group number of track groups and the track frequency, and the negative correlation between the number of tracks which are not similar to any other track and the track frequency, the method can accurately reflect the frequency of the moving object on the frequent routes represented by the groups, and provides more accurate quantitative indexes for behavior analysis, safety risk evaluation and the like of the moving object.
Fig. 4 is a block diagram illustrating an apparatus 400 for calculating trajectory frequency according to another exemplary embodiment of the present disclosure. As shown in fig. 4, the apparatus may further include: the determining module 350 may be configured to, before the track dividing module performs track similarity-based clustering division on each track in the track set to obtain the track group, determine, for each track in the track set, whether a distance between a starting point of the track to which the determining module refers and a starting point of at least one track in the other tracks meets a requirement of a preset starting point distance threshold, and a distance between end points meets a requirement of a preset end point distance threshold. A deleting module 351, configured to delete the targeted track from the track set if the determining module 350 determines no.
In the embodiment, the tracks which are not similar to any track are roughly screened out through the distance between the starting point and the end point of the tracks, the number of the tracks needing to be subjected to track similarity calculation is reduced, and the calculation efficiency of the track frequency is improved.
In a possible implementation, the frequency calculation module 340 may be configured to determine the track frequency according to a quotient obtained by dividing the total number of tracks in the track set by the sum of the group number of the track groups and the number of tracks that are not similar to any other tracks. According to the embodiment, the positive and negative correlation relation is accurately, directly and simply represented by the ratio of the total number of the tracks in the track set to the sum of the group number of the track groups and the number of the tracks which are not similar to any other tracks, so that the track frequency is obtained, and the efficiency is high. Of course, the above-mentioned positive and negative correlation relationships may be characterized by other expressions, which are not limited by the present disclosure.
As shown in fig. 4, the trajectory division module 320 of the apparatus may include: the similarity operator module 321 may be configured to calculate a one-to-one trajectory similarity between each trajectory in the trajectory set and other trajectories through any one of the following similarity calculation modes, where the trajectory similarity includes route geographical similarity, route geographical time similarity, cycle similarity, or comprehensive similarity according to an adopted similarity calculation mode. The group classification submodule 322 may be configured to classify trajectories determined to be similar according to the calculated trajectory similarity into the same trajectory group.
Wherein the similarity calculation mode comprises:
route geographical similarity calculation mode: the route geographical similarity is determined according to the proportion of adjacent important points of the two tracks in the two tracks.
Route geographical time similarity calculation mode: under the condition that the time error absolute value mean value of the adjacent important points of the two tracks after the route passes through meets the requirement of a preset time interval threshold, the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks; under the condition that the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey does not meet the requirement of the preset time interval threshold value, the geographical time similarity of the journey is determined according to the proportion of the adjacent important points of the two tracks in the two tracks and the proportion of the preset time interval threshold value and the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey.
Periodic similarity calculation mode: the method comprises the steps that when the departure time of two tracks is in accordance with the same period, the period similarity is a preset first similarity value, when the departure time of the two tracks is not in accordance with the same period, the period similarity is a preset second similarity value, and the preset first similarity value and the preset second similarity value are different values.
Route cycle integrated similarity calculation mode: the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity, or the comprehensive similarity is determined according to the product of the route geographical time similarity and the period similarity.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a block diagram illustrating an electronic device 500 in accordance with an example embodiment. As shown in fig. 5, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input/output (I/O) interface 504, and a communication component 505.
The processor 501 is configured to control the overall operation of the electronic device 500, so as to complete all or part of the steps in the above method for calculating the track frequency. The memory 502 is used to store various types of data to support operation at the electronic device 500, such as instructions for any application or method operating on the electronic device 500 and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 502 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia component 503 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 502 or transmitted through the communication component 505. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 504 provides an interface between the processor 501 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 505 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method of calculating trajectory frequency.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the above-described method of calculating trajectory frequency is also provided. For example, the computer readable storage medium may be the memory 502 described above that includes program instructions executable by the processor 501 of the electronic device 500 to perform the method described above for calculating trajectory frequency.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the above-described method of calculating trajectory frequency is also provided. For example, the computer readable storage medium may be the memory 502 described above that includes program instructions executable by the processor 501 of the electronic device 500 to perform the method described above for calculating trajectory frequency.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (8)

1. A method for calculating trajectory frequency, comprising:
acquiring a track set of a moving object;
clustering and dividing each track in the track set based on track similarity to obtain track groups, and acquiring the number of tracks which are not similar to any other tracks in the track set, wherein each track group at least comprises two similar tracks;
calculating the track frequency according to the positive correlation between the total number of tracks and the track frequency, the negative correlation between the group number of the track groups and the track frequency, and the negative correlation between the number of the tracks which are not similar to any other tracks and the track frequency in the track set;
the track similarity is obtained based on cycle similarity, the cycle similarity is a preset first similarity value under the condition that the departure time of the two tracks is in accordance with the same cycle, the cycle similarity is a preset second similarity value under the condition that the departure time of the two tracks is not in accordance with the same cycle, and the preset first similarity value and the preset second similarity value are different values;
and the clustering division based on the track similarity of each track in the track set to obtain the track group comprises:
calculating the one-to-one corresponding track similarity between each track in the track set and other tracks through any one of the following similarity calculation modes, wherein the track similarity comprises cycle similarity or comprehensive similarity according to the adopted similarity calculation mode;
dividing the tracks judged to be similar according to the calculated track similarity into the same track group;
the similarity calculation mode includes:
a periodic similarity calculation mode;
route cycle integrated similarity calculation mode: the comprehensive similarity is determined according to the product of route geographical time similarity and the cycle similarity, or the comprehensive similarity is determined according to the product of the route geographical time similarity and the cycle similarity, wherein the route geographical similarity is determined according to the proportion of adjacent important points of the two tracks in the two tracks, and the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks under the condition that the time error absolute value mean value of the adjacent important points of the two tracks of the route passes through meets the requirement of a preset time interval threshold; under the condition that the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey does not meet the requirement of the preset time interval threshold value, the geographical time similarity of the journey is determined according to the proportion of the adjacent important points of the two tracks in the two tracks and the proportion of the preset time interval threshold value and the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey.
2. The method according to claim 1, wherein before performing track similarity-based clustering on each track in the track set to obtain the track group, the method further comprises:
for each track in the track set, judging whether the distance between the starting point of the track to which the track is directed and the starting point of at least one track in other tracks meets the requirement of a preset starting point distance threshold value, and the distance between end points meets the requirement of a preset end point distance threshold value;
if not, deleting the aimed track from the track set.
3. The method of claim 1, wherein calculating the track frequency according to the total number of tracks in the track set positively correlated with track frequency, the number of groups of tracks negatively correlated with track frequency, and the number of tracks not similar to any other tracks negatively correlated with track frequency comprises:
determining the track frequency according to a quotient obtained by dividing the total number of tracks in the track set by the sum of the group number of the track groups and the number of the tracks which are not similar to any other tracks.
4. An apparatus for calculating trajectory frequency, comprising:
an acquisition module configured to acquire a set of trajectories of a moving object;
the track division module is configured to perform clustering division based on track similarity on each track in the track set to obtain track groups, wherein each track group at least comprises two similar tracks;
a noise calculation module configured to obtain a number of trajectories in the set of trajectories that are not similar to any other trajectory;
the frequency calculation module is configured to calculate the track frequency according to the positive correlation between the total number of tracks in the track set and the track frequency, the negative correlation between the number of the track groups and the track frequency, and the negative correlation between the number of the tracks which are not similar to any other tracks and the track frequency;
the track similarity is obtained based on cycle similarity, the cycle similarity is a preset first similarity value under the condition that the departure time of the two tracks is in accordance with the same cycle, the cycle similarity is a preset second similarity value under the condition that the departure time of the two tracks is not in accordance with the same cycle, and the preset first similarity value and the preset second similarity value are different values;
and, the trajectory dividing module includes:
the similarity operator module is configured to calculate the one-to-one corresponding track similarity between each track in the track set and other tracks through any one of the following similarity calculation modes, and the track similarity comprises period similarity or comprehensive similarity according to the adopted similarity calculation mode;
a group division submodule configured to divide the trajectories determined to be similar according to the calculated trajectory similarity into the same trajectory group;
the similarity calculation mode includes:
a periodic similarity calculation mode;
route cycle integrated similarity calculation mode: the comprehensive similarity is determined according to the product of route geographical time similarity and the cycle similarity, or the comprehensive similarity is determined according to the product of the route geographical time similarity and the cycle similarity, wherein the route geographical similarity is determined according to the proportion of adjacent important points of the two tracks in the two tracks, and the route geographical time similarity is determined according to the proportion of the adjacent important points of the two tracks in the two tracks under the condition that the time error absolute value mean value of the adjacent important points of the two tracks of the route passes through meets the requirement of a preset time interval threshold; under the condition that the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey does not meet the requirement of the preset time interval threshold value, the geographical time similarity of the journey is determined according to the proportion of the adjacent important points of the two tracks in the two tracks and the proportion of the preset time interval threshold value and the time error absolute value mean value of the adjacent important points of the two tracks passed by the journey.
5. The apparatus of claim 4, further comprising:
the judging module is configured to judge whether the distance between the starting point of the corresponding track and the starting point of at least one track in other tracks meets the requirement of a preset starting point distance threshold and the distance between the end points meets the requirement of a preset end point distance threshold or not according to each track in the track set before the track dividing module performs track similarity-based clustering division on each track in the track set to obtain the track group;
and the deleting module is configured to delete the corresponding track from the track set if the judging module judges that the track set is not the target track set.
6. The apparatus of claim 4, wherein the frequency calculation module is configured to determine the track frequency according to a quotient of a total number of tracks in the set of tracks divided by a sum of a group number of the group of tracks and the number of tracks that are not similar to any other tracks.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
8. An electronic device, comprising:
the computer-readable storage medium recited in claim 7; and
one or more processors to execute the program in the computer-readable storage medium.
CN201810631466.XA 2018-06-19 2018-06-19 Method and device for calculating track frequency, storage medium and electronic equipment Active CN109063727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810631466.XA CN109063727B (en) 2018-06-19 2018-06-19 Method and device for calculating track frequency, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810631466.XA CN109063727B (en) 2018-06-19 2018-06-19 Method and device for calculating track frequency, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109063727A CN109063727A (en) 2018-12-21
CN109063727B true CN109063727B (en) 2021-02-05

Family

ID=64820589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810631466.XA Active CN109063727B (en) 2018-06-19 2018-06-19 Method and device for calculating track frequency, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109063727B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110443288B (en) * 2019-07-19 2021-09-28 浙江大学城市学院 Trajectory similarity calculation method based on sequencing learning
CN111078810A (en) * 2019-11-29 2020-04-28 北京三快在线科技有限公司 Empirical route generation method and apparatus, storage medium, and electronic device
CN113254013B (en) * 2021-07-16 2021-09-24 电子科技大学 Reusable component mining method for complex business process

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122461A (en) * 2017-04-27 2017-09-01 东软集团股份有限公司 One kind trip method of trajectory clustering, device and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI385544B (en) * 2009-09-01 2013-02-11 Univ Nat Pingtung Sci & Tech Density-based data clustering method
CN105258704B (en) * 2014-06-16 2017-12-05 中国科学院沈阳自动化研究所 Multiple dimensioned space-time hotspot path detection method based on through street net modeling

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122461A (en) * 2017-04-27 2017-09-01 东软集团股份有限公司 One kind trip method of trajectory clustering, device and equipment

Also Published As

Publication number Publication date
CN109063727A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
US10663305B2 (en) Map matched aggregation for K-anonymity in trajectory data
CN108286980B (en) Method for predicting destination and recommending driving route
CN112700072B (en) Traffic condition prediction method, electronic device, and storage medium
Bierlaire et al. A probabilistic map matching method for smartphone GPS data
CN109033011B (en) Method and device for calculating track frequency, storage medium and electronic equipment
Choi et al. Attention-based recurrent neural network for urban vehicle trajectory prediction
CN109983306B (en) Method and system for generating parking related data
US20110153189A1 (en) Historical traffic data compression
US8457880B1 (en) Telematics using personal mobile devices
Newson et al. Hidden Markov map matching through noise and sparseness
CN109063727B (en) Method and device for calculating track frequency, storage medium and electronic equipment
US11042648B2 (en) Quantification of privacy risk in location trajectories
Mazaré et al. Trade-offs between inductive loops and GPS probe vehicles for travel time estimation: A Mobile Century case study
US11162801B2 (en) Methods and systems for detecting an open navigable element
Mohamed et al. Accurate and efficient map matching for challenging environments
Tang et al. Markov Chains based route travel time estimation considering link spatio-temporal correlation
Lin et al. Vehicle re-identification with dynamic time windows for vehicle passage time estimation
Stipancic et al. Measuring and visualizing space–time congestion patterns in an urban road network using large-scale smartphone-collected GPS data
Song et al. Hidden Markov model and driver path preference for floating car trajectory map matching
Waltereit et al. Route derivation using distances and turn directions
CN110956800B (en) Road section traffic data preprocessing method and device and electronic equipment
WO2021150166A1 (en) Determining a route between an origin and a destination
Mazaré et al. COMPUTING TRAVEL TIMES FROM FILTERED TRAFFIC STATES.
JP2019040378A (en) Computer program, travel road determination method, travel road determination device, on-vehicle device, and data structure
Chen Modeling route choice behavior using smartphone data

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