Prediction method, terminal and computer readable storage medium
By preprocessing and model training the GPS data of pump trucks and mixer trucks, and combining it with road condition information, the problem of inaccurate vehicle arrival time prediction in existing technologies has been solved, and efficient management in complex environments has been achieved.
Patent Information
- Application Number
- CN202210934212.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-04
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-08-04
AI Technical Summary
Existing technologies struggle to accurately predict the arrival time of pump trucks and mixer trucks under complex road conditions and external interference, and cannot monitor vehicle status in real time, resulting in low management efficiency.
By acquiring vehicle GPS data and task information, a prediction model is trained. Using GPS data preprocessing, trajectory similarity classification, and segmented route analysis, combined with road condition information, the model accurately predicts the time it takes for the vehicle to arrive at the target station and monitors the vehicle status in real time.
It enables accurate prediction of vehicle arrival times under complex road conditions and external interference, improving the convenience and efficiency of engineering management.
Smart Images

Figure CN115310696B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mechanical operation control, and in particular to a prediction method, a terminal and a computer readable storage medium. BACKGROUND
[0002] Pump trucks and mixing trucks are important engineering machinery for pumping and transporting concrete. With the continuous development of urbanization in China, the order volume of each concrete logistics company is increasing, and the demand for real-time supervision of vehicles is growing. Prediction of the arrival time of pump trucks and mixing trucks can facilitate the pre-arrangement of vehicles by administrators, enabling efficient use and monitoring of site engineering vehicles, and achieving cost reduction while maximizing profits.
[0003] As shown in Figure 1 Currently, the industry mainly uses a weighbridge system to feed back the outbound and inbound situations of mixing trucks and pump trucks, and predicts the arrival time of vehicles based on numerous historical feedback values and the departure time of the vehicles. However, predicting the arrival time of mixing trucks and pump trucks based on historical feedback values can only effectively predict the arrival time of vehicles with stable road conditions, and cannot form an accurate prediction under complex road conditions or other external factor interference. In addition, predicting the arrival time of mixing trucks and pump trucks based on historical feedback values cannot monitor the state of vehicles during travel, lacks feedback on real-time state information such as road conditions and vehicle speed, and cannot handle abnormal vehicle situations.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. SUMMARY
[0005] The prediction method, terminal and computer readable storage medium provided by the present application can accurately and efficiently predict the time at which a vehicle arrives at a target site, improving the convenience of engineering management.
[0006] The present application provides a prediction method, comprising:
[0007] Obtaining GPS data and task information of a vehicle, the GPS data including first GPS data and second GPS data, and the task information including a target site;
[0008] Training a prediction model according to the first GPS data and its corresponding task information;
[0009] Determining a predicted time for the vehicle to arrive at the target site corresponding to the second GPS data according to the prediction model and the second GPS data.
[0010] Optionally, the task information further comprises a scheduling time, and before the training of the prediction model according to the first GPS data and the corresponding task information, the method further comprises:
[0011] The GPS data is preprocessed, including at least one of the following:
[0012] The GPS data that cannot be associated with the task information is deleted;
[0013] The GPS data whose distance from the target site meets a preset threshold is screened out;
[0014] The abnormal data in the GPS data is removed;
[0015] The missing data in the GPS data is filled in;
[0016] At least one of the departure site, arrival site, departure time and arrival time in the GPS data is extracted;
[0017] A preset departure time is determined according to the vehicle scheduling time corresponding to the target site, and the GPS data meeting the preset departure time is screened out;
[0018] The distance between GPS track points is calculated, as well as the average speed between the GPS track points, and the total distance between the GPS track points between the departure site and the target site is taken as the distance.
[0019] Optionally, before the training of the prediction model according to the first GPS data and the corresponding task information, the method further comprises:
[0020] According to the track similarity between a plurality of routes corresponding to the first GPS data, the plurality of routes are classified to obtain a first classification result;
[0021] According to the first classification result, a plurality of prediction models matched with the plurality of routes are determined.
[0022] Optionally, the classification of the plurality of routes according to the similarity between the plurality of routes comprises:
[0023] The matching degree of any two routes in the plurality of routes is calculated respectively;
[0024] The plurality of routes are classified according to the matching degree.
[0025] Optionally, the calculation of the matching degree of any two routes in the plurality of routes comprises:
[0026] A first ellipse is constructed according to a first route in the plurality of routes;
[0027] determining a GPS track point in a second route of the plurality of routes falling into the first ellipse as a first matching point;
[0028] determining a first matching degree of the second route relative to the first route according to a proportion of the first matching point to total GPS track points of the second route;
[0029] constructing a second ellipse according to the second route;
[0030] determining a GPS track point in the first route falling into the second ellipse as a second matching point;
[0031] determining a second matching degree of the first route relative to the second route according to a proportion of the second matching point to total GPS track points of the first route;
[0032] obtaining a third matching degree between the first route and the second route according to the first matching degree and the second matching degree.
[0033] Optionally, the training of the prediction model according to the first GPS data and the corresponding task information comprises:
[0034] segmenting the route to obtain a plurality of segmented routes;
[0035] calculating driving times of the segmented routes according to the prediction model to obtain a predicted arrival time of the vehicle at a target station;
[0036] adjusting the prediction model according to the predicted arrival time and an actual arrival time.
[0037] Optionally, the segmenting of the route comprises:
[0038] classifying the route according to road condition information to obtain a second classification result, the road condition information comprising at least one of congestion type, weather type and road type;
[0039] segmenting the route according to the second classification result.
[0040] Optionally, the determination of the predicted time of the vehicle arriving at the target station corresponding to the second GPS data according to the prediction model and the second GPS data comprises:
[0041] determining a first prediction model corresponding to a to-be-predicted route in the second GPS data;
[0042] segmenting the to-be-predicted route;
[0043] determining a road segment corresponding to the vehicle and a position of the vehicle according to the second GPS data;
[0044] calculating a first travel time of a remaining part of the road section and a second travel time of a remaining road section in the to-be-predicted road section, respectively;
[0045] determining a predicted time for the vehicle to reach the target station corresponding to the second GPS data according to the first travel time and the second travel time.
[0046] The application further provides a terminal, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the steps of the prediction method.
[0047] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the prediction method.
[0048] The prediction method, the terminal and the computer readable storage medium provided by the application can accurately and efficiently predict the time for the vehicle to reach the target station, and improve the convenience of engineering management. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 a flowchart of a time-to-arrival prediction method in the prior art;
[0050] Figure 2 a flowchart of the prediction method according to an embodiment of the application;
[0051] Figure 3 a specific flowchart of the prediction method according to an embodiment of the application;
[0052] Figure 4 a flowchart of acquiring GPS data of a vehicle according to an embodiment of the application;
[0053] Figure 5 one of the schematic diagrams of a vehicle road trajectory according to an embodiment of the application;
[0054] Figure 6 the other of the schematic diagrams of a vehicle road trajectory according to an embodiment of the application;
[0055] Figure 7A structural schematic diagram of a prediction system according to an embodiment of the present application. DETAILED DESCRIPTION
[0056] The specific embodiments of the present application are described in further detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not used to limit the scope of the present application.
[0057] Figure 2 A flowchart of a prediction method according to an embodiment of the present application. Figure 3 A specific flowchart of a prediction method according to an embodiment of the present application. As shown in Figure 2 and Figure 3 The present embodiment provides a prediction method, comprising:
[0058] Step 201: Obtain GPS data and task information of the vehicle, the GPS data comprising first GPS data and second GPS data, and the task information comprising a target station.
[0059] In the present embodiment, the first GPS data can be historical GPS data of the vehicle, and the second GPS data can be historical GPS data and / or real-time GPS data of the vehicle. The task information can be obtained by querying a relevant engineering vehicle information table.
[0060] The prediction method of the present embodiment mainly comprises the following steps: GPS data extraction and preprocessing, prediction model construction, arrival time prediction, and prediction model updating. The GPS data extraction and preprocessing is used to extract information such as departure time, distance, speed, and arrival time implied in the first GPS data, and to eliminate abnormal values and fill in missing data. The prediction model construction is based on the first GPS data to construct a segmented prediction model for estimating the arrival time of the vehicle. The arrival time prediction part uses the second GPS data to predict the arrival time of the vehicle. The prediction model updating part is used to update the historical data and the prediction model, thereby improving the accuracy of the prediction result.
[0061] In an embodiment, the task information further comprises a dispatch time. After obtaining the GPS data of the vehicle, before training the prediction model according to the first GPS data and the corresponding task information, the GPS data needs to be preprocessed, including at least one of the following:
[0062] deleting GPS data that cannot be associated with the task information;
[0063] screening GPS data whose distance between the position of the vehicle and the target station meets a preset threshold;
[0064] eliminating abnormal data in the GPS data;
[0065] filling in missing data in the GPS data;
[0066] Extract at least one of the following from the GPS data: departure station, arrival station, departure time, and arrival time;
[0067] The preset departure time is determined based on the vehicle scheduling time corresponding to the target station, and GPS data that meets the preset departure time is filtered.
[0068] Calculate the distance between GPS track points and the average speed between GPS track points, and take the sum of the distances between GPS track points between the originating station and the target station as the distance.
[0069] In this embodiment, GPS data extraction preprocessing mainly includes fixed station GPS data extraction, GPS data outlier removal, GPS data missing value filling, and GPS data feature extraction.
[0070] like Figure 4 As shown, after obtaining the vehicle's GPS data, the system first uses the GPS number in the vehicle information table to eliminate trips in the vehicle's trip log that do not contain GPS sensors, thus narrowing the search scope of the GPS database.
[0071] Furthermore, by combining the retrieved relevant engineering vehicle information tables, the vehicle dispatch times for the relevant projects can be obtained. A vehicle may have overlapping target stations within a certain period. By using the vehicle's dispatch time for a specific project, redundant information in the GPS table, excluding that target station, can be filtered out. The filtering rule is to remove GPS information beyond a fixed time width starting from the dispatch time. Generally, the time interval between the dispatch time and vehicle departure is relatively large and irregular, so a window period needs to be set to reduce the amount of data computation. The value of the window period varies depending on the target station, and the specific time width can be selected based on experience, and then adaptively adjusted according to the selection results. The time from receiving the dispatch instruction to the vehicle's departure is generally within half an hour. If the system's task information stores the vehicle's departure time, the above steps can be skipped.
[0072] Since the latitude and longitude of the vehicle's departure station and the target stations of each project are fixed, the GPS data changes of the vehicle are monitored starting from the vehicle's dispatch time. Once the difference in latitude and longitude between the vehicle and the fixed station (i.e., the departure station or the target station) exceeds a certain threshold, it is determined that the vehicle has departed or arrived. Furthermore, the GPS data of the vehicle from the starting point to the destination can be extracted. The specific calculation method is as follows:
[0073] dis((lat1,lon1),(lat2,lon2))<λ
[0074] Here, dis() calculates the distance between the vehicle and the fixed station, λ is the threshold value for the distance between the vehicle and the fixed station, lat1 represents the latitude of the vehicle's location, long1 represents the longitude of the vehicle's location, lat2 represents the latitude of the fixed station's location, and long2 represents the longitude of the fixed station's location.
[0075] It should be noted that the GPS data in this embodiment is stored using a time-series database, such as InfluxDB, which has low network overhead, low query latency, and supports high-concurrency writes. The extracted GPS data is all the GPS data of trains from a certain station to a certain project.
[0076] To address the issue of drift and abnormal data generated by the GPS systems on concrete mixer trucks and pump trucks, this application first employs a median filter to remove abnormal data from the selected GPS trajectory points. Median filtering is a nonlinear signal processing technique based on ordination statistics theory that effectively suppresses noise. The basic principle of median filtering is to replace the value of a point in a digital image or sequence with the median value of all points in its neighborhood, making the surrounding pixel values closer to the true value, thereby eliminating isolated noise points. For example... Figure 5 As shown, the current path contains 6 GPS track points, P1 to P6. P5 is clearly abnormal data, so it can be deleted. Then, the location information of P5 is recalculated using a median filter, resulting in:
[0077] P5 = Med(P1, ..., P5)
[0078] The method of using median filtering to correct abnormal data is relatively simple and has a good filtering effect on noise generated by trajectory drift.
[0079] Secondly, the GPS devices on concrete mixer trucks and pump trucks are prone to disconnection in areas with weak or strong signal interference, such as tunnels and high-rise buildings, resulting in insufficient or missing GPS data in some areas. To address this, this application employs Akima interpolation to fill in the missing values. The GPS data extracted in chronological order is represented as {P1, P2, ..., P...} i P j , ..., P n The length between two adjacent GPS points is L. ij Assume the acceleration dv of the mixer truck i / dt i It changes continuously over the time interval [t]. i , t j The cubic interpolation polynomial for the internal velocity v and time t is:
[0080] v(t) = k0 + k1(tt)i )+k2(t-t i ) 2 +k3(t-t i ) 3
[0081]
[0082]
[0083] Assuming the interval of interpolation is T, then t=t i +T, N=(t j -t i ) / T speed values are calculated in the interval [t i , t j ], so the distance between two data points is divided into l1, l2,... l N .
[0084] l N =(v N +v N-1 )*T / 2
[0085] Through the longitude and latitude coordinates of the starting point and the distance l N travelled by the vehicle in time T, the longitude and latitude coordinates of the vehicle at the next time can be calculated in turn. Akima interpolation method can make up for data missing caused by external factors or equipment defects, and it can better reflect the change of the speed of the vehicle during driving.
[0086] The time interval of the station to the target station can be obtained by combining the filtered GPS table of a certain trip with the specific GPS values of the station and the target station. The remaining distance between the current point of the vehicle and the target station can be obtained by the Haversin formula (secant formula).
[0087] Specifically, the distance calculation between GPS data points, the instantaneous speed calculation of the vehicle, the arrival time calculation of the vehicle, etc. are carried out by the Haversin formula, and the Haversin formula is:
[0088]
[0089]
[0090] d represents the distance between two GPS data points, R represents the radius of the earth, ψ1 and ψ2 represent the latitudes of two GPS data points, and Δλ represents the longitude difference value of two GPS data points.
[0091] Step 202: training the prediction model according to the first GPS data and the corresponding task information.
[0092] In the embodiment, before training the prediction model according to the first GPS data and the corresponding task information, a model construction step is further included, specifically:
[0093] According to the trajectory similarity between the plurality of routes corresponding to the first GPS data, the plurality of routes are classified to obtain a first classification result;
[0094] According to the first classification result, a plurality of prediction models matched with the plurality of routes are determined.
[0095] According to the similarity between the plurality of routes corresponding to the first GPS data, the plurality of routes are classified, including:
[0096] The matching degree of any two routes in the plurality of routes is calculated respectively;
[0097] The plurality of routes are classified according to the matching degree.
[0098] The matching degree of any two routes in the plurality of routes is calculated respectively, including:
[0099] A first ellipse is constructed according to a first route in the plurality of routes;
[0100] A GPS trajectory point in a second route in the plurality of routes falling into the first ellipse is determined as a first matching point;
[0101] According to the proportion of the first matching point to the total GPS trajectory points of the second route, a first matching degree of the second route relative to the first route is determined;
[0102] A second ellipse is constructed according to the second route;
[0103] A GPS trajectory point in the first route falling into the second ellipse is determined as a second matching point;
[0104] According to the proportion of the second matching point to the total GPS trajectory points of the first route, a second matching degree of the first route relative to the second route is determined;
[0105] According to the first matching degree and the second matching degree, a third matching degree between the first route and the second route is obtained.
[0106] In the embodiment, for the route data of the first GPS data calculated in the foregoing step, the trajectory is classified according to the similarity measurement method, and then the path of the vehicle to be predicted is determined, and the arrival time is predicted. The embodiment of the application adopts an elliptical indefinite motion-based method to measure the spatial similarity of the trajectory, and first defines an AUB distance (Approximate upper bound distance):
[0107] aub(p i , p i+1) = 2 * sin45° * euc(p i , p i+1 )
[0108] euc(p i , p i+1 ) represents the Euclidean distance between p i and p i+1 . Based on the AUB distance, an ellipse is constructed:
[0109] Ellipse focal distance: ε = euc(p i , p i+1 )
[0110] Ellipse long axis distance: μ1 = aub(p i , p i+1 )
[0111] Ellipse short axis distance:
[0112] The range of the ellipse represents the possibility of movement between two points on the trajectory. For the ellipse constructed on the first route, if the GPS trajectory point of the other route is in the ellipse, it is judged as a matching point. The specific calculation method is:
[0113]
[0114] After obtaining the matching degree of each point on the other trajectory, the similarity of the two trajectories as a whole, i.e., the matching degree, can be calculated:
[0115]
[0116] Wherein, A(P, S) represents the matching degree of route P and route S, match(p, E(S)) represents the trajectory point p on route P falling into the ellipse of route S, N P represents the total trajectory points of route P, and match(s, E(P)) represents the trajectory point s on route S falling into the ellipse of route P, N S represents the total trajectory points of route S.
[0117] In an embodiment, a prediction model is trained according to the first GPS data and the corresponding task information, comprising:
[0118] Segmenting the route to obtain a plurality of segmented routes;
[0119] Calculating the driving time of each segmented route according to the prediction model to obtain the predicted arrival time of the vehicle at the target station;
[0120] Adjusting the prediction model according to the predicted arrival time and the actual arrival time.
[0121] For example,Figure 6 As shown, the gray dots are the starting points, and the black dots are the GPS track points. The driving track between fixed routes is fitted by referring to the idea of differentiation, the distance between each GPS track point is calculated, and the average speed between each GPS track points is calculated. The total distance is the sum of the distances of each segment.
[0122] The specific calculation method is as follows:
[0123] S 总 =S1+S2+…+S n
[0124]
[0125] Wherein, S n is the distance length of the road segment n, v n is the historical average driving speed of the road segment n, and t n is the historical average driving time of the road segment n.
[0126] In an embodiment, the road is segmented, including:
[0127] According to the road condition information, the road is classified to obtain a second classification result, and the road condition information includes at least one of a congestion type, a weather type, and a road type;
[0128] According to the second classification result, the road is segmented.
[0129] Since the route between the mixing station and the target station is relatively fixed, the embodiment of the application adopts a segmented form to divide the road into n segments. The road condition information can include weather type, road type, congestion type, etc. Among them, the weather type can be divided into extreme bad weather and regular weather, and the extreme weather is, for example, strong wind, heavy rain, heavy snow, thunderstorm, etc., and the regular weather is, for example, sunny, cloudy, light rain, etc. The road type can be divided into a first-class road and a second-class road, and the first-class road can be a plain, an urban road, a hard road surface, etc., and the second-class road can be a mountain, a hilly area, a rural road, a soft road, etc.
[0130] For different classification results, different road segmentation methods can be adopted. Exemplarily, the congestion type can be divided into congestion and non-congestion to segment the road. According to the second classification result, the road is segmented, including:
[0131] If the road belongs to a non-congestion road, the road is segmented according to geographical feature information;
[0132] If the road belongs to a congestion road, the road is uniformly segmented according to the number of track points and the length of the road.
[0133] For the path of the target site route not congested, based on different street, cross, single or double lane, etc. Geographic feature information to segment, finally the insufficient or excessive GPS points are filled in the end; For the congested section, it can be segmented according to the traffic situation, and the congestion situation is divided into three situations: serious congestion, moderate congestion and light congestion, which correspond to A, B and C in table 1. Different segmentation numbers are set for the above three congestion situations, and the segmentation numbers decrease in turn.
[0134] The determination method based on congestion coefficient is as follows:
[0135]
[0136] ρ=N W / D W
[0137] ρ is obtained by sliding window method, N W and D W respectively represent the number of trajectory points and distance length contained in the sliding window.
[0138] The specific segmentation method is shown in table 1:
[0139] Table 1 And congestion level comparison table
[0140]
[0141] In order to avoid the distance between some sections after segmentation being too large, first of all, the average method is used to increase the number of GPS trajectory points of the original route. After the route is segmented, the average driving time, distance length, average speed and other information of each section are calculated based on the historical GPS data, and the calculated model parameters are stored in the model warehouse.
[0142] Step 203: determining the predicted time of the vehicle reaching the target site corresponding to the second GPS data according to the prediction model and the second GPS data.
[0143] According to the prediction model and the second GPS data, the predicted time of the vehicle reaching the target site corresponding to the second GPS data is determined, including:
[0144] Determine the first prediction model corresponding to the to-be-predicted route in the second GPS data;
[0145] Segmenting the to-be-predicted route;
[0146] Determining the section and the position of the vehicle corresponding to the second GPS data;
[0147] Respectively calculating the first driving time of the remaining part of the section and the second driving time of the remaining section in the to-be-predicted route;
[0148] The predicted time of the vehicle reaching the target station corresponding to the second GPS data is determined according to the first travel time and the second travel time.
[0149] In the embodiment, for the vehicle to be predicted, on the basis of obtaining the current travel path of the vehicle, the road section where the vehicle is located is first determined. After determining the road section, the expression of the remaining travel time of the road section is calculated as follows:
[0150] Road section remaining travel time = road section remaining distance / vehicle travel speed
[0151] The travel speed of the vehicle is the result of weighting the instantaneous speed of the vehicle and the historical average speed of the road section, and the specific weighting method is:
[0152]
[0153] wherein v w is the instantaneous speed of the vehicle, and v i is the historical average speed of the road section.
[0154] The subsequent road section travel time is the sum of the statistical times of all subsequent road sections, and the predicted arrival time at the destination is:
[0155] Arrival time = road section remaining travel time + subsequent road section travel time
[0156] In this way, the real-time GPS data information of the vehicle is monitored on the basis of considering a large amount of historical GPS data, and the situation of abnormal GPS signal can be processed, thereby improving the accuracy of the predicted arrival time. In addition, the method based on GPS data can estimate other information such as the current running speed of the vehicle and the remaining length of the road, thereby facilitating the administrator to monitor the real-time running status of the vehicle.
[0157] In an embodiment, since external factors such as seasons, time periods, and weather can affect the accuracy of the model prediction. The mixer truck and the pump truck generate new information data during the dispatching process and store the data in the data storage module. The features of the newly generated data are extracted at regular intervals, and the parameters of the prediction module are updated, which can reduce the influence of external factors on the prediction accuracy. The embodiment of the present application adopts a model updating method to reduce the influence of external factors such as seasons, time periods, and weather on the prediction accuracy, thereby improving the robustness of the model.
[0158] In an embodiment, from the vehicle outbound time, a program is set to query the database storing GPS information at a fixed interval, and the total distance of the GPS data is calculated by step 201. The real-time GPS data obtained by querying is calculated, and the driving distance of the vehicle to be predicted, the road section, and other information are obtained, and finally the arrival time is predicted by the model constructed by step 2. If the GPS signal of the vehicle driving road section is abnormal, if the GPS data is the same as before for three consecutive times, it is determined that the signal is abnormal.
[0159] For the detection point of signal abnormality, the predicted arrival time at the destination is:
[0160] Arrival time = last time signal normal prediction time - current time and last time signal normal time interval
[0161] The prediction method of the present application comprises: acquiring GPS data and task information of a vehicle, the GPS data comprising first GPS data and second GPS data, and the task information comprising a target site; training a prediction model according to the first GPS data and the corresponding task information; and determining a prediction time of the vehicle to arrive at a target site corresponding to the second GPS data according to the prediction model and the second GPS data. The present application can accurately and efficiently predict the time of the vehicle to arrive at the target site, and improve the convenience of engineering management.
[0162] As shown in Figure 7 The present application also provides a prediction system, comprising a data acquisition module, a data transmission module, a display module, a prediction module, and a data storage module.
[0163] The data acquisition module comprises a power supply, a data transmission, a GPS sensor, and other sub-modules. The power supply module is used to supply power to the GPS sensor module, and can also supply power to other modules such as data transmission and data display. The GPS sensor sub-module is used to sense the geographic position information of the pump truck and the mixer truck, and the relevant information is transmitted to the data transmission module after processing.
[0164] The data transmission module uses a wireless network to transmit the data collected by the GPS sensor, the results of the server prediction calculation, and the vehicle driving speed and other information.
[0165] The display module is used to display the prediction results, vehicle driving speed, and other information transmitted by the transmission module.
[0166] The arrival time prediction module comprises a GPS data preprocessing sub-module, a feature information extraction sub-module, and an arrival time prediction sub-module. The GPS data preprocessing sub-module is used to filter the GPS data in the inventory table, including information such as departure station, arrival station, departure time, and arrival time. The feature information extraction sub-module is used to further calculate the preprocessed data, including distance calculation between GPS data points by the Haversin formula, instantaneous speed calculation of the vehicle, arrival time calculation of the vehicle, and the like. The arrival time prediction sub-module is used to model the feature information such as distance, speed, and time period based on the provided arrival time prediction method, and predict the time of the vehicle arriving at the station according to real-time GPS information.
[0167] The data storage module comprises a source data warehouse, a feature data warehouse, and a model warehouse, and the like. The source data warehouse sub-module is used to store historical vehicle GPS data, vehicle service stations, delivery points, project names, delivery order numbers, dispatch times, and the like by using a time series database such as InfluxDB. The feature data warehouse sub-module is used to store preprocessed GPS data, road segment remaining distance, road segment remaining time, and vehicle instantaneous speed by using a structured database such as Mysql. The model warehouse is used to store model paths and model parameters by using a structured database such as Mysql.
[0168] The application further provides a terminal, which comprises a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the steps of the prediction method.
[0169] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the prediction method.
[0170] In the embodiments of the mobile terminal and the computer readable storage medium provided in the application, all the technical features of the prediction method embodiments can be included, and the description and explanation content is basically the same as that of the above method embodiments, which will not be repeated here.
[0171] In the drawings, the sizes and relative sizes of layers and regions are exaggerated for clarity. It should be understood that when an element such as a layer, a region, or a substrate is referred to as being "formed on", "disposed on", or "located on" another element, the element can be directly disposed on the other element, or there can be an intermediate element. Conversely, when an element is referred to as being "directly formed on" or "directly disposed on" another element, there is no intermediate element.
[0172] In this article, the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inner", "outer", "vertical", "horizontal" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the purpose of expressing the technical solution clearly and conveniently, and therefore cannot be understood as a limitation on the present application.
[0173] In this article, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; can be mechanical connection, or electrical connection; can be directly connected, or indirectly connected through intermediate media, can be the internal communication of two elements. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0174] In this article, the ordinal adjectives "first", "second" and the like used in the description and in the claims serve merely to distinguish the similar elements, and do not necessarily imply a given order, or a time, spatial, hierarchical or other limitation.
[0175] In this article, unless otherwise stated, the meaning of "a plurality of", "several" is two or more.
[0176] In this article, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, in addition to containing the listed elements, other elements not explicitly listed can also be contained.
[0177] The technical features of the above-described embodiments can be combined in any manner. In order to make the description simple, all possible combinations of the technical features in the above-described embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope disclosed in this specification.
[0178] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of prediction, characterized by, The method comprises the following steps: obtaining GPS data and task information of a vehicle, wherein the GPS data comprises first GPS data and second GPS data, and the task information comprises target stations; training a prediction model according to the first GPS data and the corresponding task information; determining a predicted time for the vehicle to arrive at a target station corresponding to the second GPS data according to the prediction model and the second GPS data; before the step of training the prediction model according to the first GPS data and the corresponding task information, the method further comprises the following steps: classifying a plurality of routes corresponding to the first GPS data according to the similarity of trajectories between the routes to obtain a first classification result; determining a plurality of prediction models matched with the plurality of routes according to the first classification result; the step of classifying the plurality of routes according to the similarity between the routes comprises the following steps: respectively calculating the matching degree of any two routes in the plurality of routes; classifying the plurality of routes according to the matching degree; the step of respectively calculating the matching degree of any two routes in the plurality of routes comprises the following steps: constructing a first ellipse according to a first route in the plurality of routes; determining a first matching point in a second route in the plurality of routes as a GPS trajectory point falling within the first ellipse; determining a first matching degree of the second route relative to the first route according to the proportion of the first matching point to the total GPS trajectory points of the second route; constructing a second ellipse according to the second route; determining a second matching point in the first route as a GPS trajectory point falling within the second ellipse; determining a second matching degree of the first route relative to the second route according to the proportion of the second matching point to the total GPS trajectory points of the first route; determining a third matching degree between the first route and the second route according to the first matching degree and the second matching degree.
2. The prediction method of claim 1, wherein, The task information further comprises a scheduling time, and before the step of training the prediction model according to the first GPS data and the corresponding task information, the method further comprises the following steps: preprocessing the GPS data, including at least one of the following: deleting the GPS data that cannot be associated with the task information; screening the GPS data whose distance between the position of the vehicle and the target station satisfies a preset threshold; eliminating abnormal data in the GPS data; filling in missing data in the GPS data; extracting at least one of the departure station, the arrival station, the departure time and the arrival time in the GPS data; determining a preset departure time according to the vehicle scheduling time corresponding to the target station, and screening the GPS data satisfying the preset departure time; calculating the distance between GPS trajectory points and the average speed between the GPS trajectory points, and taking the sum of the distance between the GPS trajectory points between the departure station and the target station as a route.
3. The prediction method of claim 1, wherein, The step of training the prediction model according to the first GPS data and the corresponding task information comprises the following steps: segmenting the route to obtain a plurality of segmented routes; According to the prediction model, a travel time of the segmented route is calculated respectively to obtain a predicted arrival time of the vehicle at a target station; According to the predicted arrival time and an actual arrival time, the prediction model is adjusted.
4. The prediction method of claim 3, wherein, The segmenting of the route comprises: According to road condition information, the route is classified to obtain a second classification result, the road condition information comprising at least one of a congestion type, a weather type and a road type; According to the second classification result, the route is segmented.
5. The prediction method of claim 3, wherein, The determining of the predicted time of the vehicle to arrive at the target station corresponding to the second GPS data according to the prediction model and the second GPS data comprises: A first prediction model corresponding to a to-be-predicted route in the second GPS data is determined; The to-be-predicted route is segmented; According to the second GPS data, a road segment corresponding to the vehicle and a position of the vehicle are determined; First travel times of remaining parts of the road segments and second travel times of remaining road segments in the to-be-predicted route are calculated respectively; According to the first travel times and the second travel times, a predicted time of the vehicle to arrive at the target station corresponding to the second GPS data is determined.
6. A terminal, characterized by comprising: The terminal comprises a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements steps of the prediction method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements steps of the prediction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for acquiring arrival time of vehicle
CN104123841A
Method and device for determining vehicle destination, electronic equipment and medium
CN112749740A