CN114705214A - Mileage track calculation method and device, storage medium and electronic equipment - Google Patents
Mileage track calculation method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN114705214A CN114705214A CN202210401295.8A CN202210401295A CN114705214A CN 114705214 A CN114705214 A CN 114705214A CN 202210401295 A CN202210401295 A CN 202210401295A CN 114705214 A CN114705214 A CN 114705214A
- Authority
- CN
- China
- Prior art keywords
- track
- mileage
- sub
- calculated
- actual
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C22/00—Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Navigation (AREA)
- Train Traffic Observation, Control, And Security (AREA)
Abstract
The invention discloses a mileage track calculating method, a mileage track calculating device, a storage medium and electronic equipment, wherein a mileage track to be calculated is obtained, and the mileage track to be calculated is divided according to a preset threshold value to obtain a plurality of mileage sub-tracks to be calculated corresponding to mileage track information to be calculated; for each mileage sub-track to be calculated, obtaining a corresponding theoretical sub-track according to a vertical threshold processing method; determining a corresponding target actual drivable route in a map according to the theoretical sub-track; and summing the target actual drivable paths corresponding to all the mileage sub-tracks to be calculated to obtain the actual mileage corresponding to the mileage track to be calculated. The method adopts a vertical distance threshold processing method to reduce the data volume to be processed; the actual mileage is calculated by matching with the actual route, so that the mileage calculation error caused by various factors is reduced, and the continuous development of the mileage calculation platform is promoted.
Description
Technical Field
The invention relates to the technical field of automobile mileage calculation, in particular to a mileage track calculation method, a mileage track calculation device, a storage medium and electronic equipment.
Background
The driver needs to accurately calculate the traveled mileage during the travel service. However, due to the complexity of the offline scene, many problems are encountered in calculating the driving range. For example, in a scene with a complex road condition, such as a mountainous area, a viaduct, a traffic jam, etc., since the GPS signal of the mobile phone is weak, the positioning point may drift and cannot be accurately positioned, so that the relatively accurate driving distance cannot be calculated in real time.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic device for calculating a mileage track, so as to solve the technical problem in the prior art that a relatively accurate mileage cannot be calculated in real time due to an inaccurate positioning in a complex road condition scene.
The technical scheme provided by the invention is as follows:
a first aspect of an embodiment of the present invention provides a mileage track calculation method, including: acquiring a mileage track to be calculated and dividing the mileage track to be calculated according to a preset threshold value to obtain a plurality of mileage sub-tracks to be calculated corresponding to the mileage track information to be calculated; for each mileage sub-track to be calculated, obtaining a straight line track formed between a starting point and an end point according to the starting point position information and the end point position information of the sub-track; making a perpendicular line from each track point in the to-be-calculated mile sub-track to the straight-line track to obtain a maximum perpendicular distance; when the maximum perpendicular distance is smaller than a preset distance threshold, taking a straight line track corresponding to the mileage sub-track to be calculated as a theoretical sub-track of the mileage sub-track to be calculated; when the maximum perpendicular distance is larger than or equal to the preset distance threshold, reserving track points corresponding to the maximum perpendicular distance and dividing the to-be-calculated mileage sub-tracks again by taking the track points as dividing points; for the sub-tracks obtained after division, repeating the step of obtaining a straight-line track formed between the starting point and the end point according to the starting point position information and the end point position information of the sub-tracks to the step of reserving a track point corresponding to the maximum perpendicular distance and dividing the sub-tracks again by taking the track point as a dividing point when the maximum perpendicular distance is greater than or equal to the preset distance threshold until the maximum perpendicular distance corresponding to the divided sub-tracks is less than the preset distance threshold and obtaining a theoretical sub-track corresponding to each mileage sub-track to be calculated; determining a target actual drivable route corresponding to each theoretical sub-track in a map according to the acquired position of the theoretical sub-track corresponding to each mileage sub-track to be calculated in the map; and summing the target actual drivable paths corresponding to all the mileage sub-tracks to be calculated to obtain the actual mileage corresponding to the mileage track to be calculated.
Optionally, the acquiring the mileage track to be calculated includes: inquiring mileage track point information in a corresponding time range in a preset database according to the mileage statistics duration requirement; and determining the corresponding mileage track to be calculated according to the mileage track point information.
Optionally, the determining, according to the position of the theoretical sub-trajectory in the map, which is corresponding to each mileage sub-trajectory to be calculated, a target actual drivable path corresponding to the theoretical sub-trajectory in the map includes: inquiring and acquiring an actual drivable route with the starting point position information and the end point position information of the theoretical sub-track corresponding to each mileage sub-track to be calculated consistent by using map software; calculating the deviation degree of a theoretical sub-track corresponding to any mileage sub-track to be calculated and each corresponding actual driving route; comparing the deviation degree with a preset deviation threshold value; and taking the actual drivable route with the deviation degree smaller than the preset deviation threshold value as a corresponding target actual drivable route through which any one of the mileage sub-tracks to be calculated passes.
Optionally, after summing the target actual drivable paths corresponding to all the mileage sub-trajectories to be calculated to obtain the actual mileage corresponding to the mileage trajectories to be calculated, the method further includes: and when the mileage track to be calculated comprises a plurality of mileage tracks, summing the actual mileage corresponding to the mileage track to be calculated according to the received statistical instruction.
A second aspect of an embodiment of the present invention provides a mileage track calculating device including: the acquiring module is used for acquiring the mileage track to be calculated and dividing the mileage track to be calculated according to a preset threshold value to obtain a plurality of mileage sub-tracks to be calculated corresponding to the mileage track information to be calculated; the first determining module is used for obtaining a linear track formed between a starting point and an end point according to the starting point position information and the end point position information of each mileage sub-track to be calculated; the processing module is used for making a perpendicular line from each track point in the to-be-calculated mileage sub-track to the straight-line track to obtain the maximum perpendicular distance; the second determining module is used for taking the linear track corresponding to the mileage sub-track to be calculated as a theoretical sub-track of the mileage sub-track to be calculated when the maximum perpendicular distance is smaller than a preset distance threshold; the dividing module is used for reserving track points corresponding to the maximum perpendicular distance and dividing the to-be-calculated mileage sub-track again by taking the track points as dividing points when the maximum perpendicular distance is larger than or equal to the preset distance threshold; the repeated processing module is used for repeating the step of obtaining a straight line track formed between a starting point and an end point according to the starting point position information and the end point position information of the sub-track to the step of obtaining the straight line track formed between the starting point and the end point according to the divided sub-track until the maximum perpendicular distance is larger than or equal to the preset distance threshold, reserving a track point corresponding to the maximum perpendicular distance and dividing the sub-track again by taking the track point as a dividing point until the maximum perpendicular distance corresponding to the divided sub-track is smaller than the preset distance threshold and obtaining a theoretical sub-track corresponding to each mileage sub-track to be calculated; the third determining module is used for determining a target actual drivable route corresponding to each theoretical sub-track in the map according to the position of the theoretical sub-track corresponding to each mileage sub-track to be calculated in the map; and the calculation module is used for summing the target actual drivable routes corresponding to all the mileage sub-tracks to be calculated to obtain the actual mileage corresponding to the mileage track to be calculated.
Optionally, the apparatus further comprises: the query module is used for querying mileage track point information in a corresponding time range in a preset database according to the mileage statistics duration requirement; and the fourth determining module is used for determining the corresponding mileage track to be calculated according to the mileage track point information.
Optionally, the apparatus further comprises: the first acquisition module is used for inquiring and acquiring an actual drivable route, corresponding to each mileage sub-track to be calculated, of which the starting point position information is consistent with the end point position information, by using map software; the first calculation module is used for calculating the deviation degree of a theoretical sub-track corresponding to any mileage sub-track to be calculated and each actual driving route corresponding to the theoretical sub-track; the comparison module is used for comparing the deviation degree with a preset deviation threshold value; and a fifth determining module, configured to take the actual travelable route with the deviation degree smaller than the preset deviation threshold as the corresponding target actual travelable route through which the any one of the mileage sub-tracks to be calculated passes.
Optionally, the apparatus further comprises: and the second calculation module is used for summing the actual mileage corresponding to the mileage track to be calculated according to the received statistical instruction when the mileage track to be calculated comprises a plurality of mileage tracks.
A third aspect of the embodiments of the present invention provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to cause a computer to execute the mileage locus calculation method according to any one of the first aspect and the first aspect of the embodiments of the present invention.
A fourth aspect of an embodiment of the present invention provides an electronic device, including: the mileage track calculation method comprises a memory and a processor, wherein the memory and the processor are connected in communication with each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the mileage track calculation method according to any one of the first aspect and the first aspect of the embodiment of the invention.
The technical scheme provided by the invention has the following effects:
according to the mileage track calculation method provided by the embodiment of the invention, the data volume to be processed is reduced by adopting a vertical distance threshold processing method; the actual mileage is calculated by matching with the actual route, so that the mileage calculation error caused by various factors is reduced, and the continuous development of the mileage calculation platform is promoted.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a mileage track calculation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a mileage trace processing process provided in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of a mileage trace processing procedure provided in accordance with an embodiment of the present invention;
fig. 4 is a block diagram of the construction of a mileage track calculating apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a computer-readable storage medium provided according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a mileage track calculating method, as shown in fig. 1, the method comprises the following steps:
step S101: obtaining a mileage track to be calculated, and dividing the mileage track to be calculated according to a preset threshold value to obtain a plurality of mileage sub-tracks to be calculated corresponding to the mileage track information to be calculated. The driver needs to accurately calculate the traveled mileage in the travel service process. Specifically, a mileage track to be calculated is obtained first, and then the mileage track to be calculated is divided into mileage segments with minimum granularity, so that a plurality of mileage sub-tracks to be calculated are obtained. The division is performed according to a preset threshold, and specifically, a corresponding threshold is configured according to an actual service requirement. For example, the mileage track to be calculated is divided into every 8 meters, that is, the length of each obtained mileage sub-track to be calculated is 8 meters, or the preset threshold value can be determined according to the signal intensity of the positioning system, and the mileage track to be calculated is divided into the mileage tracks to be calculated with the signal intensity of the positioning system in the same signal intensity range.
Step S102: and for each mileage sub-track to be calculated, obtaining a straight line track formed between the starting point and the end point according to the starting point position information and the end point position information of the sub-track. Specifically, as shown in fig. 2, the curve AB is a sub-track of the mileage to be calculated, and the start point a and the end point B of the sub-track can be obtained according to the start point position information and the end point position information of the sub-track, and further, the corresponding linear track AB can be obtained. The starting point position information and the end point position information comprise longitude and latitude information corresponding to the starting point and longitude and latitude information corresponding to the end point, which are obtained according to the positioning system, and the corresponding position points can be determined according to the longitude and latitude.
Step S103: and making a perpendicular line from each track point in the to-be-calculated mileage sub-track to the straight line track to obtain the maximum perpendicular line distance. Specifically, as shown in fig. 2, each point on the trajectory curve AB is perpendicular to the straight line AB, and the perpendicular distances Hmax, H1max, and the like are obtained, and the maximum perpendicular distance Hmax can be obtained through comparison.
Step S104: and when the maximum perpendicular distance is smaller than a preset distance threshold, taking the straight-line track corresponding to the mileage sub-track to be calculated as a theoretical sub-track of the mileage sub-track to be calculated. Specifically, a distance threshold (n) is configured in advance according to actual service requirements, then the obtained maximum perpendicular distance is compared with the distance threshold, when the maximum perpendicular distance is smaller than the preset distance threshold (Hmax < n), all track points between the mileage sub-track to be calculated and the track point corresponding to the maximum perpendicular distance are discarded, and the straight-line track corresponding to the mileage sub-track to be calculated is used as the theoretical sub-track of the mileage sub-track to be calculated. Specifically, when the stronger the signal of the positioning system is, the more accurate the positioning of the mileage track point is, and the lower the possibility that the positioned mileage track point has drifted is, the smaller the preset distance threshold can be set at this time, so that only a small part of the track points are discarded by setting the smaller preset distance threshold; on the contrary, when the positioning system signal is weak, the positioning accuracy of the mileage track point is low, and the possibility that the positioned mileage track point has drifting is high, a large preset distance threshold value can be set at the moment, so that the originally obtained mileage sub-track to be calculated is optimized to the maximum extent by setting the large preset distance threshold value, and the accuracy of the subsequent mileage calculation result is improved.
In an embodiment, as shown in fig. 2, when the distance of the perpendicular CE corresponding to the track point C, i.e. the maximum perpendicular distance Hmax < n, the straight-line track AB corresponding to the track curve AB is taken as the theoretical sub-track of the curve AB.
Step S105: and when the maximum perpendicular distance is larger than or equal to the preset distance threshold value, reserving track points corresponding to the maximum perpendicular distance and dividing the mileage sub-track to be calculated again by taking the track points as dividing points. Specifically, when the maximum perpendicular distance is greater than or equal to the distance threshold (Hmax is greater than or equal to n), the track point corresponding to the maximum perpendicular distance is reserved, and then the track point is used as a dividing point to divide the mileage sub-track to be calculated.
In an embodiment, as shown in fig. 2, when the distance of the perpendicular CE corresponding to the track point C, i.e. the maximum perpendicular distance Hmax is greater than or equal to n, the track point C is retained, and the track curve AB is divided into the tracks AC and CB by using the track point as a dividing point.
Step S106: and for the sub-tracks obtained after division, repeating the steps from the step of obtaining the linear track formed between the starting point and the end point according to the starting point position information and the end point position information of the sub-tracks to the step of reserving the track point corresponding to the maximum perpendicular distance and dividing the sub-tracks again by taking the track point as a dividing point when the maximum perpendicular distance is greater than or equal to the preset distance threshold until the maximum perpendicular distance corresponding to the divided sub-tracks is less than the preset distance threshold and obtaining the theoretical sub-tracks corresponding to each mileage sub-track to be calculated. Specifically, as shown in fig. 2, the steps from step S102 to step S105 are respectively repeated for the divided tracks AC and CB, until the theoretical sub-track corresponding to each mileage sub-track to be calculated is obtained when the maximum perpendicular distance corresponding to each divided track segment is smaller than the distance threshold. For example, the steps from step S102 to step S105 are repeated for the trajectory AC to obtain the maximum vertical line (FG) distance H2max, and when H2max < n, the straight trajectory AC corresponding to the trajectory curve AC is used as the theoretical sub-trajectory of the curved trajectory AC; when the H2max is larger than or equal to n, keeping a track point F corresponding to the maximum perpendicular distance H2max, continuously dividing the track AC by taking the track point F as a dividing point, and repeating the steps from the step S102 to the step S105 on the divided track until the maximum perpendicular distance corresponding to each divided track is smaller than a distance threshold value. The processing of the trace CB is the same as that of the trace AC, and the data volume to be processed is reduced by the processing method.
Step S107: and determining a target actual driving route corresponding to each theoretical sub-track in the map according to the obtained position of the theoretical sub-track corresponding to each mileage sub-track to be calculated in the map. Specifically, the position of a theoretical sub-track corresponding to each acquired mileage sub-track to be calculated in a map is determined, and then a target actual driving route corresponding to the theoretical sub-track is determined. The actual mileage is calculated by matching with the actual route, and the mileage calculation error caused by various factors can be reduced.
In an embodiment, as shown in fig. 3, all track points from track point C to track point D are positions of a theoretical sub-track corresponding to a mileage sub-track to be calculated in a map, and the route A, B is a target actual drivable route determined in the map.
Step S108: and summing the target actual drivable paths corresponding to all the mileage sub-tracks to be calculated to obtain the actual mileage corresponding to the mileage track to be calculated. Specifically, when a target actual driving route corresponding to any one of the mileage sub-tracks to be calculated is obtained, first, a corresponding mileage is calculated:
wherein L isiThe mileage representing an actual drivable route of any one of the targets; w represents the number of target actual travelable routes; z is a radical ofiAnd representing the mileage corresponding to any mileage sub-track to be calculated.
And then summing sigma z on target actual drivable paths corresponding to all the mile sub-tracks to be calculatedi。
In an embodiment, as shown in fig. 3, the mileage corresponding to the target actual driving route A, B is summed to obtain the actual mileage z corresponding to the mileage track to be calculatedA+BWherein z isARepresents the mileage of route a; z is a radical ofBIndicating the mileage of route B.
According to the mileage track calculation method provided by the embodiment of the invention, the data volume to be processed is reduced by adopting a vertical distance threshold processing method; the actual mileage is calculated by matching with the actual route, so that the mileage calculation error caused by various factors is reduced, and the continuous development of the mileage calculation platform is promoted.
As an optional implementation manner of the embodiment of the present invention, the acquiring a mileage track to be calculated includes: inquiring mileage track point information in a corresponding time range in a preset database according to the mileage counting time requirement; and determining the corresponding mileage track to be calculated according to the mileage track point information. Specifically, after uploading corresponding location point information to a preset database (such as an hbase database), a vehicle driver can search the corresponding location point information according to a time range, so that when calculating track mileage, the vehicle driver can inquire in the preset database according to mileage statistics duration requirements to obtain the corresponding location point information within the duration range, and then can determine a corresponding mileage track within the duration range according to the location point information.
As an optional implementation manner of the embodiment of the present invention, step S107 includes: inquiring and acquiring an actual drivable route with the starting point position information and the end point position information of a theoretical sub-track corresponding to each mileage sub-track to be calculated consistent by using map software; calculating the deviation degree of a theoretical sub-track corresponding to any mileage sub-track to be calculated and each corresponding actual driving route; comparing the deviation degree with a preset deviation threshold value; and taking the actual drivable route with the deviation degree smaller than the preset deviation threshold value as a corresponding target actual drivable route through which any one of the mileage sub-tracks to be calculated passes.
Specifically, first, an actual travelable route in which the start-point position information of the theoretical sub-trajectory corresponding to each of the mileage sub-trajectories to be calculated coincides with the end-point position information may be queried using map software (such as a high-grade map or the like). For example, as shown in fig. 3, all track points from the track point C to the track point D are theoretical sub-tracks corresponding to a mileage sub-track to be calculated, and an actual travelable route consistent with the starting point position C and the ending point position D is searched on a high-grade map, and includes A, B, C three routes, that is, the actual travelable route includes a1 → a2, B1 → B2 or a1 → a2, B1 → C1, C1 → B2.
And then, calculating the deviation degree of the corresponding theoretical sub-track and each actual driving route for any mileage sub-track to be calculated. Specifically, the Fourier distance between the theoretical sub-trajectory and each actual travelable route is calculated, and the corresponding deviation degree is recorded as d1。
Finally, the Freusch distance is compared with a preset maximum threshold (h, unit meter, generally about 60) of deviation of the locus point from the route acceptable by the milestone locus to be calculated, and when d is greater than the threshold1<And h, reserving the corresponding actual drivable route, and taking the actual drivable route as the target actual drivable route through which the mileage sub-track to be calculated passes.
In one embodiment, the respective frecker distances between the theoretical sub-trajectory (trajectory point C to trajectory point D) and the actual travelable route A, B, C are calculated, and by comparison, the target actual travelable route through which the mileage sub-trajectory to be calculated passes includes route a and route B.
As an optional implementation manner of the embodiment of the present invention, after step S108, the method further includes: and when the mileage track to be calculated comprises a plurality of mileage tracks, summing the actual mileage corresponding to the mileage track to be calculated according to the received statistical instruction. Specifically, when a plurality of mileage tracks to be calculated exist, the actual mileage corresponding to the mileage track to be calculated is summed according to the statistical instruction. The statistical instruction may include statistics of actual mileage in different time periods, or actual mileage in any one of multiple different time periods, and the like.
In one embodiment, a is calculated1:09:00-10:10;a2Actual mileage in two time periods of 10:11-12: 00. First calculate a1Mileage Σ z of the target actual drivable path corresponding to the time zone1And a2Mileage Σ z of the target actual drivable path corresponding to the time zone2Then summing up to obtain the actual mileage sigma z within the corresponding time period of 09:00-12:001+∑z2。
An embodiment of the present invention further provides a mileage track calculating device, as shown in fig. 4, the device includes:
the acquiring module 401 is configured to acquire a mileage track to be calculated and divide the mileage track to be calculated according to a preset threshold to obtain a plurality of mileage sub-tracks to be calculated corresponding to the mileage track information to be calculated; for details, refer to the related description of step S101 in the above method embodiment.
A first determining module 402, configured to, for each mileage sub-track to be calculated, obtain, according to start point position information and end point position information of the sub-track, a straight-line track formed between a start point and an end point; for details, refer to the related description of step S102 in the above method embodiment.
The processing module 403 is configured to make a perpendicular line from each track point in the to-be-calculated mileage sub-track to the straight-line track, so as to obtain a maximum perpendicular distance; for details, refer to the related description of step S103 in the above method embodiment.
A second determining module 404, configured to, when the maximum perpendicular distance is smaller than a preset distance threshold, take a straight-line trajectory corresponding to the to-be-calculated mileage sub-trajectory as a theoretical sub-trajectory of the to-be-calculated mileage sub-trajectory; for details, refer to the related description of step S104 in the above method embodiment.
The dividing module 405 is configured to, when the maximum perpendicular distance is greater than or equal to the preset distance threshold, reserve a track point corresponding to the maximum perpendicular distance and divide the to-be-calculated mileage sub-track again by using the track point as a dividing point; for details, refer to the related description of step S105 in the above method embodiment.
A repeated processing module 406, configured to, for the sub-tracks obtained after the division, repeat the step of obtaining a straight-line track formed between the start point and the end point according to the start point position information and the end point position information of the sub-tracks to the step of, when the maximum perpendicular distance is greater than or equal to the preset distance threshold, reserving a track point corresponding to the maximum perpendicular distance and dividing the sub-tracks again by using the track point as a dividing point, until the maximum perpendicular distance corresponding to the divided sub-tracks is less than the preset distance threshold and obtaining a theoretical sub-track corresponding to each mileage sub-track to be calculated; for details, refer to the related description of step S106 in the above method embodiment.
A third determining module 407, configured to determine, according to the obtained position of the theoretical sub-trajectory in the map, corresponding to each mileage sub-trajectory to be calculated, a target actual drivable route corresponding to the theoretical sub-trajectory in the map; for details, refer to the related description of step S107 in the above method embodiment.
The calculating module 408 is configured to sum the target actual drivable paths corresponding to all the mileage sub-trajectories to be calculated to obtain actual mileage corresponding to the mileage trajectories to be calculated; for details, refer to the related description of step S108 in the above method embodiment.
According to the mileage track calculating device provided by the embodiment of the invention, the data volume to be processed is reduced by adopting a vertical distance threshold processing method; the actual mileage is calculated by matching with the actual route, so that the mileage calculation error caused by various factors is reduced, and the continuous development of the mileage calculation platform is promoted.
As an optional implementation manner of the embodiment of the present invention, the apparatus further includes: the query module is used for querying mileage track point information in a corresponding time range in a preset database according to mileage statistics duration requirements; and the fourth determining module is used for determining the corresponding mileage track to be calculated according to the mileage track point information.
As an optional implementation manner of the embodiment of the present invention, the apparatus further includes: the first acquisition module is used for inquiring and acquiring an actual drivable route, corresponding to each mileage sub-track to be calculated, of which the starting point position information is consistent with the end point position information, by using map software; the first calculation module is used for calculating the deviation degree of a theoretical sub-track corresponding to any mileage sub-track to be calculated and each actual driving route corresponding to the theoretical sub-track; the comparison module is used for comparing the deviation degree with a preset deviation threshold value; and a fifth determining module, configured to take the actual travelable route with the deviation degree smaller than the preset deviation threshold as the corresponding target actual travelable route through which the any one of the mileage sub-tracks to be calculated passes.
As an optional implementation manner of the embodiment of the present invention, the apparatus further includes: and the second calculation module is used for summing the actual mileage corresponding to the mileage track to be calculated according to the received statistical instruction when the mileage track to be calculated comprises a plurality of mileage tracks.
The functional description of the mileage track calculating device provided by the embodiment of the invention refers to the description of the mileage track calculating method in the above embodiment in detail.
An embodiment of the present invention further provides a storage medium, as shown in fig. 5, on which a computer program 501 is stored, and when the instructions are executed by a processor, the steps of the mileage trajectory calculation method in the foregoing embodiment are implemented. The storage medium is also stored with audio and video stream data, characteristic frame data, an interactive request signaling, encrypted data, preset data size and the like. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, the electronic device may include a processor 61 and a memory 62, where the processor 61 and the memory 62 may be connected by a bus or in another manner, and fig. 6 illustrates the connection by the bus as an example.
The processor 61 may be a Central Processing Unit (CPU). The Processor 61 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 62, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the corresponding program instructions/modules in the embodiments of the present invention. The processor 61 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 62, that is, implements the mileage trace calculation method in the above method embodiment.
The memory 62 may include a storage program area and a storage data area, wherein the storage program area may store an application program required for operating the device, at least one function; the storage data area may store data created by the processor 61, and the like. Further, the memory 62 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 62 may optionally include memory located remotely from the processor 61, and these remote memories may be connected to the processor 61 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 62 and, when executed by the processor 61, perform a mileage trajectory calculation method as in the embodiment shown in fig. 1-3.
The details of the electronic device may be understood by referring to the corresponding descriptions and effects in the embodiments shown in fig. 1 to fig. 3, and are not described herein again.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims (10)
1. A mileage track calculation method is characterized by comprising the following steps:
acquiring a mileage track to be calculated and dividing the mileage track to be calculated according to a preset threshold value to obtain a plurality of mileage sub-tracks to be calculated corresponding to the mileage track information to be calculated;
for each mileage sub-track to be calculated, obtaining a straight line track formed between a starting point and an end point according to the starting point position information and the end point position information of the sub-track;
making a perpendicular line from each track point in the to-be-calculated mile sub-track to the straight-line track to obtain a maximum perpendicular distance;
when the maximum perpendicular distance is smaller than a preset distance threshold, taking a straight line track corresponding to the mileage sub-track to be calculated as a theoretical sub-track of the mileage sub-track to be calculated;
when the maximum perpendicular distance is larger than or equal to the preset distance threshold, keeping track points corresponding to the maximum perpendicular distance, and dividing the mileage sub-track to be calculated again by taking the track points as dividing points;
for the sub-tracks obtained after division, repeating the step of obtaining a straight-line track formed between the starting point and the end point according to the starting point position information and the end point position information of the sub-tracks to the step of reserving a track point corresponding to the maximum perpendicular distance and dividing the sub-tracks again by taking the track point as a dividing point when the maximum perpendicular distance is greater than or equal to the preset distance threshold until the maximum perpendicular distance corresponding to the divided sub-tracks is less than the preset distance threshold and obtaining a theoretical sub-track corresponding to each mileage sub-track to be calculated;
determining a target actual drivable route corresponding to each theoretical sub-track in a map according to the obtained position of the theoretical sub-track corresponding to each mileage sub-track to be calculated in the map;
and summing the target actual drivable paths corresponding to all the mileage sub-tracks to be calculated to obtain the actual mileage corresponding to the mileage track to be calculated.
2. The method of claim 1, wherein the obtaining the mileage track to be calculated comprises:
inquiring mileage track point information in a corresponding time range in a preset database according to the mileage statistics duration requirement;
and determining the corresponding mileage track to be calculated according to the mileage track point information.
3. The method according to claim 1, wherein the determining, in the map, the target actual drivable path corresponding to the theoretical sub-trajectory according to the obtained position of the theoretical sub-trajectory corresponding to each mileage sub-trajectory to be calculated in the map comprises:
inquiring and acquiring an actual drivable route with the starting point position information and the end point position information of a theoretical sub-track corresponding to each mileage sub-track to be calculated consistent by using map software;
calculating the deviation degree of a theoretical sub-track corresponding to any mileage sub-track to be calculated and each corresponding actual driving route;
comparing the deviation degree with a preset deviation threshold value;
and taking the actual drivable route with the deviation degree smaller than the preset deviation threshold value as a corresponding target actual drivable route through which any one of the mileage sub-tracks to be calculated passes.
4. The method according to claim 2, wherein after summing the target actual travelable routes corresponding to all the mileage sub-tracks to be calculated to obtain the actual mileage corresponding to the mileage track to be calculated, the method further comprises:
and when the mileage track to be calculated comprises a plurality of mileage tracks, summing the actual mileage corresponding to the mileage track to be calculated according to the received statistical instruction.
5. A mileage trajectory calculating device comprising:
the acquiring module is used for acquiring the mileage track to be calculated and dividing the mileage track to be calculated according to a preset threshold value to obtain a plurality of mileage sub-tracks to be calculated corresponding to the mileage track information to be calculated;
the first determining module is used for obtaining a linear track formed between a starting point and an end point according to the starting point position information and the end point position information of each mileage sub-track to be calculated;
the processing module is used for making a perpendicular line from each track point in the to-be-calculated mileage sub-track to the straight-line track to obtain the maximum perpendicular distance;
the second determining module is used for taking the linear track corresponding to the mileage sub-track to be calculated as a theoretical sub-track of the mileage sub-track to be calculated when the maximum perpendicular distance is smaller than a preset distance threshold;
the dividing module is used for reserving track points corresponding to the maximum perpendicular distance and dividing the to-be-calculated mileage sub-track again by taking the track points as dividing points when the maximum perpendicular distance is larger than or equal to the preset distance threshold;
the repeated processing module is used for repeating the step of obtaining a straight line track formed between a starting point and an end point according to the starting point position information and the end point position information of the sub-track to the step of obtaining the straight line track formed between the starting point and the end point according to the divided sub-track until the maximum perpendicular distance is larger than or equal to the preset distance threshold, reserving a track point corresponding to the maximum perpendicular distance and dividing the sub-track again by taking the track point as a dividing point until the maximum perpendicular distance corresponding to the divided sub-track is smaller than the preset distance threshold and obtaining a theoretical sub-track corresponding to each mileage sub-track to be calculated;
the third determining module is used for determining a target actual drivable route corresponding to each theoretical sub-track in the map according to the position of the theoretical sub-track corresponding to each mileage sub-track to be calculated in the map;
and the calculation module is used for summing the target actual drivable routes corresponding to all the mileage sub-tracks to be calculated to obtain the actual mileage corresponding to the mileage track to be calculated.
6. The apparatus of claim 5, further comprising:
the query module is used for querying mileage track point information in a corresponding time range in a preset database according to the mileage statistics duration requirement;
and the fourth determining module is used for determining the corresponding mileage track to be calculated according to the mileage track point information.
7. The apparatus of claim 5, further comprising:
the first acquisition module is used for inquiring and acquiring an actual drivable route, corresponding to each mileage sub-track to be calculated, of which the starting point position information is consistent with the end point position information, by using map software;
the first calculation module is used for calculating the deviation degree of a theoretical sub-track corresponding to any mileage sub-track to be calculated and each actual driving route corresponding to the theoretical sub-track;
the comparison module is used for comparing the deviation degree with a preset deviation threshold value;
and the fifth determining module is used for taking the actual drivable path with the deviation degree smaller than the preset deviation threshold value as the corresponding target actual drivable path through which any one of the mileage sub-tracks to be calculated passes.
8. The apparatus of claim 6, further comprising:
and the second calculation module is used for summing the actual mileage corresponding to the mileage track to be calculated according to the received statistical instruction when the mileage track to be calculated comprises a plurality of mileage tracks.
9. A computer-readable storage medium storing computer instructions for causing a computer to perform the mileage trajectory calculation method according to any one of claims 1 to 4.
10. An electronic device, comprising: a memory and a processor, the memory and the processor being communicatively coupled, the memory storing computer instructions, the processor executing the computer instructions to perform the mileage trajectory calculation method of any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210401295.8A CN114705214B (en) | 2022-04-15 | 2022-04-15 | Mileage track calculation method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210401295.8A CN114705214B (en) | 2022-04-15 | 2022-04-15 | Mileage track calculation method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114705214A true CN114705214A (en) | 2022-07-05 |
CN114705214B CN114705214B (en) | 2023-05-23 |
Family
ID=82175315
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210401295.8A Active CN114705214B (en) | 2022-04-15 | 2022-04-15 | Mileage track calculation method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114705214B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117553777A (en) * | 2024-01-12 | 2024-02-13 | 航天宏图信息技术股份有限公司 | Intelligent sparse and dense curve discrete folding line method, device and equipment for high-precision navigation chart |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150262397A1 (en) * | 2014-03-14 | 2015-09-17 | Under Armour, Inc. | System and method for generating a map from activity data |
US20160377441A1 (en) * | 2015-06-23 | 2016-12-29 | International Business Machines Corporation | Quantifying anomalous behavior by identifying anomalies at subtrajectories |
US20170219360A1 (en) * | 2016-01-28 | 2017-08-03 | Uber Technologies, Inc. | Simplifying gps data for map building and distance calculation |
CN107818131A (en) * | 2017-09-20 | 2018-03-20 | 上海保橙网络科技有限公司 | A kind of method for comparing travel paths using string of binary characters |
US10706605B1 (en) * | 2018-11-30 | 2020-07-07 | BlueOwl, LLC | Vehicular telematic systems and methods for generating interactive animated guided user interfaces |
US20200309535A1 (en) * | 2019-03-29 | 2020-10-01 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, device, server and medium for determining quality of trajectory-matching data |
CN111966729A (en) * | 2020-08-27 | 2020-11-20 | 平安国际智慧城市科技股份有限公司 | Vehicle track data processing method, device, equipment and storage medium |
CN112732857A (en) * | 2021-01-20 | 2021-04-30 | 腾讯科技(深圳)有限公司 | Road network processing method, road network processing device, electronic equipment and storage medium |
CN112748451A (en) * | 2021-01-26 | 2021-05-04 | 腾讯科技(深圳)有限公司 | Track processing method and device, electronic equipment and medium |
CN113312361A (en) * | 2021-07-28 | 2021-08-27 | 阿里云计算有限公司 | Track query method, device, equipment, storage medium and computer program product |
CN113330404A (en) * | 2019-04-16 | 2021-08-31 | 深圳市柔宇科技股份有限公司 | Method for selecting sub-tracks, electronic device and computer-readable storage medium |
CN113326257A (en) * | 2020-04-30 | 2021-08-31 | 阿里巴巴集团控股有限公司 | Index construction method, recommendation method, device, electronic equipment and computer storage medium |
US20210333302A1 (en) * | 2020-12-21 | 2021-10-28 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method and apparatus for processing trajectory, roadside device and cloud control platform |
CN113587945A (en) * | 2021-06-28 | 2021-11-02 | 深圳市跨越新科技有限公司 | Vehicle driving route correction method and system under condition of road network data missing |
-
2022
- 2022-04-15 CN CN202210401295.8A patent/CN114705214B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150262397A1 (en) * | 2014-03-14 | 2015-09-17 | Under Armour, Inc. | System and method for generating a map from activity data |
US20160377441A1 (en) * | 2015-06-23 | 2016-12-29 | International Business Machines Corporation | Quantifying anomalous behavior by identifying anomalies at subtrajectories |
US20170219360A1 (en) * | 2016-01-28 | 2017-08-03 | Uber Technologies, Inc. | Simplifying gps data for map building and distance calculation |
CN107818131A (en) * | 2017-09-20 | 2018-03-20 | 上海保橙网络科技有限公司 | A kind of method for comparing travel paths using string of binary characters |
US10706605B1 (en) * | 2018-11-30 | 2020-07-07 | BlueOwl, LLC | Vehicular telematic systems and methods for generating interactive animated guided user interfaces |
US20200309535A1 (en) * | 2019-03-29 | 2020-10-01 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, device, server and medium for determining quality of trajectory-matching data |
CN113330404A (en) * | 2019-04-16 | 2021-08-31 | 深圳市柔宇科技股份有限公司 | Method for selecting sub-tracks, electronic device and computer-readable storage medium |
CN113326257A (en) * | 2020-04-30 | 2021-08-31 | 阿里巴巴集团控股有限公司 | Index construction method, recommendation method, device, electronic equipment and computer storage medium |
CN111966729A (en) * | 2020-08-27 | 2020-11-20 | 平安国际智慧城市科技股份有限公司 | Vehicle track data processing method, device, equipment and storage medium |
US20210333302A1 (en) * | 2020-12-21 | 2021-10-28 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method and apparatus for processing trajectory, roadside device and cloud control platform |
CN112732857A (en) * | 2021-01-20 | 2021-04-30 | 腾讯科技(深圳)有限公司 | Road network processing method, road network processing device, electronic equipment and storage medium |
CN112748451A (en) * | 2021-01-26 | 2021-05-04 | 腾讯科技(深圳)有限公司 | Track processing method and device, electronic equipment and medium |
CN113587945A (en) * | 2021-06-28 | 2021-11-02 | 深圳市跨越新科技有限公司 | Vehicle driving route correction method and system under condition of road network data missing |
CN113312361A (en) * | 2021-07-28 | 2021-08-27 | 阿里云计算有限公司 | Track query method, device, equipment, storage medium and computer program product |
Non-Patent Citations (1)
Title |
---|
裴剑等: "一种基于LCSS的相似车辆轨迹查找方法", 《小型微型计算机系统》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117553777A (en) * | 2024-01-12 | 2024-02-13 | 航天宏图信息技术股份有限公司 | Intelligent sparse and dense curve discrete folding line method, device and equipment for high-precision navigation chart |
CN117553777B (en) * | 2024-01-12 | 2024-04-05 | 航天宏图信息技术股份有限公司 | Intelligent sparse and dense curve discrete folding line method, device and equipment for high-precision navigation chart |
Also Published As
Publication number | Publication date |
---|---|
CN114705214B (en) | 2023-05-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109300312B (en) | Road condition analysis method and system based on vehicle big data | |
CN110579219B (en) | Track data processing method and device, storage medium and computer equipment | |
CN106840175B (en) | Method and device for matching vehicle running track with road network | |
CN111737377B (en) | Method and device for identifying drift trajectory, computing equipment and storage medium | |
CN106767851B (en) | The collected tracing point of positioning system is matched to the method and device thereof of map | |
CN108731691B (en) | Method and device for determining yaw point of navigation equipment | |
CN113587944B (en) | Quasi-real-time vehicle driving route generation method, system and equipment | |
CN113553482B (en) | Stay point identification and trip chain construction system, algorithm, equipment and storage medium | |
CN109841078B (en) | Navigation data processing method and device and storage medium | |
CN105096590B (en) | Traffic information creating method and traffic information generating device | |
EP3023740A2 (en) | Method, apparatus and computer program product for route matching | |
CN111060112A (en) | Vehicle track map matching method and system based on direction angle | |
CN114705214A (en) | Mileage track calculation method and device, storage medium and electronic equipment | |
CN108269400B (en) | Main trunk signal control intersection delay estimation method and device | |
CN110675631A (en) | Traffic flow traceability analysis method and system | |
CN114360240A (en) | High-precision positioning method based on vehicle networking track characteristics | |
CN104515528A (en) | Single-point map matching method based on road section accumulation probability | |
CN116481560B (en) | Vehicle driving mileage calculation method, device, terminal and storage medium | |
CN112633812A (en) | Track segmentation method, device, equipment and storage medium for freight vehicle | |
CN112562334A (en) | Method, device and medium for calculating real-time speed of curved road section based on floating car data | |
CN116793378A (en) | Tunnel detection method and device, electronic equipment and storage medium | |
CN108376415B (en) | Track filling method and device | |
CN115683154A (en) | Method, device and equipment for calculating vehicle mileage | |
CN114234975A (en) | Low-frequency real-time track matching method, system, computer device and storage medium | |
CN115817496A (en) | Road slope analysis method, device and equipment based on multi-source track fitting |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 100102 H02, 3 / F, building 6-2-4, yard 6, Wangjing East Road, Chaoyang District, Beijing Applicant after: Beijing Longju Yixing Technology Co.,Ltd. Address before: 100102 H02, 3 / F, building 6-2-4, yard 6, Wangjing East Road, Chaoyang District, Beijing Applicant before: Beijing Longju Driving Service Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |