CN116245215A - Prediction model acquisition and passage duration prediction method, device, equipment and medium - Google Patents

Prediction model acquisition and passage duration prediction method, device, equipment and medium Download PDF

Info

Publication number
CN116245215A
CN116245215A CN202211720619.0A CN202211720619A CN116245215A CN 116245215 A CN116245215 A CN 116245215A CN 202211720619 A CN202211720619 A CN 202211720619A CN 116245215 A CN116245215 A CN 116245215A
Authority
CN
China
Prior art keywords
road
road section
basic
extended
segment
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.)
Pending
Application number
CN202211720619.0A
Other languages
Chinese (zh)
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211720619.0A priority Critical patent/CN116245215A/en
Publication of CN116245215A publication Critical patent/CN116245215A/en
Pending legal-status Critical Current

Links

Images

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The disclosure provides a prediction model acquisition and traffic duration prediction method, a prediction model acquisition and traffic duration prediction device, prediction equipment and a prediction medium, and relates to the artificial intelligence fields of deep learning, big data processing, knowledge maps, map navigation and the like. The method for predicting the traffic duration can comprise the following steps: acquiring a navigation route to be predicted; taking each road section in the navigation route to be predicted as a basic road section, respectively acquiring an extended road section of each basic road section, and generating a topological graph corresponding to the navigation route to be predicted according to the basic road section and the extended road section; and respectively acquiring the characteristic information of the basic road section and the extended road section, and determining the passing duration of the navigation route to be predicted according to the topological graph, the characteristic information and a pre-trained prediction model. By applying the scheme disclosed by the disclosure, the accuracy of the prediction result and the like can be improved.

Description

