Track data processing method and device, computer equipment, readable storage medium and program product

By acquiring preset speed thresholds and initial trajectory data, applying filtering algorithms and effectiveness verification processing, the vehicle GPS trajectory data accuracy problem is solved, and the trajectory point accuracy is improved and the trajectory data is high-quality output.

CN119846673AActive Publication Date: 2025-04-18BEIJING FENGZHI TECH CO LTD

Patent Information

Application Number
CN202510157600.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-04-18
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

In the prior art, the accuracy of vehicle GPS trajectory data is affected by GPS hardware or software defects, resulting in latitude and longitude drift of trajectory points and reducing the accuracy of trajectory routes.

Method used

By obtaining preset speed thresholds and initial trajectory data, applying filtering algorithms and effectiveness verification processing, gradually improving the accuracy of trajectory points to ensure high quality of the output trajectory data.

Benefits of technology

It effectively improves the accuracy of trajectory points, improves the accuracy and reliability of trajectory data, and ensures the accuracy of subsequent data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119846673A_ABST
    Figure CN119846673A_ABST
Patent Text Reader

Abstract

The invention relates to a track data processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a preset speed threshold value and initial trajectory data of a target object; the initial track data comprises a plurality of track points, arranged according to a time sequence, of the target object, and each track point comprises a timestamp and position information; if the number of track points in the initial track data is greater than or equal to a preset length threshold value, filtering the initial track data based on a first filtering algorithm to obtain second track data; and if the number of the track points of the second track data is greater than or equal to a preset length threshold value, carrying out validity verification processing based on a starting track point in the second track data and a preset speed threshold value to obtain effective track data, and outputting the effective track data, the abnormal degree of the initial trajectory point in the trajectory data of the target object can be efficiently and accurately judged, and the accuracy of the trajectory data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a trajectory data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the continuous maturity and promotion of new energy vehicles, the Internet of Things and precision positioning technology, vehicle networks are becoming more and more popular, and many vehicles have been connected to intelligent platforms. When cars currently obtain vehicle GPS trajectory data and directly use it to display routes on maps, due to defects in GPS hardware or software, the longitude and latitude values ​​of certain points may be transmitted incorrectly, and the longitude and latitude of the trajectory points displayed on the map will drift, resulting in poor accuracy of the trajectory point route. Summary of the invention

[0003] Based on this, it is necessary to provide a trajectory data processing method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of trajectory points in response to the above technical problems.

[0004] In a first aspect, the present application provides a method for processing trajectory data, comprising:

[0005] Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0006] If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data;

[0007] If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0008] In one embodiment, the performing validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data includes:

[0009] Performing a starting point validity verification process based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain trajectory data to be output;

[0010] The to-be-output trajectory data is filtered using a second filtering algorithm to obtain valid trajectory data.

[0011] In one embodiment, the performing of starting point validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain the trajectory data to be output includes:

[0012] Calculating a first speed between a starting trajectory point and a second trajectory point in the second trajectory data, where the second trajectory point is a trajectory point next to the starting trajectory point; if the first speed is greater than the preset speed threshold, calculating a second speed between the second trajectory point and a third trajectory point;

[0013] If the second speed is less than or equal to the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed, a third data list is obtained, and the third data list is determined to be the trajectory data to be output; the third trajectory point is the next trajectory point of the second trajectory point; or,

[0014] If the second speed is greater than the preset speed threshold, the second trajectory point is determined to be an abnormal trajectory point, and a third speed from the starting trajectory point to the third trajectory point is calculated; if the third speed is less than or equal to the speed threshold, the starting trajectory point is determined to be a normal trajectory point, and the second trajectory data is determined to be trajectory data to be output; or,

[0015] If the third speed is greater than the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed to obtain a third data list, and the third data list is determined to be the trajectory data to be output.

[0016] In one embodiment, the method further comprises:

[0017] If the first speed is less than or equal to the preset speed threshold, the second trajectory data is determined to be trajectory data to be output.

[0018] In one embodiment, filtering the to-be-output trajectory data by a second filtering algorithm to obtain valid trajectory data includes:

[0019] Calculating the speed between each adjacent trajectory point in the trajectory data to be output, and determining the trajectory point whose speed is less than or equal to the preset speed threshold as a valid trajectory point;

[0020] Based on each of the valid trajectory points in the trajectory data to be output, valid trajectory data is obtained.

