A method, device, electronic device and storage medium for extracting coincident trajectories
By using the threshold box sliding method to determine the overlapping points and separation points in the GPS trajectory data, the problem of difficulty in efficiently extracting the same-course trajectory data in the prior art is solved, and fast and accurate overlapping trajectory data extraction is achieved.
Patent Information
- Application Number
- CN202211737051.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-31
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-12-31
AI Technical Summary
The prior art is difficult to efficiently extract data on the same route trajectory, especially when the GPS trajectory cannot be directly screened due to factors such as road width and positioning errors.
By establishing a coordinate system with longitude and latitude as the coordinate axes, drawing each track, and setting a threshold box, sliding the threshold box along the track until it stops when it contains all track points, determining the overlapping point and separation point, and intercepting the data between the overlapping point and separation point as the overlapping trajectory.
It realizes rapid and efficient extraction of overlapping trajectory data, reduces the time and energy of artificial comparison operations, and improves data processing efficiency.
Smart Images

Figure CN115983007B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of automobile dynamics and economy simulation calculation, and specifically relates to a method, device, electronic equipment and storage medium for extracting data of coincident trajectories on the same route. Background Art
[0002] As emission regulations become increasingly stringent, commercial vehicle companies are increasingly demanding fuel economy. Benchmarking of competing products on the same route is an important means of verifying economic efficiency and determining whether the target is achieved. Back-to-back verification can accurately control the test route, but for user vehicles, it is impossible to control the loading and unloading locations, and can only ensure that most routes overlap. In order to accurately compare fuel consumption, it is necessary to extract data from the same route to calculate fuel consumption, but due to factors such as road width and positioning errors, the GPS track cannot find the overlap point based on the curve intersection method.
[0003] The existing solution is to draw a track on the map, find the approximate longitude and latitude of the overlapping point and then return it to the data. After manually intercepting the data, the track is drawn again and corrections are made continuously.
[0004] The disadvantages of the existing technology are that the collected time series data is generally 1 Hz, with the same frequency. Due to the different road widths and vehicle speeds at the same location, it is impossible to directly filter according to the absolute values of longitude and latitude. -6 ,Manual comparison operation is difficult and time-consuming, and has low efficiency when the amount of data is large. Summary of the invention
[0005] In view of the problems existing in the background technology, the purpose of the present invention is to provide a method, device, electronic device and storage medium for extracting coincident trajectories with high efficiency and high speed for extracting trajectory data of the same route.
[0006] To achieve the above-mentioned purpose, in a first aspect, the overlapping trajectory extraction method designed by the present invention includes: establishing a coordinate system with longitude and latitude as coordinate axes, and drawing each trajectory between two places respectively; setting a certain threshold to form a threshold frame; selecting any trajectory, the threshold frame slides along the starting point of the selected trajectory toward the end point until the threshold frame contains all the points on the trajectory and stops, and the stop point is the overlapping point; the threshold frame slides in the opposite direction along the end point of the selected trajectory toward the starting point until the threshold frame contains all the points on the trajectory and stops, and the stop point is the separation point; intercepting the data between the overlapping point and the separation point is the overlapping trajectory.
[0007] Preferably, the data identical to the target route is searched from the Internet of Vehicles platform, and the data must include longitude, latitude, and altitude: the data must be uninterrupted, and the sampling frequency of each trajectory must be the same.
[0008] Preferably, the data is sorted by time. If the data is lost continuously for less than 5 seconds, it is supplemented by interpolation. If the data is lost continuously for more than 5 seconds, it needs to be calculated in segments.
[0009] Preferably, for data whose longitude, latitude and altitude are all 0, it is determined that the GPS signal is lost, and an interpolation method is used to supplement it.
[0010] Preferably, the threshold is determined according to the display accuracy of the longitude and latitude, and the threshold is 100 times the display accuracy.
[0011] To achieve the above object, in a second aspect, the present invention provides a coincidence trajectory extraction device, comprising:
[0012] An acquisition module, used to acquire multiple trajectories;
[0013] A module is established for placing multiple tracks in the same coordinate system established with longitude and latitude as coordinate axes;
[0014] The sliding module sets a certain threshold value to form a threshold frame; after selecting a track, the threshold frame slides along the starting point of the selected track to the end point until the threshold frame contains all the points on the track and stops, and the stop point is the coincidence point; the threshold frame slides along the end point of the selected track to the starting point in the opposite direction until the threshold frame contains all the points on the track and stops, and the stop point is the separation point;
[0015] The overlap module is used to intercept the data between the overlap point and the separation point, which is the overlap trajectory.
[0016] Preferably, the acquisition module searches for data identical to the target route from the Internet of Vehicles platform, and the data must include longitude, latitude, and altitude. The data must be uninterrupted and the sampling frequency of each trajectory must be the same.
[0017] In a third aspect, the present invention provides an electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor is used to implement any of the methods described in the first aspect when executing the programs stored in the memory.
[0018] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented.
[0019] The present invention also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned coincidence trajectory extraction methods.
[0020] The beneficial effects of the present invention are as follows: the present invention can extract the overlapping tracks of the same route based on the GPS information collected by the current vehicle-mounted device. The present invention can extract the data of the overlapping tracks between the two points by finding the overlapping points and the separation points. The overlapping track data can be extracted quickly and efficiently through the threshold frame. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Schematic diagram of the coincidence trajectory extraction method provided by the embodiment of the present invention Figure 1 ;
[0022] Figure 2 Schematic diagram of the coincidence trajectory extraction method provided by the embodiment of the present invention Figure 2 ;
[0023] Figure 3 It is a structural schematic diagram of a coincidence trajectory extraction device provided by an embodiment of the present invention;
[0024] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The technical solution of the present invention (including the preferred technical solution) is further described in detail below by means of the accompanying drawings and by listing some optional embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] The overlapping trajectory extraction method designed by the present invention includes: establishing a coordinate system with longitude and latitude as coordinate axes, and drawing each trajectory between two places respectively; setting a certain threshold to form a threshold frame 1; selecting any trajectory, the threshold frame 1 slides along the starting point of the selected trajectory to the end point until the threshold frame 1 contains all the points on the trajectory and stops, and the stop point is the overlapping point 2; the threshold frame 1 slides in the opposite direction along the end point of the selected trajectory to the starting point until the threshold frame 1 contains all the points on the trajectory and stops, and the stop point is the separation point 3; intercepting the data between the overlapping point 2 and the separation point 3 is the overlapping trajectory.
[0027] The following combination Figures 1 to 4 Further details are given.
[0028] 1) Data preparation:
[0029] Search for data that is identical to the target route from the Internet of Vehicles platform. The data must include longitude, latitude, and altitude. The data must be uninterrupted and the sampling frequency of each trajectory must be the same.
[0030] 2) Data processing:
[0031] The data is sorted by time. If the data is lost continuously for less than 5 seconds, it is supplemented by interpolation. If the data is lost continuously for more than 5 seconds, it needs to be calculated in sections. For data rows with longitude, latitude and altitude all being 0, it is judged that the GPS signal is lost and can be supplemented by interpolation.
[0032] 3) Threshold box definition:
[0033] The threshold is determined based on the display accuracy of longitude and latitude. The threshold is 100 times the display accuracy. The longitude and latitude of a point are represented by x i ,y i The threshold is represented by dx and dy, and the threshold box is defined as x in the two-dimensional coordinate system. i –dx≤x≤x i +dx,y i –dy≤y≤y i +dy formed by the rectangular area.
[0034] 4) Sliding calculation:
[0035] Select any track and traverse it in time order. The coordinates of the current track point are (x i ,y i ), search for the number of trajectory points within the threshold box range on another one or more trajectories. If the number of data points within the threshold box range on all trajectories is not 0, the calculation stops, and the sequence numbers of the trajectory points on each trajectory are recorded when the calculation stops. The separation points are calculated in reverse order using the same algorithm to obtain the sequence numbers of the separation points on each trajectory.
[0036] If there are only two tracks, select track 1 and traverse it by time. When the threshold box slides to a point p1 on track 1 i (x1 i ,y1 i ), the point on track 2 (point p2) appears in the threshold box for the first time. j (x2 j ,y2 j )), then the coincidence point of trajectory 1 and trajectory 2 is p1 i and p2 j ; Then start traversing from the end point of track 1 in reverse order. When the threshold box slides to a point P1 on track 1 i+m (x1 i+m ,y1 i+m ), the point on track 2 (point P2) appears in the threshold box for the first time. j+n (x2 j+n ,y2 j+n )), then the separation point of trajectory 1 and trajectory 2 is p1 i+m and p2 j+n .
[0037] 5) Data interception:
[0038] Data is intercepted according to the serial numbers of the overlapping points and separation points on each trajectory (the segment between the i-th point to the i+m-th point on trajectory 1, and the segment between the j-th point to the j+n-th point on trajectory 2) to obtain the overlapping trajectory segment 4.
[0039] Align the altitude data according to longitude and latitude, calculate the average altitude to get the corrected altitude, and calculate the road slope.
[0040] The present invention provides a coincidence trajectory extraction device, comprising:
[0041] Acquisition module 5 is used to acquire multiple trajectories. The acquisition module searches for data identical to the target route from the Internet of Vehicles platform. The data must include longitude, latitude, and altitude. The data must be uninterrupted and the sampling frequency of each trajectory must be the same. The data is sorted by time. If the data is lost continuously for less than 5 seconds, it is supplemented by interpolation. If the data is lost continuously for more than 5 seconds, it needs to be calculated in segments. For data with longitude, latitude, and altitude of 0, it is judged that the GPS signal is lost and interpolation is used to supplement it.
[0042] Establishing module 6, used for placing multiple tracks in the same coordinate system established with longitude and latitude as coordinate axes;
[0043] Sliding module 7 sets a certain threshold value to form a threshold value frame; after selecting a track, the threshold value frame slides along the starting point of the selected track to the end point until the threshold value frame contains all the points on the track and stops, and the stop point is the coincidence point; the threshold value frame slides in the opposite direction along the end point of the selected track to the starting point until the threshold value frame contains all the points on the track and stops, and the stop point is the separation point; the threshold value is determined according to the display accuracy of the longitude and latitude, and the threshold value is 100 times the display accuracy.
[0044] The overlap module 8 is used to intercept the data between the overlap point and the separation point as the overlap trajectory.
[0045] The present invention provides an electronic device, comprising a processor 9, a communication interface 10, a memory 11 and a communication bus 12, wherein the processor 9, the communication interface 10 and the memory 11 communicate with each other through the communication bus 12; the memory 11 is used to store computer programs; the processor 9, when executing the program stored in the memory 11, implements the following steps: establishing a coordinate system with longitude and latitude as coordinate axes, and drawing each track between two places respectively; setting a certain threshold to form a threshold frame 1; selecting any track, the threshold frame 1 slides along the starting point of the selected track to the end point until the threshold frame 1 contains all points on the track and stops, and the stop point is the coincidence point 2; the threshold frame 1 slides in the opposite direction from the end point of the selected track to the starting point until the threshold frame 1 contains all points on the track and stops, and the stop point is the separation point 3; intercepting the data between the coincidence point 2 and the separation point 3 is the coincidence track.
[0046] The memory may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
[0047] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0048] The present invention provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned coincidence trajectory extraction methods is implemented.
[0049] The present invention also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned coincidence trajectory extraction methods.
[0050] It can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0051] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.
[0053] Those skilled in the art will readily appreciate that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, combinations, replacements, improvements, etc. made within the spirit and principles of the present invention are included within the protection scope of the present invention.
Claims
1. A coincidence trajectory extraction method, It is characterized in that include: A coordinate system is established with longitude and latitude as the coordinate axes, and each track between the two places is plotted; A certain threshold is set to form a threshold frame, and the threshold is 100 times the display accuracy; select a track, and the threshold frame slides along the starting point of the selected track to the end point until the threshold frame contains all the points on the track and stops, and the stop point is the coincidence point; the threshold frame slides along the end point of the selected track to the starting point in the opposite direction until the threshold frame contains all the points on the track and stops, and the stop point is the separation point; the data between the coincidence point and the separation point is the coincidence track; the threshold frame is defined as the x in the two-dimensional coordinate system. i –dx≤x≤x i +dx,y i –dy≤y≤y i +dy, where: x i ,y i are the longitude and latitude of a point in the selected trajectory, and dx and dy represent the thresholds.
2. The method for extracting coincident trajectories according to claim 1, Features: Search for data identical to the target route from the Internet of Vehicles platform. The data includes longitude, latitude, and altitude. The data is uninterrupted and the sampling frequency of each trajectory is the same.
3. The overlapping trajectory extraction method according to claim 2, Features: The data are sorted by time. If the data is lost continuously for less than 5 seconds, it is supplemented by interpolation. If the data is lost continuously for more than 5 seconds, it is calculated in segments.
4. The overlapping trajectory extraction method according to claim 2, Features: For data whose longitude, latitude and altitude are all 0, it is judged that the GPS signal is lost and the interpolation method is used to supplement it.
5. A coincidence trajectory extraction device, include: An acquisition module, used to acquire multiple trajectories; A module is established for placing multiple tracks in the same coordinate system established with longitude and latitude as coordinate axes; Sliding module, set a certain threshold to form a threshold box; After selecting a track, the threshold box slides along the starting point of the selected track to the end point until the threshold box contains all the points on the track and stops. The stop point is the coincidence point; the threshold box slides in the opposite direction from the end point of the selected track to the starting point until the threshold box contains all the points on the track and stops. The stop point is the separation point. The threshold box is defined as the x in the two-dimensional coordinate system. i –dx≤x≤x i +dx,y i –dy≤y≤y i +dy, where: x i ,y i are the longitude and latitude of a point in the selected trajectory, respectively, and dx and dy represent the thresholds; The overlap module is used to intercept the data between the overlap point and the separation point, which is the overlap trajectory.
6. The overlapping trajectory extraction device according to claim 5, Features: The acquisition module searches for data identical to the target route from the Internet of Vehicles platform. The data includes longitude, latitude, and altitude. The data is uninterrupted, and the sampling frequency of each trajectory is the same.
7. An electronic device comprising a processor, a communication interface, a memory and a communication bus, in, The processor, the communication interface and the memory communicate with each other via a communication bus; the memory is used to store computer programs; the processor is used to implement any method described in claims 1 to 4 when executing the program stored in the memory.
8. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Vehicle driving track monitoring method and system
CN108133611A