Prediction model acquisition and passage duration prediction method, device, equipment and medium
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to a prediction model acquisition and traffic duration prediction method, device, equipment and medium in the fields of deep learning, big data processing, knowledge graph, map navigation and the like.
Background
The navigation time prediction is one of important functions of map navigation software, namely, the time for a user to reach a destination is predicted according to a navigation route selected by the user, namely, the passing duration is predicted.
Disclosure of Invention
The disclosure provides a prediction model acquisition and traffic duration prediction method, a prediction model acquisition and traffic duration prediction device, prediction equipment and prediction media.
A predictive model acquisition method comprising:
acquiring a historical navigation route of any user and corresponding passing duration;
taking each road section in the historical navigation route as a basic road section, respectively acquiring an extended road section of each basic road section, and generating a topological graph corresponding to the historical navigation route according to the basic road section and the extended road section;
respectively acquiring characteristic information of the basic road section and the extended road section, and forming a training sample by utilizing the topological graph, the characteristic information and the passing duration;
and training the prediction model by using the obtained training sample, and determining the passing duration of the navigation route to be predicted by using the prediction model.
A method of predicting a duration of a pass, comprising:
acquiring a navigation route to be predicted;
taking each road section in the navigation route to be predicted as a basic road section, respectively acquiring an extended road section of each basic road section, and generating a topological graph corresponding to the navigation route to be predicted according to the basic road section and the extended road section;
And respectively acquiring the characteristic information of the basic road section and the extended road section, and determining the passing duration of the navigation route to be predicted according to the topological graph, the characteristic information and a pre-trained prediction model.
A predictive model acquisition device comprising: the system comprises a first acquisition module, a first generation module, a sample construction module and a model training module;
the first acquisition module is used for acquiring a historical navigation route and corresponding passing duration of any user;
the first generation module is used for taking each road section in the historical navigation route as a basic road section, respectively acquiring an extended road section of each basic road section, and generating a topological graph corresponding to the historical navigation route according to the basic road section and the extended road section;
the sample construction module is used for respectively acquiring the characteristic information of the basic road section and the extended road section, and forming a training sample by utilizing the topological graph, the characteristic information and the passing duration;
the model training module is used for training the prediction model by using the acquired training sample and determining the passing duration of the navigation route to be predicted by using the prediction model.
A traffic duration prediction apparatus comprising: the system comprises a second acquisition module, a second generation module and a time length prediction module;
the second acquisition module is used for acquiring a navigation route to be predicted;
the second generation module is used for taking each road section in the navigation route to be predicted as a basic road section, respectively obtaining an extended road section of each basic road section, and generating a topological graph corresponding to the navigation route to be predicted according to the basic road section and the extended road section;
the duration prediction module is used for respectively acquiring the characteristic information of the basic road section and the extended road section, and determining the passing duration of the navigation route to be predicted according to the topological graph, the characteristic information and a prediction model obtained by training in advance.
An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a method as described above.
A computer program product comprising computer programs/instructions which when executed by a processor implement a method as described above.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flowchart of an embodiment of a predictive model acquisition method according to the present disclosure;
FIG. 2 is a schematic diagram of a portion of the map road network according to the present disclosure;
FIG. 3 is a schematic diagram of a topology graph generated as described in the present disclosure;
FIG. 4 is a flowchart of an embodiment of a method for predicting a duration of a pass according to the present disclosure;
fig. 5 is a schematic diagram of a composition structure of an embodiment 500 of a prediction model obtaining apparatus according to the present disclosure;
fig. 6 is a schematic diagram of a composition structure of an embodiment 600 of a traffic duration prediction apparatus according to the present disclosure;
fig. 7 shows a schematic block diagram of an electronic device 700 that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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 disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In addition, it should be understood that the term "and/or" herein is merely one association relationship describing the associated object, and means that three relationships may exist, for example, a and/or B may mean: 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.
Fig. 1 is a flowchart of an embodiment of a method for obtaining a prediction model according to the present disclosure. As shown in fig. 1, the following detailed implementation is included.
In step 101, a historical navigation route and a corresponding passage duration of any user are obtained.
In step 102, each road section in the historical navigation route is taken as a basic road section, an extended road section of each basic road section is obtained, and a topological graph corresponding to the historical navigation route is generated according to the basic road section and the extended road section.
In step 103, feature information of the basic road section and the extended road section is obtained respectively, and a training sample is formed by using the topological graph, the feature information and the passing duration.
In step 104, a prediction model is trained using the obtained training samples, and the prediction model is used to determine the duration of the navigation route to be predicted.
Aiming at a navigation route, the traditional passing duration prediction mode is to split the navigation route into a plurality of road sections, respectively model each road section to obtain the duration required by each road section, and further accumulate each duration to obtain the passing duration of the whole route.
However, the road section modeling method cannot describe the whole information of the road, such as the connection relation information between the road sections, which is lost, so that the accuracy is poor, and a great deal of resources and maintenance cost are required to be consumed for modeling each road section respectively for all roads in the objective world.
By adopting the scheme of the embodiment of the method, the corresponding topological graph can be generated based on each basic road section and each extended road section in the historical navigation route, the training sample can be constructed based on the topological graph and the characteristic information and the like of each road section in the topological graph, the prediction model can be obtained through training, accordingly, the passing duration of the navigation route to be predicted can be determined by using the prediction model, the end-to-end navigation time prediction can be realized, compared with the traditional mode, the whole information of the route can be marked by means of the topological graph and the like, and therefore, the accuracy of the prediction result is improved.
The method comprises the steps of acquiring historical navigation routes of different users within the latest preset time, constructing a training sample according to the acquired historical navigation routes, and simultaneously acquiring the actual passing time corresponding to each historical navigation route. The specific value of the predetermined time period can be determined according to actual needs.
For any historical navigation route, each road section can be used as a basic road section, and the expansion road sections of each basic road section can be respectively acquired.
Preferably, for any base road segment, the following processes may be performed separately: and determining adjacent upstream and downstream road sections of the basic road section from the map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and the adjacent upstream and downstream road sections and the screened road sections are used as expansion road sections of the basic road section.
The expansion road section of any basic road section can simultaneously comprise the adjacent upstream and downstream road sections of the basic road section and the road sections meeting the preset requirements in the non-adjacent upstream and downstream road sections, so that the content in the topological graph generated later is enriched, and the learning effect and the like of the model are further improved.
Preferably, the road section meeting the predetermined requirement may include: the N intermediate road segments can be communicated with the basic road segment, and the difference between the congestion probability of the N intermediate road segments and the congestion probability of the basic road segment is smaller than a first threshold value, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one. The specific values of the first threshold and the second threshold can be determined according to actual needs.
Fig. 2 is a schematic diagram of a portion of the map road network according to the present disclosure. As shown in fig. 2, it is assumed that the road segments 1 and 2 are basic road segments (for illustration only, the actual number of basic road segments may be far greater). Taking the example of the road section 1, if the road section 3 can be accessed to the road section 1 through turning, the road section 3 is an adjacent upstream road section of the road section 1, and the road section 1 can be accessed to the road section 2 and the road section 4 respectively, so that the road section 2 and the road section 4 are respectively adjacent downstream road sections of the road section 1, and accordingly, the road section 3, the road section 2 and the road section 4 can be respectively used as expansion road sections of the road section 1. Still taking road segment 1 as an example, road segments meeting the following predetermined requirements can be screened from the map road network: road segments that communicate with road segment 1 through N intermediate road segments and whose congestion probability differs from the congestion probability of road segment 1 by less than a first threshold value may be used. As for the road segment 5 shown in fig. 2, which may be in communication with the road segment 1 through 1 road segment 2, the road segment 5 may also be regarded as an extended road segment of the road segment 1, provided that the congestion probability of the road segment 5 is similar to the congestion probability of the road segment 1, i.e. the difference between the congestion probabilities of both is smaller than the first threshold value.
Preferably, the second threshold may have a value of 5, that is, N may have values of 1, 2, 3 and 4. The congestion probability of different road sections is determined without limitation, for example, the historical navigation route of each user can be mined and analyzed to determine the congestion probability of different road sections.
In practical application, only one of the adjacent upstream road section, the adjacent downstream road section, and the road section meeting the predetermined requirement may be acquired for any one of the basic road sections, or a plurality of the road sections may be acquired, or all the road sections may be acquired, depending on the actual situation.
Through the processing, aiming at any basic road section, the obtained extended road section simultaneously comprises the adjacent upstream and downstream road sections of the basic road section and the road sections with long distances but similar congestion probabilities, so that the content in the subsequently generated topological graph is enriched, and the learning effect and the like of the model are further improved.
For any historical navigation route, a topological graph corresponding to the historical navigation route can be generated according to each basic road section and each extended road section.
Preferably, each basic road segment and each extended road segment are respectively used as nodes, and edges between the nodes can be generated according to upstream-downstream relations between each basic road segment and each extended road segment, so that the topological graph is obtained.
Preferably, for any base road segment, the following processes may be performed separately: traversing each extended road segment of the basic road segment, generating an edge pointed by the basic road segment to the traversed extended road segment in response to determining that the traversed extended road segment is a downstream road segment of the basic road segment, and generating an edge pointed by the traversed extended road segment to the basic road segment in response to determining that the traversed extended road segment is an upstream road segment of the basic road segment.
Fig. 3 is a schematic diagram of a generated topology map as described in the present disclosure. As shown in fig. 3, it is assumed that it corresponds to the map road network shown in fig. 2. In which, the road segments 1 and 2 are basic road segments, and the road segments 3, 2, 4 and 5 are all extended road segments of the road segment 1, then, since the road segment 3 is an upstream road segment of the road segment 1, the road segment 3 can be connected with the road segment 1 by the side directed from the road segment 3 to the road segment 1, and since the road segment 2, 4 and 5 are all downstream road segments of the road segment 1, the road segment 1 can be connected with the road segment 2 by the side directed from the road segment 1 to the road segment 2, the road segment 1 can be connected with the road segment 4 by the side directed from the road segment 1 to the road segment 4, and the road segment 1 can be connected with the road segment 5 by the side directed from the road segment 1 to the road segment 5. Assuming that the road segment 1, the road segment 3, and the road segment 5 are all extended road segments of the road segment 2, the road segment 2 and the road segment 3 may be connected by an edge directed from the road segment 2 to the road segment 3, and the road segment 2 and the road segment 5 may be connected by an edge directed from the road segment 2 to the road segment 5.
Through the processing, the required topological graph can be efficiently and accurately generated, namely, the map road network is converted into the topological graph, so that a good foundation is laid for subsequent processing.
In addition, for any historical navigation route, the characteristic information of each basic road section and each extended road section can be obtained respectively, and further, a training sample can be formed by utilizing the topological graph corresponding to the historical navigation route, the characteristic information and the passing duration corresponding to the historical navigation route.
Preferably, the feature information may include: discrete features and continuous features after discretization. For example, for any road segment, the discrete features may include road grade labels, such as high speed, provincial road, etc., and the continuous features may include vehicle speed (e.g., average vehicle travel speed over a recently predetermined period of time), limits, road width, and road length, etc.
For continuous features, discretization may be performed, and how discretization is performed is not limited, for example, existing implementations may be used. By discretizing the continuous features, the model can learn the rules of the features more easily, and further the model training effect and the like can be improved.
Through the mode, a large number of training samples can be obtained, and then the obtained training samples can be used for training the prediction model. Preferably, the predictive model may be a graph neural network model based on an attention mechanism. In practical application, the graph neural network model can be directly adopted as a prediction model, but more preferably, the graph neural network model based on the attention mechanism can be adopted as the prediction model.
The traffic state propagation between road sections can be learned by utilizing the information transmission mechanism of the graph neural network model, and in addition, the graph neural network model based on the attention mechanism has good expansibility, can be well adapted to a topology map and the like which are not learned during training, and has more generalization.
In addition, preferably, a parallel training mode may be used in training the prediction model. For example, 4 a100GPU graphics cards may be used to train the model in parallel, so as to speed up the convergence speed of the model, and GPU refers to a graphics processor (gaplics processing unit).
Subsequently, the obtained prediction model can be used for predicting the actual passage duration, and the passage duration of the navigation route to be predicted can be determined by using the prediction model.
Accordingly, fig. 4 is a flowchart of an embodiment of a method for predicting a duration of a pass according to the present disclosure. As shown in fig. 4, the following detailed implementation is included.
In step 401, a navigation route to be predicted is acquired.
In step 402, each road segment in the navigation route to be predicted is taken as a basic road segment, an extended road segment of each basic road segment is obtained, and a topology map corresponding to the navigation route to be predicted is generated according to the basic road segment and the extended road segment.
In step 403, feature information of the basic road section and the extended road section is obtained, and a passing duration of the navigation route to be predicted is determined according to the topological graph, the feature information and a pre-trained prediction model.
By adopting the scheme of the embodiment of the method, the corresponding topological graph can be generated based on each basic road section and each extended road section in the navigation route to be predicted, the passing duration of the navigation route to be predicted can be determined based on the topological graph, the characteristic information of each road section and the prediction model, and compared with the traditional mode, the whole route information can be described by means of the topological graph and the like, so that the accuracy of the prediction result is improved, and the prediction model is applicable to any navigation route, so that the realization cost and the like are reduced.
Preferably, for any base road segment in the navigation route to be predicted, the following processes may be performed respectively: and determining adjacent upstream and downstream road sections of the basic road section from the map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and the adjacent upstream and downstream road sections and the screened road sections are used as expansion road sections of the basic road section.
Preferably, the road section meeting the predetermined requirement may include: the N intermediate road segments can be communicated with the basic road segment, and the difference between the congestion probability of the N intermediate road segments and the congestion probability of the basic road segment is smaller than 5 road segments of a first threshold value, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one.
After the extended road sections of the basic road sections are respectively obtained, a topological graph corresponding to the navigation route to be predicted can be generated according to the basic road sections and the obtained extended road sections.
Preferably, each basic road segment and each extended road segment can be used as a node respectively, and edges between the nodes can be generated according to the upstream-downstream relation between each basic road segment and each extended road segment, so that a required topological graph is obtained.
Preferably, for any base road segment, the following processes may be performed separately: traversing each extended segment of the base segment, generating an edge directed by the base segment to the traversed extended segment in response to determining the traversed extended segment as a downstream segment of the base segment, and in response to determining the traversed extended segment
The segment is an upstream segment of the base segment, and an edge directed to the base segment 5 by the traversed extension segment is generated.
In addition, the characteristic information of each basic road section and each extended road section can be acquired respectively. Preferably, the feature information may include: discrete features and continuous features after discretization.
Further, the passing duration of the navigation route to be predicted can be determined according to the topological graph, the characteristic information and a pre-trained prediction model. And taking the topological graph and the characteristic 0 information as inputs of a prediction model to obtain predicted passing duration of the navigation route to be predicted.
Preferably, the predictive model may be a graph neural network model based on an attention mechanism.
For example, the graph neural network model based on the attention mechanism can be deployed at the cloud end, and when a user initiates a navigation request at the mobile phone end, the cloud end can predict the corresponding navigation route by using the graph neural network model based on the attention mechanism to predict the passing duration of the navigation route.
It should be noted that, for simplicity of description, the foregoing method embodiments are all depicted as a series of acts, but it should be understood by those skilled in the art that the present disclosure is not limited by the order of acts depicted, as some steps may occur in other orders or concurrently in accordance with the disclosure. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all of the preferred embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure. In addition, portions of one embodiment that are not described in detail may be referred to in the description of other embodiments.
In a word, by adopting the scheme of the embodiment of the method disclosed by the invention, the accuracy of the prediction result can be improved, the implementation cost can be reduced, and the like.
The foregoing is a description of embodiments of the method, and the following further describes embodiments of the present disclosure through examples of apparatus.
Fig. 5 is a schematic diagram of a composition structure of an embodiment 500 of a prediction model obtaining apparatus according to the present disclosure. As shown in fig. 5, includes: a first acquisition module 501, a first generation module 502, a sample construction module 503, and a model training module 504.
The first obtaining module 501 is configured to obtain a historical navigation route and a corresponding passage duration of any user.
The first generating module 502 is configured to take each road segment in the historical navigation route as a base road segment, respectively obtain an extended road segment of each base road segment, and generate a topology map corresponding to the historical navigation route according to the base road segment and the extended road segment.
The sample construction module 503 is configured to obtain feature information of the basic road section and the extended road section, and form a training sample by using the topology map, the feature information, and the traffic duration.
The model training module 504 is configured to train a prediction model by using the obtained training sample, and determine a duration of a navigation route to be predicted by using the prediction model.
By adopting the scheme of the embodiment of the device, the corresponding topological graph can be generated based on each basic road section and each extended road section in the historical navigation route, the training sample can be constructed based on the topological graph and the characteristic information and the like of each road section in the topological graph, the prediction model can be obtained through training, accordingly, the passing duration of the navigation route to be predicted can be determined by using the prediction model, the end-to-end navigation time prediction can be realized, compared with the traditional mode, the whole information of the route can be marked by means of the topological graph and the like, and therefore, the accuracy of the prediction result is improved.
The method can acquire the historical navigation routes of different users within the latest preset time, construct a training sample according to the acquired historical navigation routes, and simultaneously acquire the actual passing time corresponding to each historical navigation route.
For any historical navigation route, the first generation module 502 may use each road segment therein as a base road segment, and may obtain an extended road segment of each base road segment.
Preferably, for any base road segment, the first generation module 502 may perform the following processes respectively: and determining adjacent upstream and downstream road sections of the basic road section from the map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and the adjacent upstream and downstream road sections and the screened road sections are used as expansion road sections of the basic road section.
Preferably, the road section meeting the predetermined requirement may include: the N intermediate road segments can be communicated with the basic road segment, and the difference between the congestion probability of the N intermediate road segments and the congestion probability of the basic road segment is smaller than a first threshold value, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one.
For any historical navigation route, the first generating module 502 may further generate a topology map corresponding to the historical navigation route according to each basic road segment and each extended road segment.
Preferably, the first generating module 502 may take each basic road segment and each extended road segment as a node, and may generate edges between the nodes according to an upstream-downstream relationship between each basic road segment and each extended road segment, so as to obtain the topology map.
Preferably, for any base road segment, the first generation module 502 may perform the following processes respectively: traversing each extended road segment of the basic road segment, generating an edge pointed by the basic road segment to the traversed extended road segment in response to determining that the traversed extended road segment is a downstream road segment of the basic road segment, and generating an edge pointed by the traversed extended road segment to the basic road segment in response to determining that the traversed extended road segment is an upstream road segment of the basic road segment.
In addition, for any historical navigation route, the sample construction module 503 may obtain the feature information of each basic road segment and each extended road segment, so as to form a training sample by using the topology map corresponding to the historical navigation route, the feature information and the traffic duration corresponding to the historical navigation route.
Preferably, the feature information may include: discrete features and continuous features after discretization. For example, for any road segment, the discrete features may include road grade labels, such as high speed, provincial roads, etc., and the continuous features may include vehicle speed, limits, road width, road length, etc.
In this manner, a large number of training samples may be obtained, and further, the model training module 504 may train to obtain a predictive model using the obtained training samples. Preferably, the predictive model may be a graph neural network model based on an attention mechanism.
Additionally, model training module 504 may preferably train to the predictive model in a parallel training manner.
Subsequently, the obtained prediction model can be used for predicting the actual passage duration, and the passage duration of the navigation route to be predicted can be determined by using the prediction model.
Fig. 6 is a schematic diagram of a composition structure of an embodiment 600 of a traffic duration prediction apparatus according to the present disclosure. As shown in fig. 6, includes: a second acquisition module 601, a second generation module 602 and a time length prediction module 603.
A second obtaining module 601, configured to obtain a navigation route to be predicted.
The second generating module 602 is configured to take each road segment in the navigation route to be predicted as a basic road segment, respectively obtain an extended road segment of each basic road segment, and generate a topology map corresponding to the navigation route to be predicted according to the basic road segment and the extended road segment.
The duration prediction module 603 is configured to obtain feature information of the base road segment and the extended road segment, and determine a traffic duration of the navigation route to be predicted according to the topology map, the feature information, and a prediction model obtained by training in advance.
By adopting the scheme of the embodiment of the device, the corresponding topological graph can be generated based on each basic road section and each extended road section in the navigation route to be predicted, the passing duration of the navigation route to be predicted can be determined based on the topological graph, the characteristic information of each road section and the prediction model, and compared with the traditional mode, the route overall information can be described by means of the topological graph and the like, so that the accuracy of the prediction result is improved, and the prediction model is applicable to any navigation route, so that the realization cost and the like are reduced.
Preferably, the second generating module 602 may perform the following processes for any base road segment in the navigation route to be predicted: and determining adjacent upstream and downstream road sections of the basic road section from the map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and the adjacent upstream and downstream road sections and the screened road sections are used as expansion road sections of the basic road section.
Preferably, the road section meeting the predetermined requirement may include: the N intermediate road segments can be communicated with the basic road segment, and the difference between the congestion probability of the N intermediate road segments and the congestion probability of the basic road segment is smaller than a first threshold value, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one.
After the extended road segments of each basic road segment are respectively acquired, the second generating module 602 may generate a topology map corresponding to the navigation route to be predicted according to each basic road segment and each acquired extended road segment.
Preferably, the second generating module 602 may take each basic road segment and each extended road segment as a node, and may generate edges between the nodes according to the upstream-downstream relationship between each basic road segment and each extended road segment, so as to obtain a required topology map.
Preferably, for any base road segment, the second generation module 602 may perform the following processes respectively: traversing each extended road segment of the basic road segment, generating an edge pointed by the basic road segment to the traversed extended road segment in response to determining that the traversed extended road segment is a downstream road segment of the basic road segment, and generating an edge pointed by the traversed extended road segment to the basic road segment in response to determining that the traversed extended road segment is an upstream road segment of the basic road segment.
In addition, the duration prediction module 603 may obtain feature information of each basic road segment and each extended road segment, respectively. Preferably, the feature information may include: discrete features and continuous features after discretization.
Further, the duration prediction module 603 may determine a traffic duration of the navigation route to be predicted according to the topology map, the feature information and a prediction model obtained by training in advance. And taking the topological graph and the characteristic information as inputs of a prediction model to obtain predicted passing duration of the navigation route to be predicted.
Preferably, the predictive model may be a graph neural network model based on an attention mechanism.
The specific workflow of the embodiment of the apparatus shown in fig. 5 and fig. 6 may refer to the related description in the foregoing method embodiment, and will not be repeated.
In a word, by adopting the scheme of the embodiment of the device disclosed by the invention, the accuracy of the prediction result can be improved, the implementation cost can be reduced, and the like.
The scheme disclosed by the disclosure can be applied to the field of artificial intelligence, and particularly relates to the fields of deep learning, big data processing, knowledge graph, map navigation and the like. Artificial intelligence is the subject of studying certain thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) that make a computer simulate a person, and has technology at both hardware and software levels, and artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, etc., and artificial intelligence software technologies mainly include computer vision technologies, speech recognition technologies, natural language processing technologies, machine learning/deep learning, big data processing technologies, knowledge graph technologies, etc.
In addition, the navigation route and the like in the embodiments of the present disclosure are not specific to a particular user, and cannot reflect personal information of a particular user. In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 shows a schematic block diagram of an electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM702, and the RAM703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the methods described in this disclosure. For example, in some embodiments, the methods described in the present disclosure may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM702 and/or communication unit 709. When the computer program is loaded into RAM703 and executed by computing unit 701, one or more steps of the methods described in the present disclosure may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the methods described in the present disclosure by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (33)

1. A predictive model acquisition method comprising:
acquiring a historical navigation route of any user and corresponding passing duration;
taking each road section in the historical navigation route as a basic road section, respectively acquiring an extended road section of each basic road section, and generating a topological graph corresponding to the historical navigation route according to the basic road section and the extended road section;
respectively acquiring characteristic information of the basic road section and the extended road section, and forming a training sample by utilizing the topological graph, the characteristic information and the passing duration;
And training the prediction model by using the obtained training sample, and determining the passing duration of the navigation route to be predicted by using the prediction model.
2. The method of claim 1, wherein,
the step of respectively acquiring the expansion road sections of the basic road sections comprises the following steps:
for any basic road section, the following treatments are respectively carried out: and determining adjacent upstream and downstream road sections of the basic road section from a map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and taking the adjacent upstream and downstream road sections and the screened road sections as expansion road sections of the basic road section.
3. The method of claim 2, wherein,
the road section meeting the preset requirements comprises: the road segments with the congestion probability smaller than the first threshold value can be communicated with the basic road segments through N intermediate road segments, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one.
4. A method according to claim 2 or 3, wherein,
the generating the topological graph corresponding to the historical navigation route according to the basic road section and the extended road section comprises the following steps:
And taking the basic road section and the extended road section as nodes respectively, and generating edges between the nodes according to the upstream-downstream relationship between the basic road section and the extended road section to obtain the topological graph.
5. The method of claim 4, wherein,
and generating edges between nodes according to the upstream-downstream relation between the basic road section and the extended road section comprises the following steps:
for any basic road section, the following treatments are respectively carried out: traversing each extended road segment of the basic road segment, generating an edge pointed by the basic road segment to the traversed extended road segment in response to determining that the traversed extended road segment is a downstream road segment of the basic road segment, and generating an edge pointed by the traversed extended road segment to the basic road segment in response to determining that the traversed extended road segment is an upstream road segment of the basic road segment.
6. The method according to claim 1 to 3, wherein,
the characteristic information includes: discrete features and continuous features after discretization.
7. The method according to claim 1 to 3, wherein,
the predictive model includes: a graph neural network model based on an attention mechanism.
8. The method according to claim 1 to 3, wherein,
the training the predictive model using the obtained training samples includes: and training the prediction model by adopting a parallel training mode.
9. A method of predicting a duration of a pass, comprising:
acquiring a navigation route to be predicted;
taking each road section in the navigation route to be predicted as a basic road section, respectively acquiring an extended road section of each basic road section, and generating a topological graph corresponding to the navigation route to be predicted according to the basic road section and the extended road section;
and respectively acquiring the characteristic information of the basic road section and the extended road section, and determining the passing duration of the navigation route to be predicted according to the topological graph, the characteristic information and a pre-trained prediction model.
10. The method of claim 9, wherein,
the step of respectively acquiring the expansion road sections of the basic road sections comprises the following steps:
for any basic road section, the following treatments are respectively carried out: and determining adjacent upstream and downstream road sections of the basic road section from a map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and taking the adjacent upstream and downstream road sections and the screened road sections as expansion road sections of the basic road section.
11. The method of claim 10, wherein,
the road section meeting the preset requirements comprises: the road segments with the congestion probability smaller than the first threshold value can be communicated with the basic road segments through N intermediate road segments, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one.
12. The method according to claim 10 or 11, wherein,
the generating the topological graph corresponding to the navigation route to be predicted according to the basic road section and the extended road section comprises the following steps:
and taking the basic road section and the extended road section as nodes respectively, and generating edges between the nodes according to the upstream-downstream relationship between the basic road section and the extended road section to obtain the topological graph.
13. The method of claim 12, wherein,
and generating edges between nodes according to the upstream-downstream relation between the basic road section and the extended road section comprises the following steps:
for any basic road section, the following treatments are respectively carried out: traversing each extended road segment of the basic road segment, generating an edge pointed by the basic road segment to the traversed extended road segment in response to determining that the traversed extended road segment is a downstream road segment of the basic road segment, and generating an edge pointed by the traversed extended road segment to the basic road segment in response to determining that the traversed extended road segment is an upstream road segment of the basic road segment.
14. The method according to any one of claims 9 to 11, wherein,
the characteristic information includes: discrete features and continuous features after discretization.
15. The method according to any one of claims 9 to 11, wherein,
the predictive model includes: a graph neural network model based on an attention mechanism.
16. A predictive model acquisition device comprising: the system comprises a first acquisition module, a first generation module, a sample construction module and a model training module;
the first acquisition module is used for acquiring a historical navigation route and corresponding passing duration of any user;
the first generation module is used for taking each road section in the historical navigation route as a basic road section, respectively acquiring an extended road section of each basic road section, and generating a topological graph corresponding to the historical navigation route according to the basic road section and the extended road section;
the sample construction module is used for respectively acquiring the characteristic information of the basic road section and the extended road section, and forming a training sample by utilizing the topological graph, the characteristic information and the passing duration;
the model training module is used for training the prediction model by using the acquired training sample and determining the passing duration of the navigation route to be predicted by using the prediction model.
17. The apparatus of claim 16, wherein,
the first generation module performs the following processing for any basic road section: and determining adjacent upstream and downstream road sections of the basic road section from a map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and taking the adjacent upstream and downstream road sections and the screened road sections as expansion road sections of the basic road section.
18. The apparatus of claim 17, wherein,
the road section meeting the preset requirements comprises: the road segments with the congestion probability smaller than the first threshold value can be communicated with the basic road segments through N intermediate road segments, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one.
19. The device according to claim 17 or 18, wherein,
the first generation module takes the basic road section and the extended road section as nodes respectively, and generates edges between the nodes according to the upstream-downstream relationship between the basic road section and the extended road section to obtain the topological graph.
20. The apparatus of claim 19, wherein,
the first generation module performs the following processing for any basic road section: traversing each extended road segment of the basic road segment, generating an edge pointed by the basic road segment to the traversed extended road segment in response to determining that the traversed extended road segment is a downstream road segment of the basic road segment, and generating an edge pointed by the traversed extended road segment to the basic road segment in response to determining that the traversed extended road segment is an upstream road segment of the basic road segment.
21. The device according to any one of claims 16 to 18, wherein,
the characteristic information includes: discrete features and continuous features after discretization.
22. The device according to any one of claims 16 to 18, wherein,
the predictive model includes: a graph neural network model based on an attention mechanism.
23. The device according to any one of claims 16 to 18, wherein,
the model training module trains the prediction model in a parallel training mode.
24. A traffic duration prediction apparatus comprising: the system comprises a second acquisition module, a second generation module and a time length prediction module;
The second acquisition module is used for acquiring a navigation route to be predicted;
the second generation module is used for taking each road section in the navigation route to be predicted as a basic road section, respectively obtaining an extended road section of each basic road section, and generating a topological graph corresponding to the navigation route to be predicted according to the basic road section and the extended road section;
the duration prediction module is used for respectively acquiring the characteristic information of the basic road section and the extended road section, and determining the passing duration of the navigation route to be predicted according to the topological graph, the characteristic information and a prediction model obtained by training in advance.
25. The apparatus of claim 24, wherein,
the second generation module performs the following processing for any basic road section: and determining adjacent upstream and downstream road sections of the basic road section from a map road network, screening road sections meeting preset requirements from the map road network, wherein the screened road sections are non-adjacent upstream and downstream road sections of the basic road section, and taking the adjacent upstream and downstream road sections and the screened road sections as expansion road sections of the basic road section.
26. The apparatus of claim 25, wherein,
The road section meeting the preset requirements comprises: the road segments with the congestion probability smaller than the first threshold value can be communicated with the basic road segments through N intermediate road segments, N is a positive integer, N is smaller than a second threshold value, and the second threshold value is a positive integer larger than one.
27. The apparatus of claim 25 or 26, wherein,
and the second generation module takes the basic road section and the extended road section as nodes respectively, and generates edges between the nodes according to the upstream-downstream relationship between the basic road section and the extended road section to obtain the topological graph.
28. The apparatus of claim 27, wherein,
the second generation module performs the following processing for any basic road section: traversing each extended road segment of the basic road segment, generating an edge pointed by the basic road segment to the traversed extended road segment in response to determining that the traversed extended road segment is a downstream road segment of the basic road segment, and generating an edge pointed by the traversed extended road segment to the basic road segment in response to determining that the traversed extended road segment is an upstream road segment of the basic road segment.
29. The device according to any one of claims 24 to 26, wherein,
the characteristic information includes: discrete features and continuous features after discretization.
30. The device according to any one of claims 24 to 26, wherein,
the predictive model includes: a graph neural network model based on an attention mechanism.
31. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
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-15.
32. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-15.
33. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of any of claims 1-15.
CN202211720619.0A 2022-12-30 2022-12-30 Prediction model acquisition and passage duration prediction method, device, equipment and medium Pending CN116245215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211720619.0A CN116245215A (en) 2022-12-30 2022-12-30 Prediction model acquisition and passage duration prediction method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211720619.0A CN116245215A (en) 2022-12-30 2022-12-30 Prediction model acquisition and passage duration prediction method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116245215A true CN116245215A (en) 2023-06-09