[0021] In one embodiment, the method further comprises:

[0022] If the number of trajectory points in the initial trajectory data is less than a preset length threshold, outputting the initial trajectory data list; or,

[0023] If the number of trajectory points in the second trajectory data is less than the preset length threshold, the initial trajectory data is output.

[0024] In one embodiment, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data includes:

[0025] Trajectory points that do not meet a preset complete condition in the initial trajectory data are eliminated to obtain second trajectory data, wherein the preset complete condition is that the trajectory point includes a timestamp and location information.

[0026] In a second aspect, the present application also provides a trajectory data processing device, including:

[0027] A first acquisition module is used to acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0028] A first processing module, configured to filter the initial trajectory data based on a first filtering algorithm to obtain second trajectory data if the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold;

[0029] The second processing module is used to perform validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold if the number of trajectory points in the second trajectory data is greater than or equal to the preset length threshold, obtain valid trajectory data, and output the valid trajectory data.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0031] Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0032] If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data;

[0033] If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0035] Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0036] If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data;

[0037] If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0038] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0039] Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0040] If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data;

[0041] If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0042] The above-mentioned trajectory data processing method, device, computer equipment, computer-readable storage medium and computer program product, wherein the method comprises: obtaining a preset speed threshold and initial trajectory data of the target object; the initial trajectory data comprises a plurality of trajectory points of the target object arranged in time sequence, each trajectory point comprises a timestamp and position information; if the number of trajectory points in the initial trajectory data is greater than or equal to the preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data; if the number of trajectory points in the second trajectory data is greater than or equal to the preset length threshold, performing validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and outputting the valid trajectory data. By adopting this method, the multiple trajectory points of the target object arranged in time sequence can be initially filtered by the preset speed threshold, and the starting trajectory point in each trajectory point after filtering can be verified with validity to obtain valid trajectory data of the target object, and the abnormality of the starting trajectory point in the trajectory data of the target object can be efficiently and accurately judged, the accuracy of the subsequent trajectory data can be ensured, and the high quality of the output trajectory data can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A diagram showing an application environment of a method for processing trajectory data in an embodiment;

[0045] Figure 2 A schematic diagram of a process flow of a method for processing trajectory data in one embodiment;

[0046] Figure 3 A schematic diagram of a flow chart of steps for obtaining valid trajectory data in one embodiment;

[0047] Figure 4 A schematic diagram of a flow chart of steps for obtaining trajectory data to be output in one embodiment;

[0048] Figure 5 A schematic diagram of a flow chart of steps for obtaining valid trajectory data in one embodiment;

[0049] Figure 6 is a flow chart of a method for processing trajectory data in another embodiment;

[0050] Figure 7is a flow chart of a method for processing trajectory data in another embodiment;

[0051] Figure 8 is a structural block diagram of a trajectory data processing device in one embodiment;

[0052] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] The trajectory data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can be a vehicle-mounted terminal, and the server 104 can be a gateway server; the vehicle-mounted terminal can collect the GPS information and other vehicle information of the vehicle, and transmit the GPS information and other vehicle information to the gateway server. The gateway server may include a database, so that the gateway server can save the GPS information and other vehicle information received from the vehicle to the database, and the gateway server can query the data stored in the database when the historical trajectory data of the vehicle is needed, and render the queried data through the map component to obtain the historical trajectory data of the vehicle. The method provided in this embodiment can process the queried data and output the trajectory data of the vehicle, that is, output the effective trajectory data of the vehicle. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0055] In an exemplary embodiment, Figure 2 As shown, a method for processing trajectory data is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps 202 to 206. Among them:

[0056] Step 202: Obtain a preset speed threshold and initial trajectory data of the target object.

[0057] Among them, the initial trajectory data includes multiple trajectory points of the target object arranged in time sequence, and each trajectory point includes a timestamp and location information. The target object can be a mobile object, such as a vehicle, etc.; the time sequence can be the order of time, and the multiple trajectory points can be the various trajectory points formed by the target object during the movement process. The timestamp and location information included in each trajectory point can be the location information of the target object at the time represented by the timestamp. The location can be coordinate data of the earth coordinate system, or longitude and latitude data, etc. The present disclosure does not limit the specific form of expression of the location information. The preset speed threshold can be a speed threshold determined based on the actual application scenario, for example, it can be the average speed of the target object in the application scenario during the movement process; or it can also be the average speed of other target objects, or the historical speed of the target object in the historical time period, etc.

