Calculation method and device of freight distance and electronic equipment
By segmenting vehicle travel data based on time and angle deviations, the method accurately calculates transport distance, addressing the inaccuracies of ignition cycle-based methods and enhancing vehicle management and design parameters.
Patent Information
- Application Number
- CN202411196497.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-20
AI Technical Summary
Existing methods for calculating transport distance using ignition cycles or natural days fail to accurately reflect the characteristics of the transportation process, hindering effective vehicle operation management and waybill settlement.
A method and device that divide travel segments based on vehicle travel data, using start and end times, and splicing segments according to time thresholds and vector angle deviations to determine accurate transport distance.
Accurately calculates transport distance, aligning with actual vehicle usage, providing valuable parameters for vehicle fuel tank and power chain design.
Smart Images

Figure CN119168511A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation big data technology, and in particular to a method, device and electronic equipment for calculating transportation distance. Background Art
[0002] Transport distance is an important concept in the transportation process. Its measurement and analysis are of great significance for optimizing the allocation of transportation resources, improving transportation efficiency, and reducing transportation costs. Transport distance usually refers to the distance between the starting and ending points of a transportation vehicle carrying passengers or goods (passengers are from the boarding point to the disembarking point, and goods are from the loading point to the unloading point), generally measured in kilometers. The measurement and calculation of transport distance usually rely on big data platforms to collect and analyze transport distance.
[0003] In the related art, the haul distance calculation is usually to count the vehicle's power-on running distance between IG ON and IG OFF, and add up the short-term distance to obtain the overall haul distance data.
[0004] However, in the actual driving process, simply using the ignition cycle or natural day as the standard for dividing the vehicle's transportation distance cannot accurately and truly reflect the characteristics of the transportation process, and cannot meet the needs of scenarios such as vehicle operation management and waybill settlement, which needs to be solved urgently. Summary of the invention
[0005] The present invention provides a method, device and electronic device for calculating the transport distance, so as to solve the problem in the related art that only the ignition cycle or natural day is used as the standard for dividing the vehicle transport distance, which cannot accurately and truly reflect the characteristics of the transportation process, and realizes the accurate calculation of the transport distance, effectively determines the starting point in the transportation process, makes the calculation result closer to the actual vehicle use status, and provides more reference parameters in the design of vehicle fuel tank matching, power chain matching and the like.
[0006] To achieve the above object, a first embodiment of the present invention provides a method for calculating a transport distance, comprising the following steps:
[0007] Get the vehicle's travel data;
[0008] Determine a plurality of travel segments according to the travel data, determine a current travel segment to be spliced and a next travel segment to be spliced from the splicing order of the plurality of travel segments, and determine a target time threshold according to the travel end time of the current travel segment to be spliced;
[0009] If the trip start time of the next segment to be spliced is less than the target time threshold, the current segment to be spliced is spliced with the spliced segment, and the next segment to be spliced is used as the new current segment to be spliced, until the preset splicing end condition is met to obtain the final mileage.
[0010] According to one embodiment of the present invention, determining the current to-be-joined trip segment and the next to-be-joined trip segment from the joining order of the plurality of trip segments includes:
[0011] Determining a splicing order of the plurality of trip segments based on a trip start time of each trip segment and a trip end time of each trip segment;
[0012] Based on the splicing order of the multiple travel segments, the first travel segment is used as the current travel segment to be spliced, and the next travel segment adjacent to the current travel segment to be spliced is used as the next travel segment to be spliced.
[0013] According to an embodiment of the present invention, determining the target time threshold according to the travel end time of the current travel segment to be spliced includes:
[0014] Determine whether the end time of the current trip segment to be spliced belongs to the first preset time interval;
[0015] If the end time of the current segment to be spliced belongs to the first preset time interval, then calculating a first sum of the end time of the current segment to be spliced and the first preset time, and determining whether the first sum is within the first preset time interval;
[0016] If the first sum value is within the first preset time interval, the target time threshold is obtained according to the second sum value of the trip end time of the current trip segment to be spliced and the second preset time; otherwise, the target time threshold is obtained according to the third sum value of the trip end time of the current trip segment to be spliced and the third preset time.
[0017] According to an embodiment of the present invention, after determining whether the end time of the current to-be-joined trip segment belongs to the first preset time interval, the method further includes:
[0018] If the end time of the current segment to be spliced does not belong to the first preset time interval, determining a target time closest to the end time of the current segment to be spliced;
[0019] The difference between the target time and the travel end time of the current travel segment to be spliced is calculated, and the target time threshold is obtained according to a fourth sum of the travel end time of the current travel segment to be spliced, the difference and a fourth preset time.
[0020] According to one embodiment of the present invention, before splicing the current to-be-spliced trip segment with the spliced trip segment, the method further includes:
[0021] forming a travel direction line of the current travel segment to be spliced according to the travel starting point of the current travel segment to be spliced and the travel end point of the current travel segment to be spliced, and obtaining a travel vector angle of the current travel segment to be spliced according to the travel direction line of the current travel segment to be spliced;
[0022] Determine a travel starting point and a travel end point of a final spliced travel segment in the spliced travel segments, form a travel direction line of the final spliced travel segment according to the travel starting point and the travel end point of the final spliced travel segment, and obtain a travel vector angle of the final spliced travel segment according to the travel direction line of the final spliced travel segment;
[0023] The travel vector angle deviation between the final spliced segment and the current segment to be spliced is obtained according to the difference between the travel vector angle of the final spliced segment and the travel vector angle of the current segment to be spliced. If the travel vector angle deviation is greater than a preset angle, the mileage corresponding to the spliced segment is used as the final transportation mileage.
[0024] According to one embodiment of the present invention, after determining the target time threshold according to the travel end time of the current travel segment to be spliced, the method further includes:
[0025] If the start time of the next trip segment to be spliced is greater than or equal to the target time threshold, the current trip splicing is terminated, and the mileage corresponding to the spliced trip segment is used as the final transportation mileage.
[0026] According to an embodiment of the present invention, determining a plurality of travel segments according to the travel data includes:
[0027] Based on the travel data, a plurality of initial travel segments are screened out according to an IG OFF signal and an IG ON signal of the vehicle;
[0028] Filtering out the travel segments whose travel duration is greater than or equal to a preset duration and whose travel distance is greater than or equal to a preset distance from the multiple initial travel segments, to obtain the multiple travel segments;
[0029] The starting points of the multiple initial travel segments are all when the vehicle switches from the IG OFF signal to the IG ON signal, and the ending point of each initial travel segment is when the vehicle switches from the IG ON signal to the IG OFF signal.
[0030] According to an embodiment of the present invention, the preset splicing end condition is:
[0031] The start time of the next segment to be spliced is greater than or equal to the target time threshold determined by the end time of the current segment to be spliced;
[0032] Alternatively, the plurality of travel segments have all been spliced.
[0033] According to the method for calculating the mileage proposed in the embodiment of the present invention, multiple travel segments are divided according to the travel data of the vehicle, and the travel segments are screened based on the travel start time and travel end time of each travel segment. The screened target travel segments are spliced, and it is determined whether the preset splicing end condition is met. Finally, the travel splicing is ended when the preset splicing end condition is met, and the final mileage is output. Therefore, by screening and splicing the travel segments, the accurate calculation of the mileage is achieved, the starting point in the transportation process is effectively determined, and the calculation result is closer to the actual vehicle usage status, which can provide more reference parameters in the design of vehicle fuel tank matching, power chain matching, etc.
[0034] To achieve the above object, a second embodiment of the present invention provides a device for calculating a transport distance, comprising:
[0035] An acquisition module, used to acquire the travel data of the vehicle;
[0036] a determination module, configured to determine a plurality of travel segments according to the travel data, determine a current travel segment to be spliced and a next travel segment to be spliced from a splicing order of the plurality of travel segments, and determine a target time threshold according to a travel end time of the current travel segment to be spliced;
[0037] The splicing module is used to splice the current segment to be spliced with the spliced segment when the start time of the next segment to be spliced is less than the target time threshold, and use the next segment to be spliced as the new current segment to be spliced until the preset splicing end condition is met to obtain the final transportation distance mileage.
[0038] According to an embodiment of the present invention, the determining module is specifically configured to:
[0039] Determining a splicing order of the plurality of trip segments based on a trip start time of each trip segment and a trip end time of each trip segment;
[0040] Based on the splicing order of the multiple travel segments, the first travel segment is used as the current travel segment to be spliced, and the next travel segment adjacent to the current travel segment to be spliced is used as the next travel segment to be spliced.
[0041] According to an embodiment of the present invention, the determining module is specifically configured to:
[0042] Determine whether the end time of the current trip segment to be spliced belongs to the first preset time interval;
[0043] If the end time of the current segment to be spliced belongs to the first preset time interval, then calculating a first sum of the end time of the current segment to be spliced and the first preset time, and determining whether the first sum is within the first preset time interval;
[0044] If the first sum value is within the first preset time interval, the target time threshold is obtained according to the second sum value of the trip end time of the current trip segment to be spliced and the second preset time; otherwise, the target time threshold is obtained according to the third sum value of the trip end time of the current trip segment to be spliced and the third preset time.
[0045] According to an embodiment of the present invention, after determining whether the end time of the current to-be-joined trip segment belongs to the first preset time interval, the determination module is further configured to:
[0046] If the end time of the current segment to be spliced does not belong to the first preset time interval, determining a target time closest to the end time of the current segment to be spliced;
[0047] The difference between the target time and the travel end time of the current travel segment to be spliced is calculated, and the target time threshold is obtained according to a fourth sum of the travel end time of the current travel segment to be spliced, the difference and a fourth preset time.
[0048] According to one embodiment of the present invention, before splicing the current to-be-spliced trip segment with the spliced trip segment, the splicing module is further used to:
[0049] A travel direction line of the current segment to be spliced is formed according to the travel starting point of the current segment to be spliced and the travel end point of the current segment to be spliced, and a travel vector angle of the current segment to be spliced is obtained according to the included angle between the travel direction line of the current segment to be spliced and due north;
[0050] Determine the starting point of the final spliced segment in the spliced segments and the end point of the final spliced segment, and form a travel direction line of the final spliced segment according to the starting point of the final spliced segment and the end point of the final spliced segment, and obtain the travel vector angle of the final spliced segment according to the angle between the travel direction line of the final spliced segment and due north;
[0051] The travel vector angle deviation between the final spliced segment and the current segment to be spliced is obtained according to the difference between the travel vector angle of the final spliced segment and the travel vector angle of the current segment to be spliced. If the travel vector angle deviation is greater than a preset angle, the mileage corresponding to the spliced segment is used as the final transportation mileage.
[0052] According to one embodiment of the present invention, after determining the target time threshold according to the travel end time of the current travel segment to be spliced, the determination module is further used to:
[0053] If the start time of the next trip segment to be spliced is greater than or equal to the target time threshold, the current trip splicing is terminated, and the mileage corresponding to the spliced trip segment is used as the final transportation mileage.
[0054] According to an embodiment of the present invention, the determining module is specifically configured to:
[0055] Based on the travel data, a plurality of initial travel segments are screened out according to an IG OFF signal and an IG ON signal of the vehicle;
[0056] Filtering out the travel segments whose travel duration is greater than or equal to a preset duration and whose travel distance is greater than or equal to a preset distance from the multiple initial travel segments, to obtain the multiple travel segments;
[0057] The starting points of the multiple initial travel segments are all when the vehicle switches from the IG OFF signal to the IG ON signal, and the ending point of each initial travel segment is when the vehicle switches from the IG ON signal to the IG OFF signal.
[0058] According to the device for calculating the transport distance proposed in the embodiment of the present invention, by dividing the vehicle's travel data into multiple travel segments, and screening the travel segments based on the travel start time and travel end time of each travel segment, the screened target travel segments are spliced, and it is determined whether the preset splicing end condition is met, and finally the travel splicing is terminated when the preset splicing end condition is met, and the final transport distance mileage is output. Thus, by screening and splicing the travel segments, the accurate calculation of the transport distance is achieved, the starting point in the transportation process is effectively determined, and the calculation result is closer to the actual vehicle usage status, which can provide more reference parameters in the design of vehicle fuel tank matching, power chain matching, etc.
[0059] To achieve the above objectives, a third aspect of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for calculating the transport distance as described in the above embodiments.
[0060] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the method for calculating the transport distance as described in the above embodiments.
[0061] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for calculating the transport distance as described in the above embodiments.
[0062] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0064] Figure 1 A flow chart of a method for calculating a transport distance provided according to an embodiment of the present invention;
[0065] Figure 2 A schematic diagram of a flow chart of a method for calculating a transport distance provided according to a specific embodiment of the present invention;
[0066] Figure 3 A block diagram of a device for calculating a transport distance according to an embodiment of the present invention;
[0067] Figure 4 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention.
[0068] Reference numerals:
[0069] 10 - a device for calculating the transport distance, 100 - an acquisition module, 200 - a determination module, 300 - a splicing module, 401 - a memory, 402 - a processor, 403 - a communication interface. DETAILED DESCRIPTION
[0070] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0071] A method, device and electronic device for calculating the haulage distance proposed in accordance with an embodiment of the present invention will be described below with reference to the accompanying drawings. First, a method for calculating the haulage distance proposed in accordance with an embodiment of the present invention will be described with reference to the accompanying drawings. Aiming at the problem that the standard for dividing the haulage distance of a vehicle according to the background technology only according to the ignition cycle or natural day cannot accurately and truly reflect the characteristics of the transportation process, the present invention provides a method for calculating the haulage distance, by dividing a plurality of travel segments according to the travel data of the vehicle, and screening the travel segments based on the travel start time and travel end time of each travel segment, splicing the selected target travel segments, and judging whether the preset splicing end condition is met, and finally ending the travel splicing when the preset splicing end condition is met, and outputting the final haulage mileage. Thus, by screening and splicing the travel segments, the accurate calculation of the haulage distance is achieved, the starting point in the transportation process is effectively judged, the calculation result is closer to the actual vehicle usage state, and more reference parameters can be provided in the design aspects such as vehicle fuel tank matching and power chain matching.
[0072] Figure 1 The present invention is a flowchart of a method for calculating a transport distance provided by an embodiment of the present invention.
[0073] like Figure 1 As shown, the method for calculating the transport distance includes the following steps:
[0074] In step S101 , the travel data of the vehicle is obtained.
[0075] Among them, the vehicle's travel data may include: travel starting point positioning data and time, travel end point positioning data and time, real-time positioning data during the journey, travel engine mileage, travel fuel consumption, etc. The vehicle's travel data is the basis for analyzing the driving process and calculating the transportation distance. The embodiment of the present invention can collect data through vehicle-mounted collection components, such as vehicle-mounted GPS (Global Positioning System), vehicle-side TBOX, etc.
[0076] Exemplarily, the embodiment of the present invention can collect the vehicle's travel data through the vehicle-side TBOX. The vehicle-side TBOX can locate the vehicle's position through the GPS module. At the same time, through the OBD (On-Board Diagnostics) module and MCU (Microcontroller Unit), it can collect the vehicle's bus data, including the vehicle's IGON and IG OFF moments, and upload it to the cloud server.
[0077] In step S102, multiple travel segments are determined according to the current travel data, and the current travel segment to be spliced and the next travel segment to be spliced are determined from the splicing order of the multiple travel segments, and the target time threshold is determined according to the travel end time of the current travel segment to be spliced.
[0078] The trip segment refers to the road segment that the vehicle passes through from the start to the end of the trip.
[0079] Specifically, after obtaining the travel data of the vehicle, multiple travel segments are intercepted therefrom. The interception conditions of the travel segments can be ignition cycle, natural day, a preset time threshold, etc. After the multiple intercepted travel segments are arranged in order, the first travel segment is used as the current travel segment to be spliced, and the next adjacent travel segment in the queue is selected as the next travel segment to be spliced. Through the transportation distance calculation method of the embodiment of the present invention, the target time threshold is calculated based on the travel end time of the current travel segment to be spliced.
[0080] As a possible implementation method, in some embodiments, multiple travel segments are determined based on current travel data, including: based on the current travel data, multiple initial travel segments are screened out according to the vehicle's IG OFF signal and IG ON signal; from the multiple initial travel segments, travel segments with a driving duration greater than or equal to a preset duration and a driving distance greater than or equal to a preset distance are screened out to obtain multiple travel segments; wherein the starting point of the multiple initial travel segments is when the vehicle switches from the IG OFF signal to the IG ON signal, and the end point of each initial travel segment is when the vehicle switches from the IG ON signal to the IG OFF signal.
[0081] The preset duration and the preset distance may be values set by technicians in this field according to needs, or may be thresholds obtained through a limited number of computer simulations, and are not specifically limited here.
[0082] Specifically, the embodiment of the present invention can intercept the travel segment according to the ignition cycle, and after obtaining the current travel data, filter out the moment when the vehicle switches from the IG OFF signal to the IG ON signal and the corresponding position of the vehicle at that moment as the starting point of each travel segment; filter out the moment when the vehicle switches from the IG ON signal to the IG OFF signal and the corresponding position of the vehicle at that moment as the end point of each travel segment. The starting point and the end point are matched one by one to obtain multiple initial travel segments; then the initial travel segments are filtered according to the preset duration and driving distance, and the travel segments with shorter driving duration or shorter driving distance are excluded to obtain multiple travel segments.
[0083] For example, assuming that the preset duration is 20 minutes and the preset distance is 10 kilometers, after obtaining the current travel data, the embodiment of the present invention can obtain the time when the vehicle switches from the IG OFF signal to the IG ON signal and the time when the vehicle switches from the IG ON signal to the IG OFF signal through the current travel data. For example, the time when the vehicle switches from the IG OFF signal to the IG ON signal is 8 o'clock, 10 o'clock, and 13 o'clock, and the time when the vehicle switches from the IG ON signal to the IG ON signal is 8 o'clock, 10 o'clock, and 13 o'clock. The time of the OFF signal is 9 o'clock, 11 o'clock, and 15 o'clock. Then, in the embodiment of the present invention, the distance corresponding to 8 o'clock to 9 o'clock can be used as an initial travel segment, the distance corresponding to 10 o'clock to 11 o'clock can be used as an initial travel segment, and the distance corresponding to 13 o'clock to 15 o'clock can be used as an initial travel segment; then the multiple initial travel segments obtained above are judged according to the preset duration and the preset distance. Since the duration corresponding to 8 o'clock to 9 o'clock is greater than 20 minutes, if the distance of the initial travel segment corresponding to 8 o'clock to 9 o'clock is greater than 10km, the travel segment corresponding to 8 o'clock to 9 o'clock is used as one of the multiple travel segments, and then the initial travel segment corresponding to 10 o'clock to 11 o'clock and the initial travel segment corresponding to 13 o'clock to 15 o'clock are judged respectively, and finally multiple travel segments are obtained according to the judgment results.
[0084] It should be noted that the method for determining the initial travel segment corresponding to 10:00 to 11:00 and the initial travel segment corresponding to 13:00 to 15:00 is the same as the method for determining the distance corresponding to 8:00 to 9:00 mentioned above, and will not be described in detail here to avoid redundancy.
[0085] Among them, in some embodiments, the current trip segment to be spliced and the next trip segment to be spliced are determined from the splicing order of multiple trip segments, including: based on the start time of each trip segment and the end time of each trip segment, determining the splicing order of multiple trip segments; based on the splicing order of multiple trip segments, taking the first trip segment as the current trip segment to be spliced, and taking the next trip segment adjacent to the current trip segment to be spliced as the next trip segment to be spliced.
[0086] Specifically, the start time and end time of each trip segment are obtained, and the trip segments are sorted according to the order of time to determine the splicing order of multiple trip segments. First, the first trip segment in the queue is selected as the current trip segment to be spliced, and the next trip segment adjacent to it in the queue is selected as the next trip segment to be spliced.
[0087] For example, the current multiple travel segments are S1 (10:00-11:00), S2 (8:00-9:00) and S3 (13:00-15:00). The travel segments are sorted in chronological order to obtain S2, S1 and S3. At this time, according to the sorting result, S2 is used as the current travel segment to be spliced, and the next travel segment adjacent to it is S1, so S1 is the next travel segment to be spliced.
[0088] As a possible implementation method, in some embodiments, the target time threshold is determined based on the travel end time of the current journey segment to be spliced, including: judging whether the travel end time of the current journey segment to be spliced belongs to the first preset time interval; if the travel end time of the current journey segment to be spliced belongs to the first preset time interval, calculating the first sum of the travel end time of the current journey segment to be spliced and the first preset time, and judging whether the first sum is in the first preset time interval; if the first sum is in the first preset time interval, obtaining the target time threshold based on the second sum of the travel end time of the current journey segment to be spliced and the second preset time, otherwise, obtaining the target time threshold based on the third sum of the travel end time of the current journey segment to be spliced and the third preset time.
[0089] Among them, the first preset time interval can be a time interval set by technical personnel in this field according to needs, or it can be a time interval obtained through a limited number of computer simulations; the first preset time, the second preset time and the third preset time can be time values set by technical personnel in this field according to needs, or they can be time values obtained through a limited number of computer simulations, and no specific limitation is made here.
[0090] Specifically, after the first segment in the sorting result is used as the current segment to be spliced, the embodiment of the present invention determines the target time threshold by judging whether the end time of the current segment to be spliced belongs to the preset time interval. Specifically, when the end time of the current segment to be spliced belongs to the first preset time interval, the first sum of the end time of the current segment to be spliced and the first preset time is calculated, and it is judged whether the first sum is also within the first preset time interval. If the first sum is also within the first preset time interval, the target time threshold is the second sum of the end time of the current segment to be spliced and the second preset time; if the first sum is not within the first preset time interval, the target time threshold is the third sum of the end time of the current segment to be spliced and the third preset time.
[0091] For example, after screening, n travel segments are retained, and the retained travel segments are represented in chronological order as S(i) (i=1, 2,..., n), the start time of each travel segment is represented by startDatetime(i), and the end time of each travel segment is represented by endDatetime(i). Considering that transportation is generally carried out during the day, the embodiment of the present application can set the first preset time interval to 5:00 to 20:00, the first preset time is 4h, the second preset time is 4h, and the third preset time is 13h. The first segment is selected as the segment to be spliced, and then it is determined whether the end time endDatetime(1) of the segment to be spliced is between 5:00 and 20:00. If the end time endDatetime(1) of the segment to be spliced is between 5:00 and 20:00, it means that the user is currently parking during the day. When the user parks early in the day (such as parking between 5:00 and 16:00), it is generally possible to rest in a service area or continue on the road after unloading some goods. If the user parks late in the day (such as parking between 17:00 and 20:00), it is generally late to unload some goods, or the parking time itself is around 20:00, which is also late. The user may choose to rest late and leave the next day. In order to avoid the situation where the transportation distance is judged to be over due to a long interval in the middle, the embodiment of the present application can take into account whether the current parking is late (such as whether it is parked close to 20:00). The embodiment of the present application sets a first preset time, that is, determines whether the end time endDatetime(1)+4 (i.e., the first preset time) of the segment to be spliced is also between 5:00 and 20:00. If If the end time endDatetime(1)+4 of the previous segment to be spliced is between 5:00 and 20:00, it means that the user did not park late and would not park for a long time under normal circumstances (that is, the interval between the next start time and the current end time would not be too large). Therefore, in the embodiment of the present application, the end time endDatetime(1)+4 of the current segment to be spliced (that is, the second preset time) can be used as the target time threshold; if the end time endDatetime(1)+4 of the current segment to be spliced is not between 5:00 and 20:00, it means that the current parking is late and the user may choose to rest and leave the next day. The user may take a rest. Therefore, in the embodiment of the present application, the end time endDatetime(1)+13 of the current segment to be spliced (that is, the third preset time) can be used as the target time threshold. It should be noted that the setting of the third preset time can take into account the user's rest time (generally 7-9 hours at night) and the first preset time. Therefore, in the embodiment of the present application, the third preset time can be preferably 13 hours.
[0092] It should be noted that the present invention determines whether the interval between the travel segments is within the normal rest time range by presetting the time and calculating the sum of the end time and the preset time, thereby screening the travel segments with the same transport distance. The sum of the first preset time, the second preset time and the end time of the current trip to be spliced is used as the target time threshold. At this time, since their sum values all fall within the first preset time interval, it means that there is no date change. Considering the actual situation, the values of the first preset time and the second preset time can be set to be relatively small; when the third sum of the third preset time and the end time of the current trip to be spliced is used as the target time threshold, the third sum is not within the first preset time interval, indicating that there may be a date change at this time. Considering the actual situation, the driver needs a longer rest time, so the value of the third preset time is set to be relatively large, for example, it can be set to a duration greater than 8 hours.
[0093] Furthermore, in some embodiments, after determining whether the travel end time of the current travel segment to be spliced belongs to the first preset time interval, it also includes: if the travel end time of the current travel segment to be spliced does not belong to the first preset time interval, determining the target time closest to the travel end time of the current travel segment to be spliced; calculating the difference between the target time and the travel end time of the current travel segment to be spliced, and obtaining the target time threshold according to the fourth sum of the travel end time of the current travel segment to be spliced, the difference and the fourth preset time.
[0094] The fourth preset time may be a time set by technicians in this field according to needs, or may be a threshold value obtained through a limited number of computer simulations, which is not specifically limited here.
[0095] Specifically, if the end time of the current itinerary segment to be spliced does not belong to the first preset time interval, it means that the user's parking time is late. Taking into account the user's rest time, the embodiment of the present application can consider the five hours closest to the end time of the current itinerary segment to be spliced, based on the five hours closest to the end time of the current itinerary segment to be spliced (that is, the target time), the difference between the target time and the end time of the current itinerary segment to be spliced, the fourth sum of the end time of the current itinerary segment to be spliced and the fourth preset time is used as the time threshold.
[0096] For example, if the end time of the current itinerary segment to be spliced is 4 o'clock, the first preset time interval is 5 o'clock to 20 o'clock, and the fourth preset time is 4 hours, according to the first preset time interval, the target time closest to the end time of the trip is 5 o'clock, then the time threshold is 5 hours later than 4 o'clock, which is 9 o'clock.
[0097] In step S103, if the start time of the next segment to be spliced is less than the target time threshold, the current segment to be spliced is spliced with the spliced segment, and the next segment to be spliced is used as the new current segment to be spliced, until the preset splicing end condition is met to obtain the final mileage.
[0098] The preset splicing end condition may be a condition set by a person skilled in the art according to demand, for example, the final transportation distance mileage is greater than a certain threshold.
[0099] It should be noted that, usually, due to the large time and space span of haul distance calculation, the driver needs to stop and rest on the way. Therefore, when calculating the haul distance, it is necessary to consider the interval relationship between multiple trip segments, determine whether multiple trip segments belong to the same haul distance, and then splice the multiple trip segments belonging to the same haul distance to finally obtain the entire haul distance data.
[0100] Specifically, the start time of the next segment to be spliced is obtained. If the start time of the next segment to be spliced is less than the target time threshold, it means that the time interval between the current segment to be spliced and the next segment to be spliced is small, and the current segment to be spliced and the spliced segment belong to the same transportation distance. The current segment to be spliced and the spliced segment are spliced, and the next segment to be spliced is used as the new current segment to be spliced. The end time of the new current segment to be spliced is analyzed and calculated until the preset splicing end condition is met, the trip splicing is ended, and the mileage corresponding to the spliced segment is used as the final transportation distance mileage.
[0101] For example, after calculation, it is obtained that the target time threshold is 9, and the start time of the next segment to be spliced is 8, and the start time of the next segment to be spliced is less than the target time threshold, then the current segment to be spliced is spliced with the spliced segment, and the next segment to be spliced is used as the new current segment to be spliced. The travel end time of the new current segment to be spliced is continued to be analyzed and calculated until the preset splicing end condition is met, the trip splicing is ended, and the mileage corresponding to the spliced segment is used as the final transportation mileage for output.
[0102] Therefore, by screening multiple suitable trip segments according to the vehicle's trip data and judging the interval time between the trip segments based on the start time and end time of the trip segments, the trip segments that meet the conditions are spliced together to obtain the final mileage.
[0103] Optionally, in some embodiments, before the current segment to be spliced is spliced with the already spliced segment, it also includes: forming a travel direction line of the current segment to be spliced according to the travel starting point of the current segment to be spliced and the travel end point of the current segment to be spliced, and obtaining the travel vector angle of the current segment to be spliced according to the travel direction line of the current segment to be spliced; determining the travel starting point and the travel end point of the final spliced segment in the already spliced segments, and forming the travel direction line of the final spliced segment according to the travel starting point and the travel end point of the final spliced segment, and obtaining the travel vector angle of the final spliced segment according to the travel direction line of the final spliced segment; obtaining the travel vector angle deviation between the final spliced segment and the current segment to be spliced according to the difference between the travel vector angle of the final spliced segment and the travel vector angle of the current segment to be spliced, and if the travel vector angle deviation is greater than the preset angle, the mileage corresponding to the already spliced segment is used as the final transportation mileage.
[0104] The stroke vector angle refers to the angle between the stroke direction line and a certain reference direction. The preset angle can be a value set by those skilled in the art according to requirements, or a value obtained through a limited number of computer simulations, and is not specifically limited here.
[0105] It is understandable that the transport distance is usually the distance between the starting point and the end point of the total journey of the transport vehicle, for example, from the boarding point to the disembarking point of a tourist bus, and from the loading point to the unloading point of a truck. In actual use, it is considered that during the driving process of the vehicle, although the stop time is short, it has entered the return stage during the stop interval. For example, after the vehicle arrives at the disembarking point, it stays for a short time and then returns to the boarding point. At this time, although the stop time is short, the vehicle has entered the return stage, and the transport distance should be cut off. The embodiment of the present invention takes into account the situation where the stop time is short but the vehicle enters the return stage. Not only does it use the target time threshold as the judgment standard, but it also compares the difference between the two travel vector angles. When the travel vector angle deviation of the two travel segments is greater than a certain threshold, it indicates that the vehicle is traveling in opposite directions. At this time, the vehicle has entered the return stage, and the travel splicing should be cut off.
[0106] Specifically, the travel starting point of the current segment to be spliced is connected with the travel end point of the current segment to be spliced to form the travel direction line of the current segment to be spliced, and the travel vector angle of the current segment to be spliced is determined based on the travel direction line. Among them, the embodiment of the present invention preferably uses the angle between the travel direction line and the north direction as the travel vector angle of the current segment to be spliced. Similarly, the angle between the travel direction line of the next segment formed by connecting the travel starting point of the next segment with the travel end point of the next segment and the north direction is the travel vector angle of the next segment. The travel vector angle deviation between the current segment to be spliced and the next segment of the current segment to be spliced is obtained based on the difference between the travel vector angle of the current segment to be spliced and the travel vector angle of the next segment.
[0107] For example, the preset angle is set to 150°, the angle between the travel direction line of the current segment to be spliced and the north direction is 180°, the angle between the travel direction line of the final segment to be spliced and the north direction is 20°, and the travel vector angle deviation between the current segment to be spliced and the final segment to be spliced is 160°, which is greater than the preset angle of 150°. The driving direction of the current segment to be spliced and the driving direction of the final segment to be spliced are likely to be opposite. Therefore, the segment splicing is terminated, and the mileage corresponding to the spliced segment is used as the final transportation mileage.
[0108] Furthermore, in some embodiments, the preset splicing end condition is: the start time of the next trip segment to be spliced is greater than or equal to the target time threshold determined by the end time of the current trip segment to be spliced; or, multiple trip segments have been spliced.
[0109] Specifically, after determining the target time threshold according to the end time of the current segment to be spliced, determine whether the start time of the next segment to be spliced is greater than or equal to the target time threshold. If the start time of the next segment to be spliced is greater than or equal to the target time threshold, it means that the start time of the next segment to be spliced is significantly different from the end time of the current segment to be spliced, the interval between the two segments is relatively long, and there is a situation of switching the transport distance in between, so the splicing is terminated; in addition, if there is no next segment to be spliced after the current segment to be spliced, it is also determined that the preset splicing end condition is met and the splicing is terminated.
[0110] For example, the end time of the current segment to be spliced is 19:00, and the target time threshold determined based on the end time of the current segment to be spliced is 8:00 one day after the end time. The start time of the next segment to be spliced is 15:00. The start time of the next segment to be spliced is greater than the target time threshold. The itinerary splicing is cut off, and the accumulated mileage up to the current segment to be spliced is output to obtain the final transportation mileage.
[0111] Therefore, the present invention determines whether the travel vector angle deviation between the current travel segment to be spliced and the next travel segment to be spliced of the current travel segment to be spliced is greater than a preset angle. When the deviation is greater than the preset angle, it is determined that the vehicle enters the return phase and the travel accumulation is cut off to achieve accurate calculation of the transport distance.
[0112] Optionally, in some embodiments, after determining the target time threshold according to the trip end time of the current trip segment to be spliced, it also includes: if the trip start time of the next trip segment to be spliced is greater than or equal to the target time threshold, then the current trip splicing is ended, and the mileage corresponding to the spliced trip segment is used as the final transportation mileage.
[0113] It can be understood that when the start time of the next segment to be spliced is greater than or equal to the target time threshold, it means that the time interval between the next segment to be spliced and the final segment is large, and the trip corresponding to the current transport distance is likely to have ended.
[0114] Specifically, the start time of the next segment to be spliced is obtained. When the start time of the next segment to be spliced is greater than or equal to the target time threshold, the trip splicing is ended, and the mileage corresponding to the spliced segment is output as the final transportation mileage.
[0115] For example, after the above steps, the target time threshold is calculated to be 9 o'clock, and the start time of the next segment to be spliced is 13 o'clock. The time interval between the current segment to be spliced and the next segment to be spliced is too long. Therefore, it is determined that the trip corresponding to the previous transport distance has ended, and the mileage corresponding to the spliced segment is used as the final transport distance mileage.
[0116] Therefore, the cut-off conditions of the trip splicing are judged by the time interval and the trip direction, so as to achieve accurate calculation of the transportation distance, improve the analytical value of the final transportation mileage output, and provide more reference parameters in the design of vehicle fuel tank matching, power chain matching, etc.
[0117] In order to enable those skilled in the art to further understand the method for calculating the transport distance in the embodiment of the present invention, it is described in detail below in conjunction with specific embodiments.
[0118] Specifically, Figure 2 As shown, Figure 2 The flowchart of a method for calculating the transport distance provided according to a specific embodiment of the present invention is as follows. The method for calculating the transport distance includes:
[0119] S201, obtaining the vehicle's travel data.
[0120] S202, filter out all the travel segments of the vehicle within the statistical time, wherein each travel segment includes a travel start time of the corresponding travel and a travel end time of the corresponding travel.
[0121] S203, filter the travel segments with driving distance less than 10 km and driving time less than 20 min, and represent the retained travel segments in chronological order as S(i) (i=1, 2, ..., n). The start time of each travel segment is represented by startDatetime(i) and the end time of each travel segment is represented by endDatetime(i).
[0122] S204, determine endDatetime(i)∈(5:00,20:00), if yes, execute S205; if no, execute S206.
[0123] S205, determine endDatetime(i)+4∈(5:00,20:00), if yes, execute S209; if no, execute S208.
[0124] S206, Δt=5 hours, the target time closest to endDatetime(i) - endDatetime(i).
[0125] S207, T threshold=endDatetime(i)+Δt+4.
[0126] Wherein, Tthreshold represents the target time threshold.
[0127] S208, T threshold=endDatetime(i)+13.
[0128] S209, T threshold=endDatetime(i)+4.
[0129] S210, determine whether startDatetime(i+1)<T threshold, if yes, execute S211, if no, execute S212.
[0130] S211, determine whether the travel vector angle deviation between S(i) and S(i+1) is less than 150°, if yes, execute S213, if no, execute S212.
[0131] S212, end the trip splicing and output the final transportation distance S.
[0132] S213, splice the travel segments, and the final transportation distance mileage S=S+S(i).
[0133] According to the method for calculating the mileage proposed in the embodiment of the present invention, multiple travel segments are divided according to the travel data of the vehicle, and the travel segments are screened based on the travel start time and travel end time of each travel segment. The screened target travel segments are spliced, and it is determined whether the preset splicing end condition is met. Finally, the travel splicing is ended when the preset splicing end condition is met, and the final mileage is output. Therefore, by screening and splicing the travel segments, the accurate calculation of the mileage is achieved, the starting point in the transportation process is effectively determined, and the calculation result is closer to the actual vehicle usage status, which can provide more reference parameters in the design of vehicle fuel tank matching, power chain matching, etc.
[0134] Next, a device for calculating the transport distance according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0135] Figure 3 4 is a block diagram of a device for calculating a transport distance according to an embodiment of the present invention.
[0136] like Figure 3 As shown, the distance calculation device 10 includes: an acquisition module 100 , a determination module 200 and a splicing module 300 .
[0137] Wherein, the acquisition module 100 is used to acquire the travel data of the vehicle;
[0138] The determination module 200 is used to determine a plurality of travel segments according to the travel data, and determine the current travel segment to be spliced and the next travel segment to be spliced from the splicing order of the plurality of travel segments, and determine the target time threshold according to the travel end time of the current travel segment to be spliced;
[0139] The splicing module 300 is used to splice the current segment to be spliced with the spliced segment when the start time of the next segment to be spliced is less than the target time threshold, and use the next segment to be spliced as the new current segment to be spliced until the preset splicing end condition is met to obtain the final transportation distance mileage.
[0140] According to one embodiment of the present invention, the determination module 200 is specifically used to: determine the splicing order of multiple trip segments based on the trip start time of each trip segment and the trip end time of each trip segment; based on the splicing order of multiple trip segments, use the first trip segment as the current trip segment to be spliced, and use the next trip segment adjacent to the current trip segment to be spliced as the next trip segment to be spliced.
[0141] According to one embodiment of the present invention, the determination module 200 is specifically used to: determine whether the trip end time of the current trip segment to be spliced belongs to the first preset time interval; if the trip end time of the current trip segment to be spliced belongs to the first preset time interval, calculate the first sum of the trip end time of the current trip segment to be spliced and the first preset time, and determine whether the first sum is in the first preset time interval; if the first sum is in the first preset time interval, obtain the target time threshold according to the second sum of the trip end time of the current trip segment to be spliced and the second preset time, otherwise, obtain the target time threshold according to the third sum of the trip end time of the current trip segment to be spliced and the third preset time.
[0142] According to one embodiment of the present invention, after determining whether the travel end time of the current itinerary segment to be spliced belongs to the first preset time interval, the determination module 200 is also used to: if the travel end time of the current itinerary segment to be spliced does not belong to the first preset time interval, determine the target time closest to the travel end time of the current itinerary segment to be spliced; calculate the difference between the target time and the travel end time of the current itinerary segment to be spliced, and obtain the target time threshold according to the fourth sum of the travel end time of the current itinerary segment to be spliced, the difference and the fourth preset time.
[0143] According to one embodiment of the present invention, before the current segment to be spliced is spliced with the already spliced segments, the splicing module 300 is further used to: form a travel direction line of the current segment to be spliced according to the travel starting point of the current segment to be spliced and the travel end point of the current segment to be spliced, and obtain a travel vector angle of the current segment to be spliced according to the angle between the travel direction line of the current segment to be spliced and due north; determine the travel starting point and the travel end point of the final segment to be spliced in the already spliced segments, and obtain the ... The starting point of the connecting segment and the end point of the final connecting segment form the travel direction line of the final connecting segment, and the travel vector angle of the final connecting segment is obtained according to the angle between the travel direction line of the final connecting segment and due north; the travel vector angle deviation between the final connecting segment and the current segment to be connected is obtained according to the difference between the travel vector angle of the final connecting segment and the travel vector angle of the current segment to be connected. If the travel vector angle deviation is greater than the preset angle, the mileage corresponding to the connected segment is taken as the final transportation mileage.
[0144] According to one embodiment of the present invention, after determining the target time threshold according to the trip end time of the current trip segment to be spliced, the determination module 200 is further used to: if the trip start time of the next trip segment to be spliced is greater than or equal to the target time threshold, then end the current trip splicing and use the mileage corresponding to the spliced trip segment as the final transportation mileage.
[0145] According to one embodiment of the present invention, the determination module 200 is specifically used to: based on the travel data, select multiple initial travel segments according to the IGOFF signal and IG ON signal of the vehicle; select the travel segments with a driving time greater than or equal to a preset time and a driving distance greater than or equal to a preset distance from the multiple initial travel segments, to obtain multiple travel segments; wherein the starting point of the multiple initial travel segments is when the vehicle switches from the IG OFF signal to the IG ON signal, and the end point of each initial travel segment is when the vehicle switches from the IG ON signal to the IG OFF signal.
[0146] According to the device for calculating the transport distance proposed in the embodiment of the present invention, by dividing the vehicle's travel data into multiple travel segments, and screening the travel segments based on the travel start time and travel end time of each travel segment, the screened target travel segments are spliced, and it is determined whether the preset splicing end condition is met, and finally the travel splicing is terminated when the preset splicing end condition is met, and the final transport distance mileage is output. Thus, by screening and splicing the travel segments, the accurate calculation of the transport distance is achieved, the starting point in the transportation process is effectively determined, and the calculation result is closer to the actual vehicle usage status, which can provide more reference parameters in the design of vehicle fuel tank matching, power chain matching, etc.
[0147] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device may include:
[0148] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .
[0149] When the processor 402 executes the program, the method for calculating the transport distance provided in the above embodiment is implemented.
[0150] Furthermore, the electronic device further comprises:
[0151] The communication interface 403 is used for communication between the memory 401 and the processor 402 .
[0152] The memory 401 is used to store computer programs that can be executed on the processor 402 .
[0153] The memory 401 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.
[0154] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0155] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.
[0156] The processor 402 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0157] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method for calculating the transport distance when the program is executed by a processor.
[0158] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the above distance calculation method when executed by a processor.
[0159] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0160] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0161] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for calculating the transport distance. It is characterized in that The following steps are involved: Get the vehicle's travel data; Determine a plurality of travel segments according to the travel data, determine a current travel segment to be spliced and a next travel segment to be spliced from the splicing order of the plurality of travel segments, and determine a target time threshold according to the travel end time of the current travel segment to be spliced; If the trip start time of the next segment to be spliced is less than the target time threshold, the current segment to be spliced is spliced with the spliced segment, and the next segment to be spliced is used as the new current segment to be spliced, until the preset splicing end condition is met to obtain the final mileage.
2. The method according to claim 1, It is characterized in that The step of determining the current to-be-joined segment and the next to-be-joined segment from the joining order of the plurality of segments comprises: Determining a splicing order of the plurality of trip segments based on a trip start time of each trip segment and a trip end time of each trip segment; Based on the splicing order of the multiple travel segments, the first travel segment is used as the current travel segment to be spliced, and the next travel segment adjacent to the current travel segment to be spliced is used as the next travel segment to be spliced.
3. The method according to claim 1 or 2, It is characterized in that The step of determining the target time threshold according to the travel end time of the current travel segment to be spliced includes: Determine whether the end time of the current trip segment to be spliced belongs to the first preset time interval; If the end time of the current segment to be spliced belongs to the first preset time interval, then calculating a first sum of the end time of the current segment to be spliced and the first preset time, and determining whether the first sum is within the first preset time interval; If the first sum value is within the first preset time interval, the target time threshold is obtained according to the second sum value of the trip end time of the current trip segment to be spliced and the second preset time; otherwise, the target time threshold is obtained according to the third sum value of the trip end time of the current trip segment to be spliced and the third preset time.
4. The method according to claim 3, It is characterized in that After determining whether the end time of the current to-be-joined travel segment falls within the first preset time interval, the method further includes: If the end time of the current segment to be spliced does not belong to the first preset time interval, determining a target time closest to the end time of the current segment to be spliced; The difference between the target time and the travel end time of the current travel segment to be spliced is calculated, and the target time threshold is obtained according to a fourth sum of the travel end time of the current travel segment to be spliced, the difference and a fourth preset time.
5. The method according to claim 1, It is characterized in that Before splicing the current to-be-spliced travel segment with the spliced travel segment, the method further includes: forming a travel direction line of the current travel segment to be spliced according to the travel starting point of the current travel segment to be spliced and the travel end point of the current travel segment to be spliced, and obtaining a travel vector angle of the current travel segment to be spliced according to the travel direction line of the current travel segment to be spliced; Determine a travel starting point and a travel end point of a final spliced travel segment in the spliced travel segments, form a travel direction line of the final spliced travel segment according to the travel starting point and the travel end point of the final spliced travel segment, and obtain a travel vector angle of the final spliced travel segment according to the travel direction line of the final spliced travel segment; The travel vector angle deviation between the final spliced segment and the current segment to be spliced is obtained according to the difference between the travel vector angle of the final spliced segment and the travel vector angle of the current segment to be spliced. If the travel vector angle deviation is greater than a preset angle, the mileage corresponding to the spliced segment is used as the final transportation mileage.
6. The method according to claim 1, It is characterized in that After determining the target time threshold according to the travel end time of the current travel segment to be spliced, the method further includes: If the start time of the next trip segment to be spliced is greater than or equal to the target time threshold, the current trip splicing is terminated, and the mileage corresponding to the spliced trip segment is used as the final transportation mileage.
7. The method according to claim 1, It is characterized in that The determining of a plurality of travel segments according to the travel data comprises: Based on the travel data, a plurality of initial travel segments are screened out according to an IG OFF signal and an IG ON signal of the vehicle; Filtering out the travel segments whose travel duration is greater than or equal to a preset duration and whose travel distance is greater than or equal to a preset distance from the multiple initial travel segments, to obtain the multiple travel segments; The starting points of the multiple initial travel segments are all when the vehicle switches from the IG OFF signal to the IG ON signal, and the ending point of each initial travel segment is when the vehicle switches from the IG ON signal to the IG OFF signal.
8. The method according to claim 1, It is characterized in that The preset splicing end condition is: The start time of the next segment to be spliced is greater than or equal to the target time threshold determined by the end time of the current segment to be spliced; Alternatively, the plurality of travel segments have all been spliced.
9. A device for calculating transport distance, It is characterized in that include: An acquisition module, used to acquire the travel data of the vehicle; a determination module, configured to determine a plurality of travel segments according to the travel data, determine a current travel segment to be spliced and a next travel segment to be spliced from a splicing order of the plurality of travel segments, and determine a target time threshold according to a travel end time of the current travel segment to be spliced; The splicing module is used to splice the current segment to be spliced with the spliced segment when the start time of the next segment to be spliced is less than the target time threshold, and use the next segment to be spliced as the new current segment to be spliced until the preset splicing end condition is met to obtain the final transportation distance mileage.
10. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for calculating the transport distance as claimed in any one of claims 1 to 8.
