CN111190989B - Discrete trajectory analysis method and device, electronic equipment and readable storage medium - Google Patents

Discrete trajectory analysis method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111190989B
CN111190989B CN201911426023.8A CN201911426023A CN111190989B CN 111190989 B CN111190989 B CN 111190989B CN 201911426023 A CN201911426023 A CN 201911426023A CN 111190989 B CN111190989 B CN 111190989B
Authority
CN
China
Prior art keywords
main
track point
track
distance
target
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
CN201911426023.8A
Other languages
Chinese (zh)
Other versions
CN111190989A (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.)
Shenzhen Anngic Technology Co ltd
Original Assignee
Shenzhen Anngic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Anngic Technology Co ltd filed Critical Shenzhen Anngic Technology Co ltd
Priority to CN201911426023.8A priority Critical patent/CN111190989B/en
Publication of CN111190989A publication Critical patent/CN111190989A/en
Application granted granted Critical
Publication of CN111190989B publication Critical patent/CN111190989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing

Abstract

The application provides a discrete trajectory analysis method, a discrete trajectory analysis device, an electronic device and a readable storage medium, wherein the discrete trajectory analysis method comprises the following steps: determining a search direction coordinate axis according to coordinate values of a plurality of main track points of the main discrete track; acquiring a first target track point of the target discrete track and a coordinate value of the first target track point on the coordinate axis of the searching direction; screening primary main track points from the plurality of main track points according to the search direction coordinate axis; and determining the distance between the first target track point and the main discrete track according to the primary selected main track point and the adjacent main track points. Compared with the prior art, the method has the advantages of small calculation amount and high calculation efficiency.

Description