[0058] Specifically, the server can determine the target object and query the trajectory data of the target object in the database corresponding to the server. That is to say, the trajectory data corresponding to the target object stored in the database is the initial trajectory data of the target object, and the initial trajectory data includes multiple trajectory points of the target object arranged in chronological order during the movement process; the server can also obtain a pre-configured speed threshold of the target object.

[0059] Step 204: If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, the initial trajectory data is filtered based on a first filtering algorithm to obtain second trajectory data.

[0060] The number of trajectory points in the initial trajectory data may be the number of trajectory points included in the initial trajectory data; the preset length threshold may be a predetermined threshold, and the preset length threshold is used to screen whether to filter the initial trajectory data; the preset length threshold may be a minimum value that indicates that the initial trajectory data can be filtered, and optionally, the preset length threshold may be 3. The first filtering algorithm may be an invalid data filtering algorithm, for example, it may be used to filter trajectory points with invalid timestamps and / or invalid location information.

[0061] Specifically, after obtaining the initial trajectory data corresponding to the target object, the server can determine the number of trajectory points contained in the initial trajectory data, and judge the relationship between the number of trajectory points of the initial trajectory data and a preset length threshold. If the number of trajectory points of the initial trajectory data is greater than or equal to the preset length threshold, it is determined that the initial trajectory data can be filtered. The server can filter the trajectory points contained in the initial trajectory data based on the first filtering algorithm to obtain the trajectory data after filtering, and determine that the trajectory data after filtering is the second trajectory data.

[0062] Step 206: If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0063] The starting trajectory point in the second trajectory data may be a trajectory point located at the first position in the second trajectory data; and the preset speed threshold may be a speed threshold corresponding to the target object determined based on the actual scene.

[0064] Specifically, after filtering the first trajectory data, the server obtains the second trajectory data. The server can determine the number of trajectory points included in the second trajectory data, and judge the relationship between the number of trajectory points of the second trajectory data and a preset length threshold. If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, the server can obtain the starting trajectory point in the second trajectory data, and based on the starting trajectory point and the preset speed threshold, perform validity verification processing on each trajectory point in the second trajectory data to obtain valid trajectory data corresponding to the second trajectory data. In this way, the server can output the valid trajectory data.

[0065] Optionally, the server may output the obtained valid trajectory data corresponding to the target object to the map component, perform visualization processing on the valid trajectory data through the map component, obtain visualization data corresponding to the movement process of the target object, display the visualization data, and so on.

[0066] In the above-mentioned trajectory data processing method, a preset speed threshold and initial trajectory data of the target object are obtained; the initial trajectory data includes multiple trajectory points of the target object arranged in time sequence, and each trajectory point includes a timestamp and position information; if the number of trajectory points in the initial trajectory data is greater than or equal to the preset length threshold, the initial trajectory data is filtered based on the first filtering algorithm to obtain second trajectory data; if the number of trajectory points in the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output. By adopting this method, the multiple trajectory points of the target object arranged in time sequence can be initially filtered by the preset speed threshold, and the validity verification processing is performed based on the starting trajectory point in each filtered trajectory point to obtain valid trajectory data of the target object, and the abnormality of the starting trajectory point in the trajectory data of the target object can be efficiently and accurately judged, the accuracy of subsequent trajectory data is guaranteed, and the high quality of the output trajectory data is improved.

[0067] In one embodiment, Figure 3As shown, the specific processing process of the step of "performing validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data" may include:

[0068] Step 302 : performing a starting point validity verification process based on the starting trajectory point in the second trajectory data and a preset speed threshold to obtain trajectory data to be output.

[0069] Among them, the preset speed threshold can be a speed threshold corresponding to the target object determined based on the actual application scenario; the starting point validity verification processing can be based on the starting trajectory point in the second trajectory data and the next trajectory point of the starting trajectory point for validity verification processing, which is used to perform abnormality detection on the next trajectory point of the starting trajectory point.

[0070] Specifically, after obtaining the second trajectory data, the server can obtain the starting trajectory point in the second trajectory data and the next trajectory point of the starting trajectory point, that is, the second trajectory point; the server can calculate the speed of the target object in the process of moving from the starting trajectory point to the second trajectory point based on the inspiration trajectory point and the second trajectory point, and perform starting point validity verification processing based on the speed and a preset speed threshold to obtain the trajectory data to be output corresponding to the second trajectory data.