Family

ID=86632242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211720619.0A Pending CN116245215A (en) 2022-12-30 2022-12-30 Prediction model acquisition and passage duration prediction method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116245215A (en)

Similar Documents

Publication Publication Date Title
CN112560496A (en) Training method and device of semantic analysis model, electronic equipment and storage medium
TWI726341B (en) Sample attribute evaluation model training method, device, server and storage medium
CN109724611A (en) Paths planning method, device, electronic equipment and storage medium
US20210342722A1 (en) Air quality prediction model training method, air quality prediction method, electronic device and storage medium
CN112561191A (en) Prediction model training method, prediction method, device, apparatus, program, and medium
CN114357105B (en) Pre-training method and model fine-tuning method of geographic pre-training model
CN107145991B (en) Time-varying random network dynamic path searching method considering road section correlation
CN114715145B (en) Trajectory prediction method, device and equipment and automatic driving vehicle
CN114417192B (en) Method, device, equipment, medium and product for updating POI (Point of interest) state
CN114543829A (en) Model training method, navigation track recommendation method and device and vehicle
CN112652165A (en) Model training and road condition prediction method, device, equipment, medium and program product
CN111047107B (en) Road traffic time prediction method, device, electronic equipment and storage medium
CN113158030A (en) Method and device for recommending different-place interest points, electronic equipment and storage medium
EP4040421B1 (en) Method and apparatus for predicting traffic data and electronic device
CN115687764A (en) Training method of vehicle track evaluation model, and vehicle track evaluation method and device
CN116245215A (en) Prediction model acquisition and passage duration prediction method, device, equipment and medium
CN115330067A (en) Traffic congestion prediction method and device, electronic equipment and storage medium
CN115206102A (en) Method, apparatus, electronic device, and medium for determining traffic path
CN114817476A (en) Language model training method and device, electronic equipment and storage medium
CN113344277A (en) Prediction model training method, state updating method, device, equipment and medium
CN114970949B (en) Method and device for predicting running speed, electronic device, and storage medium
CN112541021A (en) Route evaluation method, and scenic spot tour estimation duration calculation method and device
CN115512554B (en) Parameter model training and traffic signal control method, device, equipment and medium
CN115031750B (en) Method, device and computer program product for determining state of blocked road section
CN116884215A (en) Traffic state prediction and model generation methods, devices, equipment and media

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