Discrete trajectory analysis method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a discrete trajectory analysis method and apparatus, an electronic device, and a readable storage medium.
Background
In an Advanced Driving Assistance System (ADAS), it is often necessary to calculate a distance between a discrete trajectory of a vehicle and a discrete trajectory of a target.
In the prior art, during calculation, the distance between each track point in one of the discrete tracks and each track point in the other discrete track is often calculated, and then the shortest distance among the distances is taken; or each time one distance is calculated, the distance is compared with a preset distance threshold value, and the distance smaller than the preset distance threshold value is used as the distance between two discrete tracks. The existing calculation method has large calculation amount and low calculation efficiency.
Disclosure of Invention
An embodiment of the present application aims to provide a method and an apparatus for analyzing a discrete trajectory, an electronic device, and a readable storage medium, so as to solve the problems of a large amount of computation and low computation efficiency in the prior art.
In a first aspect, an embodiment of the present application provides a discrete trajectory analysis method, configured to calculate a distance between a target trajectory point and a main discrete trajectory of a target discrete trajectory, where the target discrete trajectory includes multiple target trajectory points, and the main discrete trajectory includes multiple main trajectory points, the method includes: determining a searching direction coordinate axis according to coordinate values of a plurality of main track points of the main discrete track, wherein the searching direction coordinate axis is used for reflecting the integral extending direction of the main discrete track; acquiring a first target track point of the target discrete track and a coordinate value of the first target track point on the coordinate axis of the search direction, wherein the first target track point is any one of two end points of the target discrete track; according to the search direction coordinate axis, primary main track points are screened from the plurality of main track points, wherein the coordinate values of the primary main track points in the search direction coordinate axis are closest to the coordinate values of the first target track points in the search direction coordinate axis; and determining the distance between the first target track point and the main discrete track according to the initial main track point and the adjacent main track point, wherein the adjacent main track point is the main track point adjacent to the initial main track point.
In the foregoing embodiment, the search direction coordinate axis may be determined first, then the first target track point of the target discrete trajectory and the coordinate value corresponding to the first target track point on the search direction coordinate axis are obtained, then an initial main track point of the coordinate value closest to the coordinate axis of the first target track point on the search direction coordinate axis is selected from the main track points, and then the distance between the first target track point and the main discrete trajectory is determined according to the initial main track point and the adjacent main track point of the initial main track point. Compared with the prior art, the method has the advantages of small calculation amount and high calculation efficiency.
In one possible design, determining the distance between the first target trajectory point and the main discrete trajectory according to the initially selected main trajectory point and the adjacent main trajectory points includes: calculating a first distance between the primary selected main track point and the first target track point; calculating a second distance between the adjacent main track point and the first target track point; if the second distance is smaller than the first distance, taking the adjacent main track point corresponding to the second distance smaller than the first distance as a new primary main track point, and executing the following steps: calculating a first distance between the primary selected main track point and the first target track point until the first distance is smaller than the second distance; determining smaller adjacent main track points of final main track points corresponding to a first distance smaller than the second distance, wherein the smaller adjacent main track points are adjacent main track points which are closest to the first target track point in the adjacent main track points of the final main track points; acquiring a connecting line between the final selected main track point and the smaller adjacent main track point; and calculating the point-line distance between the connecting line and the first target track point, wherein the point-line distance is the distance between the first target track point and the main discrete track.
In the above embodiment, a first distance between the initially selected main track point and the first target track point and a second distance between the adjacent main track point and the first target track point can be calculated respectively, and then the main track point closest to the first target track point in the plurality of main track points is determined by comparing the first distance with the second distance. If the second distance is smaller than the first distance, the adjacent main track point corresponding to the second distance can be used as a new primary main track point, and then the step is skipped: and calculating a first distance between the primary selection main track point and the first target track point, and executing circulation until the first distance is smaller than the second distance. And if the second distance is greater than the first distance, taking the initially selected main track point as a final main track point, obtaining a smaller adjacent main track point of the final main track point, then obtaining a connecting line between the final main track point and the smaller adjacent main track point, and taking the point-line distance between the first target track point and the connecting line as the distance between the first target track point and the main discrete track. The above-described embodiment may more accurately reflect the actual distance of two discrete trajectories.
In one possible design, for any target track point in the target discrete trajectory except the first target track point, the method further includes: acquiring a final main track point corresponding to a previous target track point of the target track points, wherein the final main track point corresponding to the previous target track point is used as an initial main track point of the current target track point; and determining the distance between the current target track point and the main discrete track according to the adjacent main track points of the initial main track points of the current target track point and the initial main track points of the current target track point.
In the foregoing embodiment, for any one of the other target track points except the first target track point, the final main track point corresponding to the last target track point of the target track point can be directly used as the initial main track point of the current target track point, and then the distance between the current target track point and the main discrete track is determined according to the adjacent main track point of the initial main track point of the current target track point and the initial main track point of the current target track point. Because the operation result of the last target track point of the current target track point is used, the operation amount can be further reduced, and the operation efficiency is improved.
In one possible design, the determining a search direction coordinate axis according to coordinate values of a plurality of main track points of the main discrete track includes: acquiring the maximum value and the minimum value of the plurality of main track points in the direction of an x coordinate axis, and calculating the span value of the main discrete track in the direction of the x coordinate axis, wherein the span value in the direction of the x coordinate axis is the difference between the maximum value and the minimum value in the direction of the x coordinate axis; acquiring the maximum value and the minimum value of the plurality of main track points in the y coordinate axis direction, and calculating the span value of the main discrete track in the y coordinate axis direction, wherein the span value in the y coordinate axis direction is the difference between the maximum value and the minimum value in the y coordinate axis direction; and determining a coordinate axis of the search direction according to the relative magnitude of the span value of the main discrete track in the direction of the x coordinate axis and the span value of the main discrete track in the direction of the y coordinate axis.
In the above embodiment, the search direction coordinate axis may be determined according to the span of all main trajectory points of the main discrete trajectory in the x or y direction, so that the overall extension trend of the main discrete trajectory may be better determined.
In a possible design, the determining a coordinate axis of a search direction according to a relative magnitude of a span value of the main discrete trajectory in an x coordinate axis direction and a span value of the main discrete trajectory in a y coordinate axis direction includes: if the span value of the main discrete track in the x coordinate axis direction is larger than or equal to the span value of the main discrete track in the y coordinate axis direction, determining the x coordinate axis as the search direction coordinate axis; and if the span value of the main discrete track in the x coordinate axis direction is smaller than the span value of the main discrete track in the y coordinate axis direction, determining the y coordinate axis as the search direction coordinate axis.
In the above embodiment, if the coordinate span value in the x-axis direction exceeds the coordinate span value in the y-axis direction, it indicates that the overall extension trend of the main discrete trajectory is extension along the x-axis direction; and if the coordinate span value in the y-axis direction exceeds the coordinate span value in the x-axis direction, indicating that the overall extension trend of the main discrete track is extension along the y-axis direction.
In a second aspect, an embodiment of the present application provides a discrete trajectory analysis device, configured to calculate a distance between a target trajectory point and a main discrete trajectory of a target discrete trajectory, where the target discrete trajectory includes a plurality of target trajectory points, the main discrete trajectory includes a plurality of main trajectory points, and the device includes: the coordinate axis determining module is used for determining a searching direction coordinate axis according to coordinate values of a plurality of main track points of the main discrete track, and the searching direction coordinate axis is used for reflecting the integral extending direction of the main discrete track; the coordinate value acquisition module is used for acquiring a first target track point of the target discrete track and a coordinate value of the first target track point on the coordinate axis of the search direction, wherein the first target track point is any one of two end points of the target discrete track; the track point screening module is used for screening a primary main track point from the plurality of main track points according to the searching direction coordinate axis, wherein the coordinate value of the primary main track point in the searching direction coordinate axis is closest to the coordinate value of the first target track point in the searching direction coordinate axis; and the distance determining module is used for determining the distance between the first target track point and the main discrete track according to the initial main track point and the adjacent main track point, wherein the adjacent main track point is the main track point adjacent to the initial main track point.
In one possible design, the distance determining module is specifically configured to: calculating a first distance between the primary selected main track point and the first target track point; calculating a second distance between the adjacent main track point and the first target track point; if the second distance is smaller than the first distance, the adjacent main track point corresponding to the second distance smaller than the first distance is used as a new primary main track point, and the following steps are executed: calculating a first distance between the primary selected main track point and the first target track point until the first distance is smaller than the second distance; determining a smaller adjacent main track point of the final main track points corresponding to a first distance smaller than the second distance, wherein the smaller adjacent main track point is an adjacent main track point which is closest to the first target track point in the adjacent main track points of the final main track points; acquiring a connecting line between the final selected main track point and the smaller adjacent main track point; and calculating the point-line distance between the connecting line and the first target track point, wherein the point-line distance is the distance between the first target track point and the main discrete track.
In one possible design, the apparatus further includes: the track point acquisition module is used for acquiring a final main track point corresponding to a previous target track point of the target track points, and the final main track point corresponding to the previous target track point is used as an initial main track point of the current target track point; and the current track point distance module is used for determining the distance between the current target track point and the main discrete track according to the adjacent main track points of the initial main track point of the current target track point and the initial main track point of the current target track point.
In one possible design, the coordinate axis determining module is specifically configured to obtain a maximum value and a minimum value of the plurality of main track points in an x coordinate axis direction, and calculate a span value of the main discrete track in the x coordinate axis direction, where the span value in the x coordinate axis direction is a difference between the maximum value and the minimum value in the x coordinate axis direction; acquiring the maximum value and the minimum value of the plurality of main track points in the y coordinate axis direction, and calculating the span value of the main discrete track in the y coordinate axis direction, wherein the span value in the y coordinate axis direction is the difference between the maximum value and the minimum value in the y coordinate axis direction; and determining a searching direction coordinate axis according to the relative magnitude of the span value of the main discrete track in the direction of the x coordinate axis and the span value of the main discrete track in the direction of the y coordinate axis.
In one possible design, the coordinate axis determining module is specifically configured to determine the x coordinate axis as the search direction coordinate axis if a span value of the primary discrete trajectory in the x coordinate axis direction is greater than or equal to a span value of the primary discrete trajectory in the y coordinate axis direction; and if the span value of the main discrete track in the x coordinate axis direction is smaller than the span value of the main discrete track in the y coordinate axis direction, determining the y coordinate axis as the search direction coordinate axis.
In a fourth aspect, an embodiment of the present application provides an electronic device, which includes the method described in the first aspect or any optional implementation manner of the first aspect.
In a fifth aspect, the present application provides a readable storage medium having stored thereon an executable program which, when executed by a processor, performs the method of the first aspect or any of the optional implementations of the first aspect.
In a sixth aspect, the present application provides an executable program product which, when run on a computer, causes the computer to perform the method of the first aspect or any possible implementation manner of the first aspect.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 illustrates a schematic flow chart of a discrete trajectory analysis method provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating the detailed steps of step S140 in FIG. 1;
FIG. 3 is a flow chart diagram illustrating one embodiment of a discrete trajectory analysis method provided by an embodiment of the present application;
fig. 4 shows a schematic structural block diagram of a discrete trajectory analysis device provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of a target trajectory point and a primary discrete trajectory;
FIG. 6 shows another schematic diagram of a target trajectory point and a primary discrete trajectory;
FIG. 7 shows yet another schematic diagram of a target trajectory point and a primary discrete trajectory;
fig. 8 shows a schematic diagram of the calculation of the distance between the target trajectory point and the main discrete trajectory.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 shows a discrete trajectory analysis method provided in an embodiment of the present application, where the method may be executed by an electronic device, and the electronic device may be a terminal device or a server, and the method specifically includes the following steps S110 to S140:
and step S110, determining a coordinate axis of a searching direction according to the coordinate values of the plurality of main track points of the main discrete track.
And the searching direction coordinate axis is used for reflecting the integral extending direction of the main discrete track. The main discrete trajectory may be a discrete trajectory of motion of a vehicle driven by a user in the ADAS, and may be composed of a plurality of main trajectory points, and the plurality of main trajectory points may be positions corresponding to the vehicle driven by the user at a plurality of different times, respectively.
Optionally, step S110 specifically includes: acquiring the maximum value and the minimum value of the plurality of main track points in the direction of an x coordinate axis, and calculating the span value of the main discrete track in the direction of the x coordinate axis, wherein the span value in the direction of the x coordinate axis is the difference between the maximum value and the minimum value in the direction of the x coordinate axis; acquiring the maximum value and the minimum value of the plurality of main track points in the y coordinate axis direction, and calculating the span value of the main discrete track in the y coordinate axis direction, wherein the span value in the y coordinate axis direction is the difference between the maximum value and the minimum value in the y coordinate axis direction; and determining a searching direction coordinate axis according to the relative magnitude of the span value of the main discrete track in the direction of the x coordinate axis and the span value of the main discrete track in the direction of the y coordinate axis.
For convenience of explanation, the main discrete trajectory is not set as:
Self={ps 1 (sx 1 ,sy 1 ),ps 2 (sx 2 ,sy 2 ),…,ps m (sx m ,sy m )}
wherein ps i (sx i ,sy i ) And (i =1,2,3.. M) a plurality of main track points of the main discrete track, specifically m, wherein m is a positive integer. Extracting the maximum value maxX and the minimum value minX of all main track points of the main discrete track on the x axis; extracting the maximum value maxY and the minimum value minY of all main track points of the main discrete track on the y axis, and calculating the difference between the maximum value and the minimum value:
dx=maxX-minX
dy=maxY-minY
wherein dx is the span value of the x coordinate axis direction, and dy is the span value of the y coordinate axis direction.
Determining a search direction coordinate axis according to the relative magnitude of the span value of the main discrete trajectory in the x coordinate axis direction and the span value of the main discrete trajectory in the y coordinate axis direction, and specifically comprising: if the span value of the primary discrete trajectory in the direction of the x coordinate axis is greater than or equal to the span value of the primary discrete trajectory in the direction of the y coordinate axis, determining the x coordinate axis as the coordinate axis of the search direction; and if the span value of the main discrete track in the x coordinate axis direction is smaller than the span value of the main discrete track in the y coordinate axis direction, determining the y coordinate axis as the search direction coordinate axis.
If dx is larger than dx, the x-axis is used as the coordinate axis of the search direction, and if dy is larger than dx, the y-axis is used as the coordinate axis of the search direction.
And step S120, acquiring a first target track point of the target discrete track and a coordinate value of the first target track point on the coordinate axis of the search direction.
The first target track point is any one of two end points of the target discrete track; the target discrete trajectory may be a discrete trajectory of a target preceding vehicle movement to be followed by a vehicle driven by a user, and the target discrete trajectory is not set as:
Tar={pt 1 (tx 1 ,ty 1 ),pt 2 (tx 2 ,ty 2 ),…,pt n (tx n ,ty n )}
wherein pt is j (tx j ,ty j ) And (j =1,2,3.. N) are a plurality of target track points of the target discrete track, specifically n, wherein n is a positive integer.
For convenience of description, the x axis is not set as the coordinate axis of the search direction, and then the coordinate value of the first target track point on the x axis can be obtained.
Step S130, screening primary main track points from the plurality of main track points according to the searching direction coordinate axis, wherein the coordinate values of the primary main track points in the searching direction coordinate axis are closest to the coordinate values of the first target track points in the searching direction coordinate axis;
the description is continued in the above example: multiple main track points ps i (sx i ,sy i ) And each main track point in (i =1,2,3.. M) has an x-axis coordinate and a y-axis coordinate which correspond to each other, and since the coordinate axis of the searching direction is the x axis, the x-axis coordinate of each main track point is obtained and compared with the coordinate axis of the first target track point on the x axis, and the primary main track point is selected. And the coordinate value of the initially selected main track point on the x axis is closest to the coordinate value of the first target track point on the x axis.
And step S140, determining the distance between the first target track point and the main discrete track according to the primary main track point and the adjacent main track point, wherein the adjacent main track point is the main track point adjacent to the primary main track point.
The coordinate axis of the searching direction can be determined firstly, then a first target track point of the target discrete track and the coordinate value corresponding to the first target track point on the coordinate axis of the searching direction are obtained, then an initial main track point of the coordinate value closest to the coordinate axis of the first target track point on the coordinate axis of the searching direction coordinate axis is selected from the main track points, and then the distance between the first target track point and the main discrete track is determined according to the initial main track point and the adjacent main track point of the initial main track point. Compared with the prior art, the method has the advantages of small calculation amount, high calculation efficiency and high accuracy.
Referring to fig. 2, fig. 2 shows a flowchart of the specific step of step S140, which specifically includes the following steps S141 to S147:
step S141, calculating a first distance between the initially selected main track point and the first target track point.
And S142, calculating a second distance between the adjacent main track point and the first target track point.
The number of adjacent main track points may be one or two. If the primary main track point is selected as the end point of the main discrete track, the adjacent main track point is the only one; and if the primary selected main track points are not the end points of the main discrete track, the number of the adjacent main track points is two.
Step S143, determining whether the second distance is smaller than the first distance, if yes, executing step S147; if not, go to step S144.
If the number of the adjacent main track points is one, judging whether a second distance between the only one adjacent main track point and the first target track point is smaller than a first distance; if the number of the adjacent main track points is two, the initially selected main track point is not set to be represented by a, the two adjacent main track points are represented by b and c respectively, and if the second distance between any one of the b and the c and the first target track point is less than the first distance, the second distance can be judged to be less than the first distance.
If the second distance is smaller than the first distance, it indicates that the adjacent main track point corresponding to the second distance is closer to the first target track point than the initially selected main track point, and therefore step S147 is executed; for example, referring to fig. 5, the distance between the initially selected main track point a and the first target track point is d2, the distance between the adjacent main track point b and the first target track point is d1, the distance between the adjacent main track point c and the first target track point is d3, and d3 is smaller than d2, which means that the adjacent main track point c is closer to the first target track point than the initially selected main track point a.
If the second distance is greater than the first distance, it indicates that the initially selected main track point corresponding to the first distance is closer to the first target track point relative to the adjacent main track points on the two sides of the initially selected main track point, and step S144 is executed; for example, referring to fig. 6, in the case that there are two adjacent main track points, d1> d2 and d3> d2 indicate that the initially selected main track point is closer to the first target track point relative to the adjacent main track points b and c. Referring to fig. 7, in the case that there is one adjacent main track point, d1> d2 indicates that the initially selected main track point is closer to the first target track point than the only adjacent main track point b.
And step S144, determining smaller adjacent main track points of the final selection main track points corresponding to the first distance which is smaller than the second distance.
Less than the first distance of second distance corresponds selects main track point can be marked as final main track point, and less adjacent main track point does in the adjacent main track point of final main track point with the nearest adjacent main track point of first target track point distance. If the final selection main track point has two adjacent main track points, the smaller adjacent main track point which is close to the first target track point in the two adjacent main track points can be selected; for example, if the distance between the adjacent main track point b and the first target track point is not smaller than the distance between the adjacent main track point c and the first target track point, b is selected as the smaller adjacent main track point.
And if the main track point only has one adjacent main track point, determining the only adjacent main track point as a smaller adjacent main track point.
And S145, acquiring a connecting line between the final selected main track point and the smaller adjacent main track point.
Step S146, calculating a point-to-line distance between the connection line and the first target track point, where the point-to-line distance is a distance between the first target track point and the main discrete track.
For details, referring to fig. 8, a connecting line between the final main track point mp2 (mx 1, my 1) and the smaller adjacent main track point mp1 (mx 2, my 2) is obtained, and then the distance d between the first target track point tp (xt, yt) and the connecting line is calculated.
Figure BDA0002353063010000111
Because the distance between the first target track point and the connecting line is calculated, the actual distance between the first target track point and the main discrete track can be reflected more accurately.
And S147, taking the adjacent main track point corresponding to the second distance smaller than the first distance as a new primary main track point, and jumping to the step S141.
And comparing the adjacent main track point corresponding to the second distance with the initially selected main track point, and approaching the first target track point more, so that the adjacent main track point approaching the first target track point can be selected as a new initially selected main track point, and then the step S141 is skipped to execute the circulation step.
The first distance of primary election main track point and first target track point and the second distance of adjacent main track point and first target track point can be worked out respectively, then through comparing the size between first distance and the second distance to confirm in a plurality of main track points with the main track point that first target track point is closest. If the second distance is smaller than the first distance, the adjacent main track point corresponding to the second distance can be used as a new primary main track point, and then the step is skipped: and calculating a first distance between the primary selection main track point and the first target track point, and executing circulation until the first distance is smaller than the second distance. And if the second distance is greater than the first distance, taking the initially selected main track point as a final main track point, obtaining a smaller adjacent main track point of the final main track point, then obtaining a connecting line between the final main track point and the smaller adjacent main track point, and taking the point-line distance between the first target track point and the connecting line as the distance between the first target track point and the main discrete track. The embodiment can reflect the actual distance between the first target track point and the main discrete track more accurately.
Optionally, referring to fig. 3, after step S140, the method further includes step S150 to step S160:
and S150, acquiring a final main track point corresponding to a previous target track point of the target track points, wherein the final main track point corresponding to the previous target track point is used as an initial main track point of the current target track point.
And step S160, determining the distance between the current target track point and the main discrete track according to the adjacent main track points of the initially selected main track points of the current target track point and the initially selected main track points of the current target track point.
For any other target track point except the first target track point in the plurality of target track points, the final main track point corresponding to the last target track point of the target track point can be directly used as the initial main track point of the current target track point, and then the distance between the current target track point and the main discrete track is determined according to the adjacent main track point of the initial main track point of the current target track point and the initial main track point of the current target track point. Because the operation result of the last target track point of the current target track point is used, the operation amount can be further reduced, and the operation efficiency is improved. Optionally, step S160 specifically includes the following steps: calculating a first distance between the initially selected main track point and the current target track point; calculating a second distance between the adjacent main track point and the current target track point; if the second distance is smaller than the first distance, taking the adjacent main track point corresponding to the second distance smaller than the first distance as a new primary main track point, and executing the following steps: calculating a first distance between the initially selected main track point and the current target track point until the first distance is smaller than the second distance; determining a smaller adjacent main track point of the final main track point corresponding to the first distance which is smaller than the second distance, wherein the smaller adjacent main track point is an adjacent main track point which is closest to the current target track point in the adjacent main track points of the final main track point; acquiring a connecting line of the final selected main track point and the smaller adjacent main track point; and calculating a point-line distance between the connecting line and the current target track point, wherein the point-line distance is the distance between the current target track point and the main discrete track.
The above steps are the same as steps S141 to S147 shown in fig. 2, and are not described herein again.
After the distances between the target track points and the main discrete track, which are not the first target track points, are obtained through the steps, the distances between the target track points and the main discrete track can be combined into a distance sequence, and the distance sequence reflects the distance between the target discrete track and the main discrete track. After the distance sequence is obtained, the distance sequence can be used for analyzing the change rate of the distance between tracks, and therefore the embodiment of the application has strong practical value.
Referring to fig. 5, fig. 5 illustrates a discrete trajectory analysis apparatus provided in an embodiment of the present application, where the apparatus 400 includes:
and a coordinate axis determining module 410, configured to determine a search direction coordinate axis according to coordinate values of a plurality of main trajectory points of the main discrete trajectory, where the search direction coordinate axis is used to reflect an overall extending direction of the main discrete trajectory.
And the coordinate value acquisition module 420 is used for acquiring a first target track point of the target discrete track and a coordinate value of the first target track point on the coordinate axis of the search direction, wherein the first target track point is any one of two endpoints of the target discrete track.
And the track point screening module 430 is used for screening primary main track points from the main track points according to the search direction coordinate axis, wherein the primary main track points are located on the coordinate value of the search direction coordinate axis and the coordinate value of the first target track point on the search direction coordinate axis are closest to each other.
And the distance determining module 440 is used for determining the distance between the first target track point and the main discrete track according to the initial main track point and the adjacent main track point, wherein the adjacent main track point is the main track point adjacent to the initial main track point.
The distance determining module 440 is specifically configured to: calculating a first distance between the initially selected main track point and the first target track point; calculating a second distance between the adjacent main track point and the first target track point; if the second distance is smaller than the first distance, taking the adjacent main track point corresponding to the second distance smaller than the first distance as a new primary main track point, and executing the following steps: calculating a first distance between the initially selected main track point and the first target track point until the first distance is smaller than the second distance; determining smaller adjacent main track points of final main track points corresponding to a first distance smaller than the second distance, wherein the smaller adjacent main track points are adjacent main track points which are closest to the first target track point in the adjacent main track points of the final main track points; acquiring a connecting line of the final selected main track point and the smaller adjacent main track point; and calculating a point-line distance between the connecting line and the first target track point, wherein the point-line distance is the distance between the first target track point and the main discrete track.
The coordinate axis determining module 410 is specifically configured to obtain a maximum value and a minimum value of the plurality of main track points in the x coordinate axis direction, and calculate a span value of the main discrete track in the x coordinate axis direction, where the span value in the x coordinate axis direction is a difference between the maximum value and the minimum value in the x coordinate axis direction; acquiring the maximum value and the minimum value of the plurality of main track points in the y coordinate axis direction, and calculating the span value of the main discrete track in the y coordinate axis direction, wherein the span value in the y coordinate axis direction is the difference between the maximum value and the minimum value in the y coordinate axis direction; and determining a searching direction coordinate axis according to the relative magnitude of the span value of the main discrete track in the direction of the x coordinate axis and the span value of the main discrete track in the direction of the y coordinate axis.
A coordinate axis determining module 410, configured to determine an x coordinate axis as the search direction coordinate axis if a span value of the primary discrete trajectory in the x coordinate axis direction is greater than or equal to a span value of the primary discrete trajectory in the y coordinate axis direction; and if the span value of the main discrete track in the x coordinate axis direction is smaller than the span value of the main discrete track in the y coordinate axis direction, determining the y coordinate axis as the search direction coordinate axis.
The device further comprises:
and the track point acquisition module is used for acquiring a final main track point corresponding to a previous target track point of the target track point, and the final main track point corresponding to the previous target track point is used as an initial main track point of the current target track point.
And the current track point distance module is used for determining the distance between the current target track point and the main discrete track according to the adjacent main track points of the initial main track point of the current target track point and the initial main track point of the current target track point.
The discrete trace analyzing apparatus shown in fig. 4 corresponds to the discrete trace analyzing method shown in fig. 1, and details are not repeated here.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (8)