[0071] Step 304 : filtering the trajectory data to be output by using a second filtering algorithm to obtain valid trajectory data.

[0072] The second filtering algorithm may be a general filtering algorithm, for example, an algorithm for filtering based on the speed of each trajectory point to date.

[0073] Specifically, the server can filter the multiple trajectory points contained in the output trajectory data based on the second filtering algorithm, that is, the server can detect the validity of the multiple trajectory points contained in the output trajectory data based on the second filtering algorithm, obtain multiple trajectory points that pass the validity detection, and obtain valid trajectory data corresponding to the target object based on the multiple trajectory points that pass the validity detection.

[0074] In this embodiment, by presetting a speed threshold filtering algorithm, the trajectory data of the target object is subjected to multiple validity checks, which can ensure the validity and accuracy of the obtained trajectory data and improve the quality of the output trajectory data of the target object.

[0075] In one embodiment, Figure 4 As shown, the specific processing process of the step of "performing a starting point validity verification process based on the starting trajectory point in the second trajectory data and a preset speed threshold to obtain trajectory data to be output" may include:

[0076] Step 402, calculate the first speed between the starting track point and the second track point in the second track data, the second track point being the next track point of the starting track point. If the first speed is greater than a preset speed threshold, calculate the second speed between the second track point and the third track point.

[0077] The plurality of trajectory points included in the second trajectory data may be arranged in chronological order, and the second trajectory point may be the next trajectory point of the starting trajectory point in the second trajectory data, that is, the trajectory point located at the second position in the second trajectory data. Accordingly, the third trajectory point may be the next trajectory point of the second trajectory point, that is, the next trajectory point located after the second trajectory point in the second trajectory data.

[0078] Specifically, after determining the starting trajectory point corresponding to the second trajectory data and the next trajectory point (the second trajectory point) of the starting trajectory point, the server can calculate the time taken to move from the starting trajectory point to the second trajectory point based on the timestamp in the starting trajectory point and the timestamp in the second trajectory point, and calculate the distance moved from the starting trajectory point to the second trajectory point based on the position data in the starting trajectory point and the position data in the second trajectory point. Based on this, the server can calculate the first speed based on the distance and time from the starting trajectory point to the second trajectory point.

[0079] The server may compare the first speed with a preset speed threshold, and if the first speed is greater than the preset speed threshold, the server may determine the next track point of the second track point, i.e., the third track point. In this way, the server may calculate the duration used to move from the second track point to the third track point based on the timestamp in the second track point and the timestamp in the third track point, and calculate the distance moved from the second track point to the third track point based on the position data in the second track point and the position data in the third track point, and based on this, the server may calculate the second speed based on the distance and duration of moving from the second track point to the third track point.

[0080] Optionally, if the server determines that the first speed is less than or equal to a preset speed threshold, the server may determine that the current second trajectory data is trajectory data to be output, that is, determine the second trajectory data as trajectory data to be output of the target object.

[0081] Step 404: if the second speed is less than or equal to the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed, a third data list is obtained, and the third data list is determined as the trajectory data to be output. The third trajectory point is the next trajectory point of the second trajectory point.

[0082] Specifically, the server may compare the second speed in the process of moving from the second trajectory point to the third trajectory point with a preset speed threshold; if the calculated second speed is less than or equal to the preset speed threshold, the server may determine that the starting trajectory point is an abnormal trajectory point, so that the server may remove the starting trajectory point from the second trajectory data, obtain the second trajectory data after removing the starting trajectory point, and determine that the second trajectory data after removing the starting trajectory point is the third data list. In this way, the server may determine the third data list as the trajectory data to be output.

[0083] Step 406: If the second speed is greater than the preset speed threshold, the second trajectory point is determined to be an abnormal trajectory point, and a third speed from the starting trajectory point to the third trajectory point is calculated. If the third speed is less than or equal to the speed threshold, the starting trajectory point is determined to be a normal trajectory point, and the second trajectory data is determined to be the trajectory data to be output.

