CN116109021B - Travel time prediction method, device, equipment and medium based on multitask learning - Google Patents

Travel time prediction method, device, equipment and medium based on multitask learning Download PDF

Info

Publication number
CN116109021B
CN116109021B CN202310393149.XA CN202310393149A CN116109021B CN 116109021 B CN116109021 B CN 116109021B CN 202310393149 A CN202310393149 A CN 202310393149A CN 116109021 B CN116109021 B CN 116109021B
Authority
CN
China
Prior art keywords
feature matrix
feature
track
vehicle
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310393149.XA
Other languages
Chinese (zh)
Other versions
CN116109021A (en
Inventor
陈学文
唐海娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Chinese Academy of Sciences
Original Assignee
University of Chinese Academy of Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Chinese Academy of Sciences filed Critical University of Chinese Academy of Sciences
Priority to CN202310393149.XA priority Critical patent/CN116109021B/en
Publication of CN116109021A publication Critical patent/CN116109021A/en
Application granted granted Critical
Publication of CN116109021B publication Critical patent/CN116109021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • G06Q50/40
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Mathematics (AREA)
  • Marketing (AREA)
  • Mathematical Analysis (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application relates to the technical field of traffic control, and provides a travel time prediction method, a device, equipment and a medium based on multi-task learning, wherein the method comprises the following steps: acquiring vehicle track positioning data and urban road network data; processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle; acquiring space-time association of road nodes according to the speed feature matrix to obtain a target feature matrix; predicting the speed of the vehicle according to the target feature matrix; and predicting the travel time of the vehicle according to the road network track characteristic diagram and the speed of the vehicle. By the technical scheme, accurate long-short-term traffic speed prediction can be realized.

Description

Travel time prediction method, device, equipment and medium based on multitask learning
Technical Field
The present application relates to the field of traffic control technologies, and in particular, to a method, an apparatus, a device, and a medium for predicting travel time based on multi-task learning.
Background
The intelligent traffic facilitates the daily life of people, helps policy makers make reasonable decisions, and plays an important role in life. In recent years, with the popularization of devices such as GPS and the continuous accumulation of related data, intelligent traffic has been continuously developed, and the construction of intelligent traffic has become a hotspot problem of society. Travel time prediction is an important component of intelligent traffic, has become one of hot problems in the intelligent traffic field, and currently covers public traffic fields such as rail transportation, road transportation, water transportation, air transportation and the like.
For the user, accurate prediction of travel time can help the user to reasonably arrange travel time, and waiting time is reduced. An accurate travel time prediction may also improve the monetary effects of the user, such as: accurate travel time predictions can reduce the loss of the commodity during travel. For city managers, travel time prediction improves urban road congestion and carbon emission problems to a certain extent by affecting user travel planning. And the change of the travel time reflects the change of the speed and the flow of vehicles on the road, so the travel time can be used as auxiliary information for dynamic travel, congestion control and traffic detection. In recent years, with the rapid development of platforms such as sharing bicycles, sharing automobiles, map navigation, and online shopping, business value of travel time prediction is increasingly prominent for enterprises.
Aiming at travel time prediction, the current method mainly predicts the speed of a future road node through a space-time diagram neural network, and predicts the travel time through a track processing module. The method comprises the following specific steps of inputting speed information in a historical traffic network into a space-time diagram neural network and predicting speed change in a future period of time. The vehicle track is input into a track processing module, and the overall travel time is predicted according to the length of the vehicle track and the speed of a node through which the vehicle passes.
However, such methods do not fully consider the long-short term influence of road nodes and node association during driving, such as speed and time variation generated by traffic signal change at a vehicle traffic intersection, and the prediction result is not accurate enough.
Disclosure of Invention
The embodiment of the application provides a travel time prediction method, a device, equipment and a medium based on multi-task learning, which aim to solve the technical problems of inaccurate travel speed and travel time prediction of vehicles in the related art.
In a first aspect, an embodiment of the present application provides a method for predicting travel time based on multitask learning, including:
acquiring vehicle track positioning data and urban road network data;
processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle;
acquiring space-time association of road nodes according to the speed feature matrix to obtain a target feature matrix;
predicting the speed of the vehicle according to the target feature matrix;
and predicting the travel time of the vehicle according to the road network track characteristic diagram and the speed of the vehicle.
In one embodiment, preferably, acquiring the space-time association of the road node according to the velocity feature matrix to obtain the target feature matrix includes:
According to the speed feature matrix, obtaining time association among road nodes to obtain a first feature matrix;
obtaining long-term association of road nodes according to the first feature matrix to obtain a second feature matrix;
and acquiring the space-time association of the road nodes according to the second feature matrix to obtain a target feature matrix.
In one embodiment, preferably, according to the velocity feature matrix, obtaining a time association between road nodes to obtain a first feature matrix includes:
and carrying out cavity causal convolution processing of a gating mechanism on the speed characteristic matrix to determine time association among road nodes and obtain a first characteristic matrix.
In one embodiment, preferably, according to the first feature matrix, obtaining long-term association of the road node to obtain a second feature matrix includes:
carrying out differential processing on each characteristic value in the speed characteristic matrix by adopting a multi-head attention mechanism, and calculating an association matrix among road nodes;
generating a feature map corresponding to the road node according to each incidence matrix;
sampling the different feature images in different sizes to obtain a final feature image;
And carrying out graph convolution processing according to the final feature graph and the first feature matrix to obtain long-term association of the road nodes and obtain a second feature matrix.
In one embodiment, preferably, according to the second feature matrix, acquiring the space-time association of the road node to obtain the target feature matrix includes:
and carrying out diffusion graph convolution processing on the second feature matrix and the road network track feature graph, carrying out residual error processing and standardization processing to obtain space-time association of road nodes, obtaining a third feature matrix, and determining the third feature matrix as the target feature matrix.
In one embodiment, preferably, processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle includes:
dividing the vehicle track positioning data according to an order of a vehicle journey to obtain at least one track section, wherein each track section comprises coordinates and elapsed time of each track point;
calculating the probability of matching the track points in each track section to each road node in the urban road network data according to the hidden Markov model;
Selecting a target road network segment with the maximum probability corresponding to each track segment, and mapping the track segment to the target road network segment to obtain the road network track feature map;
and determining the average speed on each road node according to the time and the distance between the adjacent road nodes of the vehicle so as to obtain the speed characteristic matrix of the vehicle.
In one embodiment, predicting the travel time of the vehicle based on the road network trajectory characteristics and the speed of the vehicle preferably comprises:
processing each track segment by using an attention mechanism to obtain a first feature code of each track point;
performing global coding processing on the first feature codes of each track point by using an attention mechanism to obtain second feature codes corresponding to each track segment;
correspondingly splicing the second feature code and the speed of the vehicle to obtain a target code vector;
and predicting the travel time of the vehicle in the track section according to the target coding vector.
In a second aspect, an embodiment of the present application provides a travel time prediction apparatus based on multitasking learning, including:
the first acquisition module is used for acquiring vehicle track positioning data and urban road network data;
The processing module is used for processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle;
the second acquisition module is used for acquiring the space-time association of the road nodes according to the speed feature matrix so as to obtain a target feature matrix;
the first prediction module is used for predicting the speed of the vehicle according to the target feature matrix;
and the second prediction module is used for predicting the travel time of the vehicle according to the road network track characteristics and the speed of the vehicle.
In one embodiment, preferably, the second obtaining module includes:
the first association acquisition unit is used for acquiring time association among road nodes according to the speed feature matrix so as to obtain a first feature matrix;
the second association acquisition unit is used for acquiring long-term association of the road nodes according to the first feature matrix so as to obtain a second feature matrix;
and the third association acquisition unit is used for acquiring the space-time association of the road nodes according to the second feature matrix so as to obtain a target feature matrix.
In one embodiment, preferably, the first association acquiring unit is specifically configured to:
And carrying out cavity causal convolution processing of a gating mechanism on the speed characteristic matrix to determine time association among road nodes and obtain a first characteristic matrix.
In one embodiment, preferably, the second association acquiring unit is specifically configured to:
carrying out differential processing on each characteristic value in the speed characteristic matrix by adopting a multi-head attention mechanism, and calculating an association matrix among road nodes;
generating a feature map corresponding to the road node according to each incidence matrix;
sampling the different feature images in different sizes to obtain a final feature image;
and carrying out graph convolution processing according to the final feature graph and the first feature matrix to obtain long-term association of the road nodes and obtain a second feature matrix.
In one embodiment, preferably, the third association acquiring unit is specifically configured to:
and carrying out diffusion graph convolution processing on the second feature matrix and the road network track feature graph, carrying out residual error processing and standardization processing to obtain space-time association of road nodes, obtaining a third feature matrix, and determining the third feature matrix as the target feature matrix.
In one embodiment, preferably, the processing module includes:
The dividing unit is used for dividing the vehicle track positioning data according to the order of the vehicle journey to obtain at least one track section, wherein each track section comprises coordinates and passing time of each track point;
the calculation unit is used for calculating the probability of matching the track points in each track section to each road node in the urban road network data according to the hidden Markov model;
the selecting unit is used for selecting a target road network segment with the maximum probability corresponding to each track segment, and mapping the track segment to the target road network segment so as to obtain the road network track characteristic diagram;
and the speed determining unit is used for determining the average speed on each road node according to the time and the distance between the vehicles passing through the adjacent road nodes so as to obtain the speed characteristic matrix of the vehicles.
In one embodiment, the second prediction module preferably includes:
the first coding unit is used for processing each track segment by using an attention mechanism to obtain a first feature code of each track point;
the second coding unit is used for performing global coding processing on the first feature codes of each track point by using an attention mechanism so as to obtain second feature codes corresponding to each track segment;
The splicing unit is used for correspondingly splicing the second feature codes and the speed of the vehicle to obtain target coding vectors;
and the time prediction unit is used for predicting the travel time of the vehicle in the track section according to the target coding vector.
In a third aspect, a computer device is provided, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above-described method for travel time prediction based on multi-tasking when executing the computer program.
In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above-described approach to travel time prediction based on multi-tasking.
In the scheme realized by the travel time prediction method, the device, the equipment and the medium based on the multi-task learning, the space-time diagram neural network considering the influence of the long-short-term nodes is adopted, the long-term association between road nodes in the road network is obtained through different properties of the feature diagram and the urban road network diagram, the short-term space-time association between the road nodes is also obtained, the influence between the nodes is fully considered, and the information of the track points is maximized through the slicing of the track sections and the coding of the features instead of the conventional physical method according to the form of the distance and the speed prediction time, so that the accurate long-short-term traffic speed prediction can be realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a schematic flow diagram of a method of travel time prediction based on multitasking learning according to one embodiment of the application.
Fig. 2 shows a schematic flow chart of step S102 in a method for predicting travel time based on multitasking learning according to an embodiment of the application.
FIG. 3 is a schematic diagram showing a processing procedure of a velocity feature matrix in a travel time prediction method based on multitasking learning according to an embodiment of the present application.
FIG. 4 is a schematic diagram showing a characteristic map processing procedure in a travel time prediction method based on multi-task learning according to an embodiment of the present application.
FIG. 5 shows a detailed process diagram of a method for predicting travel time based on multi-task learning according to one embodiment of the application.
Fig. 6 shows a block diagram of a travel time prediction apparatus based on multitasking learning according to an embodiment of the present application.
FIG. 7 illustrates a block diagram of a computer device according to one embodiment of the application.
Detailed Description
For a better understanding of the technical solution of the present application, the following detailed description of the embodiments of the present application refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
FIG. 1 shows a schematic flow diagram of a method of travel time prediction based on multitasking learning according to one embodiment of the application.
As shown in fig. 1, a travel time prediction method based on multitasking learning according to an embodiment of the present application includes:
step S101, vehicle track positioning data and urban road network data are acquired.
The vehicle track positioning data comprise tracks of all strokes of the vehicle, coordinates and elapsed time of all track points on the tracks, current position information of the vehicle and the like.
The city road network data includes road network data, map data, etc. of each place.
Step S102, processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle;
as shown in fig. 2, in one embodiment, the step S102 preferably includes:
step S201, dividing the vehicle track positioning data according to an order of a vehicle journey to obtain at least one track section, wherein each track section comprises coordinates and elapsed time of each track point;
in this embodiment, the vehicle track positioning data may be divided according to an order to which the vehicle course belongs. For example, when an order on the vehicle is not completed and a next order is received, the vehicle track positioning data can be divided into two track segments according to the order to which the vehicle journey belongs, wherein one track segment is the last order, one track segment is the next order, and each track segment comprises coordinates of each track point and the elapsed time.
Step S202, calculating the probability of matching the track points in each track section to each road node in the urban road network data according to the hidden Markov model;
based on the hidden Markov model, calculating the probability of matching each track point to the road node, and selecting the road network segment with the highest probability as a mapping result.
Step S203, selecting a target road network segment with the highest probability corresponding to each track segment, and mapping the track segment to the target road network segment to obtain the road network track feature map;
after mapping, the track segments are converted to road network track segments on the road network nodes, and the road network track segments are track features, so that a road network track feature map is obtained.
And step S204, determining the average speed of each road node according to the time and the distance between the vehicles passing through the adjacent road nodes so as to obtain a speed characteristic matrix of the vehicles.
By the time the vehicle passes adjacent track points and their distance on the track segment, the speed on each road node can be obtained and converted into a speed feature matrix.
Step S103, acquiring space-time association of road nodes according to the speed feature matrix to obtain a target feature matrix;
In one embodiment, preferably, step S103 includes:
according to the speed feature matrix, obtaining time association among road nodes to obtain a first feature matrix;
in one embodiment, preferably, according to the velocity feature matrix, obtaining a time association between road nodes to obtain a first feature matrix includes:
and carrying out cavity causal convolution processing of a gating mechanism on the speed characteristic matrix to determine time association among road nodes and obtain a first characteristic matrix.
And obtaining time correlation from the speed characteristic matrix X through hole causal convolution to obtain a first characteristic matrix X1. Specifically, assume thatThe hole causal convolution can be expressed as: />Wherein d represents a voidSize, or->Representing a hole causal convolution, s representing the convolution kernel size, and x (t-d x s) representing the dimension after convolution. Gating mechanisms are used to control data transfer in causal convolution. Assuming input, this method can be expressed as:wherein->Respectively representing the tanh activation function and the sigmoid activation function +.>Representing a hole causal convolution,>the convolution kernel is represented, and b and c represent feature offsets.
Obtaining long-term association of road nodes according to the first feature matrix to obtain a second feature matrix;
In one embodiment, preferably, according to the first feature matrix, obtaining long-term association of the road node to obtain a second feature matrix includes:
carrying out differential processing on each characteristic value in the speed characteristic matrix by adopting a multi-head attention mechanism, and calculating an association matrix among road nodes;
generating a feature map corresponding to the road node according to each incidence matrix;
as shown in fig. 3, assume thatRepresenting the eigenvalues of N nodes at T time steps. First, X 'is obtained by first-order difference of X, and X'>. Subsequently, the correlation matrix is calculated +.>. The method comprises the following steps: />Wherein->Wherein->For the learnable parameters, X' is the feature matrix after the first order difference. />Is the generated feature map.
Sampling the different feature images in different sizes to obtain a final feature image;
sampling different feature images with different sizes to obtain a final feature imageTopk is the sampling function and N is the sample size.
In this embodiment, a multi-headed attention mechanism may be employed to obtain a plurality of different correlation matrices. Different convolution sampling is carried out on different incidence matrixes to generate different feature graphs, the sizes of the sampling are gradually increased, the number of neighbors of the nodes is different on the different feature graphs, the incidence degrees of the neighbor nodes are different, node information with high incidence degrees is aggregated in this way, and node information with low incidence degrees is filtered.
And carrying out graph convolution processing according to the final feature graph and the first feature matrix to obtain long-term association of the road nodes and obtain a second feature matrix.
After the cavity causal convolution, a first feature matrix X1 is obtained, and then the feature matrix X1 is subjected to feature map convolution and time-space map convolution in sequence. Firstly, carrying out graph convolution on the final feature graph A and a first feature matrix X1, wherein the process is as follows:,/>representing the ith sub-graph, W represents the mapping tensor matrix.
And acquiring the space-time association of the road nodes according to the second feature matrix to obtain a target feature matrix.
In one embodiment, preferably, according to the second feature matrix, acquiring the space-time association of the road node to obtain the target feature matrix includes:
and carrying out diffusion graph convolution processing on the second feature matrix and the road network track feature graph, applying long-term influence to neighbor nodes in a diffusion mode, aggregating short-term influence of node neighbors, carrying out residual error processing and standardization processing to obtain space-time association of road nodes, obtaining a third feature matrix, and determining the third feature matrix as the target feature matrix. The At road network is convolved with the X2 by a diffusion map, . And adding residual errors and normalizing to obtain an output characteristic matrix.
As shown in fig. 4, the above-mentioned flow entirely includes: and after the final feature map is obtained, carrying out gating cavity causal convolution on the final feature map A and the velocity feature matrix X, and then adding sequential space-time dynamic map convolution, wherein the space-time dynamic map convolution is used for obtaining space features. And finally outputting the coded feature matrix through residual errors.
In a specific embodiment, the above process may be an iterative process, as shown in fig. 5, where the process of obtaining the target feature matrix may be used as a space-time block to obtain a space-time relationship of the input data, and then the above process may be iterated through a multi-head attention mechanism, that is, iterating through a plurality of space-time blocks to finally obtain a final target feature matrix, and then inputting the target feature matrix into a prediction block including two convolution layers to predict the vehicle speed.
And step S104, predicting the speed of the vehicle according to the target feature matrix.
Specifically, the target feature matrix may be processed by a multi-layer perceptron to predict the speed of the vehicle.
Step S105, predicting the travel time of the vehicle according to the road network track characteristic diagram and the speed of the vehicle.
In one embodiment, predicting the travel time of the vehicle based on the road network trajectory characteristics and the speed of the vehicle preferably comprises:
processing each track segment by using an attention mechanism to obtain a first feature code of each track point;
performing global coding processing on the first feature codes of each track point by using an attention mechanism to obtain second feature codes corresponding to each track segment;
correspondingly splicing the second feature code and the speed of the vehicle to obtain a target code vector;
and predicting the travel time of the vehicle in the track section according to the target coding vector.
In this embodiment, the track is followedIs divided into different track segments which are then divided into different track segments,. For each track, the multi-head attention is adopted for processing, and the method is concretely as follows:
firstly, nonlinear mapping is carried out on a track segment T' to obtainWherein->Representing three different tensor matrices, namely a Query matrix, a Key matrix and a Value matrix, so that different feature tensors (i.e. feature codes) are obtained through different nonlinear mappings. Subsequently different acquisition incidence matrices are acquired>,/>A Query matrix representing the nth correlation matrix and a Value matrix +. >Is their characteristic dimension. Then pass through the association matrix and +.>Encoding track segments +.>. After all track segments have been encoded +.>Global coding using a multi-head attention mechanism to obtain the final coding tensor +.>. Will->Splicing with S in one-to-one correspondence to obtain tensor ∈ ->And finally, predicting time through the multi-layer perceptron.
Fig. 6 shows a block diagram of a travel time prediction apparatus based on multitasking learning according to an embodiment of the present application.
As shown in fig. 6, in a second aspect, an embodiment of the present application provides a travel time prediction apparatus based on multitasking learning, including:
a first obtaining module 61, configured to obtain vehicle track positioning data and urban road network data;
the processing module 62 is configured to process the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle;
a second obtaining module 63, configured to obtain a space-time association of the road node according to the velocity feature matrix, so as to obtain a target feature matrix;
a first prediction module 64 for predicting a speed of the vehicle based on the target feature matrix;
a second prediction module 65, configured to predict a travel time of the vehicle according to the road network track feature and the speed of the vehicle.
In one embodiment, preferably, the second obtaining module includes:
the first association acquisition unit is used for acquiring time association among road nodes according to the speed feature matrix so as to obtain a first feature matrix;
the second association acquisition unit is used for acquiring long-term association of the road nodes according to the first feature matrix so as to obtain a second feature matrix;
and the third association acquisition unit is used for acquiring the space-time association of the road nodes according to the second feature matrix so as to obtain a target feature matrix.
In one embodiment, preferably, the first association acquiring unit is specifically configured to:
and carrying out cavity causal convolution processing of a gating mechanism on the speed characteristic matrix to determine time association among road nodes and obtain a first characteristic matrix.
In one embodiment, preferably, the second association acquiring unit is specifically configured to:
carrying out differential processing on each characteristic value in the speed characteristic matrix by adopting a multi-head attention mechanism, and calculating an association matrix among road nodes;
generating a feature map corresponding to the road node according to each incidence matrix;
sampling the different feature images in different sizes to obtain a final feature image;
And carrying out graph convolution processing according to the final feature graph and the first feature matrix to obtain long-term association of the road nodes and obtain a second feature matrix.
In one embodiment, preferably, the third association acquiring unit is specifically configured to:
and carrying out diffusion graph convolution processing on the second feature matrix and the road network track feature graph, carrying out residual error processing and standardization processing to obtain space-time association of road nodes, obtaining a third feature matrix, and determining the third feature matrix as the target feature matrix.
In one embodiment, preferably, the processing module includes:
the dividing unit is used for dividing the vehicle track positioning data according to the order of the vehicle journey to obtain at least one track section, wherein each track section comprises coordinates and passing time of each track point;
the calculation unit is used for calculating the probability of matching the track points in each track section to each road node in the urban road network data according to the hidden Markov model;
the selecting unit is used for selecting a target road network segment with the maximum probability corresponding to each track segment, and mapping the track segment to the target road network segment so as to obtain the road network track characteristic diagram;
And the speed determining unit is used for determining the average speed on each road node according to the time and the distance between the vehicles passing through the adjacent road nodes so as to obtain the speed characteristic matrix of the vehicles.
In one embodiment, the second prediction module preferably includes:
the first coding unit is used for processing each track segment by using an attention mechanism to obtain a first feature code of each track point;
the second coding unit is used for performing global coding processing on the first feature codes of each track point by using an attention mechanism so as to obtain second feature codes corresponding to each track segment;
the splicing unit is used for correspondingly splicing the second feature codes and the speed of the vehicle to obtain target coding vectors;
and the time prediction unit is used for predicting the travel time of the vehicle in the track section according to the target coding vector.
In a third aspect, a computer device is provided, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above-described method for travel time prediction based on multi-tasking when executing the computer program.
In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above-described approach to travel time prediction based on multi-tasking.
It should be noted that, for convenience and brevity of description, the above-described travel time prediction device based on multi-task learning and specific working process of each module may refer to the corresponding process in the foregoing embodiment of the travel time prediction method based on multi-task learning, which is not described herein again.
It should be noted that, for convenience and brevity of description, specific working processes of the model training device and each module described above may refer to corresponding processes in the foregoing embodiments of the travel time prediction method based on the multi-task learning, which are not described herein.
The above-described multitasking learning-based travel time prediction apparatus may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 7.
FIG. 7 illustrates a block diagram of a computer device according to one embodiment of the application.
Referring to fig. 7, the computer device includes a processor, a memory, and a network interface connected by a system bus, wherein the memory may include a storage medium and an internal memory.
The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any of the methods for predicting infectious disease space for multi-source data provided by embodiments of the present application.
The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
The internal memory provides an environment for the execution of a computer program in a storage medium that, when executed by a processor, causes the processor to perform any of a number of methods for predicting travel time based on multi-task learning or a method for training a predicted neural network. The storage medium may be nonvolatile or volatile.
The network interface is used for network communication such as transmitting assigned tasks and the like. It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The computer device of embodiments of the present application exists in a variety of forms including, but not limited to:
(1) Mobile communication devices, which are characterized by mobile communication functionality and are aimed at providing voice, data communication. Such terminals include smart phones (e.g., iPhone), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer equipment, which belongs to the category of personal computers, has the functions of calculation and processing and generally has the characteristic of mobile internet surfing. Such terminals include PDA, MID and UMPC devices, etc., such as iPad.
(3) Portable entertainment devices such devices can display and play multimedia content. Such devices include audio, video players (e.g., iPod), palm game consoles, electronic books, and smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture in that the server is provided with high-reliability services, and therefore, the server has high requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like.
(5) Other electronic devices with data interaction function.
In addition, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for performing the steps of:
acquiring vehicle track positioning data and urban road network data;
processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle;
acquiring space-time association of road nodes according to the speed feature matrix to obtain a target feature matrix;
Predicting the speed of the vehicle according to the target feature matrix;
and predicting the travel time of the vehicle according to the road network track characteristic diagram and the speed of the vehicle.
In one embodiment, preferably, acquiring the space-time association of the road node according to the velocity feature matrix to obtain the target feature matrix includes:
according to the speed feature matrix, obtaining time association among road nodes to obtain a first feature matrix;
obtaining long-term association of road nodes according to the first feature matrix to obtain a second feature matrix;
and acquiring the space-time association of the road nodes according to the second feature matrix to obtain a target feature matrix.
In one embodiment, preferably, according to the velocity feature matrix, obtaining a time association between road nodes to obtain a first feature matrix includes:
and carrying out cavity causal convolution processing of a gating mechanism on the speed characteristic matrix to determine time association among road nodes and obtain a first characteristic matrix.
In one embodiment, preferably, according to the first feature matrix, obtaining long-term association of the road node to obtain a second feature matrix includes:
Carrying out differential processing on each characteristic value in the speed characteristic matrix by adopting a multi-head attention mechanism, and calculating an association matrix among road nodes;
generating a feature map corresponding to the road node according to each incidence matrix;
sampling the different feature images in different sizes to obtain a final feature image;
and carrying out graph convolution processing according to the final feature graph and the first feature matrix to obtain long-term association of the road nodes and obtain a second feature matrix.
In one embodiment, preferably, according to the second feature matrix, acquiring the space-time association of the road node to obtain the target feature matrix includes:
and carrying out diffusion graph convolution processing on the second feature matrix and the road network track feature graph, carrying out residual error processing and standardization processing to obtain space-time association of road nodes, obtaining a third feature matrix, and determining the third feature matrix as the target feature matrix.
In one embodiment, preferably, processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle includes:
dividing the vehicle track positioning data according to an order of a vehicle journey to obtain at least one track section, wherein each track section comprises coordinates and elapsed time of each track point;
Calculating the probability of matching the track points in each track section to each road node in the urban road network data according to the hidden Markov model;
selecting a target road network segment with the maximum probability corresponding to each track segment, and mapping the track segment to the target road network segment to obtain the road network track feature map;
and determining the average speed on each road node according to the time and the distance between the adjacent road nodes of the vehicle so as to obtain the speed characteristic matrix of the vehicle.
In one embodiment, predicting the travel time of the vehicle based on the road network trajectory characteristics and the speed of the vehicle preferably comprises:
processing each track segment by using an attention mechanism to obtain a first feature code of each track point;
performing global coding processing on the first feature codes of each track point by using an attention mechanism to obtain second feature codes corresponding to each track segment;
correspondingly splicing the second feature code and the speed of the vehicle to obtain a target code vector;
and predicting the travel time of the vehicle in the track section according to the target coding vector.
It should be noted that, the functions or steps that can be implemented by the computer readable storage medium or the electronic device may correspond to the relevant descriptions in the foregoing method embodiments, and are not described herein for avoiding repetition.
The technical scheme of the application is described in detail by combining the drawings, through the technical scheme of the application, related operation of gray release can be integrated in the release system, and a developer can enable the release system to call the deployment system to correspondingly deploy for gray release only by carrying out integrated setting in the release system, so that the complexity of gray release deployment work is reduced, and the efficiency and reliability of gray release are improved.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It should be understood that although the terms first, second, etc. may be used to describe the arrangement elements in the embodiments of the present application, these arrangement elements should not be limited to these terms. These terms are only used to distinguish the setting units from each other. For example, a first setting unit may also be referred to as a second setting unit, and similarly, a second setting unit may also be referred to as a first setting unit, without departing from the scope of embodiments of the present application.
Depending on the context, the word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to detection". Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (6)

1. A method for predicting travel time based on multitasking learning, comprising:
acquiring vehicle track positioning data and urban road network data;
processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle;
acquiring space-time association of road nodes according to the speed feature matrix to obtain a target feature matrix;
predicting the speed of the vehicle according to the target feature matrix;
predicting the travel time of the vehicle according to the road network track feature map and the speed of the vehicle;
Acquiring the space-time association of the road nodes according to the speed feature matrix to obtain a target feature matrix, wherein the method comprises the following steps:
according to the speed feature matrix, obtaining time association among road nodes to obtain a first feature matrix;
obtaining long-term association of road nodes according to the first feature matrix to obtain a second feature matrix;
acquiring space-time association of road nodes according to the second feature matrix to obtain a target feature matrix;
according to the speed feature matrix, obtaining the time association between the road nodes to obtain a first feature matrix, including:
carrying out cavity causal convolution processing of a gating mechanism on the speed feature matrix to determine time association among road nodes so as to obtain a first feature matrix;
according to the first feature matrix, obtaining long-term association of the road node to obtain a second feature matrix, including:
carrying out differential processing on each characteristic value in the speed characteristic matrix by adopting a multi-head attention mechanism, and calculating an association matrix among road nodes;
generating a feature map corresponding to the road node according to each incidence matrix;
sampling the different feature images in different sizes to obtain a final feature image;
Performing graph convolution processing according to the final feature graph and the first feature matrix to obtain long-term association of road nodes and obtain a second feature matrix;
according to the second feature matrix, acquiring the space-time association of the road node to obtain a target feature matrix, including:
and carrying out diffusion graph convolution processing on the second feature matrix and the road network track feature graph, carrying out residual error processing and standardization processing to obtain space-time association of road nodes, obtaining a third feature matrix, and determining the third feature matrix as the target feature matrix.
2. The method for predicting travel time based on multi-task learning according to claim 1, wherein processing the vehicle track positioning data and urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle comprises:
dividing the vehicle track positioning data according to an order of a vehicle journey to obtain at least one track section, wherein each track section comprises coordinates and elapsed time of each track point;
calculating the probability of matching the track points in each track section to each road node in the urban road network data according to the hidden Markov model;
Selecting a target road network segment with the maximum probability corresponding to each track segment, and mapping the track segment to the target road network segment to obtain the road network track feature map;
and determining the average speed on each road node according to the time and the distance between the adjacent road nodes of the vehicle so as to obtain the speed characteristic matrix of the vehicle.
3. The method of claim 2, wherein predicting the travel time of the vehicle based on the road network trajectory characteristics and the speed of the vehicle comprises:
processing each track segment by using an attention mechanism to obtain a first feature code of each track point;
performing global coding processing on the first feature codes of each track point by using an attention mechanism to obtain second feature codes corresponding to each track segment;
correspondingly splicing the second feature code and the speed of the vehicle to obtain a target code vector;
and predicting the travel time of the vehicle in the track section according to the target coding vector.
4. A multitasking learning-based travel time prediction apparatus, comprising:
The first acquisition module is used for acquiring vehicle track positioning data and urban road network data;
the processing module is used for processing the vehicle track positioning data and the urban road network data to obtain a road network track feature map and a speed feature matrix of the vehicle;
the second acquisition module is used for acquiring the space-time association of the road nodes according to the speed feature matrix so as to obtain a target feature matrix;
the first prediction module is used for predicting the speed of the vehicle according to the target feature matrix;
the second prediction module is used for predicting the travel time of the vehicle according to the road network track characteristics and the speed of the vehicle;
the second acquisition module includes:
the first association acquisition unit is used for acquiring time association among road nodes according to the speed feature matrix so as to obtain a first feature matrix;
the second association acquisition unit is used for acquiring long-term association of the road nodes according to the first feature matrix so as to obtain a second feature matrix;
the third association acquisition unit is used for acquiring the space-time association of the road nodes according to the second feature matrix so as to obtain a target feature matrix;
the first association acquiring unit is specifically configured to:
Carrying out cavity causal convolution processing of a gating mechanism on the speed feature matrix to determine time association among road nodes so as to obtain a first feature matrix;
the second association acquiring unit is specifically configured to:
carrying out differential processing on each characteristic value in the speed characteristic matrix by adopting a multi-head attention mechanism, and calculating an association matrix among road nodes;
generating a feature map corresponding to the road node according to each incidence matrix;
sampling the different feature images in different sizes to obtain a final feature image;
performing graph convolution processing according to the final feature graph and the first feature matrix to obtain long-term association of road nodes and obtain a second feature matrix;
the third association acquiring unit is specifically configured to:
and carrying out diffusion graph convolution processing on the second feature matrix and the road network track feature graph, carrying out residual error processing and standardization processing to obtain space-time association of road nodes, obtaining a third feature matrix, and determining the third feature matrix as the target feature matrix.
5. A computer device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
Wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the method of any of the preceding claims 1 to 3.
6. A computer readable storage medium, characterized in that computer executable instructions for performing the method of any one of claims 1 to 3 are stored.
CN202310393149.XA 2023-04-13 2023-04-13 Travel time prediction method, device, equipment and medium based on multitask learning Active CN116109021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310393149.XA CN116109021B (en) 2023-04-13 2023-04-13 Travel time prediction method, device, equipment and medium based on multitask learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310393149.XA CN116109021B (en) 2023-04-13 2023-04-13 Travel time prediction method, device, equipment and medium based on multitask learning

Publications (2)

Publication Number Publication Date
CN116109021A CN116109021A (en) 2023-05-12
CN116109021B true CN116109021B (en) 2023-08-15

Family

ID=86265932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310393149.XA Active CN116109021B (en) 2023-04-13 2023-04-13 Travel time prediction method, device, equipment and medium based on multitask learning

Country Status (1)

Country Link
CN (1) CN116109021B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696355A (en) * 2020-06-29 2020-09-22 中南大学 Dynamic graph convolution traffic speed prediction method
CN112785077A (en) * 2021-02-01 2021-05-11 南京航空航天大学 Travel demand prediction method and system based on space-time data
CN113159428A (en) * 2021-04-26 2021-07-23 青岛大学 Traffic flow prediction method, electronic device, and storage medium
CN113705880A (en) * 2021-08-25 2021-11-26 杭州远眺科技有限公司 Traffic speed prediction method and device based on space-time attention diagram convolutional network
CN114202120A (en) * 2021-12-13 2022-03-18 中国电子科技集团公司第十五研究所 Urban traffic travel time prediction method aiming at multi-source heterogeneous data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021216154A1 (en) * 2020-04-21 2021-10-28 Inrix, Inc. Travel speed prediction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696355A (en) * 2020-06-29 2020-09-22 中南大学 Dynamic graph convolution traffic speed prediction method
CN112785077A (en) * 2021-02-01 2021-05-11 南京航空航天大学 Travel demand prediction method and system based on space-time data
CN113159428A (en) * 2021-04-26 2021-07-23 青岛大学 Traffic flow prediction method, electronic device, and storage medium
CN113705880A (en) * 2021-08-25 2021-11-26 杭州远眺科技有限公司 Traffic speed prediction method and device based on space-time attention diagram convolutional network
CN114202120A (en) * 2021-12-13 2022-03-18 中国电子科技集团公司第十五研究所 Urban traffic travel time prediction method aiming at multi-source heterogeneous data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于深度学习的交通通行时间预测研究;付丽萍;中国优秀硕士学位论文全文数据库工程科技Ⅱ辑(第2022年第03期);C034-1834 *

Also Published As

Publication number Publication date
CN116109021A (en) 2023-05-12

Similar Documents

Publication Publication Date Title
Tekouabou et al. Improving parking availability prediction in smart cities with IoT and ensemble-based model
US11790213B2 (en) Identifying complex events from hierarchical representation of data set features
Xiao et al. Understanding private car aggregation effect via spatio-temporal analysis of trajectory data
CN112382099B (en) Traffic road condition prediction method and device, electronic equipment and storage medium
CN109543886A (en) Prediction technique, device, terminal and the storage medium of destination
CN113468978B (en) Fine granularity car body color classification method, device and equipment based on deep learning
CN111091215B (en) Vehicle identification method, device, computer equipment and storage medium
CN113643532B (en) Regional traffic prediction method and device
CN112396254A (en) Destination prediction method, destination prediction device, destination prediction medium, and electronic device
Zhi et al. BiGRU based online multi-modal driving maneuvers and trajectory prediction
CN113239702A (en) Intention recognition method and device and electronic equipment
CN113159403A (en) Method and device for predicting pedestrian track at intersection
CN114926636A (en) Point cloud semantic segmentation method, device, equipment and storage medium
KR102479671B1 (en) Method for providing parts information of vehicle
CN111414852A (en) Image prediction and vehicle behavior planning method, device and system and storage medium
HajiAkhondi-Meybodi et al. Vit-cat: Parallel vision transformers with cross attention fusion for popularity prediction in mec networks
CN116109021B (en) Travel time prediction method, device, equipment and medium based on multitask learning
CN116089875A (en) Traffic flow prediction method, device and storage medium integrating multisource space-time data
CN116501820A (en) Vehicle track prediction method, device, equipment and storage medium
CN116579460A (en) Information prediction method, apparatus, computer device and storage medium
CN113119996B (en) Trajectory prediction method and apparatus, electronic device and storage medium
CN116403397A (en) Traffic prediction method based on deep learning
CN114819140A (en) Model pruning method and device and computer equipment
CN115222089A (en) Road traffic jam prediction method, device, equipment and readable storage medium
CN113192315B (en) Traffic flow distribution prediction method, prediction device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant