CN111047107B - Road traffic time prediction method, device, electronic equipment and storage medium - Google Patents
Road traffic time prediction method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111047107B CN111047107B CN201911344130.6A CN201911344130A CN111047107B CN 111047107 B CN111047107 B CN 111047107B CN 201911344130 A CN201911344130 A CN 201911344130A CN 111047107 B CN111047107 B CN 111047107B
- Authority
- CN
- China
- Prior art keywords
- road
- connection relation
- data corresponding
- preset
- node
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000007246 mechanism Effects 0.000 claims abstract description 38
- 238000004364 calculation method Methods 0.000 claims abstract description 32
- 238000013507 mapping Methods 0.000 claims abstract description 32
- 238000012549 training Methods 0.000 claims description 84
- 230000006870 function Effects 0.000 claims description 29
- 230000015654 memory Effects 0.000 claims description 29
- 230000002776 aggregation Effects 0.000 claims description 22
- 238000004220 aggregation Methods 0.000 claims description 22
- 238000012545 processing Methods 0.000 claims description 13
- 238000003062 neural network model Methods 0.000 claims description 8
- 230000004931 aggregating effect Effects 0.000 claims description 5
- 238000010276 construction Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 8
- 238000005070 sampling Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 235000002020 sage Nutrition 0.000 description 2
- 206010039203 Road traffic accident Diseases 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012821 model calculation Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/40—Business processes related to the transportation industry
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- Theoretical Computer Science (AREA)
- Tourism & Hospitality (AREA)
- General Physics & Mathematics (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Development Economics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses a road traffic time prediction method, a road traffic time prediction device, electronic equipment and a storage medium, and relates to the technical field of intelligent traffic, wherein the method comprises the following steps: acquiring a target road node, and acquiring a computation subgraph corresponding to the target road node according to preset map data; obtaining road characteristic data corresponding to each road node in the computational subgraph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism; and inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to the connection relation of each road node into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node. Therefore, data are read through a preset mapping mechanism, the data acquisition efficiency is improved, connection relation characteristic data among all roads are considered during prediction, the accuracy of road passing time prediction is improved, and the accuracy of estimated arrival time is improved.
Description
Technical Field
The present application relates to the field of intelligent transportation technologies in data processing technologies, and in particular, to a method and an apparatus for predicting road transit time, an electronic device, and a storage medium.
Background
At present, with the continuous development of geographic position related sensors such as a global positioning system and the like, most public transport is provided with an automatic vehicle positioning system, and with the continuous popularization of map navigation, the estimated arrival time is an important component of a map technology.
However, the estimated arrival time is due to a lot of uncertainty of environment and traffic, and each road transit time plays a very important role in predicting the estimated arrival time, so how to accurately predict the road transit time is a technical problem to be solved.
Disclosure of Invention
A first object of the present application is to propose a road transit time prediction method.
A second object of the present application is to provide a road transit time prediction apparatus.
A third object of the present application is to provide an electronic device.
A fourth object of the present application is to propose a non-transitory computer readable storage medium storing computer instructions.
In order to achieve the above object, a method for predicting road transit time is provided in an embodiment of the first aspect of the present application, including the following steps:
acquiring a target road node, and acquiring a computation subgraph corresponding to the target road node according to preset map data;
obtaining road characteristic data corresponding to each road node in the computation subgraph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism;
and inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to the connection relation of each road node into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node.
To achieve the above object, a second aspect of the present application provides a road transit time prediction apparatus, including:
the first acquisition module is used for acquiring a target road node and acquiring a computation subgraph corresponding to the target road node according to preset map data;
the second acquisition module is used for acquiring road characteristic data corresponding to each road node in the computational sub-graph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism;
and the calculation module is used for inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate the predicted passing time corresponding to the target road node.
To achieve the above object, a third aspect of the present application provides an electronic device, including: 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 to enable the at least one processor to perform the road transit time prediction method described in the above embodiments.
To achieve the above object, a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the road transit time prediction method described in the above embodiment is provided in a fourth aspect of the present application.
One embodiment in the above application has the following advantages or benefits:
acquiring a target road node, and acquiring a computation subgraph corresponding to the target road node according to preset map data; obtaining road characteristic data corresponding to each road node in the computational subgraph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism; and inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node. Therefore, data are read through a preset mapping mechanism, the data acquisition efficiency is improved, connection relation characteristic data among all roads are considered during prediction, the accuracy of road passing time prediction is further improved, and the accuracy of estimated arrival time is improved.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a flow chart of a road transit time prediction method according to a first embodiment of the present application;
FIG. 2 is an exemplary diagram of a computational subgraph according to a first embodiment of the application;
FIG. 3 is a flow chart of a road transit time prediction method according to a second embodiment of the present application;
FIG. 4 is an exemplary diagram of a storage according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of a road transit time prediction apparatus according to a third embodiment of the present application;
fig. 6 is a schematic structural diagram of a road transit time prediction apparatus according to a fourth embodiment of the present application;
fig. 7 is a schematic structural diagram of a road transit time prediction apparatus according to a fifth embodiment of the present application;
fig. 8 is a schematic structural view of a road transit time prediction apparatus according to a sixth embodiment of the present application;
fig. 9 is a block diagram of an electronic device for implementing a road transit time prediction method according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
A road transit time prediction method, apparatus, electronic device, and storage medium according to an embodiment of the present application are described below with reference to the accompanying drawings.
According to the scheme, the data are read through the preset mapping mechanism, the data acquisition efficiency is improved, the road characteristic data and the connection relation characteristic data among the roads are considered during prediction, the accuracy of road passing time prediction is further improved, and therefore the accuracy of estimated arrival time is improved.
Specifically, fig. 1 is a flowchart of a road transit time prediction method according to a first embodiment of the present application.
As shown in fig. 1, the method includes:
Specifically, when the road passing time is predicted, the road passing time of one road or a plurality of roads in the navigation route can be simultaneously predicted, so that the road needing the passing time prediction is used as a target road node, and a computation subgraph corresponding to the target road node can be obtained according to preset map data.
The preset map data is pre-established, as a possible implementation manner, a plurality of roads and connection relations among the roads are obtained, and the preset map data is established according to the plurality of roads and the connection relations among the roads, that is, each road can be used as a node, and intersections among the roads are used as edges, so that the preset map data is established.
Therefore, the target road node can be found from the preset map data, and all road nodes adjacent to the target road node and the connecting edge are used as a computation subgraph, for example, as shown in fig. 2, the target road node is a, and the computation subgraph is a dotted line surrounding each road node and the connecting edge connected with the target road node a.
And 102, acquiring road characteristic data corresponding to each road node in the computational sub-graph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism.
It can be understood that the preset database is preset, and as a possible implementation manner, the historical feature data of a plurality of roads corresponding to a plurality of roads and the historical feature data of a plurality of connection relationships corresponding to connection relationships between the roads are obtained, and the historical feature data of a plurality of roads corresponding to a plurality of roads and the historical feature data of a plurality of connection relationships corresponding to connection relationships between the roads are stored in the preset database according to a preset mapping mechanism.
Therefore, road characteristic data corresponding to each road node in the computational sub-graph, such as a traffic jam index, a transit time and a traffic accident probability at the moment corresponding to the road node, and connection relation characteristic data corresponding to each road node connection relation, such as a red-green light condition of the crossroad, a traffic jam index and the like, can be acquired from a preset database through a preset mapping mechanism.
The preset mapping mechanism refers to a storage obtaining and storage mode, and the file pointer is stored in the memory, so that the system obtains the external memory data in a memory operation mode, and the data reading efficiency is improved.
And 103, inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node.
Specifically, the preset prediction model is generated in advance, as a possible implementation manner, training road nodes are determined, training sub-graphs corresponding to the training road nodes are obtained according to preset map data, road characteristic sample data corresponding to each road node in the training sub-graphs and connection relation characteristic sample data corresponding to connection relations of each road node are obtained from a preset database through a preset mapping mechanism, the road characteristic sample data corresponding to each road node and the connection relation characteristic sample data corresponding to each road node are aggregated through a preset aggregation function to generate training road characteristic sample data, a plurality of training road characteristic sample data are input into a neural network model to obtain a plurality of training results, and loss function calculation and back propagation gradient processing are respectively carried out on the plurality of training results and a plurality of current passing times corresponding to the plurality of training road nodes, until a predictive model is generated.
Therefore, the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation are input into a preset prediction model for calculation to generate the predicted passing time corresponding to the target road node, as a possible implementation manner, the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation are aggregated through a preset aggregation function to generate the target road characteristic data, and the target road characteristic data are input into the preset prediction model for calculation to generate the predicted passing time corresponding to the target road node.
That is, a target road node is taken as a starting point, a computation subgraph is generated according to a connection relation, road characteristic data corresponding to each node in the computation subgraph is obtained through a mmap mechanism and is mounted in the subgraph, each node characteristic in a sampling subgraph is aggregated through an aggregation function through the connection relation to generate target road characteristic data, and then the target road characteristic data is utilized to carry out full-connection computation to generate a prediction result of the target road node, namely the transit time.
For example, assuming that the road nodes are B, C neighbors distributed as a, predicting the passing time of the target road node a, firstly sampling the connection relationship of a to generate a computational sub-graph formed by A, B, C, obtaining road characteristic data of the computational sub-graph A, B, C through a mmap mechanism for mounting, constructing the target road characteristic data according to the computational sub-graph, inputting the target road characteristic data into a preset prediction model, and directly generating the prediction result of a, namely the passing time, through full-connection calculation.
In summary, according to the road transit time prediction method provided by the embodiment of the application, a target road node is obtained, and a computation sub-graph corresponding to the target road node is obtained according to preset map data; obtaining road characteristic data corresponding to each road node in the computational subgraph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism; and inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node. Therefore, data are read through a preset mapping mechanism, the data acquisition efficiency is improved, connection relation characteristic data among all roads are considered during prediction, the accuracy of road passing time prediction is further improved, and the accuracy of estimated arrival time is improved.
In order to implement the above embodiments and to describe more clearly the specific processes of data preprocessing and generation of the preset prediction model, the following description is made in detail with reference to fig. 3, and fig. 3 is a flowchart of a road transit time prediction method according to a second embodiment of the present application.
Specifically, for modeling a road as a point in a graph, an intersection between roads is modeled as an edge in the graph, a plurality of historical road characteristic data corresponding to a plurality of roads and a plurality of historical connection relation characteristic data corresponding to connection relations between the roads are obtained, the historical road characteristic data and the historical connection relation characteristic data are sliced according to preset time, such as 5min granularity, and statistical values such as mean value calculation, summation calculation and the like in the slices are calculated to serve as final historical road characteristic data and historical connection relation characteristic data, wherein in order to prevent the problem of numerical explosion existing in a regression model, a prediction target can be converted into a classification problem.
That is, the neighborhood relationship between map points is fully utilized, roads in the map are modeled as points of the map, intersections in the map are modeled as edges of the map, the flow of the roads to be predicted is divided into a plurality of levels, and node classification prediction is performed by utilizing graph sage (a mode of aggregating node neighborhood characteristic information).
Specifically, for example, if a beijing road is simply modeled, the number of road nodes in the graph is about 200w, and the historical data characteristic magnitude in one month is about 300G, if a distributed graph is directly used for storage, serious bandwidth bottlenecks may occur in the prepared data during training, so a preset mapping mechanism is used to store a plurality of road historical characteristic data corresponding to a plurality of roads and a plurality of connection relation historical characteristic data corresponding to connection relations between the roads in a preset database, for example, a mmap mechanism of linux, a large-scale point characteristic is stored in an external memory, and the reading efficiency of the data is optimized in the form of memory mapping and file pointers, the mmap mechanism is roughly as shown in fig. 4, and the file pointers are stored in the internal memory, so that the system obtains the external memory data in the mode of memory operation.
That is to say, the preprocessing data has low redundancy and can be completed by a single machine, and the huge road characteristics in the map are stored in an external memory by utilizing the mmap mechanism of linux, so that the network bandwidth bottleneck of the original distributed map storage is overcome.
And 204, determining a training road node, and acquiring a training subgraph corresponding to the training road node according to preset map data.
And step 206, carrying out aggregation processing on the road characteristic sample data corresponding to each road node and the connection relation characteristic sample data corresponding to the connection relation of each road node through a preset aggregation function to generate training road characteristic sample data.
And step 207, inputting the multiple training road characteristic sample data into the neural network model to obtain multiple training results, and respectively performing loss function calculation and back propagation gradient processing on the multiple training results and multiple current passing times corresponding to the multiple training road nodes until a prediction model is generated.
Specifically, one road node is taken as a training road node to acquire a neighbor subgraph, namely a training subgraph, random sampling is carried out according to adjacent points of the training subgraph, the number of sampled layers and the number of neighbor sampling points are taken as model hyper-parameters, road characteristic sample data corresponding to each road node in the training subgraph and connection relation characteristic sample data corresponding to each road node in the training subgraph are read from an external memory in a mmap mode after the training subgraph is generated, and the road characteristic sample data are hung in the training subgraph.
For the random sampling training subgraph, the representation of the neighbor nodes is aggregated into the current node representation through an aggregation function, then gradient return is carried out, for example, when a GATgraph sage algorithm is adopted, the aggregation function is an attention function, the neighbor representations of all the nodes are aggregated together in a weighted manner through attention, then the neighbor representations are connected with the self representation to carry out full-connection conversion representation, namely, road characteristic sample data corresponding to all the road nodes and connection relation characteristic sample data corresponding to all the road node connection relations are aggregated through a preset aggregation function to generate training road characteristic sample data.
And finally, inputting the multiple training road characteristic sample data into the neural network model to obtain multiple training results, and respectively performing loss function calculation and back propagation gradient processing on the multiple training results and multiple current passing times corresponding to the multiple training road nodes until a prediction model is generated.
That is to say, a starting point is randomly selected, a training subgraph corresponding to a walking neighbor with the starting point as a starting point is obtained, road characteristic data corresponding to each node in the training subgraph is obtained through a mmap mechanism and is mounted in the training subgraph, training road characteristic sample data is constructed according to the generated training subgraph, loss function calculation and back propagation gradient are carried out on the training road characteristic sample data through a neural network model, the training process is repeated until the model converges, and a prediction model is generated. The method has the advantages that independent modeling of each intersection node of the map is not needed, and a preset prediction model is realized by using dispersion/aggregation, so that the problem that massive processor operation is needed for each node due to independent modeling of each node is avoided, the processor can be fully utilized to accelerate training time by using multi-machine acceleration, the problem of repeated model calculation realized by a traditional method is solved, and model training and prediction can be finished by a single machine.
For example, assuming that a currently trained node is a, B, C and D are neighbors of a, a connection relation of a is sampled to generate a training subgraph formed by A, B and C, historical road characteristic data of the sampled subgraph A, B and C are obtained through a mmap mechanism to be mounted, training road characteristic sample data are constructed according to the training subgraph and input into a neural network, a loss function is calculated with current passing time of a point a, and direction gradient return training is performed until a prediction model is generated. And A, B and D training subgraphs can be constructed to repeat the steps for training.
It should be noted that, in the prediction process, since the in-degree of a node is very large, the prediction is also calculated based on the training subgraph of the previous sample, and the current node representation information is generated by representing the neighboring nodes through the aggregation function.
In summary, the method for predicting road transit time according to the embodiment of the present application includes obtaining a plurality of roads and connection relations among the roads, constructing preset map data according to the roads and the connection relations among the roads, obtaining a plurality of road historical feature data corresponding to the roads and a plurality of connection relation historical feature data corresponding to the connection relations among the roads, storing the plurality of road historical feature data corresponding to the roads and the plurality of connection relation historical feature data corresponding to the connection relations among the roads in a preset database according to a preset mapping mechanism, determining training road nodes, obtaining training sub-images corresponding to the training road nodes according to the preset map data, obtaining road feature sample data corresponding to the road nodes in the training sub-images from the preset database through the preset mapping mechanism, and obtaining connection relation features corresponding to the connection relations among the road nodes, and performing aggregation processing on road characteristic sample data corresponding to each road node and connection relation characteristic sample data corresponding to the connection relation of each road node through a preset aggregation function to generate training road characteristic sample data, inputting a plurality of training road characteristic sample data into a neural network model to obtain a plurality of training results, and performing loss function calculation and back propagation gradient processing on the plurality of training results and a plurality of current passing times corresponding to the plurality of training road nodes respectively until a prediction model is generated. Therefore, data are read through a preset mapping mechanism, the data acquisition efficiency is improved, connection relation characteristic data among all roads are considered during prediction, the accuracy of road passing time prediction is further improved, and the accuracy of estimated arrival time is improved.
In order to implement the above embodiments, the present application further proposes a road passing time prediction device, fig. 5 is a schematic structural diagram of a road passing time prediction device according to a fourth embodiment of the present application, and as shown in fig. 5, the road passing time prediction device includes: a first acquisition module 501, a second acquisition module 502, and a calculation module 503, wherein,
the first obtaining module 501 is configured to obtain a target road node, and obtain a computation sub-graph corresponding to the target road node according to preset map data.
A second obtaining module 502, configured to obtain, from a preset database through a preset mapping mechanism, road feature data corresponding to each road node in the computational sub-graph and connection relationship feature data corresponding to a connection relationship of each road node.
The calculating module 503 is configured to input the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation, so as to generate a predicted transit time corresponding to the target road node.
In an embodiment of the present application, the calculating module 503 is specifically configured to:
aggregating the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation through a preset aggregation function to generate target road characteristic data; and inputting the characteristic data of the target road into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node.
In an embodiment of the present application, as shown in fig. 6, on the basis of fig. 5, the method further includes: a third acquisition module 504 and a construction module 505.
And a third obtaining module 504, configured to obtain multiple roads and connection relationships among the roads.
And a building module 505, configured to build the preset map data according to the multiple roads and the connection relationship between the multiple roads.
In an embodiment of the present application, as shown in fig. 7, on the basis of fig. 6, the method further includes: a fourth acquisition module 506 and a storage module 507.
A fourth obtaining module 506, configured to obtain historical road characteristic data corresponding to the multiple roads and historical connection relation characteristic data corresponding to connection relations among the multiple roads. The storage module 507 is configured to store, in the preset database, a plurality of historical road characteristic data corresponding to the plurality of roads and a plurality of historical connection relationship characteristic data corresponding to connection relationships between the roads according to the preset mapping mechanism.
In an embodiment of the present application, as shown in fig. 8, on the basis of fig. 5, the method further includes: a determination acquisition module 508, a fifth acquisition module 509, an aggregation module 510, and a generation module 511.
The determining and obtaining module 508 is configured to determine a training road node, and obtain a training subgraph corresponding to the training road node according to the preset map data.
A fifth obtaining module 509, configured to obtain, from a preset database through a preset mapping mechanism, road characteristic sample data corresponding to each road node in the training subgraph and connection relationship characteristic sample data corresponding to a connection relationship of each road node.
And an aggregation module 510, configured to aggregate, by using a preset aggregation function, the road characteristic sample data corresponding to each road node and the connection relationship characteristic sample data corresponding to each road node connection relationship to generate training road characteristic sample data.
The generating module 511 is configured to input a plurality of training road characteristic sample data into a neural network model to obtain a plurality of training results, and perform loss function calculation and back propagation gradient processing on the plurality of training results and a plurality of current transit times corresponding to a plurality of training road nodes respectively until the prediction model is generated.
It should be noted that the explanation of the road passing time prediction method is also applicable to the road passing time prediction device according to the embodiment of the present invention, and the implementation principle is similar, and is not repeated herein.
In summary, the road transit time prediction apparatus of the embodiment of the present application obtains a target road node, and obtains a computation sub-graph corresponding to the target road node according to preset map data; obtaining road characteristic data corresponding to each road node in the computational subgraph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism; and inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node. Therefore, data are read through a preset mapping mechanism, the data acquisition efficiency is improved, connection relation characteristic data among all roads are considered during prediction, the accuracy of road passing time prediction is further improved, and the accuracy of estimated arrival time is improved.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 9 is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 9, the electronic apparatus includes: one or more processors 901, memory 902, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 9 illustrates an example of a processor 901.
The memory 902, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for identifying the validity of parking bit data in the embodiment of the present application (for example, the first obtaining module 501, the second obtaining module 502, and the calculating module 503 shown in fig. 5). The processor 901 executes various functional applications of the server and data processing by running non-transitory software programs, instructions and modules stored in the memory 902, that is, implements the road transit time prediction method in the above method embodiment.
The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 902 may optionally include memory located remotely from the processor 901, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device performing the method of recognizing validity of parking space data may further include: an input device 903 and an output device 904. The processor 901, the memory 902, the input device 903 and the output device 904 may be connected by a bus or other means, and fig. 9 illustrates the connection by a bus as an example.
The input device 903 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device, such as an input device like a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, etc. The output devices 904 may include a display device, auxiliary lighting devices (e.g., LEDs), tactile feedback devices (e.g., vibrating motors), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A road transit time prediction method, comprising:
acquiring a target road node, and acquiring a computation subgraph corresponding to the target road node according to preset map data;
obtaining road characteristic data corresponding to each road node in the computation subgraph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism;
inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node; the step of inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate the predicted passing time corresponding to the target road node comprises the following steps:
aggregating the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation through a preset aggregation function to generate target road characteristic data;
and inputting the characteristic data of the target road into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node.
2. The method of claim 1, prior to said obtaining a target road node and obtaining a sampled sub-graph corresponding to the target node, further comprising:
acquiring a plurality of roads and the connection relation among the roads;
and constructing the preset map data according to the plurality of roads and the connection relation among the roads.
3. The method of claim 2, wherein after obtaining the plurality of roads and the connection relationship between the roads, further comprising:
obtaining a plurality of historical road characteristic data corresponding to the plurality of roads and a plurality of historical connection relation characteristic data corresponding to the connection relation among the roads;
and storing a plurality of historical road characteristic data corresponding to the plurality of roads and a plurality of historical connection relation characteristic data corresponding to the connection relation among the roads in the preset database according to the preset mapping mechanism.
4. The method of claim 1, wherein before the inputting the target road characteristic data into a preset prediction model for calculation to generate the predicted transit time corresponding to the target road node, the method further comprises:
determining a training road node, and acquiring a training subgraph corresponding to the training road node according to the preset map data;
obtaining road characteristic sample data corresponding to each road node in the training subgraph and connection relation characteristic sample data corresponding to each road node connection relation from a preset database through a preset mapping mechanism;
performing aggregation processing on the road characteristic sample data corresponding to each road node and the connection relation characteristic sample data corresponding to the connection relation of each road node through a preset aggregation function to generate training road characteristic sample data;
and inputting a plurality of training road characteristic sample data into a neural network model to obtain a plurality of training results, and respectively carrying out loss function calculation and back propagation gradient processing on the plurality of training results and a plurality of current passing times corresponding to a plurality of training road nodes until the prediction model is generated.
5. A road transit time prediction apparatus, comprising:
the first acquisition module is used for acquiring a target road node and acquiring a computation subgraph corresponding to the target road node according to preset map data;
the second acquisition module is used for acquiring road characteristic data corresponding to each road node in the computational sub-graph and connection relation characteristic data corresponding to each road node connection relation from a preset database through a preset mapping mechanism;
the calculation module is used for inputting the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node; the calculation module is specifically configured to:
aggregating the road characteristic data corresponding to each road node and the connection relation characteristic data corresponding to each road node connection relation through a preset aggregation function to generate target road characteristic data;
and inputting the characteristic data of the target road into a preset prediction model for calculation to generate predicted passing time corresponding to the target road node.
6. The apparatus of claim 5, further comprising:
the third acquisition module is used for acquiring a plurality of roads and the connection relation among the roads;
and the construction module is used for constructing the preset map data according to the plurality of roads and the connection relation among the roads.
7. The apparatus of claim 6, further comprising:
the fourth acquisition module is used for acquiring a plurality of historical road characteristic data corresponding to the plurality of roads and a plurality of historical connection relation characteristic data corresponding to the connection relation among the roads;
and the storage module is used for storing a plurality of historical road characteristic data corresponding to the plurality of roads and a plurality of historical connection relation characteristic data corresponding to the connection relation among the roads in the preset database according to the preset mapping mechanism.
8. The apparatus of claim 5, further comprising:
the determining and obtaining module is used for determining a training road node and obtaining a training subgraph corresponding to the training road node according to the preset map data;
the fifth acquisition module is used for acquiring road characteristic sample data corresponding to each road node in the training subgraph and connection relation characteristic sample data corresponding to each road node connection relation from a preset database through a preset mapping mechanism;
the aggregation module is used for aggregating the road characteristic sample data corresponding to each road node and the connection relation characteristic sample data corresponding to the connection relation of each road node through a preset aggregation function to generate training road characteristic sample data;
and the generation module is used for inputting a plurality of training road characteristic sample data into a neural network model to obtain a plurality of training results, and respectively carrying out loss function calculation and back propagation gradient processing on the plurality of training results and a plurality of current transit times corresponding to a plurality of training road nodes until the prediction model is generated.
9. An electronic 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 to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911344130.6A CN111047107B (en) | 2019-12-23 | 2019-12-23 | Road traffic time prediction method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911344130.6A CN111047107B (en) | 2019-12-23 | 2019-12-23 | Road traffic time prediction method, device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111047107A CN111047107A (en) | 2020-04-21 |
CN111047107B true CN111047107B (en) | 2022-05-10 |
Family
ID=70238905
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911344130.6A Active CN111047107B (en) | 2019-12-23 | 2019-12-23 | Road traffic time prediction method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111047107B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597700B (en) * | 2020-05-09 | 2023-08-15 | 北京百度网讯科技有限公司 | Signal control algorithm evaluation method and device, electronic equipment and readable storage medium |
CN111914180B (en) * | 2020-08-19 | 2024-04-16 | 腾讯科技(深圳)有限公司 | User characteristic determining method, device, equipment and medium based on graph structure |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1796058A1 (en) * | 2005-12-12 | 2007-06-13 | C.R.F. Societa Consortile per Azioni | Method and system for estimating the arrival time of a public transport means at predetermined points of its path |
CN104269059A (en) * | 2014-10-15 | 2015-01-07 | 河海大学 | City path travel time forecasting method based on multi-source data fusion |
CN109035761A (en) * | 2018-06-25 | 2018-12-18 | 复旦大学 | Travel time estimation method based on back-up surveillance study |
-
2019
- 2019-12-23 CN CN201911344130.6A patent/CN111047107B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1796058A1 (en) * | 2005-12-12 | 2007-06-13 | C.R.F. Societa Consortile per Azioni | Method and system for estimating the arrival time of a public transport means at predetermined points of its path |
CN104269059A (en) * | 2014-10-15 | 2015-01-07 | 河海大学 | City path travel time forecasting method based on multi-source data fusion |
CN109035761A (en) * | 2018-06-25 | 2018-12-18 | 复旦大学 | Travel time estimation method based on back-up surveillance study |
Non-Patent Citations (3)
Title |
---|
图卷积神经网络综述;徐冰冰 等;《计算机学报》;20191104;正文第5-8页 * |
基于图卷积神经网络的旅行时间预测方法研究;虎玉鑫;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20190115;正文第25-59页 * |
虎玉鑫.基于图卷积神经网络的旅行时间预测方法研究.《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》.2019, * |
Also Published As
Publication number | Publication date |
---|---|
CN111047107A (en) | 2020-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7204826B2 (en) | Traffic accident identification method, apparatus, device and computer storage medium | |
CN111210656B (en) | Method and device for predicting free parking space of parking lot, electronic equipment and storage medium | |
JP7334205B2 (en) | Destination prediction method, device, electronic device, computer-readable storage medium and computer program | |
CN114357105B (en) | Pre-training method and model fine-tuning method of geographic pre-training model | |
CN111310987B (en) | Method and device for predicting free parking space of parking lot, electronic equipment and storage medium | |
EP3851799B1 (en) | Determine traffic checkpoint method and apparatus, electronic device, and medium | |
CN111325382B (en) | Method and device for predicting free parking space of parking lot, electronic equipment and storage medium | |
CN109781132B (en) | Experience route replacing method and device, electronic equipment and storage medium | |
CN112101527B (en) | Method and device for identifying lane change, electronic equipment and storage medium | |
CN112000893A (en) | Resident area prediction method, resident area prediction device, resident area prediction equipment and storage medium | |
US10304328B2 (en) | Diagnostic system, method, and recording medium for signalized transportation networks | |
CN114428828A (en) | Method and device for digging new road based on driving track and electronic equipment | |
Yedavalli et al. | Microsimulation analysis for network traffic assignment (MANTA) at metropolitan-scale for agile transportation planning | |
CN111047107B (en) | Road traffic time prediction method, device, electronic equipment and storage medium | |
CN111982138A (en) | Prediction model obtaining and path planning method, device and storage medium | |
Li et al. | Design and implementation of intelligent traffic and big data mining system based on internet of things | |
CN112269930A (en) | Method and device for establishing regional heat prediction model and regional heat prediction | |
CN114626169A (en) | Traffic network optimization method, device, equipment, readable storage medium and product | |
JP2023027233A (en) | Road data integration map generation method, device, and electronic apparatus | |
US20240262385A1 (en) | Spatio-temporal pose/object database | |
Moskvin | Quantum Neural Networks and Their Potential in Traffic Prediction | |
CN114549051A (en) | Cross-regional talent flow intention analysis method, device, equipment and storage medium | |
CN113609631A (en) | Method and device for creating network topological graph based on event and electronic equipment | |
CN111582543A (en) | Generation method of prediction model, and determination method and device of estimated arrival time | |
CN111753037A (en) | Information representation method and device, electronic equipment and storage medium |
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 |