[0084] Specifically, if the calculated second speed is greater than the preset speed threshold, the server may determine that the next track point of the starting track point is an abnormal track point, that is, determine that the second track point is an abnormal track point. In this way, the server may calculate the time taken to move from the starting track point to the third track point based on the timestamp in the starting track point and the timestamp in the third track point, and calculate the distance moved from the starting track point to the third track point based on the position data in the starting track point and the position data in the third track point. Based on this, the server may calculate the third speed based on the distance and time from the starting track point to the third track point. For example, the server may determine the ratio between the distance and the time as the third speed.

[0085] The server may compare the third speed with a preset speed threshold. If the calculated third speed is less than or equal to the preset speed threshold, the server may determine that the starting trajectory point is a normal trajectory point and determine that the second trajectory data is trajectory data to be output.

[0086] Step 408: If the third speed is greater than the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed, a third data list is obtained, and the third data list is determined to be the trajectory data to be output.

[0087] Specifically, if the third speed is greater than a preset speed threshold, the server can determine that the starting trajectory point is an abnormal trajectory point, and the server can remove the abnormal trajectory point in the second trajectory data, and determine the second trajectory data after removing the starting trajectory point as a third data list, and determine the third data list as the trajectory data to be output. In other words, the server can determine the second trajectory data after removing the starting trajectory point as the trajectory data to be output when the third speed is greater than the preset speed threshold.

[0088] It should be noted that the present disclosure does not limit the execution order and execution scope of the above steps 402, 404, 406, and 408. Those skilled in the art may execute one or more of the above steps 402, 404, 406, and 408 based on the requirements of the actual application scenarios.

[0089] In this embodiment, by calculating the speed between the starting trajectory point and the second trajectory point, the speed between the second trajectory point and the third trajectory point, and the speed between the starting trajectory point and the third trajectory point, abnormal detection of trajectory data can be implemented starting from the starting trajectory point, thereby ensuring the accuracy of subsequent trajectory data output and improving judgment efficiency.

[0090] In one embodiment, the trajectory data processing method further includes:

[0091] If the first speed is less than or equal to the preset speed threshold, the second trajectory data is determined to be the trajectory data to be output.

[0092] Specifically, the server can calculate the first speed based on the time taken to move from the starting trajectory point to the second trajectory point and the distance moved, and compare the first speed with a preset speed threshold. If the server determines that the first speed is less than or equal to the preset speed threshold, the server can determine the second trajectory data as the trajectory data to be output.

[0093] In this embodiment, the efficiency of abnormality detection of the starting trajectory point can be improved by comparing the speed calculation with the preset speed threshold.

[0094] In an exemplary embodiment, Figure 5 As shown, the specific processing process of the step of "filtering the output trajectory data by the second filtering algorithm to obtain valid trajectory data" includes:

[0095] Step 502 , calculating the speed between each adjacent trajectory point in the trajectory data to be output, and determining the trajectory point whose speed is less than or equal to a preset speed threshold as a valid trajectory point.

[0096] The trajectory data to be output includes a plurality of trajectory points, and the trajectory points are arranged in a time sequence represented by a timestamp in the trajectory point. Adjacent trajectory points may be arranged in the order in which the trajectory data to be output is arranged.

[0097] Specifically, the server may calculate the speed between each trajectory point according to the arrangement order between each trajectory point included in the trajectory data to be output. Based on the relationship between the speed between each trajectory point and the preset speed threshold, the server may screen each trajectory point to obtain multiple valid trajectory points. For example, the server may compare the speed of the trajectory point with the preset speed threshold, and determine the trajectory point whose speed is less than the preset speed threshold as a valid trajectory point.

[0098] In one example, for each trajectory point in the trajectory data to be output, the calculation process of the speed of the trajectory point may include: the server may determine the previous trajectory point of the trajectory point in the trajectory data to be output, and calculate the time taken to move from the previous trajectory point of the trajectory point to the trajectory point based on the timestamp in the trajectory point and the timestamp in the previous trajectory point, and calculate the distance moved from the previous trajectory point of the trajectory point to the trajectory point based on the position data in the previous trajectory point of the trajectory point and the position data in the trajectory point, based on which the server can calculate the speed of the trajectory point based on the distance and the time.

[0099] Step 504 , obtaining valid trajectory data based on each valid trajectory point in the trajectory data to be output.

[0100] Specifically, the server may filter out multiple valid trajectory points from each trajectory point included in the trajectory points to be output, and determine each valid trajectory point as valid trajectory data.

[0101] In this embodiment, the validity of each trajectory point is detected by the second filtering algorithm, thereby improving the efficiency and accuracy of detecting valid trajectory points.

