A method, device and equipment for calculating vehicle mileage
By fitting the curve to the vehicle trajectory data and splitting the trajectory to calculate the mileage, the problem of inaccurate vehicle mileage statistics in the prior art is solved, and more efficient and accurate mileage calculation is achieved.
Patent Information
- Application Number
- CN202211405871.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-10
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-11-10
AI Technical Summary
The existing vehicle mileage calculation methods have problems such as high workload, poor flexibility and inaccurate statistics in enterprises that manage a large number of vehicles.
By obtaining the vehicle's trajectory data, fit the driving trajectory curve, calculate the curvature, and split the trajectory when the curvature exceeds the threshold, calculate the split trajectory distance, and accumulate the driving mileage.
It improves the accuracy and efficiency of vehicle mileage calculations and reduces the statistical burden on users.
Smart Images

Figure CN115683154B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicle mileage calculation, and particularly to a method, device, and equipment for calculating vehicle mileage. Background Art
[0002] With the continuous development of the automotive industry, more and more intelligent connected vehicles have entered people's daily life travel. Currently, the main source of vehicle mileage statistics is still the vehicle odometer. For enterprises that need to manage a large number of vehicles, such as logistics companies and vehicle rental companies, using the odometer to count mileage has problems such as large workload, poor flexibility, and inaccurate statistics. Summary of the Invention
[0003] Embodiments of this specification provide a method, device, and equipment for calculating vehicle mileage to solve the problem of inaccurate statistics in existing vehicle mileage calculation methods.
[0004] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0005] A method for calculating vehicle mileage provided by an embodiment of this specification, characterized by including:
[0006] Obtain the trajectory data of the vehicle;
[0007] Fit the trajectory data of the vehicle to obtain the driving trajectory fitting curve of the vehicle;
[0008] Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve;
[0009] If the curvature of the driving trajectory is greater than a preset curvature threshold, split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; N represents an integer greater than 0;
[0010] Calculate the distances of the N split trajectories;
[0011] Accumulate the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory.
[0012] A device for calculating vehicle mileage provided by an embodiment of this specification, characterized by including:
[0013] An information acquisition module for obtaining the trajectory data of the vehicle;
[0014] A processing module for fitting the trajectory data of the vehicle to obtain the driving trajectory fitting curve of the vehicle;
[0015] Calculate the curvature of the fitted curve of the driving trajectory according to the fitted curve of the driving trajectory;
[0016] If the curvature of the driving trajectory is greater than a preset curvature threshold, split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; N represents an integer greater than 0;
[0017] Calculate the distances of the N split trajectories;
[0018] A driving mileage acquisition module for accumulating the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory.
[0019] A vehicle mileage calculation device provided by an embodiment of this specification, characterized in that it may include:
[0020] At least one processor; and,
[0021] A memory communicatively connected to the at least one processor; wherein,
[0022] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0023] Obtain the trajectory data of the vehicle;
[0024] Fit the trajectory data of the vehicle to obtain the fitted curve of the driving trajectory of the vehicle;
[0025] Calculate the curvature of the fitted curve of the driving trajectory according to the fitted curve of the driving trajectory;
[0026] If the curvature of the driving trajectory is greater than a preset curvature threshold, split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; N represents an integer greater than 0;
[0027] Calculate the distances of the N split trajectories;
[0028] Accumulate the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory.
[0029] At least one embodiment in this specification can achieve the following beneficial effects: By obtaining the trajectory data of a vehicle; fitting the trajectory data of the vehicle to obtain a fitted curve of the driving trajectory of the vehicle; calculating the curvature of the fitted curve of the driving trajectory according to the fitted curve of the driving trajectory; if the curvature of the driving trajectory is greater than a preset curvature threshold, splitting the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; calculating the distances of the N split trajectories; performing an accumulation process on the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory. This makes the finally obtained driving mileage data more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0031] Figure 1 It is a schematic diagram of the system architecture corresponding to a method for calculating vehicle mileage provided by an embodiment of this specification;
[0032] Figure 2 It is a schematic flowchart of a method for calculating vehicle mileage provided by an embodiment of this specification;
[0033] Figure 3 It is a swimlane diagram of a method for calculating vehicle mileage provided by an embodiment of this specification;
[0034] Figure 4 It is a schematic diagram of the structure of a device for calculating vehicle mileage provided by an embodiment of this specification;
[0035] Figure 5 It is a schematic diagram of the structure of a device for calculating vehicle mileage provided by an embodiment of this specification. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the following will clearly and completely describe the technical solutions of one or more embodiments of this specification in conjunction with the specific embodiments and corresponding drawings of this specification. Obviously, the described embodiments are only some, rather than all, of the embodiments of this specification. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of one or more embodiments of this specification.
[0037] The following will, in conjunction with the accompanying drawings, elaborate in detail on the technical solutions provided by each embodiment of this specification.
[0038] In the prior art, the main source of vehicle mileage statistics is still the vehicle odometer. For enterprises that need to manage a large number of vehicles, such as logistics companies and vehicle rental companies, using the odometer to count mileage has problems such as heavy workload, poor flexibility, and inaccurate statistics.
[0039] To solve the defects in the prior art, the following embodiments are given in this solution:
[0040] Figure 1 It is a schematic diagram of the system architecture corresponding to a method for calculating vehicle mileage in an embodiment of this specification. As Figure 1 shown, this solution mainly includes: an in-vehicle intelligent terminal 1, an in-vehicle network card 2, and a server 3. In practical applications, the in-vehicle intelligent terminal 1 can collect the trajectory data of the vehicle and upload the data to the server 3 through the in-vehicle network card 2. The server 3 calculates the mileage of the vehicle based on the received vehicle trajectory data and stores the calculated mileage in the mileage record item of the database for easy viewing and statistics. The server 3 can also feedback the vehicle mileage to the in-vehicle intelligent terminal 1 through the in-vehicle network card 2, so that the driver can directly view the mileage traveled by the vehicle.
[0041] Next, a method for calculating vehicle mileage provided in the embodiments of the specification will be specifically described in conjunction with the accompanying drawings:
[0042] Figure 2 It is a schematic flowchart of a method for calculating vehicle mileage provided in an embodiment of this specification. From a program perspective, the execution subject of the process can be a program or an application client running on an application server.
[0043] As Figure 2 shown, this process can include the following steps:
[0044] Step 202: Obtain the trajectory data of the vehicle.
[0045] In the embodiments of this specification, the trajectory data of the vehicle can be collected by the in-vehicle intelligent terminal, and the server can obtain the trajectory data of the vehicle through the in-vehicle network card. Among them, the in-vehicle intelligent terminal is composed of multiple parts such as a positioning module, a wireless communication transmission module, a CPU processor, a real-time clock module, a networking module, a data reporting module, and a data storage module, which is convenient for data collection, storage, and processing.
[0046] Step 204: Fit the trajectory data of the vehicle to obtain the fitted curve of the vehicle's driving trajectory.
[0047] In the embodiments of this specification, multiple trajectory data uploaded by a vehicle can be obtained. The obtained multiple trajectory data uploaded by the vehicle can be fitted according to a polynomial curve fitting function to obtain a fitting curve after fitting the multiple trajectory data. This fitting curve can be understood as the trajectory curve of the driving trajectory corresponding to the multiple trajectory data in a rectangular coordinate system.
[0048] Step 206: Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve.
[0049] In the embodiments of this specification, the existing curvature calculation formula can be used to calculate the curvature of the fitting curve to obtain the curvature of the fitting curve, that is, the curvature of the driving trajectory.
[0050] Step 208: If the curvature of the driving trajectory is greater than a preset curvature threshold, split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; N represents an integer greater than 0.
[0051] In the embodiments of this specification, a curvature threshold can be preset to facilitate the calculation of the vehicle mileage. If the calculated curvature is greater than the preset threshold, the driving trajectory formed by the obtained multiple trajectory data is split to obtain multiple split sub-trajectories, and the curvature corresponding to each sub-trajectory is calculated according to the trajectory data corresponding to each sub-trajectory. If the curvature of some of these sub-trajectories is still greater than the preset threshold, these sub-trajectories greater than the preset threshold can be continued to be split until all the obtained trajectories are less than or equal to the preset threshold. For example: the curvature of the trajectory corresponding to multiple trajectory points of the vehicle obtained is 0.01, and the preset curvature threshold is 0.003, then the trajectory is split to obtain two sub-trajectories. If the curvature of one of the sub-trajectories 1 is 0.004 and the curvature of the other sub-trajectory 2 is 0.0001, then sub-trajectory 1 is continued to be split to obtain two smaller sub-trajectories 3 and sub-trajectory 4, and the curvatures of the two smaller sub-trajectories are both less than 0.003, then the sub-trajectories 2, sub-trajectory 3, and sub-trajectory 4 after the trajectory split can be obtained. This is only a schematic example here, and there is no specific limit on how many are specifically split each time. It can be an average split or a random split.
[0052] Step 210: Calculate the distances of the N split trajectories.
[0053] When the trajectory in the embodiments of this specification is less than or equal to the threshold, each trajectory can be regarded as a trajectory approximately like a straight line, and its degree of bending can be ignored, and then the actual distance corresponding to each trajectory is calculated according to the existing road calculation method. For example: calculate the trajectory distance according to the longitude and latitude of the starting point and the ending point of each trajectory.
[0054] Step 212: Accumulate the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory.
[0055] In the embodiments of the present specification, the distance calculation results of the split trajectories are accumulated to obtain the driving mileage corresponding to the driving trajectory. If the curvature of the trajectory formed by the obtained multiple trajectory data is less than or equal to the preset threshold, the trajectory may not be split, and the distance may be directly calculated to obtain the vehicle driving mileage corresponding to the driving trajectory.
[0056] It should be understood that the order of some steps of the method described in one or more embodiments of the present specification can be interchanged according to actual needs, or some of the steps can also be omitted or deleted.
[0057] Figure 2 In the method, by obtaining the trajectory data of the vehicle; fitting the trajectory data of the vehicle to obtain the fitting curve of the driving trajectory of the vehicle; calculating the curvature of the fitting curve of the driving trajectory according to the fitting curve of the driving trajectory; if the curvature of the driving trajectory is greater than the preset curvature threshold, splitting the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; calculating the distances of the N split trajectories; accumulating the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory. The calculated driving mileage data is made more accurate.
[0058] Based on Figure 2 the method, the embodiments of the present specification also provide some specific implementation schemes of the method, which will be described below.
[0059] Optionally, the trajectory data of the vehicle in the embodiments of the present specification specifically includes at least one of vehicle number data, longitude data and latitude data of the vehicle position, timestamp data, speed data of the vehicle, and driving direction data of the vehicle.
[0060] In the embodiments of this specification, the vehicle number corresponding to each vehicle is unique, and there will be no situation where multiple vehicles correspond to one number. The vehicle number can be regarded as an identification information of a vehicle. The vehicle number can be the license plate number of the vehicle, or a serial number written by the server itself and fed back to the vehicle terminal. There is no specific limitation here, and the corresponding method can be selected to generate the vehicle number. The vehicle can collect the longitude data and latitude data corresponding to the vehicle position according to the positioning module included in the in-vehicle intelligent terminal. The vehicle collects the timestamp data according to the real-time clock included in the intelligent terminal. Among them, the timestamp can be a character sequence that uniquely identifies the time at a certain moment. The timestamp in the embodiments of this specification can be the timestamp of Coordinated Universal Time (UTC) in the eighth time zone. The vehicle can collect the speed of the vehicle itself according to the speed sensor, and the server filters out some abnormal trajectory data according to the speed data uploaded by the vehicle, such as: data with a speed exceeding 200 kilometers per hour, or data with a negative speed. The driving direction can be determined according to the front and rear position information of the vehicle, or can be determined according to the heading angle of the vehicle. The server can determine whether the data uploaded by the vehicle is illegal data according to the driving direction of the vehicle and the allowed driving direction of the lane. In the illegal data, the driving direction of the vehicle is opposite to the lane direction.
[0061] To make the calculated mileage accuracy higher, it lies in obtaining the longitude data and latitude data of the vehicle position described in the embodiments of this specification, which specifically may include:
[0062] Obtain the base station positioning information of the vehicle position;
[0063] Obtain the satellite positioning information of the vehicle position; the satellite positioning information of the vehicle position includes longitude information and latitude information with a first accuracy;
[0064] The positioning system of the vehicle calibrates the satellite positioning information according to the base station positioning information to obtain the longitude information and latitude information with a second accuracy of the vehicle position; the second accuracy is higher than the first accuracy.
[0065] In the embodiments of this specification, the vehicle positioning module can determine the longitude and latitude data of the vehicle position through satellite positioning plus the assistance of a base station. The vehicle positioning module obtains satellite positioning data to obtain the longitude and latitude data with the first accuracy at the current position. The first accuracy can be 5 digits after the decimal point of the longitude and latitude, corresponding to the meter-level accuracy, such as the accuracy of 1 meter or 5 meters. The vehicle positioning module can also obtain the satellite signals received by the base station in real time through the wireless communication network. The positioning module performs real-time joint calculation based on the obtained satellite positioning and base station positioning to obtain the longitude and latitude data with the second accuracy. The second accuracy can be 7 digits after the decimal point of the longitude and latitude, reaching the centimeter-level accuracy, so as to improve the accuracy and precision of calculating the driving mileage. The vehicle positioning module can perform joint calculation according to the Real-time kinematic (RTK) carrier phase differential algorithm. Through RTK, real-time dynamic centimeter-level accuracy positioning can be obtained. Among them, in the RTK operation mode, the base station transmits its observed values and station coordinate information to the positioning module in the vehicle through the data link. The positioning module of the vehicle not only receives data from the base station through the data link, but also collects the observed data of the satellite positioning system, forms differential observed values in the module for real-time processing, and gives centimeter-level positioning results at the same time. The satellite positioning system can be one of various satellite positioning systems such as the Global Positioning System (GPS), the BeiDou Navigation Satellite System (BDS), and the Global Navigation Satellite System (GNSS).
[0066] In order to obtain an accurate vehicle driving trajectory, in the embodiments of this specification, obtaining the trajectory data of the vehicle may specifically include:
[0067] When the vehicle triggers the start state, the vehicle reports vehicle trajectory data at a set frequency.
[0068] In the embodiments of this specification, when the vehicle starts, it can establish a connection with the vehicle networking platform. The vehicle can upload trajectory data according to the established connection relationship. When the vehicle starts, it starts to upload trajectory data to obtain the initial trajectory data of the vehicle, that is, the trajectory data at the starting point, and uploads the trajectory data collected during the driving process at a set frequency. For example: when the vehicle starts, it uploads the trajectory data at the starting point, and then uploads the trajectory data again after an interval of 100 ms, that is, uploads the trajectory data at a frequency of 100 ms / time, or even a higher frequency. Specifically, at what frequency to upload the trajectory data, the user can set the vehicle according to his own needs. Among them, the format of the vehicle trajectory data upload is the json format, which is easy for people to write and read, and at the same time makes it easier for machines to parse and generate, and occupies less space.
[0069] Before fitting the trajectory data of the vehicle to make the fitted curve closer to the driving trajectory curve, the method in the embodiments of this specification may further include:
[0070] Obtain a list of longitude information and a list of latitude information that make up the road;
[0071] Determine the longitude information and latitude information of the lane where the vehicle is located according to the longitude information and latitude information of the vehicle;
[0072] Perform rejection processing on the abnormal trajectory data of the vehicle according to the longitude information and latitude information of the lane to obtain the trajectory data of the processed vehicle.
[0073] In the embodiments of this specification, the list of longitude information and the list of latitude information of the road may include the longitude information and latitude information of the starting points of each road, the longitude information and latitude information of the turning points of each road, the longitude information and latitude information of the ending points of each road, and the longitude information and latitude information of some other positions in each road. The list of longitude information and the list of latitude information of the road may include the longitude information and latitude information of multiple corresponding lanes in each road. The server may match the longitude information and latitude information contained in multiple trajectory data of the vehicle with the list of longitude information and the list of latitude information of the road to obtain the longitude information and latitude information of the lane corresponding to the vehicle driving trajectory. The server may filter multiple trajectory data according to the obtained longitude information and latitude information of the lane, reject the trajectory data with a large difference in longitude information and latitude information, and at the same time, may also reject invalid or abnormal data through other information contained in the trajectory data to obtain the remaining valid trajectory data. The fitting may be performed according to the remaining valid trajectory data to obtain the fitted curve corresponding to the driving trajectory, improving the accuracy of the calculated curvature and also improving the accuracy of the calculated driving mileage.
[0074] In the embodiments of this specification, calculating the curvature of the fitted curve of the driving trajectory may specifically include:
[0075] Obtain a trajectory equation according to the trajectory data of each trajectory point in the driving trajectory;
[0076] Derive the trajectory equation;
[0077] Calculate the curvature according to the derived trajectory equation.
[0078] In the embodiments of this specification, a longitude equation and a latitude equation of the driving trajectory may be obtained according to the trajectory data corresponding to each trajectory point, that is where a0 = X0, and X0 represents the longitude of the starting trajectory point in the driving trajectory. a0 = v0, where v0 represents the speed of the starting trajectory point. Among them, v1 represents the speed at the end point of the driving trajectory; h = X1 - X0, where X1 represents the longitude at the end point of the trajectory; T = t1 - t0, t0 represents the timestamp of the starting trajectory point, t1 represents the timestamp of the end point of the trajectory, t represents the timestamp in the same trajectory data as the longitude and latitude, and t0 ≤ t ≤ t1.
[0079] b0 = Y0, where Y0 represents the latitude of the starting trajectory point in the driving trajectory. b0 = v0, where v0 represents the speed of the starting trajectory point. Among them, v1 represents the speed at the end point of the driving trajectory; l = Y1 - Y0, where Y1 represents the latitude at the end point of the trajectory.
[0080] In the embodiments of this specification, the curvature can be calculated by combining the longitude equation and the latitude equation obtained above with the formula where x'(t) can be obtained by taking the first derivative of x(t), y'(t) can be obtained by taking the first derivative of y(t), and x”(t) can be obtained by taking the second derivative of x(t). Then, it is determined whether the trajectory needs to be split and calculated according to the calculated curvature of the driving trajectory.
[0081] To facilitate recording mileage information, after obtaining the driving mileage corresponding to the driving trajectory in the embodiments of this specification, it may further include:
[0082] Obtain the mileage record items of the vehicle;
[0083] Update the driving mileage corresponding to the driving trajectory to the mileage record items to obtain the updated mileage record items.
[0084] In the embodiments of this specification, to facilitate recording the driving mileage of the vehicle, mileage record items corresponding to each vehicle can be created according to the numbers of different vehicles, which is convenient for obtaining the mileage information of the corresponding vehicle. The server can query the mileage record items corresponding to the vehicle according to the vehicle number and store the calculated mileage information of the vehicle in the corresponding mileage record items. If the server fails to find the mileage record items corresponding to the vehicle, a mileage record item can be initialized to record the mileage information of the vehicle.
[0085] To facilitate counting the driving mileage of the vehicle in different time periods, when updating the driving mileage corresponding to the driving trajectory to the mileage record items in the embodiments of this specification, the mileage record items include at least one mileage record information, and specifically may include:
[0086] Judge whether the duration of the vehicle's stop is not less than the first threshold to obtain the first judgment result;
[0087] If the first judgment result indicates that the duration for which the vehicle has stopped driving is less than the first threshold, then accumulate the driving mileage corresponding to the driving trajectory into the previous mileage record information recorded in the mileage record item;
[0088] If the first judgment result indicates that the duration for which the vehicle has stopped driving is not less than the first threshold, then newly create a mileage record information according to the driving mileage corresponding to the driving trajectory;
[0089] Store the newly created mileage record information into the mileage record item.
[0090] In the embodiments of this specification, the mileage record item may include vehicle number information and at least one piece of mileage record information. The mileage record information may at least include the start time information of the vehicle mileage and the vehicle mileage information. The server may obtain the data previously uploaded by the vehicle according to the vehicle number information. The server determines whether the driving mileage of the previous period has ended based on the trajectory data uploaded this time and the trajectory data obtained last time, and whether the mileage information calculated this time can be used as the mileage record of the new period in the mileage record item.
[0091] In the embodiments of this specification, it is possible to determine whether the driving mileage of the previous period has ended by the duration for which the vehicle has stopped driving. If the duration for which the vehicle has stopped driving is not less than the set threshold, it can be considered that the driving mileage of the previous period has ended, and a new mileage record information calculated for this vehicle is newly created and stored in the mileage record item. If the duration for which the vehicle has stopped driving is less than the set threshold, then the mileage calculated this time can be accumulated into the previous mileage record information recorded in the mileage record item, and the time information in the mileage record information is updated.
[0092] In the embodiments of this specification, there are two methods for judging the vehicle stop duration. One is that the vehicle turns off the engine and stops driving, and when it starts again, it will upload trajectory data. The timestamp in the trajectory data uploaded when the vehicle turns off the engine can be obtained according to the vehicle number, and the difference is taken with the timestamp in the trajectory data uploaded when it starts again to judge whether the difference between the two timestamps is not less than the threshold. The other is that the vehicle stops driving while still starting. In this case, the vehicle still uploads trajectory data at a set frequency. The duration during which the longitude information and latitude information in the vehicle trajectory data do not change can be calculated to judge whether this duration exceeds the threshold. For example: If the threshold for the duration of the vehicle stopping driving is 15 minutes, the vehicle is in the starting state, but the vehicle stops driving. At this time, the vehicle still uploads trajectory data to the server at a frequency of 100 ms / time. At this time, the server can count the duration during which the longitude and latitude information in the continuously uploaded trajectory data does not change. If the counted duration is not less than 15 minutes, a mileage record information can be created for the first mileage calculated after the vehicle drives and stored in the mileage record item. Among them, multiple mileage record information corresponding to a vehicle is recorded in the mileage record item. The server can automatically count the mileage information for any time period selected by the user according to the time information contained in the multiple mileage information, which can improve the accuracy and efficiency of mileage statistics, reduce the operation burden of the user, and at the same time can also realize the online calculation and statistics of vehicle mileage.
[0093] Through the above method, the calculation result of the vehicle driving mileage can be made more accurate, with higher efficiency, and at the same time, the operation burden of the user for counting mileage is also reduced.
[0094] To more clearly illustrate a vehicle mileage calculation method provided in the embodiments of this specification, Figure 3 The swimlane diagram of a vehicle mileage calculation method provided in the embodiments of this specification is as Figure 3 shown. This method may include an information acquisition stage and a processing stage, and specifically may include:
[0095] Step 302: Obtain the trajectory data of the vehicle.
[0096] In the embodiments of this specification, when the vehicle is in the starting state, the vehicle can collect the trajectory data of the vehicle from the vehicle according to the installed in-vehicle intelligent terminal, and send the collected trajectory data to the server. The server will receive the trajectory data uploaded by the vehicle every set time and store the trajectory data in the database.
[0097] Step 304: Obtain the longitude information list and latitude information list of the road.
[0098] In the embodiments of this specification, the server can obtain the longitude information list and latitude information list that make up the road in the database. The information in the two lists may contain the longitude information and latitude information of specific lanes.
[0099] Step 306: Match the trajectory data of the vehicle with the longitude information list and the latitude information list of the road to obtain the longitude information and the latitude information of the lane where the vehicle is located.
[0100] In the embodiments of the present specification, the longitude information and the latitude information contained in the trajectory data of the vehicle can be matched with the longitude information list and the latitude information list of the road to obtain the longitude information and the latitude information of the lane corresponding to the driving trajectory.
[0101] Step 308: Eliminate the abnormal trajectory data of the vehicle according to the longitude information and the latitude information of the lane to obtain the effective trajectory data of the vehicle.
[0102] In the embodiments of the present specification, the obtained longitude and latitude information of the lane can be compared with the longitude and latitude information contained in the trajectory data, and the trajectory data with too large differences from the longitude and latitude information of the lane can be eliminated. At the same time, the abnormal or invalid data can also be eliminated according to the vehicle speed data and the driving direction data in the trajectory data to obtain the effective trajectory data of the vehicle.
[0103] Step 310: Fit according to the effective trajectory data of the vehicle to obtain the driving trajectory fitting curve of the vehicle.
[0104] Step 312: Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve.
[0105] In the embodiments of the present specification, the effective trajectory data of the vehicle can be used to fit with the existing polynomial curve fitting function to obtain the driving trajectory fitting curve of the vehicle. Then, the curvature of the curve is calculated according to the existing function for calculating the curvature to obtain the curvature corresponding to the driving trajectory of the vehicle.
[0106] Step 314: Determine whether the curvature is greater than a preset curvature threshold to obtain a determination result.
[0107] Step 316: If the determination result indicates that the curvature is greater than the preset curvature threshold, split the driving trajectory.
[0108] Step 318: If the determination result indicates that the curvature is not greater than the preset curvature threshold, calculate the driving trajectory of the vehicle to obtain the driving mileage corresponding to the driving trajectory.
[0109] In the embodiments of this specification, it is possible to directly determine whether the curvature is greater than a preset curvature threshold. If it is not greater than the threshold, the distance of the driving trajectory is directly calculated to obtain the vehicle driving mileage corresponding to the driving trajectory. If it is greater than the preset curvature threshold, the driving trajectory is split to obtain the split sub-trajectories, and the curvatures of the split sub-trajectories are calculated again and it is determined whether the curvatures of the sub-trajectories are greater than the threshold respectively. If there are still sub-trajectories greater than the threshold, the sub-trajectories greater than the threshold are continuously split until the obtained sub-trajectories are not greater than the threshold. The distances of the trajectories not greater than the threshold are calculated, and the calculation results are accumulated to obtain the vehicle driving mileage corresponding to the driving trajectory.
[0110] Step 320: Update the driving mileage to the mileage record item.
[0111] In the embodiments of this specification, the calculated driving mileage can be updated to the mileage record item. At least one mileage record information corresponding to a certain vehicle is recorded in the mileage record item. One mileage record item records the mileage information of one vehicle and can record multiple mileage record information of the vehicle. The server can query the mileage record item corresponding to the vehicle according to the vehicle number in the trajectory data, and can determine whether a new mileage record information needs to be created to record the driving mileage according to the duration of the vehicle's stop. If the duration does not exceed the threshold, the driving mileage is accumulated to the mileage information recorded last time in the mileage record item, and the time information of the mileage record information is updated. If the duration exceeds the threshold, a new mileage record information is created in the mileage record item according to the driving mileage and the trajectory data.
[0112] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 4 For the embodiments of this specification, it corresponds to Figure 2 a structural schematic diagram of a calculation device for vehicle mileage. As Figure 4 shown, the device may include:
[0113] An information acquisition module 402, configured to acquire the trajectory data of the vehicle;
[0114] A processing module 404, configured to fit the trajectory data of the vehicle to obtain a driving trajectory fitting curve of the vehicle;
[0115] Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve;
[0116] If the curvature of the driving trajectory is greater than a preset curvature threshold, split the driving trajectory to obtain N split trajectories; the curvatures of the split trajectories are less than or equal to the preset curvature threshold; N represents an integer greater than 0;
[0117] Calculate the distances of the N split trajectories;
[0118] A driving mileage acquisition module 406, configured to perform an accumulation process on the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory.
[0119] Based on the same idea, an embodiment of this specification also provides a device corresponding to the above method.
[0120] Figure 5 For the embodiment of this specification, it provides a Figure 2 structural schematic diagram of a calculation device for vehicle mileage. As Figure 5 shown, the device 500 may include:
[0121] At least one processor 510; and,
[0122] A memory 530 communicatively connected to the at least one processor; wherein,
[0123] The memory 530 stores instructions 520 executable by the at least one processor 510, and when the instructions are executed by the at least one processor 510, the at least one processor 510 is enabled to: [[ID=...]]
[0124] Obtain the trajectory data of the vehicle;
[0125] Fit the trajectory data of the vehicle to obtain a driving trajectory fitting curve of the vehicle;
[0126] Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve;
[0127] If the curvature of the driving trajectory is greater than a preset curvature threshold, split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; N represents an integer greater than 0;
[0128] Calculate the distances of the N split trajectories;
[0129] Perform an accumulation process on the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory.
[0130] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments. In particular, for Figure 5 the device shown, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, reference can be made to the partial description of the method embodiment.
[0131] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers can program themselves to "integrate" a digital character system onto a single PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL), and there is not just one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into an integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.
[0132] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to logically program the method steps to enable the controller to be implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same functions. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.
[0133] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0134] For the convenience of description, when describing the above devices, they are described as various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in one or more software and / or hardware.
[0135] The above are only embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for calculating vehicle mileage, characterized in that, Including: Obtain the trajectory data of the vehicle; Fit the trajectory data of the vehicle to obtain the driving trajectory fitting curve of the vehicle; Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve; If the curvature of the driving trajectory is greater than a preset curvature threshold, split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; The N represents an integer greater than 0; Calculate the distances of the N split trajectories; Perform an accumulation process on the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory; Before fitting the trajectory data of the vehicle, it further includes: Obtain the longitude information list and latitude information list of the road, and the longitude information list and latitude information list of the road include the longitude information and latitude information of multiple corresponding lanes in each road; Determine the longitude information and latitude information of the lane where the vehicle is located according to the longitude information and latitude information of the vehicle; Perform an elimination process on the abnormal trajectory data of the vehicle according to the longitude information and latitude information of the lane to obtain the processed trajectory data of the vehicle.
2. The method according to claim 1, wherein The trajectory data of the vehicle specifically includes at least one of vehicle number data, longitude data and latitude data of the vehicle position, timestamp data, speed data of the vehicle, and driving direction data of the vehicle.
3. The method according to claim 2, wherein The longitude data and latitude data of the vehicle position specifically include: Obtain the base station positioning information of the vehicle position; Obtain the satellite positioning information of the vehicle position; the satellite positioning information of the vehicle position includes longitude information and latitude information with a first accuracy; The positioning system of the vehicle calibrates the satellite positioning information according to the base station positioning information to obtain the longitude information and latitude information with a second accuracy of the vehicle position; the second accuracy is higher than the first accuracy.
4. The method according to claim 1, wherein The obtaining of the trajectory data of the vehicle specifically includes: When the vehicle triggers the start state, the vehicle reports vehicle trajectory data at a set frequency.
5. The method according to claim 1, characterized in that, The calculation of the curvature of the driving trajectory fitting curve specifically includes: Obtain the trajectory equation according to the trajectory data of each trajectory point in the driving trajectory; Derive the trajectory equation; Calculate the curvature according to the derived trajectory equation.
6. The method according to claim 1, characterized in that, After obtaining the driving mileage corresponding to the driving trajectory, it further includes: Obtain the mileage record items of the vehicle; Update the driving mileage corresponding to the driving trajectory to the mileage record items to obtain the updated mileage record items.
7. The method according to claim 5, wherein Updating the driving mileage corresponding to the driving trajectory to the mileage record items, and the mileage record items include at least one mileage record information, specifically including: Judge whether the duration of the vehicle's stop is not less than the first threshold to obtain the first judgment result; If the first judgment result indicates that the duration of the vehicle's stop is less than the first threshold, accumulate the driving mileage corresponding to the driving trajectory to the previous mileage record information recorded in the mileage record items; If the first judgment result indicates that the duration of the vehicle's stop is not less than the first threshold, then a new mileage record information is newly created according to the driving mileage corresponding to the driving trajectory; Store the newly created mileage record information into the mileage record item.
8. A calculation device for vehicle mileage, characterized in that, Including: An information acquisition module, configured to acquire trajectory data of a vehicle; A processing module, configured to fit the trajectory data of the vehicle to obtain a driving trajectory fitting curve of the vehicle; Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve; If the curvature of the driving trajectory is greater than a preset curvature threshold, then split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; The N represents an integer greater than 0; Calculate the distances of the N split trajectories; A driving mileage acquisition module, configured to perform an accumulation process on the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory; The processing module is further configured to acquire a longitude information list and a latitude information list of a road, and the longitude information list and the latitude information list of the road include the longitude information and the latitude information of multiple corresponding lanes in each road; Determine the longitude information and the latitude information of the lane where the vehicle is located according to the longitude information and the latitude information of the vehicle; Perform an elimination process on the abnormal trajectory data of the vehicle according to the longitude information and the latitude information of the lane to obtain the processed trajectory data of the vehicle.
9. A calculation device for vehicle mileage, characterized in that, Including: At least one processor; And, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: Acquire trajectory data of a vehicle; Fit the trajectory data of the vehicle to obtain a driving trajectory fitting curve of the vehicle; Calculate the curvature of the driving trajectory fitting curve according to the driving trajectory fitting curve; If the curvature of the driving trajectory is greater than a preset curvature threshold, then split the driving trajectory to obtain N split trajectories; the curvature of the split trajectories is less than or equal to the preset curvature threshold; the N represents an integer greater than 0; Calculate the distances of the N split trajectories; Perform an accumulation process on the distances of the N split trajectories to obtain the driving mileage corresponding to the driving trajectory; Before fitting the trajectory data of the vehicle, it further includes: Acquire a longitude information list and a latitude information list of a road, and the longitude information list and the latitude information list of the road include the longitude information and the latitude information of multiple corresponding lanes in each road; Determine the longitude information and the latitude information of the lane where the vehicle is located according to the longitude information and the latitude information of the vehicle; Perform an elimination process on the abnormal trajectory data of the vehicle according to the longitude information and the latitude information of the lane to obtain the processed trajectory data of the vehicle.
Citation Information
Patent Citations
Dynamic differential positioning method based on map matching for mobile communication terminals
CN106454722A
Mileage trajectory calculation method and device, storage medium and electronic equipment
CN114705214A
Overrun vehicle destination prediction method and system based on map grid index and XGBOOST
CN114912689A