Vehicle stopping behavior analysis and prediction method and system based on multi-task learning
The multi-task learning method is used to capture the spatiotemporal dependence of vehicle stay behavior, which improves the accuracy of stay behavior prediction, solves the problem of ignoring the correlation between tasks in the existing technology, and is applied to traffic optimization and personalized services.
Patent Information
- Application Number
- PCT/CN2023/089134
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2024-09-12
AI Technical Summary
The existing technology ignores the spatiotemporal correlation and task dependence between different prediction tasks in the analysis of vehicle stay behavior, resulting in insufficient prediction accuracy.
Using a method based on multi-task learning, a deep recurrent neural network is used to extract the spatiotemporal characteristics of the vehicle's stay behavior, and a multi-task learning prediction network is used to capture the correlation between the stay location and stay duration, and build a stay location task model and stay duration task model. , perform simultaneous learning and prediction.
It improves the accuracy of vehicle stay behavior prediction and supports applications such as point of interest recommendation, personalized travel planning, targeted advertising, and smart parking.
Smart Images

Figure CN2023089134_12092024_PF_FP_ABST
Abstract
Description
Vehicle stop behavior analysis and prediction method and system based on multi-task learning Technical Field
[0001] The present invention mainly relates to the fields of trajectory data mining and intelligent traffic optimization, and specifically to a vehicle stop behavior analysis and prediction method and system based on multi-task learning. Background Art
[0002] Vehicle stop behavior analysis refers to the statistical analysis of relevant data obtained from vehicle stop behavior, from which the patterns of users' travel intentions and activity attributes are discovered, and these patterns are combined with strategies such as urban road network traffic operation optimization. It plays a key role in recommending points of interest, preventing road safety incidents, personalized route recommendations, planning urban roads, and improving traffic efficiency.
[0003] In recent years, analyzing and mining the deep features of traffic big data, as well as modeling and predicting them, has become a hot topic in the field of urban computing, attracting the attention of many experts and companies both domestically and internationally. Existing work primarily explores the internal spatiotemporal correlations of individual prediction tasks, such as traffic flow, speed, and travel time, and introduces deep learning methods to model and predict traffic data. These efforts ignore the spatiotemporal correlations and task dependencies between different prediction tasks, focusing solely on individual tasks and missing inter-task dependencies, such as where and how long a vehicle stops. Capturing these inter-task dependencies to better model traffic data would significantly improve prediction accuracy. Therefore, it is crucial to consider incorporating multi-task learning into vehicle stop behavior analysis and prediction systems.
[0004] Summary of the Invention
[0005] The purpose of the present invention is to address the shortcomings of the existing technology and propose a vehicle stop behavior analysis and prediction method and system based on multi-task learning.
[0006] In order to achieve the above technical objectives, the technical solution of the present invention is:
[0007] According to a first aspect of an embodiment of the present invention, a vehicle stop behavior analysis and prediction method based on multi-task learning is provided, the method comprising the following steps:
[0008] S1, collects vehicle GPS and OBD data including vehicle ID after desensitization, trip start time, start longitude, start latitude, end time, end longitude and end latitude;
[0009] S2, pre-processing the vehicle GPS and OBD data to obtain vehicle stop behavior data including stop location and stop duration; and using a deep recurrent neural network to extract spatiotemporal features of the pre-processed vehicle stop behavior;
[0010] S3, inputs the spatiotemporal features into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the multi-task learning prediction network obtains the correlation between the stop location prediction task and the stop duration prediction task to predict the stop location and stop duration.
[0011] Furthermore, the vehicle GPS and OBD data are pre-processed to obtain the dwell time, including:
[0012] Sort vehicle GPS and OBD data by start time;
[0013] Delete the GPS and OBD data of vehicles whose end time of the previous item is later than or equal to the start time of the next item, delete the GPS and OBD data of vehicles whose stop time is less than or equal to the start time, and delete the GPS and OBD data of vehicles whose start and stop locations are inconsistent;
[0014] Subtract the start time of the second item from the end time of the first item in the vehicle GPS and OBD data to get the length of stay.
[0015] Furthermore, the vehicle GPS and OBD data are pre-processed to obtain the following locations:
[0016] According to the user ID, the vehicle GPS data and OBD data are aligned and merged by timestamp, and sorted by user ID to obtain vehicle trajectory data;
[0017] Determine whether the distance between any track point and its adjacent track point in the vehicle track data is less than a distance threshold;
[0018] If it is less than the distance threshold, the time difference between the two track points is calculated; if the time difference is greater than the time difference threshold and the speed of the track point is 0, the stop state of the track point is marked at the stop start time, and the vehicle starts at the stop end time, and the stop point is recorded;
[0019] Get the set of stay points for each user;
[0020] Get the set of stay points of all users.
[0021] Furthermore, the deep recurrent neural network is used to extract spatiotemporal features of the pre-processed vehicle stop behavior, including:
[0022] Dividing the vehicle stop behavior data into several levels of vehicle stop behavior data according to time intervals;
[0023] The vehicle parking behavior data at a certain level is processed through the first-level recurrent neural network;
[0024] The vehicle stop behavior data between layers is processed through the second-layer recurrent neural network;
[0025] The vehicle stop behavior data is transformed between the first-level recurrent neural network and the second-level recurrent neural network to encode the vehicle stop behavior data and obtain spatiotemporal features.
[0026] Furthermore, the vehicle stop behavior data at a certain level is processed by the first-level recurrent neural network, including:
[0027] in, Indicates the concatenation of vectors, el is the longitude of the location where the user's vehicle stops, et is the latitude of the location where the user's vehicle stops, h i-1 Represents the running status of the first level recurrent neural network at the i-1th iteration;
[0028] The vehicle stop behavior data between layers is processed by the second-level recurrent neural network, including:
[0029] Among them, eu represents the vector information that uniquely identifies the user ID, hn represents the hidden state information obtained after the iteration of the first-level recurrent neural network, and h j-1 Represents the running status of the second-level recurrent neural network at the j-1th iteration.
[0030] Furthermore, the spatiotemporal features are input into a multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the multi-task learning prediction network is used to obtain the correlation between the stop location prediction task and the stop duration prediction task, so as to predict the stop location and stop duration, including:
[0031] The spatiotemporal features are input into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the stop location task model and the stop duration task model are constructed using the long short-term memory network. The stop location task model and the stop duration task model are learned simultaneously through the multi-task learning prediction network, and the correlation between the stop location prediction task and the stop duration prediction task is explored to predict the stop location and stop duration in the future time period.
[0032] Among them, the multi-task learning process includes: selecting the relu function as the activation function, using the mean square error function as the loss function for predicting the length of stay, and using the cross entropy function as the loss function for predicting the stay location; the loss function of the multi-task deep learning network is the sum of the mean square error function and the cross entropy function, and the mean square error function and the cross entropy function are optimized simultaneously to learn and predict the stay location and stay duration in the future time period.
[0033] According to a second aspect of an embodiment of the present invention, a vehicle stop behavior analysis and prediction system based on multi-task learning is provided, comprising:
[0034] The data collection module collects vehicle GPS and OBD data, including the desensitized vehicle ID, trip start time, start longitude, start latitude, end time, end longitude, and end latitude;
[0035] The vehicle stop behavior data acquisition module pre-processes the vehicle GPS and OBD data to obtain vehicle stop behavior data including stop location and stop duration; and uses a deep recurrent neural network to extract spatiotemporal features of the pre-processed vehicle stop behavior;
[0036] The multi-task learning prediction module inputs the spatiotemporal features into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the multi-task learning prediction network obtains the correlation between the stop location prediction task and the stop duration prediction task to predict the stop location and stop duration.
[0037] Furthermore, it also includes:
[0038] The user terminal includes a prediction result receiving module and a user matching module;
[0039] The prediction result receiving module receives the vehicle stop behavior prediction results output by the multi-task learning prediction module and transmits them to the user matching module;
[0040] The user matching module matches the dwell behavior prediction results with the user and feeds back the matching results to the user.
[0041] According to a third aspect of an embodiment of the present invention, an electronic device is provided, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned vehicle stop behavior analysis and prediction method based on multi-task learning.
[0042] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned vehicle stop behavior analysis and prediction method based on multi-task learning is implemented.
[0043] Compared with the existing technology, the present invention has the following advantages: the present invention provides a vehicle stop behavior analysis and prediction method based on multi-task learning. In addition to considering the vehicle's historical stop behavior, the present invention also considers the correlation between the stop location prediction task and the stop duration prediction task. The present invention inputs spatiotemporal features into the multi-task learning prediction network. Based on the vehicle's historical stop behavior, the multi-task learning prediction network obtains the correlation between the stop location prediction task and the stop duration prediction task to predict the stop location and the stop duration. The spatiotemporal dependency of vehicle stop behavior can be analyzed, thereby improving the accuracy of stop behavior prediction. The present invention provides support for applications such as point of interest recommendation, personalized travel planning, targeted advertising, and smart parking. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] FIG1 is a flow chart of a vehicle stop behavior analysis and prediction method based on multi-task learning proposed in an embodiment of the present invention;
[0046] FIG2 is a flowchart of the steps for extracting the residence time according to an embodiment of the present invention;
[0047] FIG3 is a flowchart of the steps of extracting a stay location according to an embodiment of the present invention;
[0048] FIG4 is a schematic diagram of a deep recurrent neural network provided by an embodiment of the present invention;
[0049] FIG5 is a schematic diagram of a vehicle stop behavior analysis and prediction system based on multi-task learning provided by an embodiment of the present invention;
[0050] FIG6 is a comparison chart of the accuracy of the multi-task prediction network and the LSTM network provided by an embodiment of the present invention;
[0051] FIG7 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present invention.
[0053] The following is a further detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings. In the absence of conflict, the features of the following embodiments and implementations can be combined with each other.
[0054] As shown in FIG1 , an embodiment of the present invention further provides a vehicle stop behavior analysis and prediction method based on multi-task learning, comprising the following steps:
[0055] Step S1, collecting vehicle GPS (Global Positioning System) and OBD (On-Board Diagnostics) data, the vehicle GPS and OBD data include vehicle ID after desensitization, trip start time, start longitude, start latitude, end time, end longitude and end latitude and other information.
[0056] In step S2, the vehicle GPS and OBD data collected in step S1 are preprocessed to obtain vehicle stop behavior data including the stop location and stop duration; and a deep recurrent neural network is used to extract spatiotemporal features of the preprocessed vehicle stop behavior.
[0057] Furthermore, the step S2 specifically includes the following steps:
[0058] Step S201 , pre-processing the vehicle GPS and OBD data collected in step S1 to obtain vehicle stop behavior data including stop location and stop duration.
[0059] As shown in FIG2 , the specific steps for obtaining the stay duration are as follows:
[0060] S2011, sorting the vehicle GPS and OBD data by start time.
[0061] S2012, delete the GPS and OBD data of the vehicle whose end time of the previous item is later than or equal to the start time of the next item, and delete the GPS and OBD data of the vehicle whose stop time is less than or equal to the start time.
[0062] S2013: Based on the sorted vehicle GPS and OBD data, the start time of the next item is subtracted from the end time of the previous item to obtain the dwell time. Furthermore, GPS and OBD data of vehicles with inconsistent start and stop locations are removed, and GPS and OBD data of vehicles with dwell times less than a dwell time threshold are deleted. In this example, the dwell time threshold is set to 5 minutes.
[0063] As shown in Figure 3, the specific extraction steps for obtaining the stay location are as follows:
[0064] S2014: Align and merge the vehicle GPS data and OBD data according to the timestamp based on the user ID, and sort them according to the user ID to obtain vehicle trajectory data T.
[0065] S2015 , determining whether the distance between any trajectory point in the vehicle trajectory data and its adjacent trajectory point is less than a distance threshold; in this example, the distance threshold is set to 50 m.
[0066] If it is less than the distance threshold, the time difference between the two track points is calculated and recorded as τ; if the time difference is greater than the time difference threshold (in this example, the time difference threshold is set to 150s), and the speed of the track point is 0, the stop state of the track point is marked at the stop start time, and the vehicle starts at the stop end time, and the i-th stop point is recorded as s i =(id,lon,lat,t s ,t e ,τ), where id is the user id, lon is the longitude of the stay point, lat is the latitude of the stay point, t s is the dwell start time, t e The end time of your stay.
[0067] Get the set of stay points for each user and record the jth user stay point set as S j ={s1,s2,...,s n}, j = 1,…, n.
[0068] Get the set of all users’ stay points, denoted as S = {S1, S2, ..., S n}.
[0069] Step S202: Use a deep recurrent neural network to extract spatiotemporal features of the pre-processed vehicle stop behavior.
[0070] The stop behavior data of the fake vehicle user is S = {s1,s2,...,s n}, specific to each stop point s i , which represents a tuple consisting of latitude, longitude and time, namely s i=(id,el,et,y,m,h,min,s,d), where the distribution represents the user ID, longitude, latitude, year, month, day, hour, minute, second, and duration of stay. The deep recurrent neural network, as shown in Figure 4, extracts location and time information through an embedding layer and propagates this information through the first-level recurrent neural network to obtain the hidden state of the stay behavior. The second-level recurrent neural network, whose input is derived from the output of the first-level recurrent neural network, transforms the vehicle stop behavior data between the first-level recurrent neural network and the second-level recurrent neural network to effectively represent the user's stop behavior, including:
[0071] The user's stay behavior is divided into different levels of movement trajectories according to time intervals from days to weeks, and transformation encoding is performed between the first-level recurrent neural network and the second-level recurrent neural network.
[0072] The process of processing a certain level of vehicle stop behavior data through the first-level recurrent neural network is as follows:
[0073] in, Indicates concatenating vectors, h i-1 This represents the running state of the first-level recurrent neural network at the i-1th iteration. If the user's movement records with a time interval smaller than a segment are iteratively input, a representation of the user's movement records over a period of time can be obtained.
[0074] The process of processing vehicle stop behavior data between levels through the second-level recurrent neural network is as follows:
[0075] When the next user's movement record is large, the low-level state needs to be input into the high-level recurrent neural network to represent the user's movement record together. The specific details of the formula are as follows:
[0076] Where eu represents the vector information that can uniquely identify the user, hn represents the hidden state information sent after the low-level RNN iterative representation, and hj-1 represents the previous running result of the high-level recurrent neural network.
[0077] By encoding different levels of dwell behaviors with recurrent neural networks at different levels, the mobile features of the first-level dwell behaviors can be extracted and processed in the second-level recurrent neural network to retain the user's dwell behavior features to the greatest extent.
[0078] The user's stay behavior is divided into different levels, namely the first and second levels. By encoding different stay behaviors, the user's stay behavior records are processed as a whole, thus simplifying the user's complex stay behavior patterns. el,et are the latitude and longitude of the user's stay location. The first level embedding of the i-th level is as follows:
[0079] in Indicates concatenating vectors, h i-1 Represents the running state of the last recurrent neural network. When i=1, it is the initial input stay behavior s i By iteratively inputting this information of the user, we can obtain a representation of the user's stay behavior over a period of time.
[0080] The second layer embedding inputs the first-level state representing the user's stay behavior over a period of time into the high-level recurrent neural network, integrating the user's stay behavior:
[0081] Among them, eu represents the vector information that can uniquely identify the user, h n represents the hidden state information sent after the iterative representation of the first-level recurrent neural network, h j-1 Represents the last running result of the second-level recurrent neural network.
[0082] Now that we know how to use a hierarchical recurrent neural network to process user dwell behavior, we can intuitively understand that user dwell behavior is a segmented record. The first-level recurrent neural network processes a single dwell record, and there are often large time intervals between different dwell records. The second-level recurrent neural network processes the gaps between different dwell records. By transforming user dwell behavior between the two different levels of the recurrent neural network, we can process longer user dwell records. This hierarchical approach better preserves information about user dwell behavior at different levels, thereby better modeling user dwell behavior.
[0083] S3, inputs the spatiotemporal features into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the multi-task learning prediction network obtains the correlation between the stop location prediction task and the stop duration prediction task to predict the stop location and stop duration.
[0084] The spatiotemporal features are input into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the stop location task model and the stop duration task model are constructed using the long short-term memory network. The stop location task model and the stop duration task model are learned simultaneously through the multi-task learning prediction network, and the correlation between the stop location prediction task and the stop duration prediction task is explored to predict the stop location and stop duration in the future time period.
[0085] In this example, both the stop location task model and the stay duration task model are implemented based on the long short-term memory network. The difference between the stop location task model and the stay duration task model is that predicting the stay duration is a regression problem, while predicting the stop location is a classification problem.
[0086] In the task of predicting the length of stay, the present invention sorts the stay behavior data in chronological order to obtain the time series data of the vehicle's stay behavior. Then, the next vehicle stay duration and location category are used as labels to train and obtain the information of the next stay duration and location category. Then, during the long short-term memory network task learning process, the parameter change process is as follows: σ(x)=1 / (1+e -x ) (3)
[0087] Where σ(x) represents the sigmoid activation function.
[0088] During parameter learning, the dwell duration task model uses not only the input x from the previous layer but also the input h from the previous time point in the current layer, as well as various gated inputs, to form a new vector. This ensures that the dwell duration task model can remember previous vehicle dwell behaviors and use them to predict the next dwell behavior. C t =f t ⊙C t-1 +i t ⊙g t , h t =o t ⊙tanh(C t ),
[0089] Among them, i t is the input gate, f t For the forget gate, o t is the output gate, g t is the candidate internal state, C t For the state unit, Wxi, Whi, Wxf, Whf, Wxo, Who, Wxc and Whc represent the weights of the linear transformation matrix.
[0090] The dwell duration task model uses the ReLU activation function for dwell duration prediction. This is because dwell duration prediction is a regression problem, and the ReLU activation function generally performs better. The ReLU activation function is a maximum-valued function. It outputs values greater than 0, meaning that the neuron is activated when the value is greater than 0. It suppresses values less than 0, and outputs 0 for negative inputs. This allows the dwell duration task model to discard some values, resulting in sparseness and better prediction results.
[0091] When predicting rest locations, since this is a classification problem, the classification labels are derived by clustering the vehicle trajectory points in the vehicle trajectory data using a clustering algorithm. Therefore, the rest location prediction model uses the softmax activation function. The formula for the softmax activation function is shown below. It is commonly used in multi-classification problems. Softmax maps each label value to the range (0, 1). The sum of these label values is 1. The label value represents the probability, and the label with the highest probability is the predicted result.
[0092] When predicting the length of stay, the loss function used by the prediction model is the mean squared error (MSE). MSE is the square of the difference between the true value and the predicted value and then summed and averaged. The formula is as follows:
[0093] When predicting a stopover location, the loss function used by the stopover location prediction model is cross entropy. Generally, cross entropy is used to describe the difference in probability values. When two probability distributions are close, the cross entropy value is generally smaller. The calculation method is as follows:
[0094] In the present invention, the loss function of the multi-task deep learning model is the result obtained by adding formulas (6) and (7). By optimizing these two loss functions simultaneously, the multi-task deep learning model can simultaneously learn the stay location prediction task and the stay duration prediction task, and predict the stay behavior in the future time period.
[0095] As shown in FIG5 , the present invention also provides a vehicle stop behavior analysis and prediction system based on multi-task learning, including a data acquisition terminal, a stop behavior modeling terminal, a multi-task prediction terminal, and a user terminal:
[0096] The data acquisition terminal includes a vehicle GPS and OBD data acquisition module and a data transmission module. The vehicle GPS (Global Positioning System) and OBD (On-Board Diagnostics) data acquisition module mainly collects vehicle trajectory data composed of GPS and OBD, and transmits the collected trajectory data to the data transmission module; the data transmission module transmits the collected vehicle trajectory data to the data preprocessing module in the stop behavior modeling terminal. The data collected by the vehicle GPS and OBD data acquisition module includes information such as the vehicle ID after desensitization, the start time of the trip, the start longitude, the start latitude, the end time, the end longitude and the end latitude. The vehicle GPS and OBD data are collectively referred to as vehicle trajectory data and transmitted to the data preprocessing module.
[0097] The stop behavior modeling terminal includes a data preprocessing module and a stop behavior modeling module. The data preprocessing module first receives the vehicle trajectory data transmitted by the data transmission module, and then extracts the vehicle stop behavior data from the vehicle trajectory data, specifically including the stop location and stop duration. The stop behavior module uses a deep recurrent neural network method to extract spatiotemporal features of the preprocessed vehicle stop behavior, laying the foundation for the multi-task prediction terminal. The data preprocessing module receives the vehicle trajectory data and performs data preprocessing to obtain the vehicle stop behavior data, specifically including the vehicle ID after desensitization, the stop start time, the stop longitude, the stop latitude, and the stop end time.
[0098] The multi-task prediction terminal includes a stop location classification module and a stop duration regression module. The terminal captures the correlation between multiple tasks based on multi-task learning and predicts the tasks. It predicts the stop behavior in the future time period based on the vehicle's historical stop behavior and the correlation between multiple tasks.
[0099] The user terminal includes a prediction result receiving module and a user matching module. The prediction result receiving module receives the vehicle stop behavior prediction results output by the multi-task prediction terminal and transmits them to the user matching module. The user matching module matches the obtained stop behavior prediction results with individual users and outputs the matching results to the individual user terminal.
[0100] The original data is shown in Table 1 below, and the prediction results are shown in Table 2 below.
[0101] Table 1: Original data table
[0102] The original data is as above, which indicates that the vehicle stayed at the location with longitude and latitude (108.3646, 22.82886), the location category of the location is 12, the time is 8 o'clock in the morning on Monday, June 2017, and the vehicle stayed at the location for 5 minutes.
[0103] Table 2: Prediction results
[0104] The data in Table 2 shows that the prediction results have some errors, but they are within an acceptable range. The last item represents the duration of stay. The original data is 5, and the predicted result is 5.58. Observe the third item in the data, sub_class, which represents the location label. The predicted location classification number is 12, indicating that this location belongs to a point near location 12. The predicted result is also location 12, which is basically accurate.
[0105] The multi-task learning prediction network was trained 100 times, and the accuracy results are shown in Figure 6. It can be seen that the accuracy of the multi-task learning prediction network tends to remain constant after a small amount of training. This is due to the small amount of data used by the multi-task learning prediction network. Since the multi-task learning prediction network can only model each vehicle user, it can only use data from a single private car. As shown in Figure 6, the accuracy of the multi-task deep learning model quickly reached over 90%, which is due to the deeper multi-task deep learning neural network and its better fit to the data.
[0106] In summary, the method of the present invention not only considers the historical stop behavior of vehicles, but also the correlation between the stop location prediction task and the stop duration prediction task. The present invention inputs spatiotemporal features into a multi-task learning prediction network. Based on the vehicle's historical stop behavior, the multi-task learning prediction network obtains the correlation between the stop location prediction task and the stop duration prediction task to predict the stop location and the stop duration. This can analyze the spatiotemporal dependency of vehicle stop behavior, thereby improving the accuracy of stop behavior prediction. The present invention provides support for applications such as point of interest recommendation, personalized travel planning, targeted advertising, and smart parking.
[0107] Corresponding to the aforementioned embodiment of the vehicle stop behavior analysis and prediction method based on multi-task learning, the present invention also provides an embodiment of a vehicle stop behavior analysis and prediction device based on multi-task learning.
[0108] 7 , an embodiment of the present invention provides a vehicle stop behavior analysis and prediction device based on multi-task learning, including one or more processors for implementing the vehicle stop behavior analysis and prediction method based on multi-task learning in the above embodiment.
[0109] The embodiment of the vehicle stop behavior analysis and prediction device based on multi-task learning of the present invention can be applied to any device with data processing capabilities, and the any device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located to read the corresponding computer program instructions in the non-volatile memory into the memory and run them. From the hardware level, as shown in Figure 7, it is a hardware structure diagram of any device with data processing capabilities in which the vehicle stop behavior analysis and prediction device based on multi-task learning of the present invention is located. In addition to the processor, memory, network interface, and non-volatile memory shown in Figure 7, the any device with data processing capabilities in which the device in the embodiment is located can also include other hardware according to the actual function of the device with data processing capabilities, which will not be described in detail.
[0110] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0111] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present invention. A person of ordinary skill in the art can understand and implement the present invention without inventive work.
[0112] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the vehicle stop behavior analysis and prediction method based on multi-task learning in the above embodiment is implemented.
[0113] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.
[0114] The above embodiments are intended only to illustrate the design concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. The scope of protection of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design concepts disclosed in the present invention are within the scope of protection of the present invention.
Claims
1. A vehicle stop behavior analysis and prediction method based on multi-task learning, characterized in that: The method comprises the following steps: S1, collect vehicle GPS and OBD data including vehicle ID after desensitization, trip start time, start longitude, start latitude, end time, end longitude and end latitude; S2, preprocessing the vehicle GPS and OBD data to obtain the vehicle stop behavior data including the stop location and stop duration; and using a deep recurrent neural network to extract the spatiotemporal features of the preprocessed vehicle stop behavior; S3, input the spatiotemporal features into the multi-task learning prediction network, and obtain the correlation between the stop location prediction task and the stop duration prediction task through the multi-task learning prediction network based on the historical stop behavior of the vehicle, so as to predict the stop location and stop duration.
2. The vehicle stop behavior analysis and prediction method based on multi-task learning according to claim 1 is characterized in that: Preprocess the vehicle GPS and OBD data to obtain the dwell time, including: Sort vehicle GPS and OBD data by start time; Delete the GPS and OBD data of vehicles whose end time of the previous item is later than or equal to the start time of the next item, delete the GPS and OBD data of vehicles whose stop time is less than or equal to the start time, and delete the GPS and OBD data of vehicles whose start and stop locations are inconsistent; Subtract the start time of the latter item from the end time of the former item of vehicle GPS and OBD data to get the length of stay.
3. The vehicle stop behavior analysis and prediction method based on multi-task learning according to claim 1 is characterized in that: Preprocess the vehicle GPS and OBD data to obtain the following locations: According to the user ID, the vehicle GPS data and OBD data are aligned and merged by timestamp, and sorted by user ID to obtain vehicle trajectory data; Determine whether the distance between any track point in the vehicle track data and its adjacent track point is less than a distance threshold; If it is less than the distance threshold, the time difference between the two track points is calculated; if the time difference is greater than the time difference threshold and the speed of the track point is 0, the stop state of the track point is marked at the stop start time, until the vehicle starts at the stop end time and the stop point is recorded; Get the set of stay points for each user; Get the set of stay points of all users.
4. The vehicle stop behavior analysis and prediction method based on multi-task learning according to claim 1 is characterized in that: The deep recurrent neural network is used to extract spatiotemporal features of the preprocessed vehicle stop behavior, including: Dividing the vehicle stop behavior data into several levels of vehicle stop behavior data according to time intervals; The vehicle stop behavior data at a certain level is processed through the first-level recurrent neural network; The vehicle stop behavior data between levels are processed through the second-level recurrent neural network; The vehicle stop behavior data is transformed between the first-level recurrent neural network and the second-level recurrent neural network to encode the vehicle stop behavior data and obtain spatiotemporal features.
5. The vehicle stop behavior analysis and prediction method based on multi-task learning according to claim 4 is characterized in that: The vehicle stop behavior data at a certain level is processed by the first-level recurrent neural network, including: in, Indicates concatenating the vectors, el is the longitude of the location where the user's vehicle stops, et is the latitude of the location where the user's vehicle stops, and h i-1 Represents the running status of the first level recurrent neural network at the i-1th iteration; The vehicle stop behavior data between levels is processed by the second-level recurrent neural network including: Among them, eu represents the vector information that uniquely identifies the user ID, hn represents the hidden state information obtained after the iteration of the first-level recurrent neural network, and h j-1 Represents the running status of the second-level recurrent neural network in the j-1th iteration.
6. The vehicle stop behavior analysis and prediction method based on multi-task learning according to claim 1 is characterized in that: The spatiotemporal features are input into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the multi-task learning prediction network is used to obtain the correlation between the stop location prediction task and the stop duration prediction task, so as to predict the stop location and stop duration, including: The spatiotemporal features are input into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the stop location task model and the stop duration task model are respectively constructed based on the long short-term memory network. The stop location task model and the stop duration task model are learned simultaneously through the multi-task learning prediction network, and the correlation between the stop location prediction task and the stop duration prediction task is mined to predict the stop location and stop duration in the future time period. Among them, the multi-task learning process includes: selecting the relu function as the activation function, using the mean square error function as the loss function for predicting the length of stay, and using the cross entropy function as the loss function for predicting the stop location; the loss function of the multi-task deep learning network is the sum of the mean square error function and the cross entropy function, and the mean square error function and the cross entropy function are optimized simultaneously to learn and predict the stop location and duration in the future time period.
7. A vehicle stop behavior analysis and prediction system based on multi-task learning, characterized in that: include: The data collection module collects vehicle GPS and OBD data including the vehicle ID after desensitization, the start time of the trip, the start longitude, the start latitude, the end time, the end longitude and the end latitude; The vehicle stop behavior data acquisition module pre-processes the vehicle GPS and OBD data to obtain the vehicle stop behavior data including the stop location and stop duration; and uses a deep recurrent neural network to extract the spatiotemporal features of the pre-processed vehicle stop behavior; The multi-task learning prediction module inputs the spatiotemporal features into the multi-task learning prediction network. Based on the historical stop behavior of the vehicle, the multi-task learning prediction network is used to obtain the correlation between the stop location prediction task and the stop duration prediction task, so as to predict the stop location and stop duration.
8. The vehicle stop behavior analysis and prediction system based on multi-task learning according to claim 7 is characterized in that: Also includes: The user terminal includes a prediction result receiving module and a user matching module; A prediction result receiving module receives the vehicle stop behavior prediction result output by the multi-task learning prediction module and transmits it to the user matching module; The user matching module matches the dwell behavior prediction results with the user and feeds back the matching results to the user.
9. An electronic device, comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the vehicle stop behavior analysis and prediction method based on multi-task learning as described in any one of claims 1-6 above.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the vehicle stop behavior analysis and prediction method based on multi-task learning as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
User behavior portrait prediction method and system based on trajectory information
CN111444243A
Private car dwell time prediction method and device based on neural network, and medium
CN112529284A
Private car parking position prediction method and system based on enhanced recurrent neural network
CN113780665A
Destination recommendation method and system based on multi-source heterogeneous information network
CN114398462A
Method, apparatus, and system for computing a spatial footprint index
US20220163335A1