[0102] In one embodiment, the trajectory data processing method further includes:

[0103] If the number of track points in the initial track data is less than the preset length threshold, the initial track data list is output. Alternatively, if the number of track points in the second track data is less than the preset length threshold, the initial track data is output.

[0104] Specifically, the server can compare the number of trajectory points in the initial trajectory data with a preset length threshold. If the server determines that the number of trajectory points in the initial trajectory data is less than the preset length threshold, the server can output the initial trajectory data to the map component, and visualize the initial trajectory data through the map component to obtain visualization data corresponding to the movement process of the target object, and display the visualization data, etc.

[0105] In this embodiment, the processing efficiency of the initial trajectory data is improved.

[0106] In one embodiment, the specific processing of the step of "filtering the initial trajectory data based on the first filtering algorithm to obtain the second trajectory data" includes:

[0107] The trajectory points that do not meet the preset complete condition in the initial trajectory data are eliminated to obtain the second trajectory data.

[0108] The preset complete condition is that the trajectory point includes timestamp and location information.

[0109] Specifically, for each of the multiple trajectory points included in the initial trajectory data, the server can judge whether the trajectory point meets the preset complete condition. The server can determine the trajectory points that do not contain timestamps or location information in the data included in the trajectory point as trajectory points that do not meet the preset complete condition. In this way, the server can remove the trajectory points that do not meet the preset complete condition in the initial trajectory data to obtain the initial trajectory data after removal, and determine the initial trajectory data after removal as the second trajectory data.

[0110] In this embodiment, the accuracy of the trajectory data of the target object outputted subsequently is ensured by detecting the integrity of the data contained in each trajectory point.

[0111] In the following, in combination with a specific embodiment, Figure 6 As shown, the specific implementation process of the above-mentioned trajectory data processing method may include:

[0112] Step 1: Input the data list and speed threshold v, that is, the server obtains the initial trajectory data and speed threshold of the target object.

[0113] Step 2, determine whether the data list is less than 3. If not, execute step 3; if less than 3, execute step 6.

[0114] Step 3, filtering invalid track points, that is, the server can filter the invalid track points in the initial track data to obtain a filtered data list.

[0115] Step 4, determine whether the length of the filtered data list is less than 3; if it is not less than 3, execute step 5; if it is less than 3, execute step 6.

[0116] Step 5: Process the starting trajectory point and filter the remaining trajectory points.

[0117] Step 6, return the data list, that is, output the data list.

[0118] In conjunction with a specific embodiment, Figure 7 As shown, the specific implementation process of the above-mentioned trajectory data processing method may include:

[0119] The gateway server collects car GPS information and other information through the vehicle terminal, and the gateway service saves the message data into the database. When you need to view the historical trajectory route, query the database through the back-end program and pass it to the map component for trajectory rendering; each data has longitude and latitude and timestamp, and the Haversing formula is used to calculate the shortest distance between two points on the earth's surface. By obtaining the timestamps of two adjacent trajectory points, the speed value between the previous trajectory point and the next trajectory point can be calculated. The unit of the speed value can be meters per second.

[0120] Step S1: Input data list and speed threshold. Specifically, the input parameters may include the speed threshold and a list of data points of vehicle trajectories sorted in chronological order from small to large. The information of a single vehicle trajectory point must include longitude and latitude and timestamp. The unit of the speed threshold is meter per second.

[0121] Step S2: If the input data list is empty or its length is less than 3, the original data list is returned.

[0122] Step S3: Filter invalid points, which may be data points that lack latitude, longitude or timestamp. If the number of filtered data points is still less than 3, return the original data point list.

[0123] Step S4: Processing the starting trajectory point: using the starting trajectory point filtering method to verify the validity of the starting trajectory point and process the starting trajectory point.

[0124] Step S4.1: Input data list and speed threshold v.

[0125] Step S4.2: Calculate the speed v12 from the starting trajectory point to the second trajectory point. If the speed v12 is greater than the speed threshold v, continue to step S4.3; otherwise, directly return the input data list.

[0126] Step S4.3: Calculate the speed v23 from the second trajectory point to the third trajectory point. If the speed v23 is less than or equal to the speed threshold v, the starting trajectory point is determined to be an abnormal point, and the incoming data list is removed from the starting trajectory point and returned; if the speed v23 is greater than the speed threshold v, it is inferred that the second trajectory point is abnormal, and continue to execute step S4.4.