1. A discrete trajectory analysis method, characterized in that it is used to calculate the distance between a target trajectory point of a target discrete trajectory and a main discrete trajectory, said target discrete trajectory comprising a plurality of target trajectory points, said main discrete trajectory comprising a plurality of main trajectory points, said method comprising:
determining a searching direction coordinate axis according to coordinate values of a plurality of main track points of the main discrete track, wherein the searching direction coordinate axis is used for reflecting the integral extending direction of the main discrete track;
acquiring a first target track point of the target discrete track and a coordinate value of the first target track point on the coordinate axis of the search direction, wherein the first target track point is any one of two end points of the target discrete track;
according to the search direction coordinate axis, primary main track points are screened from the plurality of main track points, wherein the coordinate values of the primary main track points in the search direction coordinate axis are closest to the coordinate values of the first target track points in the search direction coordinate axis;
determining the distance between the first target track point and the main discrete track according to the initially selected main track point and the adjacent main track point, wherein the adjacent main track point is the main track point adjacent to the initially selected main track point;
wherein, according to the primary main track point and the adjacent main track point, determining the distance between the first target track point and the main discrete track comprises:
calculating a first distance between the primary selected main track point and the first target track point;
calculating a second distance between the adjacent main track point and the first target track point;
if the second distance is smaller than the first distance, taking the adjacent main track point corresponding to the second distance smaller than the first distance as a new primary main track point, and executing the following steps: calculating a first distance between the primary selected main track point and the first target track point until the first distance is smaller than the second distance;
determining a smaller adjacent main track point of the final main track points corresponding to a first distance smaller than the second distance, wherein the smaller adjacent main track point is an adjacent main track point which is closest to the first target track point in the adjacent main track points of the final main track points;
acquiring a connecting line of the final selected main track point and the smaller adjacent main track point;
and calculating the point-line distance between the connecting line and the first target track point, wherein the point-line distance is the distance between the first target track point and the main discrete track.
2. The method of claim 1, wherein for any target trace point in the target discrete trace other than the first target trace point, the method further comprises:
acquiring a final main track point corresponding to a previous target track point of the target track points, wherein the final main track point corresponding to the previous target track point is used as an initial main track point of the current target track point;
and determining the distance between the current target track point and the main discrete track according to the adjacent main track points of the initial main track points of the current target track point and the initial main track points of the current target track point.
3. The method according to claim 1, wherein determining a search direction coordinate axis from coordinate values of a plurality of primary trajectory points of the primary discrete trajectory comprises:
acquiring the maximum value and the minimum value of the plurality of main track points in the direction of an x coordinate axis, and calculating the span value of the main discrete track in the direction of the x coordinate axis, wherein the span value in the direction of the x coordinate axis is the difference between the maximum value and the minimum value in the direction of the x coordinate axis;
acquiring the maximum value and the minimum value of the plurality of main track points in the y coordinate axis direction, and calculating the span value of the main discrete track in the y coordinate axis direction, wherein the span value in the y coordinate axis direction is the difference between the maximum value and the minimum value in the y coordinate axis direction;
and determining a coordinate axis of the search direction according to the relative magnitude of the span value of the main discrete track in the direction of the x coordinate axis and the span value of the main discrete track in the direction of the y coordinate axis.
4. The method of claim 3, wherein determining the search direction coordinate axis according to a relative magnitude of a span value of the primary discrete trajectory in the x coordinate axis direction and a span value of the primary discrete trajectory in the y coordinate axis direction comprises:
if the span value of the main discrete track in the x coordinate axis direction is larger than or equal to the span value of the main discrete track in the y coordinate axis direction, determining the x coordinate axis as the search direction coordinate axis;
and if the span value of the main discrete track in the x coordinate axis direction is smaller than the span value of the main discrete track in the y coordinate axis direction, determining the y coordinate axis as the search direction coordinate axis.
5. A discrete trajectory analysis device for calculating a distance between a target trajectory point and a main discrete trajectory of a target discrete trajectory, the target discrete trajectory comprising a plurality of target trajectory points, the main discrete trajectory comprising a plurality of main trajectory points, the device comprising:
the coordinate axis determining module is used for determining a searching direction coordinate axis according to coordinate values of a plurality of main track points of the main discrete track, and the searching direction coordinate axis is used for reflecting the integral extending direction of the main discrete track;
the coordinate value acquisition module is used for acquiring a first target track point of the target discrete track and a coordinate value of the first target track point on the coordinate axis of the search direction, wherein the first target track point is any one of two end points of the target discrete track;
the track point screening module is used for screening primary main track points from the plurality of main track points according to the search direction coordinate axis, wherein the coordinate values of the primary main track points in the search direction coordinate axis are closest to the coordinate values of the first target track points in the search direction coordinate axis;
the distance determining module is used for determining the distance between the first target track point and the main discrete track according to the initially selected main track point and the adjacent main track point, wherein the adjacent main track point is the main track point adjacent to the initially selected main track point;
wherein the distance determining module is specifically configured to:
calculating a first distance between the initially selected main track point and the first target track point;
calculating a second distance between the adjacent main track point and the first target track point;
if the second distance is smaller than the first distance, taking the adjacent main track point corresponding to the second distance smaller than the first distance as a new primary main track point, and executing the following steps: calculating a first distance between the primary selected main track point and the first target track point until the first distance is smaller than the second distance;
determining smaller adjacent main track points of final main track points corresponding to a first distance smaller than the second distance, wherein the smaller adjacent main track points are adjacent main track points which are closest to the first target track point in the adjacent main track points of the final main track points;
acquiring a connecting line of the final selected main track point and the smaller adjacent main track point;
and calculating the point-line distance between the connecting line and the first target track point, wherein the point-line distance is the distance between the first target track point and the main discrete track.
6. The apparatus of claim 5, further comprising:
the track point acquisition module is used for acquiring a final main track point corresponding to a previous target track point of the target track points, and the final main track point corresponding to the previous target track point is used as an initial main track point of the current target track point;
and the current track point distance module is used for determining the distance between the current target track point and the main discrete track according to the adjacent main track points of the initial main track point of the current target track point and the initial main track point of the current target track point.
7. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the method of any one of claims 1-4 when executed.
8. A readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the method of any one of claims 1-4.
CN201911426023.8A 2019-12-31 2019-12-31 Discrete trajectory analysis method and device, electronic equipment and readable storage medium Active CN111190989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911426023.8A CN111190989B (en) 2019-12-31 2019-12-31 Discrete trajectory analysis method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911426023.8A CN111190989B (en) 2019-12-31 2019-12-31 Discrete trajectory analysis method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111190989A CN111190989A (en) 2020-05-22
CN111190989B true CN111190989B (en) 2023-03-14

