Bus driving position data compensation method and system, electronic device and storage medium
By utilizing the speed similarity of historical bus driving data, an average value is calculated to compensate for bus location data, and an index table is established. This solves the problem of inaccurate GPS positioning and achieves accurate compensation and improved stability of bus location data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 武汉元光科技有限公司
- Filing Date
- 2023-05-31
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, GPS positioning data for buses is inaccurate and unstable due to signal blind spots, signal interference, and network instability, requiring the design of algorithmic mechanisms for accurate compensation.
By acquiring historical bus driving data of the bus routes to be compensated, and utilizing the similarity of bus speeds within the same area, the average longitude and latitude values are calculated for data compensation. A compensation data index table is then established to quickly obtain the compensation data.
It reduces errors caused by GPS drift, accurately restores the actual driving situation of buses, and improves the accuracy and stability of bus location data.
Smart Images

Figure CN116704805B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent public transportation, and more specifically, to a method, system, electronic device, and storage medium for compensating bus driving location data. Background Technology
[0002] GPS location data for buses plays a crucial role in real-time public transportation systems. Through GPS positioning technology, these systems can monitor the operational status of buses in real time and display their location and trajectory on a map, helping passengers stay informed about their bus's location. Furthermore, the location data provides more accurate real-time data support for the system, enabling continuous monitoring of bus operations and providing data support for urban traffic management and optimization.
[0003] To ensure that the location information of buses can be reflected in real time and accurately, the real-time bus system needs to acquire the GPS positioning data of buses in real time. Although the GPS positioning system of buses is highly accurate and reliable in most cases, there are situations such as signal blind spots, signal interference, and unstable network transmission that can affect the accuracy and stability of real-time positioning information. Therefore, the real-time bus software needs to design an algorithm mechanism to accurately compensate for lost or delayed GPS data. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing a method, system, electronic device, and storage medium for compensating bus driving location data.
[0005] According to a first aspect of the present invention, a method for compensating bus driving location data is provided, comprising:
[0006] Obtain the current location data of the target bus route to be compensated, wherein the next location data of the current location data needs to be compensated;
[0007] Obtain all historical bus travel data that are traveling on the target bus route to be compensated and have passed through the current location point data;
[0008] Retrieve the next location data from the current location data in any historical bus travel data;
[0009] Aggregate the next location data from all historical bus driving data to obtain the next location data to be compensated for the current location data of the target bus route.
[0010] Based on the above technical solution, the present invention can also be improved as follows.
[0011] Optionally, obtain all historical bus travel data that travels on the target bus route to be compensated and passes through the current location data, including:
[0012] Using the current location as the center point and the direction of the target bus route to be compensated as the length direction, determine a square area with a set side length;
[0013] Obtain historical bus travel data for all buses that traveled on the target bus route to be compensated and passed through the square area within a set historical time period.
[0014] Optionally, the side length of the positive direction region is 10m.
[0015] Optionally, obtaining the next location data of the current location data on any historical bus travel data includes:
[0016] Iterate through each historical bus travel data point and obtain the next location data point that is a fixed time interval from the current location data point in all historical bus travel data points, thus obtaining multiple historical next location data points.
[0017] Optionally, the aggregation process of the next location data on all historical bus driving data includes:
[0018] Obtain the longitude and latitude of the next location point for each historical point;
[0019] Calculate the longitude and latitude averages of all historical next location data, and use these averages as compensation data for the next location on the target bus route to be compensated.
[0020] Optional, also includes:
[0021] The target bus route to be compensated is decomposed into multiple line segments of fixed length. The midpoint of each line segment is used as the center point. A square area is determined along the direction of the bus route with a fixed length as the side length of the square.
[0022] Using each center point as the current location point data, calculate the compensation data for the next location point for each current location point data;
[0023] A compensation data index table is established based on the data and acquisition time of each current location point, and the compensation data and acquisition time of the next location point corresponding to each current location point.
[0024] Optionally, obtain the location data of the points that need to be compensated on the target bus route;
[0025] Based on the location point data that needs compensation, the compensation data for the next location point is found in the compensation data index table.
[0026] According to a second aspect of the present invention, a bus driving location data compensation system is provided, comprising:
[0027] The first acquisition module is used to acquire the current location data of the target bus route to be compensated, wherein the next location data of the current location data needs to be compensated;
[0028] The second acquisition module is used to acquire all historical bus travel data that travels on the target bus route to be compensated and passes through the current location point data.
[0029] The third acquisition module is used to acquire the next location data of the current location data in any historical bus driving data;
[0030] The data processing module is used to aggregate the next location data from all historical bus driving data to obtain the next location data to be compensated for the current location data of the target bus route.
[0031] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the processor is configured to implement the steps of a bus driving location data compensation method when executing a computer management program stored in the memory.
[0032] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management class program is stored, wherein the computer management class program, when executed by a processor, implements the steps of a bus driving location data compensation method.
[0033] This invention provides a bus driving location data compensation method, system, electronic device, and storage medium. By using the driving data of vehicles operating on the target route in the same area in historical conditions for prediction, and fully considering the similarity of the speed of buses at the same coordinate position, it can reduce errors and restore the actual bus driving data compensation. Attached Figure Description
[0034] Figure 1 A flowchart of a bus driving location data compensation method provided by the present invention;
[0035] Figure 2 A schematic diagram illustrating the overall process of the bus driving location data compensation method;
[0036] Figure 3 This is a schematic diagram of a bus driving location data compensation system provided by the present invention;
[0037] Figure 4 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;
[0038] Figure 5 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined with each other to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0040] Figure 1 A flowchart of a bus driving location data compensation method provided by the present invention is shown below. Figure 1 As shown, the method includes:
[0041] S1, obtain the current location data of the target bus route to be compensated, wherein the next location data of the current location data needs to be compensated.
[0042] Understandably, during bus operation, some location data along bus routes may be missing or incomplete, necessitating compensation for some location data. When location data on a bus route requires compensation, it can be done by using the current location data on the target bus route as the basis for compensating the next location data point.
[0043] S2, Obtain all historical bus travel data that are traveling on the target bus route to be compensated and have passed through the current location point data.
[0044] As an example, obtaining all historical bus travel data that travels on the target bus route to be compensated and passes through the current location data includes: determining a square area with a set side length, centered on the current location and with the direction of the target bus route to be compensated as the length direction; and obtaining all historical bus travel data that travels on the target bus route to be compensated and passes through the square area within a set historical time period.
[0045] Understandably, to obtain historical bus travel data for buses on the same route, since the routes of buses on the same route usually do not completely overlap in reality, a square area is drawn with the current location as the center point, along the direction of the route, which is the length of the side of the square. Whenever a bus on the same route passes through this square area, it is considered that the route has passed through the current location. This allows for the acquisition of historical bus travel data for a set historical time period that passes through the current location. Based on the historical travel data of buses on the same route that have passed through the current location, data for the next location point of the target bus route to be compensated can be obtained. In this invention, the side length of the square is 10m.
[0046] S3 retrieves the next location data from the current location data in any historical bus driving data.
[0047] As an example, obtaining the next location data of the current location data on any historical bus driving data includes: traversing each historical bus driving data, obtaining the next location data of all historical bus driving data that is separated from the current location data by a fixed time interval, and obtaining multiple historical next location data.
[0048] Understandably, when the historical bus routes passing through the square area of the current location are obtained, the data of the next location point that is a fixed time interval from the collection time of the current location point data in each historical bus route data is obtained, resulting in multiple historical next location point data.
[0049] Specifically, for each historical bus route data point, the speeds of buses on the same route are usually quite similar in reality. Therefore, when obtaining data for the next location point from the current location, the acquisition time of the current location data is obtained, and then after a certain interval, such as 4 seconds, the location data 4 seconds after the acquisition time of the current location data is obtained as the next location data. The same operation is performed for each historical bus route data point to obtain the data for the next location point from the current location point in each historical bus route data point.
[0050] S4 aggregates the next location data from all historical bus driving data to obtain the next location data to be compensated for the current location data of the target bus route to be compensated.
[0051] As an example, the aggregation processing of the next location data on all historical bus driving data includes: obtaining the longitude and latitude of each historical next location data; calculating the average longitude and average latitude of all historical next location data, and using the average longitude and average latitude as compensation data for the next location on the target bus route to be compensated.
[0052] Understandably, step S3 obtains the data for the next location point from the current location point in each historical bus route's travel data. Each location point data includes longitude and latitude data. The average longitude and latitude of all historical next location point data are calculated, and these average longitude and latitude values are used as compensation data for the next location point of the current location point data on the target bus route to be compensated.
[0053] In the process of compensating the next location point data of the current location point on the bus route to be compensated, the compensation data of the next location point of each current location point can be established first. So that when the next location point data of the current location point needs to be compensated in the future, the compensation data can be directly obtained by retrieval without real-time calculation.
[0054] See also Figure 2 As an example, the method further includes: decomposing the target bus route to be compensated into multiple line segments of fixed length, with the midpoint of each line segment as the center point, and determining a square area along the direction of the bus route with a fixed length as the side length of the square; using each center point as the current location point data, calculating the compensation data for the next location point of each current location point data; and establishing a compensation data index table based on each current location point data and its collection time, and the compensation data for the next location point corresponding to each current location point data and its collection time.
[0055] Understandably, for each target bus route to be compensated, the target bus route is divided into multiple segments with a length of 10 meters. The midpoint of each segment is used as the center, and multiple square areas with a side length of 10 meters are determined as the smallest coordinate unit of the bus route.
[0056] Using each center point as the current location point, calculate the compensation data for the next location point for each current location point according to the method described above, and establish a compensation data index table based on the data of each current location point, the acquisition time, the compensation data of the next location point, and the acquisition time.
[0057] When it is necessary to compensate for the data of the next location point of the current location point, obtain the location point data that needs to be compensated on the target bus route; based on the location point data that needs to be compensated, search in the compensation data index table to find the compensation data of the next location point of the location point data.
[0058] See Figure 3 This invention provides a bus driving location data compensation system, which includes a first acquisition module 301, a second acquisition module 302, a third acquisition module 303, and a data processing module 304, wherein:
[0059] The first acquisition module 301 is used to acquire the current location data of the target bus route to be compensated, wherein the next location data of the current location data needs to be compensated.
[0060] The second acquisition module 302 is used to acquire all historical bus travel data that travels on the target bus route to be compensated and passes through the current location point data.
[0061] The third acquisition module 303 is used to acquire the next location data of the current location data in any historical bus driving data;
[0062] The data processing module 304 is used to aggregate the next location data on all historical bus driving data to obtain the next location data to be compensated for the current location data of the target bus route to be compensated.
[0063] It is understood that the bus driving location data compensation system provided by the present invention corresponds to the bus driving location data compensation method provided in the foregoing embodiments. The relevant technical features of the bus driving location data compensation system can be referred to the relevant technical features of the bus driving location data compensation method, and will not be repeated here.
[0064] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 4 As shown, an embodiment of the present invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, it implements the steps of a bus driving position data compensation method.
[0065] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 5As shown, this embodiment provides a computer-readable storage medium 500 on which a computer program 511 is stored. When the computer program 511 is executed by a processor, it implements the steps of a bus driving position data compensation method.
[0066] The present invention provides a method, system, electronic device, and storage medium for compensating bus driving location data, which has the following beneficial effects:
[0067] (1) This invention uses the historical driving data of the target route operating vehicles in the same area to make predictions, and fully considers the similarity of the speed of buses at the same coordinate position, which can reduce errors and restore the bus data compensation of the actual bus driving situation.
[0068] (2) The compensation locations of all historical bus location data within a square area are relatively dispersed. By calculating the average value, errors caused by GPS drift can be reduced.
[0069] (3) Establish a compensation data index table so that when it is necessary to compensate for bus location data, the compensation location of a large number of buses can be calculated quickly.
[0070] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0071] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0072] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0073] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0074] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0075] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0076] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for compensating bus driving location data, characterized in that, include: Obtain the current location data of the target bus route to be compensated, wherein the next location data of the current location data needs to be compensated; Obtain all historical bus travel data that are traveling on the target bus route to be compensated and have passed through the current location point data; Retrieve the next location data from the current location data in any historical bus travel data; Aggregate the next location data from all historical bus driving data to obtain the next location data to be compensated for the current location data of the target bus route to be compensated. Obtain all historical bus travel data that travels on the target bus route to be compensated and passes through the current location data, including: Using the current location as the center point and the direction of the target bus route to be compensated as the length direction, determine a square area with a set side length; Obtain historical bus travel data for all buses that travel on the target bus route to be compensated and pass through the square area within a set historical time period; The step of obtaining the next location data from the current location data on any historical bus route includes: Iterate through each historical bus driving data, and obtain the next location data that is a fixed time interval from the current location data collection time in all historical bus driving data, to obtain multiple historical next location data. The target bus route to be compensated is decomposed into multiple line segments of fixed length. The midpoint of each line segment is used as the center point. A square area is determined along the direction of the bus route with a fixed length as the side length of the square. Using each center point as the current location point data, calculate the compensation data for the next location point for each current location point data; Based on the data and acquisition time of each current location point, and the compensation data and acquisition time of the next location point corresponding to each current location point, a compensation data index table is established; Obtain the location data of the points requiring compensation on the target bus route; Based on the location point data that needs compensation, the compensation data for the next location point is found in the compensation data index table.
2. The bus driving location data compensation method according to claim 1, characterized in that, The side length of the square region is 10m.
3. The bus driving location data compensation method according to claim 1, characterized in that, The aggregation process of the next location data on all historical bus driving data includes: Obtain the longitude and latitude of the next location point for each historical point; Calculate the longitude and latitude averages of all historical next location data, and use these averages as compensation data for the next location on the target bus route to be compensated.
4. A bus driving location data compensation system, characterized in that, The system is used to execute the bus driving location data compensation method as described in any one of claims 1-3, including: The first acquisition module is used to acquire the current location data of the target bus route to be compensated, wherein the next location data of the current location data needs to be compensated; The second acquisition module is used to acquire all historical bus travel data that travels on the target bus route to be compensated and passes through the current location point data. The third acquisition module is used to acquire the next location data of the current location data in any historical bus driving data; The data processing module is used to aggregate the next location data from all historical bus driving data to obtain the next location data to be compensated for the current location data of the target bus route.
5. An electronic device, characterized in that, It includes a memory and a processor, wherein the processor is used to implement the steps of the bus driving location data compensation method as described in any one of claims 1-3 when executing a computer management program stored in the memory.
6. A computer-readable storage medium, characterized in that, It stores a computer management program, which, when executed by a processor, implements the steps of the bus driving location data compensation method as described in any one of claims 1-3.
Citation Information
Patent Citations
Bus running data compensation method and device
CN110136469A
Trajectory data processing method and device and electronic equipment
CN110727757A