[0127] Step S4.4: If the second trajectory point is abnormal, the speed v13 can be calculated based on the starting trajectory point and the third trajectory point. If v13 is less than or equal to the speed threshold v, the starting trajectory point is marked as a normal point and the passed-in data list is returned; if v13 is greater than the speed threshold v, the starting trajectory point is judged to be invalid, the starting trajectory point is removed from the passed-in data list and then returned.

[0128] Step S5: Use the second filtering algorithm to process the data list returned by step S4. Specifically, calculate the speed between adjacent points one by one. If the calculated speed exceeds the speed threshold, mark the point as an abnormal point and skip it. Otherwise, add the point to the valid point list and update the previous point as the current point.

[0129] Step S6: Returning the filtered valid track point list. Then, the server can input the returned filtered valid track point list into the map component, and the map component processes the valid track point list to obtain the visualization data of the track data of the target object.

[0130] The trajectory data processing method provided in this embodiment can determine the validity of all initial trajectory data through the first few data in the initial trajectory data, ensure the accuracy of subsequent data, and improve the accuracy of the output trajectory data of the target object.

[0131] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0132] Based on the same inventive concept, the embodiment of the present application also provides a trajectory data processing device for implementing the trajectory data processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the one or more trajectory data processing device embodiments provided below can refer to the limitations of the trajectory data processing method above, and will not be repeated here.

[0133] In an exemplary embodiment, Figure 8 As shown, a trajectory data processing device 800 is provided, comprising:

[0134] A first acquisition module 802 is used to acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0135] A first processing module 804 is configured to filter the initial trajectory data based on a first filtering algorithm to obtain second trajectory data if the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold;

[0136] The second processing module 806 is used to perform validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold if the number of trajectory points in the second trajectory data is greater than or equal to the preset length threshold, obtain valid trajectory data, and output the valid trajectory data.

[0137] In one embodiment, the second processing module is specifically configured to:

[0138] Performing a starting point validity verification process based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain trajectory data to be output;

[0139] The to-be-output trajectory data is filtered using a second filtering algorithm to obtain valid trajectory data.

[0140] In one embodiment, the second processing module is further specifically configured to:

[0141] Calculating a first speed between a starting trajectory point and a second trajectory point in the second trajectory data, where the second trajectory point is a trajectory point next to the starting trajectory point; if the first speed is greater than the preset speed threshold, calculating a second speed between the second trajectory point and a third trajectory point;

[0142] If the second speed is less than or equal to the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed, a third data list is obtained, and the third data list is determined to be the trajectory data to be output; the third trajectory point is the next trajectory point of the second trajectory point; or,

[0143] If the second speed is greater than the preset speed threshold, the second trajectory point is determined to be an abnormal trajectory point, and a third speed from the starting trajectory point to the third trajectory point is calculated; if the third speed is less than or equal to the speed threshold, the starting trajectory point is determined to be a normal trajectory point, and the second trajectory data is determined to be trajectory data to be output; or,

[0144] If the third speed is greater than the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed to obtain a third data list, and the third data list is determined to be the trajectory data to be output.

[0145] In one embodiment, the trajectory data processing device further includes:

[0146] The first determining module is configured to determine that the second trajectory data is trajectory data to be output if the first speed is less than or equal to the preset speed threshold.

[0147] In one embodiment, the second processing module is further specifically configured to:

[0148] Calculating the speed between each adjacent trajectory point in the trajectory data to be output, and determining the trajectory point whose speed is less than or equal to the preset speed threshold as a valid trajectory point;

[0149] Based on each of the valid trajectory points in the trajectory data to be output, valid trajectory data is obtained.

[0150] In one embodiment, the trajectory data processing device further includes:

[0151] a first output module, configured to output the initial trajectory data list if the number of trajectory points in the initial trajectory data is less than a preset length threshold; or

[0152] The second output module is configured to output the initial trajectory data if the number of trajectory points in the second trajectory data is less than the preset length threshold.

[0153] In one embodiment, the first processing module is specifically configured to:

[0154] Trajectory points that do not meet a preset complete condition in the initial trajectory data are eliminated to obtain second trajectory data, wherein the preset complete condition is that the trajectory point includes a timestamp and location information.

[0155] Each module in the above-mentioned trajectory data processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0156] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for processing trajectory data is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0157] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0158] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0159] Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0160] If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data;

