Travel Time Prediction Method, System and Storage Medium
By obtaining road network and trajectory data, using generative adversarial networks and Gaussian distribution fitting, accurate prediction of travel time is achieved, and the problem of travel time prediction in urban traffic is solved, and urban traffic planning and management is supported.
Patent Information
- Application Number
- CN202111237316.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-10-22
Smart Images

Figure CN113988401B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of urban transportation, and particularly relates to a travel time prediction method, system, and storage medium. Background Art
[0002] Intelligent transportation systems play an important role in optimizing traffic road networks. In order to analyze and avoid traffic congestion, intelligent transportation systems require a large amount of complete, accurate, and real-time traffic data. Currently, a large number of different types of detectors, such as induction coil detectors, microwave sensors, video detectors, etc., have been installed on major traffic sections in China to provide a data basis for traffic congestion analysis. These detectors can collect various types of traffic flow data, such as speed, occupancy, traffic flow, etc.
[0003] With the continuous advancement of urbanization, urban transportation has also developed rapidly. The speed of traffic supply far lags behind the ever-increasing speed of people's traffic demand, resulting in urban road congestion. Therefore, intelligent transportation systems need to relieve urban congestion by reasonably planning urban road networks and effectively formulating traffic control policies. Among the various components of urban traffic planning and management, travel time prediction for road sections, as an important basic theory, is particularly important. Currently, there is a lack of a method for travel time prediction. Summary of the Invention
[0004] This application aims to solve at least one of the technical problems existing in the prior art. For this purpose, this application proposes a travel time prediction method, system, and storage medium that can achieve travel time prediction.
[0005] The first aspect embodiment of this application provides a travel time prediction method, including:
[0006] Obtain a road network and trajectory data;
[0007] Obtain the final road representation data according to the road network and the trajectory data;
[0008] Concatenate the final road representation data with the historical travel time of the corresponding road to obtain a first input parameter;
[0009] Perform normal distribution sampling on the final road representation data to obtain a second input parameter;
[0010] Input the first input parameter and the second input parameter into the objective function of a generative adversarial network to obtain a prediction result;
[0011] Perform fitting using a Gaussian distribution to obtain travel time prediction distribution data.
[0012] The travel time prediction method according to the embodiments of the first aspect of the present application has at least the following beneficial effects: The travel time prediction method of the embodiments of the present application first obtains a road network and trajectory data, and then obtains the final road representation data according to the road network and the trajectory data; splices the final road representation data with the historical travel time of the corresponding road to obtain a first input parameter; performs normal distribution sampling on the final road representation data to obtain a second input parameter; inputs the first input parameter and the second input parameter into the objective function of the generative adversarial network to obtain a prediction result; performs fitting using a Gaussian distribution to obtain travel time prediction distribution data, which can realize travel time prediction and facilitate people to plan travel plans.
[0013] According to some embodiments of the first aspect of the present application, the obtaining the final road representation data according to the road network and the trajectory data includes:
[0014] Obtaining a road embedding according to the road network;
[0015] Obtaining the road traffic information of the nodes corresponding to the road network according to the road network and the trajectory data;
[0016] Performing a graph convolution operation on the road traffic information to obtain a graph learning result;
[0017] Obtaining the final road representation data according to the road embedding and the graph learning result.
[0018] According to some embodiments of the first aspect of the present application, the road network is a directed graph composed of intertwined roads is the node set in the road network, is the road set in the road network.
[0019] According to some embodiments of the first aspect of the present application, the trajectory data is a set of sequence sample points , representing the latitude of the i-th point, representing the longitude of the -th point, representing the timestamp of the
[0020] According to some embodiments of the first aspect of the present application, the performing a graph convolution operation on the real-time traffic information of the nodes of the road network to obtain a graph learning result includes:
[0021] Constructing a spatial dependence using a graph convolutional network according to the first formula,
[0022] The first formula is:
[0023] , where Relu is the activation function, X is the road traffic information at the corresponding moment, Symmetric normalized Laplacian operator of is the identity matrix, is the weight matrix of the first-layer graph convolutional network, is the weight matrix of the second-layer graph convolutional network, represents the sigmoid activation function, X GC is the graph learning result.
[0024] According to some embodiments of the first aspect of the present application, the objective function is as follows:
[0025] where s represents the first input parameter, z represents the second input parameter, G represents the generative model, D represents the discriminative model, represents the cumulative distribution function of a random variable, represents the travel time distribution in the dataset, Es represents mathematical expectation of, Ez represents mathematical expectation of,
[0026] is the prediction result.
[0027] According to some embodiments of the first aspect of the present application, the objective function is as follows:
[0028]
[0029] where x represents the first input parameter, z represents the second input parameter, y represents a specific time period, G represents the generative model, D represents the discriminative model, represents the cumulative distribution function of a random variable, represents the travel time distribution in the dataset, Es represents mathematical expectation of, Ez represents mathematical expectation of,
[0030] is the prediction result.
[0031] According to some embodiments of the first aspect of the present application, the calculation formula of the travel time prediction distribution data is as follows:
[0032]
[0033] where si represents the first input parameter, ti represents the corresponding historical driving time of the prediction result, represents a Gaussian distribution, represents from The average of the two learned fully-connected layers, which represents from the standard deviation value of the two learned fully-connected layers,
[0034] serves as the travel time prediction distribution data.
[0035] An embodiment of the second aspect of the present application provides a travel time prediction system, including:
[0036] At least one memory;
[0037] At least one processor;
[0038] At least one program;
[0039] The program is stored in the memory, and the processor executes at least one of the programs to implement:
[0040] The travel time prediction method as described in any embodiment of the first aspect of the present application.
[0041] An embodiment of the third aspect of the present application provides a computer-readable storage medium, and the computer-readable storage medium stores computer-executable signals for executing:
[0042] The travel time prediction method as described in any embodiment of the first aspect of the present application.
[0043] The additional aspects and advantages of the present application will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present application. Description of the Drawings
[0044] The additional aspects and advantages of the present application will become apparent and be easily understood in conjunction with the following description of the embodiments with reference to the accompanying drawings, where:
[0045] Figure 1 is a flowchart of the steps of the travel time prediction method according to some embodiments of the first aspect of the present application;
[0046] Figure 2 is a flowchart of the steps of the travel time prediction method according to some embodiments of the first aspect of the present application;
[0047] Figure 3 is a schematic diagram of the objective function of the generative adversarial network according to some embodiments of the first aspect of the present application. Detailed Embodiments
[0048] To make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0049] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order from that in the flowchart. Terms such as those in the description, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.
[0050] In the description of the present application, if the first and second are described only for the purpose of distinguishing technical features, they cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence relationship of the indicated technical features.
[0051] In the description of the present application, unless otherwise clearly defined, words such as "set", "installed", "connected", etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above words in the present application in combination with the specific content of the technical solution.
[0052] Refer to Figure 1 , an embodiment of the first aspect of the present application provides a travel time prediction method, including but not limited to steps S110, S120, S130, S140, S150 and S160.
[0053] Step S110, obtain a road network and trajectory data;
[0054] Step S120, obtain the final road representation data according to the road network and trajectory data;
[0055] Step S130, splice the final road representation data with the historical travel time of the corresponding road to obtain a first input parameter;
[0056] Step S140, perform normal distribution sampling on the final road representation data to obtain a second input parameter;
[0057] Step S150, input the first input parameter and the second input parameter into the objective function of the generative adversarial network to obtain a prediction result;
[0058] Step S160, perform fitting using a Gaussian distribution to obtain travel time prediction distribution data.
[0059] The travel time prediction method according to the embodiment of the present application first obtains a road network and trajectory data, and then obtains the final road representation data according to the road network and the trajectory data; splices the final road representation data with the historical travel time of the corresponding road to obtain a first input parameter; performs normal distribution sampling on the final road representation data to obtain a second input parameter; inputs the first input parameter and the second input parameter into the objective function of the generative adversarial network to obtain a prediction result; and performs fitting using a Gaussian distribution to obtain travel time prediction distribution data, which can realize travel time prediction, facilitate people to plan travel plans, and provide data support for the intelligent transportation system to facilitate the completion of urban traffic planning and management.
[0060] Referring to Figure 2 and Figure 3 , step S120 may include but is not limited to step S210, step S220, step S230, and step S240.
[0061] Step S210, obtaining a road embedding according to the road network;
[0062] Step S220, obtaining the road traffic information of the nodes corresponding to the road network according to the road network and the trajectory data;
[0063] Step S230, performing a graph convolution operation on the road traffic information to obtain a graph learning result;
[0064] Step S240, obtaining the final road representation data according to the road embedding and the graph learning result.
[0065] It can be understood that the road network can be collected through the intelligent transportation system, and the road network is a directed graph composed of interwoven roads is the node set in the road network, is the road set in the road network. For the sparsity of the road network, an adjacency matrix is used as the data structure to store the road network, and let the adjacency matrix be . If there is a road between nodes and , then , otherwise , where 1 < i < N, 1 < j < M. For the road in , its type of feature information is represented as , the characteristic information of the road can include road number, road type, number of lanes, date and time point, etc. Among them, the date refers to a certain day of each week, for example, it can be Monday or Tuesday. It should be noted that the characteristic information of the road can also include other information, which is not limited in the embodiments of this application. The embodiments of this application input the characteristic information of the road into the graph neural network to obtain a road embedding, that is, a discretized embedding. The road embedding can convert the features from a static text representation to a low-dimensional numerical representation, and can embed features with similar semantic representations and close distances into the embedding space. The embedding learning layer performs matrix multiplication with the weight matrix to convert the features into embedding values, where N is the number of roads and E is the dimension of the embedded features. The embedded features have high computational efficiency and can reduce the size of the input dimension.
[0066] It can be understood that the trajectory data is a set of sequence sample points , represents the latitude of the i-th point, represents the -th point's longitude, represents the -th point's timestamp. The travel time prediction method of the embodiments of this application can obtain the road traffic information of the nodes of the road network according to the road network and the trajectory data, and the road traffic information includes traffic flow speed and average vehicle passing speed of the road.
[0067] It can be understood that for the travel time prediction method in the first aspect embodiments of this application, in step S230, graph convolution operation is performed according to the road traffic information of the nodes of the road network to obtain a graph learning result, including:
[0068] According to the first formula, a spatial dependence is constructed using a graph convolutional network,
[0069] The first formula is:
[0070] , where Relu is the activation function, X is the road traffic information at the corresponding moment, is the symmetric normalized Laplacian operator of is the identity matrix, is the weight matrix of the first layer of the graph convolutional network, is the weight matrix of the second layer of the graph convolutional network, represents the sigmoid activation function, X GC is the graph learning result.
[0071] It can be understood that the graph convolutional network is a matrix multiplication process, and its time complexity is expressed as:
[0072]
[0073] is the spatial size of the graph network, is the size of the feature. The time complexity of the graph convolutional network is simple, and using the graph convolutional network can reduce the training time.
[0074] It can be understood that, referring to Figure 3 , the final representation data of the road is sampled according to the normal distribution to obtain the second input parameter, which is denoted as z. When z passes through the generative model Generator, a pseudo-time prediction will be generated, and the pseudo-time prediction is concatenated with z, which is expressed as G(z).
[0075] It can be understood that in step S150, the objective function is as follows:
[0076]
[0077] where s represents the first input parameter, z represents the second input parameter, G represents the generative model Generator, D represents the discriminative model Discriminator, represents the cumulative distribution function of the random variable, represents the travel time distribution in the dataset, Es represents the mathematical expectation of, Ez represents the mathematical expectation of,
[0078] is the prediction result.
[0079] It can be understood that in some other embodiments, in step S150, the objective function can also be as follows:
[0080]
[0081] where x represents the first input parameter, z represents the second input parameter, y represents a specific time period, G represents the generative model Generator, D represents the discriminative model Discriminator, represents the cumulative distribution function of the random variable, represents the travel time distribution in the dataset, Es represents the mathematical expectation of, Ez represents the mathematical expectation of,
[0082] is the prediction result, y represents a specific time period. For example, y can be morning, noon, afternoon, evening, night, early morning, etc.
[0083] It can be understood that in step S160, the calculation formula of the travel time prediction distribution data is as follows:
[0084]
[0085] Among them, si represents the first input parameter, and ti represents the corresponding historical driving time of the prediction result. represents a Gaussian distribution. represents from the average value of two fully connected layers learned. represents from the standard deviation value of two fully connected layers learned.
[0086] is the travel time prediction distribution data.
[0087] It can be understood that in step S160, a Gaussian distribution is used for fitting to obtain the predicted time distribution, and the obtained predicted time distribution is:
[0088] Among them, several roads can form a route. is a set of roads, representing an ordered path sequence of a route. T Rj represents route R j 's predicted time distribution, t ei represents road e i 's predicted time distribution.
[0089] The second aspect embodiment of the present application provides a travel time prediction system, including:
[0090] At least one memory;
[0091] At least one processor;
[0092] At least one program;
[0093] The program is stored in the memory, and the processor executes at least one program to implement:
[0094] The travel time prediction method as described in any embodiment of the first aspect of the present application.
[0095] The processor and the memory can be connected through a bus or other means.
[0096] The memory, as a non-transitory readable storage medium, can be used to store non-transitory software instructions and non-transitory executable instructions. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. It can be understood that the memory optionally includes a memory remotely provided with respect to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0097] The processor realizes various functional applications and data processing by running the non-transitory software instructions, instructions, and signals stored in the memory, that is, realizes the travel time prediction method of the first aspect embodiment described above.
[0098] The non-transitory software instructions and instructions required to implement the travel time prediction method of the above embodiment are stored in the memory. When executed by the processor, the travel time prediction method of the first aspect embodiment or the travel time prediction method of the second aspect embodiment of the present application is executed. For example, execute the Figure 1 method steps S110 to S160 in the above description, Figure 2 method steps S210 to S240 in the above description.
[0099] The third aspect embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores computer-executable signals, and the computer-executable signals are used to execute:
[0100] The travel time prediction method according to any one of the first aspect embodiments of the present application.
[0101] For example, execute the Figure 1 method steps S110 to S160 in the above description, Figure 2 method steps S210 to S240 in the above description.
[0102] The device embodiments described above are merely illustrative. 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 may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] Through the description of the above embodiments, those of ordinary skill in the art can understand that all or some of the steps and systems disclosed in the above methods can be implemented as software, firmware, hardware, and their appropriate combinations. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable signals, data structures, instruction modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically includes computer-readable signals, data structures, instruction modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.
[0104] The embodiments of the present application have been described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the above embodiments. Within the scope of knowledge possessed by those of ordinary skill in the art, various changes can be made without departing from the purpose of the present application.
Claims
1. A travel time prediction method, characterized in that, including: obtaining a road network and trajectory data; obtaining final road representation data according to the road network and the trajectory data; concatenating the final road representation data with the historical travel time of the corresponding road to obtain a first input parameter; performing normal distribution sampling on the final road representation data to obtain a second input parameter; inputting the first input parameter and the second input parameter into the objective function of a generative adversarial network to obtain a prediction result; performing fitting using a Gaussian distribution to obtain travel time prediction distribution data; the objective function is as follows: Among them, s represents the first input parameter, z represents the second input parameter, G represents the generation model, and D represents the discrimination model. represents the cumulative distribution function of the random variable. represents the travel time distribution in the dataset, and Es represents the mathematical expectation of, and Ez represents the mathematical expectation of. as the prediction result; the obtaining of the final road representation data according to the road network and the trajectory data includes: obtaining a road embedding according to the road network; obtaining road traffic information of nodes corresponding to the road network according to the road network and the trajectory data; performing graph convolution operation on the road traffic information to obtain a graph learning result; obtaining final road representation data according to the road embedding and the graph learning result; the performing of the graph convolution operation on the real-time traffic information of the nodes of the road network to obtain a graph learning result includes: constructing spatial dependence using a graph convolutional network according to a first formula, the first formula is: Among them, Relu is the activation function, and X is the road traffic information. The symmetric normalized Laplacian operator of is the identity matrix. is the weight matrix of the first-layer graph convolutional network. is the weight matrix of the second-layer graph convolutional network. represents the sigmoid activation function, and X GC is the graph learning result.
2. The travel time prediction method according to claim 1, wherein The road network is a directed graph composed of intertwined roads is the set of nodes in the road network, is the set of roads in the road network.
3. The travel time prediction method according to claim 1, wherein The trajectory data is a set of sequential sample points , representing the latitude of the i-th point, representing the longitude of the i-th point, and representing the timestamp of the 4. The travel time prediction method according to claim 1, wherein the calculation formula of the travel time prediction distribution data is as follows: wherein, si represents the first input parameter, and ti represents the corresponding historical driving time of the prediction result, represents a Gaussian distribution, represents from the average value of two fully connected layers learned from represents from the standard deviation value of two fully connected layers learned from For the travel time prediction distribution data.
5. A travel time prediction system, characterized in that, including: at least one memory; at least one processor; at least one program; the program is stored in the memory, and the processor executes at least one of the programs to implement: the travel time prediction method according to any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores computer-executable signals, and the computer-executable signals are used to execute: the travel time prediction method according to any one of claims 1 to 4.