Family

ID=70708129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911426023.8A Active CN111190989B (en) 2019-12-31 2019-12-31 Discrete trajectory analysis method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111190989B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015110762A1 (en) * 2014-01-23 2015-07-30 Université Claude Bernard Lyon 1 Method for determining the trajectory of a point of a moving object
CN107341558A (en) * 2016-04-28 2017-11-10 李哲荣 Multiply the computational methods in path and the computing device and record media using the method altogether
WO2018053921A1 (en) * 2016-09-22 2018-03-29 深圳市元征科技股份有限公司 Traveling trajectory determination method and device thereof
CN108776727A (en) * 2018-05-29 2018-11-09 福州大学 A kind of geometry feature extracting method based on taxi track data
CN108994838A (en) * 2018-08-21 2018-12-14 智久(厦门)机器人科技有限公司上海分公司 The relationship calculation method and system of robot location and planning path
CN110543473A (en) * 2019-08-20 2019-12-06 武汉中海庭数据技术有限公司 Crowdsourcing data fusion optimization method and device and storage medium
CN110555061A (en) * 2019-09-06 2019-12-10 北京百度网讯科技有限公司 method and device for determining track similarity

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7797019B2 (en) * 2006-03-29 2010-09-14 Research In Motion Limited Shared image database with geographic navigation
JP6558239B2 (en) * 2015-12-22 2019-08-14 アイシン・エィ・ダブリュ株式会社 Automatic driving support system, automatic driving support method, and computer program
US11526568B2 (en) * 2018-05-25 2022-12-13 Yellcast, Inc. User interfaces and methods for operating a mobile computing device for location-based transactions

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015110762A1 (en) * 2014-01-23 2015-07-30 Université Claude Bernard Lyon 1 Method for determining the trajectory of a point of a moving object
CN107341558A (en) * 2016-04-28 2017-11-10 李哲荣 Multiply the computational methods in path and the computing device and record media using the method altogether
WO2018053921A1 (en) * 2016-09-22 2018-03-29 深圳市元征科技股份有限公司 Traveling trajectory determination method and device thereof
CN108776727A (en) * 2018-05-29 2018-11-09 福州大学 A kind of geometry feature extracting method based on taxi track data
CN108994838A (en) * 2018-08-21 2018-12-14 智久(厦门)机器人科技有限公司上海分公司 The relationship calculation method and system of robot location and planning path
CN110543473A (en) * 2019-08-20 2019-12-06 武汉中海庭数据技术有限公司 Crowdsourcing data fusion optimization method and device and storage medium
CN110555061A (en) * 2019-09-06 2019-12-10 北京百度网讯科技有限公司 method and device for determining track similarity

Also Published As

Publication number Publication date
CN111190989A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
US11527155B2 (en) Time-segmented signal timing method and apparatus for traffic light, electronic device and storage medium
CN110617825B (en) Vehicle positioning method and device, electronic equipment and medium
EP3876150A2 (en) Vehicle tracking method and apparatus
JP2023509572A (en) Method, apparatus, electronics, storage medium and computer program for detecting vehicles
US11380035B2 (en) Method and apparatus for generating map
US11508162B2 (en) Method and apparatus for detecting mobile traffic light
CN112560684A (en) Lane line detection method, lane line detection device, electronic apparatus, storage medium, and vehicle
CN111209361A (en) Car following target selection method and device, electronic equipment and readable storage medium
US20210358298A1 (en) Method and apparatus for adjusting channelization of traffic intersection
CN111460375A (en) Positioning data validity determination method, device, equipment and medium
CN114817651B (en) Data storage method, data query method, device and equipment
CN112528927A (en) Confidence determination method based on trajectory analysis, roadside equipment and cloud control platform
KR20230088332A (en) Data annotation methods, devices, systems, devices and storage media
CN111190989B (en) Discrete trajectory analysis method and device, electronic equipment and readable storage medium
EP3866065A1 (en) Target detection method, device, electronic apparatus, and storage medium
CN116361567B (en) Data processing method and system applied to cloud office
CN112994980A (en) Time delay testing method and device, electronic equipment and storage medium
CN112671679A (en) Channel estimation method, device and storage medium applied to SIMO system
CN108304301B (en) Method and device for recording user behavior track
CN114299192B (en) Method, device, equipment and medium for positioning and mapping
CN112507957A (en) Vehicle association method and device, road side equipment and cloud control platform
CN113405550A (en) Space positioning method, device, equipment and storage medium
CN114158119B (en) Driving direction identification method and device, electronic equipment and medium
JP2011117941A (en) Moving distance calculation device and moving distance calculation method
US20220291002A1 (en) Method for determining road information

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