[0161] If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0162] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0163] Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0164] If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data;

[0165] If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0166] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0167] Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information;

[0168] If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data;

[0169] If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0171] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0172] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0173] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for processing trajectory data, characterized in that: The method comprises: Acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information; If the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold, filtering the initial trajectory data based on a first filtering algorithm to obtain second trajectory data; If the number of trajectory points of the second trajectory data is greater than or equal to the preset length threshold, validity verification processing is performed based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data, and the valid trajectory data is output.

2. The method according to claim 1, characterized in that The performing validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain valid trajectory data includes: Performing a starting point validity verification process based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain trajectory data to be output; The to-be-output trajectory data is filtered using a second filtering algorithm to obtain valid trajectory data.

3. The method according to claim 2, characterized in that The performing a starting point validity verification process based on the starting trajectory point in the second trajectory data and the preset speed threshold to obtain trajectory data to be output includes: Calculating a first speed between a starting trajectory point and a second trajectory point in the second trajectory data, where the second trajectory point is a trajectory point next to the starting trajectory point; if the first speed is greater than the preset speed threshold, calculating a second speed between the second trajectory point and a third trajectory point; If the second speed is less than or equal to the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed, a third data list is obtained, and the third data list is determined to be the trajectory data to be output; the third trajectory point is the next trajectory point of the second trajectory point; or, If the second speed is greater than the preset speed threshold, the second trajectory point is determined to be an abnormal trajectory point, and a third speed from the starting trajectory point to the third trajectory point is calculated; if the third speed is less than or equal to the speed threshold, the starting trajectory point is determined to be a normal trajectory point, and the second trajectory data is determined to be trajectory data to be output; or, If the third speed is greater than the preset speed threshold, the starting trajectory point is determined to be an abnormal trajectory point, the starting trajectory point in the second trajectory data is removed to obtain a third data list, and the third data list is determined to be the trajectory data to be output.

4. The method according to claim 3, characterized in that The method further comprises: If the first speed is less than or equal to the preset speed threshold, the second trajectory data is determined to be trajectory data to be output.

5. The method according to claim 3, characterized in that: The filtering the to-be-output trajectory data by a second filtering algorithm to obtain valid trajectory data includes: Calculating the speed between each adjacent trajectory point in the trajectory data to be output, and determining the trajectory point whose speed is less than or equal to the preset speed threshold as a valid trajectory point; Based on each of the valid trajectory points in the trajectory data to be output, valid trajectory data is obtained.

6. The method according to claim 1, characterized in that The method further comprises: If the number of trajectory points in the initial trajectory data is less than a preset length threshold, outputting the initial trajectory data list; or, If the number of trajectory points in the second trajectory data is less than the preset length threshold, the initial trajectory data is output.

7. The method according to claim 1, characterized in that The filtering the initial trajectory data based on the first filtering algorithm to obtain the second trajectory data includes: Trajectory points that do not meet a preset complete condition in the initial trajectory data are eliminated to obtain second trajectory data, wherein the preset complete condition is that the trajectory point includes a timestamp and location information.

8. A trajectory data processing device, characterized in that: The device comprises: A first acquisition module is used to acquire a preset speed threshold and initial trajectory data of the target object; the initial trajectory data includes a plurality of trajectory points of the target object arranged in time sequence, each of the trajectory points includes a timestamp and position information; A first processing module, configured to filter the initial trajectory data based on a first filtering algorithm to obtain second trajectory data if the number of trajectory points in the initial trajectory data is greater than or equal to a preset length threshold; The second processing module is used to perform validity verification processing based on the starting trajectory point in the second trajectory data and the preset speed threshold if the number of trajectory points in the second trajectory data is greater than or equal to the preset length threshold, obtain valid trajectory data, and output the valid trajectory data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • GPS trajectory correction method based on speed calculation strategy

    CN111538050A

  • Data processing method and device, electronic equipment and storage medium

    CN111856521A

  • Track correction method and terminal

    CN115712133A

  • Driving track determination method and device, electronic equipment and readable storage medium

    CN116678430A

  • Vehicle data processing method and apparatus, computer device, and storage medium

    US20230045727A1

Cited By

  • Vehicle detection method and device, computer equipment, readable storage medium and program product

    CN121007718A

  • Vehicle detection method and device, computer device, readable storage medium and program product

    CN121007718B