CN109360421B - Traffic information prediction method and device based on machine learning and electronic terminal - Google Patents

Traffic information prediction method and device based on machine learning and electronic terminal Download PDF

Info

Publication number
CN109360421B
CN109360421B CN201811469413.9A CN201811469413A CN109360421B CN 109360421 B CN109360421 B CN 109360421B CN 201811469413 A CN201811469413 A CN 201811469413A CN 109360421 B CN109360421 B CN 109360421B
Authority
CN
China
Prior art keywords
traffic information
grid
target
historical traffic
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811469413.9A
Other languages
Chinese (zh)
Other versions
CN109360421A (en
Inventor
魏萍
吴育人
王淼石
庄伯金
肖京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811469413.9A priority Critical patent/CN109360421B/en
Publication of CN109360421A publication Critical patent/CN109360421A/en
Application granted granted Critical
Publication of CN109360421B publication Critical patent/CN109360421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • G08G1/0129Traffic data processing for creating historical data or processing based on historical data

Abstract

The embodiment of the invention provides a traffic information prediction method and device for machine learning and an electronic terminal. Relates to the technical field of artificial intelligence. The method comprises the steps of selecting any grid from a plurality of grids in a city as a target grid, and acquiring first historical traffic information of the target grid before a prediction time period; determining connectivity between other grids and a target grid according to road information of the grids, and then determining associated grids of the target grid according to the connectivity; then, second historical traffic information of the associated grid before the prediction time period is obtained, wherein the second historical traffic information and the first historical traffic information correspond to the same historical time period; and further, learning the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain the predicted traffic information of the target grid in the prediction time period. Therefore, the technical scheme provided by the embodiment of the invention realizes the prediction of the traffic accidents of the grid from multiple dimensions.

Description

Traffic information prediction method and device based on machine learning and electronic terminal
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of data processing, in particular to a traffic information prediction method and device based on machine learning and an electronic terminal.
[ background of the invention ]
With the development of economy and science and technology, the transportation modes of people going out are various, and the urban traffic environment is increasingly complex. Meanwhile, the occurrence amount of urban traffic accidents also shows a growing trend. Urban traffic accidents frequently cause personal and financial injuries, traffic jam can also be caused, and even secondary accidents can be induced.
In order to reduce the negative effects caused by traffic accidents as much as possible and reduce casualties and property loss, the method for reducing the negative effects caused by the traffic accidents by predicting the occurrence of the traffic accidents is an effective technical means.
[ summary of the invention ]
In view of this, the embodiment of the present invention provides a traffic information prediction method based on machine learning, which analyzes the grid in a time dimension and a space dimension to predict the traffic information of the grid.
In a first aspect, an embodiment of the present invention provides a traffic information prediction method based on machine learning, including:
selecting any grid from a plurality of grids of a city as a target grid, and acquiring first historical traffic information of the target grid before a prediction time period;
acquiring target road information of the target grid and other road information of other grids except the target grid from map information;
determining the connectivity of each other grid and the target grid according to the target road information and the other road information;
screening out the designated grids with the connectivity meeting a preset condition from the other grids to serve as the associated grids of the target grid;
acquiring second historical traffic information of the associated grid before the predicted time period, wherein the second historical traffic information and the first historical traffic information correspond to the same historical time period;
and learning the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain the predicted traffic information of the target grid in the prediction time period.
The above-mentioned aspect and any possible implementation manner further provide an implementation manner, after the screening out the designated mesh, of which the connectivity satisfies a preset condition, from the other meshes, as an associated mesh of the target mesh, the method further includes:
determining the influence level on the target grid for each associated grid according to the connectivity of each associated grid and the target grid;
and learning the first historical traffic information, the second historical traffic information corresponding to each associated grid and the influence level corresponding to each associated grid based on a pre-established prediction model to obtain the predicted traffic information of the target grid in the prediction time period.
The foregoing aspects and any possible implementations further provide an implementation, where before the learning processing is performed on the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain predicted traffic information of the target mesh in the prediction time period, the method further includes:
acquiring first historical traffic information corresponding to a prediction grid in each unit time length included in a training designated time period, and second historical traffic information corresponding to an associated grid of the prediction grid in each unit time length included in the training designated time period;
using the first historical traffic information and the second historical traffic information as input values of training samples;
selecting first historical traffic information corresponding to a specified number of unit time lengths from the training specified time period, and taking the first historical traffic information corresponding to each unit time length as a reference value of the training sample;
inputting the input value of the training sample into a training model, and training the training model through a machine learning algorithm;
and when the error between the output value of the training model and the reference value of the training sample is smaller than a preset threshold value, obtaining the prediction model.
The above-described aspect and any possible implementation further provide an implementation, where the first historical traffic information includes at least: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
The above-described aspect and any possible implementation further provide an implementation, where the second historical traffic information includes at least: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
In a second aspect, an embodiment of the present invention provides a traffic information prediction apparatus based on machine learning, where the traffic information prediction apparatus based on machine learning:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for selecting any grid from a plurality of grids of a city as a target grid and acquiring first historical traffic information of the target grid before a prediction time period;
a second acquisition unit configured to acquire, from map information, target road information of the target mesh and other road information of meshes other than the target mesh among the meshes;
the determining unit is used for determining the connectivity of each other grid and the target grid according to the target road information and the other road information;
the associated grid selection unit is used for screening out the specified grid of which the connectivity meets the preset condition from the other grids to serve as the associated grid of the target grid;
a third obtaining unit, configured to obtain second historical traffic information of the associated grid before the predicted time period, where the second historical traffic information corresponds to the same historical time period as the first historical traffic information;
and the prediction unit is used for learning the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain the predicted traffic information of the target grid in the prediction time period.
The aspect and any possible implementation manner described above further provide an implementation manner, where the associated grid selecting unit is configured to screen out the designated grid with the connectivity satisfying a preset condition from the other grids, and after the designated grid with the connectivity satisfying the preset condition is selected as the associated grid of the target grid,
the determining unit is further configured to determine, for each associated grid, an influence level on the target grid according to the connectivity of the associated grid with the target grid;
the prediction unit is further configured to perform learning processing on the first historical traffic information, the second historical traffic information corresponding to each associated grid, and the influence level corresponding to each associated grid based on a pre-established prediction model to obtain predicted traffic information of the target grid in the prediction time period.
The foregoing aspects and any possible implementations further provide an implementation, where the traffic information prediction apparatus based on machine learning further includes a prediction model establishing unit, where before the prediction unit performs learning processing on the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain predicted traffic information of the target mesh in the prediction time period, the prediction model establishing unit is configured to:
acquiring first historical traffic information corresponding to a prediction grid in each unit time length included in a training designated time period, and second historical traffic information corresponding to an associated grid of the prediction grid in each unit time length included in the training designated time period; and the number of the first and second groups,
using the first historical traffic information and the second historical traffic information as input values of training samples; and the number of the first and second groups,
selecting first historical traffic information corresponding to a specified number of unit time lengths from the training specified time period, and taking the first historical traffic information corresponding to each unit time length as a reference value of the training sample; and the number of the first and second groups,
inputting the input value of the training sample into a training model, and training the training model through a machine learning algorithm; and the number of the first and second groups,
and when the error between the output value of the training model and the reference value of the training sample is smaller than a preset threshold value, obtaining the prediction model.
In a third aspect, the present invention provides an electronic terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the traffic information prediction method based on machine learning according to any one of the first aspect.
In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are read and executed by a computer, the computer is enabled to implement the traffic information prediction method based on machine learning according to any one of the first aspect.
The technical scheme has the following beneficial effects:
according to the technical scheme provided by the invention, based on the grid formation of a city, historical traffic information of a certain grid in a specific time period is obtained, and the mutual influence among the grids in a spatial dimension is considered, and the historical traffic information of an associated grid of the grid is also obtained, so that the grid is analyzed from multiple dimensions according to the historical traffic information of the grid and the historical traffic information of the associated grid, and the prediction of the traffic information of the grid is realized.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a traffic information prediction method for machine learning according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another method for predicting traffic information through machine learning according to an embodiment of the present invention;
FIG. 3 is a functional block diagram of a machine-learned traffic information prediction apparatus according to an embodiment of the present invention;
fig. 4 is a functional block diagram of an electronic terminal according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, etc. may be used to describe the historical traffic information in the embodiments of the present invention, the historical traffic information should not be limited to these terms. These terms are only used to distinguish historical traffic information from one another. For example, the first historical traffic information may also be referred to as the second historical traffic information, and similarly, the second historical traffic information may also be referred to as the first historical traffic information, without departing from the scope of embodiments of the present invention.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
In order to reduce the negative impact caused by a traffic accident, the present invention provides a traffic information prediction method based on machine learning, and specifically, please refer to fig. 1, which is a schematic flow diagram of the traffic information prediction method based on machine learning provided by the embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
102. any grid is selected from a plurality of grids of a city to serve as a target grid, and first historical traffic information of the target grid before a prediction time period is obtained.
Specifically, in order to facilitate timely and effective management of the urban area, before step 102 is executed, the urban area needs to be divided into grids of a preset size, so that management of the urban area is implemented by taking each grid as a unit. The size of the divided grids can be determined according to actual requirements, and the preset size of the divided grids is not limited by the method.
In an embodiment of the present invention, the first historical traffic information at least includes: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
104. Target road information of the target mesh and other road information of meshes other than the target mesh among the plurality of meshes are acquired from the map information.
106. And determining the connectivity of each other grid and the target grid according to the target road information and other road information.
The technical scheme of the invention mainly realizes the prediction of grid traffic information in cities, and mainly considers the connectivity of roads between grids aiming at the correlation condition between any two urban grids, specifically, for example, if three grids A and B and a grid C, the grid A comprises 10 roads, the grid B comprises 8 roads, and the grid C comprises 9 roads, wherein the directly connected roads in the grids A and B comprise 5 roads, and the directly connected roads in the grids A and C comprise 2 roads, so that the correlation degree of the roads between the grids A and B is higher than the correlation degree of the roads between the grids A and C, and if road congestion or other traffic faults occur in the grids A, the influence on the traffic condition in the grids B is higher than the influence on the traffic condition in the grids C.
Based on the above analysis, in order to predict the traffic condition of the target mesh more accurately, it is important to select an associated mesh that affects the traffic condition of the target mesh, and when determining the associated mesh, the associated mesh is determined by the road relationship between meshes. Aiming at the map information according to the target grid, determining an associated grid communicated with the target grid, comprising the following steps:
the roads of traffic are divided into a plurality of grades (such as national roads, provincial roads, urban roads and alleys), and the roads of different grades have different influence degrees on urban traffic. For example, the national roads are main trunk roads for politics and economy nationwide, and are roads connecting each large economic center, port station hubs, commodity production bases and strategic importance, and the national roads usually include a plurality of fork junctions connected with other roads, so that the national roads are driven by more vehicles, and if the national roads connecting two grids have traffic accidents or traffic congestion, large-area traffic influence is brought to urban traffic; the alleys refers to small lanes in the city, the alleys are narrow and small in road, few vehicles come and go, if the alleys in a certain grid have a traffic jam problem, the traffic condition of the alleys is generally influenced, and the traffic jam problem in a large range cannot be caused. In order to determine connectivity between the grids relatively accurately, when determining the connectivity between each other grid and the target grid in step 106, how many connected national roads, many connected provincial roads, and many connected urban roads are included between the two grids may be determined; and then, determining the connectivity between the two grids according to the corresponding weight of each road grade and the number of the roads with different grades.
The following examples are givenThe process of determining connectivity between two grids is illustrated: firstly, supposing that the corresponding rights of national roads, provincial roads and urban roads are 0.5, 0.3, 0.15 and 0.05 of the existing three grids of d, e and f respectively, wherein e is a target grid, 2 roads with the same name are included between the two grids of d and e and are national roads, 3 roads are provided as provincial roads, 5 roads are provided as urban roads and 1 road is a road; e. and f, 4 roads with the same name are included between the two grids, namely national roads, 1 road with the condition of province, 3 roads in urban areas and 1 road with the same name. Wherein, the connectivity T between the two grids d and ede2.5 + 3.3 + 5+ 0.15+1 + 0.05-2.7; e. f degree of connectivity T between two gridsef=4*0.5+1*0.3+3*0.15+1*0.05=2.8。
In addition, since the two meshes include a plurality of mutually associated roads, but the two meshes are relatively far apart, even if one of the meshes is congested with roads or otherwise, the other mesh is not affected by the traffic, so that such a secondary mesh that has a plurality of mutually associated roads but is relatively far away from the target mesh may not be considered when considering the effect of the traffic of the mesh around the target mesh on the traffic of the target mesh. Therefore, in order to increase the speed of determining the mesh associated with the target mesh, after the target mesh is determined, a range for determining the mesh associated with the target mesh may be set based on a specified rule, so as to further filter to the secondary meshes, reduce the time for acquiring other road information, and also reduce other road information processed in step 106 to some extent, thereby achieving the purpose of rapidly determining the connectivity of each other mesh with the target mesh.
Continuing with the example, there are four grids d, e, f, h, where e is the target grid, d is the neighborhood grid of e and is directly connected to e; f is a non-domain grid, and a grid x is needed to pass from an e grid to an f grid; h is also the domain grid of e, but h and e are not directly communicated, at least 4 grids y need to be passed from the e grid to the h grid, and because e and h need to be communicated through a plurality of grids, the influence of the h grid traffic condition on the e grid traffic can be not considered.
108. And screening out the designated grids with the connectivity meeting the preset conditions from other grids to serve as the associated grids of the target grid.
110. And acquiring second historical traffic information of the associated grid before the predicted time period, wherein the second historical traffic information and the first historical traffic information correspond to the same historical time period.
In the present invention, the second historical traffic information at least includes: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
112. And learning the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain the predicted traffic information of the target grid in the prediction time period.
According to the technical scheme provided by the invention, based on the grid formation of a city, historical traffic information of a certain grid in a specific time period is obtained, and the mutual influence among the grids in a spatial dimension is considered, and the historical traffic information of an associated grid of the grid is also obtained, so that the grid is analyzed from multiple dimensions according to the historical traffic information of the grid and the historical traffic information of the associated grid, and the prediction of the traffic information of the grid is realized.
Further, since each of the other grids surrounding the target grid has a different degree of connectivity to the target grid, the degree of influence of each other mesh around the target mesh on the target mesh also differs, in order to more accurately predict the traffic information corresponding to the target grid at a specified time in the future, after the associated grids meeting the preset conditions are screened out based on the connectivity of the target grid and other grids in the period, the impact level on the target grid may be determined for each associated grid based on the connectivity of each associated grid with the target grid, and, thus, when the traffic information of the target grid is predicted by using the prediction model, the first historical traffic information, the second historical traffic information corresponding to each associated grid and the corresponding influence level are input into the prediction model to be subjected to learning processing, so that the predicted traffic information of the target grid is obtained.
In a specific embodiment, the implementation process of determining the target grid influence level by using the connectivity comprises the following steps: firstly, dividing influence levels into four levels of severe influence, moderate influence and mild influence in advance, and distributing level division ranges for the four influence levels based on the connectivity between grids, wherein the corresponding influence level with the connectivity within the range of 7-10 is the severe influence; the influence grade corresponding to the connectivity within the range of 5-7 is a severe influence; the influence grade corresponding to the connectivity within the range of 2.5-5 is moderate influence; the influence grade of the connectivity within the range of 0-2.5 is a slight influence.
It is specified that the target mesh and the associated mesh are connected to each other, and therefore, the traffic condition corresponding to the associated mesh has an influence on the traffic condition of the target mesh, that is, the degree of connection of each associated mesh with the target mesh, the degree of influence of the second historical traffic information corresponding to each associated mesh on the predicted traffic information of the target mesh is determined to a certain extent, and therefore, when predicting the predicted traffic information of the target grid by using the prediction model, the connectivity of the associated grid and the target grid is taken into account, the second historical traffic information in each associated mesh may be highlighted for varying degrees of influence on the predicted traffic information for the target mesh, thereby enabling the use of machine learning algorithms, after the first historical traffic information, the second historical traffic information and the influence level are processed, the obtained predicted traffic information is more accurate.
Further, the step 112 is mainly implemented by inputting the obtained first historical traffic information of the target grid and the second historical traffic information of the associated grid associated with the target grid into the prediction model, and processing the two types of historical traffic information through the prediction model, so as to predict the traffic information of the target grid. One of the keys to the implementation of step 112 is a predictive model for predicting traffic information. Therefore, before the step 112 of learning the first historical traffic information and the second historical traffic information based on the prediction model to obtain the predicted traffic information of the target mesh is implemented, the prediction model for predicting the predicted traffic information of the target mesh needs to be established first, and based on this, the present invention provides another implementation manner, as shown in fig. 2, the establishment of the prediction model is:
202. acquiring first historical traffic information corresponding to the prediction grids in each unit time length included in the training designated time period, and acquiring second historical traffic information corresponding to the correlation grids of the prediction grids in each unit time length included in the training designated time period.
204. And taking the first historical traffic information and the second historical traffic information as input values of the training sample.
206. And selecting the first historical traffic information corresponding to a specified number of unit time lengths from the specified training time period, and taking the first historical traffic information corresponding to each unit time length as a reference value of the training sample.
208. And inputting the input value of the training sample into the training model, and training the training model through a machine learning algorithm.
210. And when the error between the output value of the training model and the reference value of the training sample is smaller than a preset threshold value, obtaining a prediction model.
In addition, it is supplementary to be noted here that, in order to shorten the training process of establishing the prediction model, before the initial machine learning model is trained, a connectivity between the target mesh and an associated mesh corresponding to the target mesh may be acquired, a weight is assigned to traffic information of each associated mesh based on the connectivity of each associated mesh, traffic information in the associated mesh is weighted and averaged based on the assigned weight to obtain processed second historical traffic information, and thus the first historical traffic information and the processed second historical traffic information in the first specified time period are used as input samples.
For example, assume that the target grid is a non-boundary grid in the urban area, there are at least 8 neighboring surrounding grids around the target grid, and assume that the 8 surrounding grids are corresponding associated grids with the target grid. The determination method of the associated grid is similar to the implementation method of step 104, and the description of the present invention is omitted here. In addition, assuming that the training specified period is 10 days, and the unit time length is hours, the first historical traffic information and the second historical traffic information of the prediction grid and the grid related to the prediction grid in each hour included in the 10 days are used as input values of the training samples. Secondly, the first historical traffic information corresponding to each hour in each day from the 5 th day to the 10 th day is selected as the reference value of the training sample in the 10 th day.
During specific training, using first historical traffic information of a prediction grid in each hour in days 1-4 and first historical traffic information of a correlation grid of the prediction grid in each hour in days 1-4 as input values to be trained to obtain predicted traffic information of the prediction grid in each hour in day 5, then comparing the obtained predicted traffic information corresponding to each hour in day 5 with actual traffic information corresponding to each hour in day 5, when the error between the predicted traffic information and the actual traffic information is larger than a certain value, using the first historical traffic information of the prediction grid in each hour in days 2-5 and the first historical traffic information of the correlation grid of the prediction grid in each hour in days 2-5 as input values to be trained to obtain the predicted traffic information of the prediction grid in each hour in day 6, … …, repeating the above steps until the error between the predicted traffic information and the actual traffic information is less than a certain value, which indicates that the accuracy of the training model meets the requirement, and ending the training process to obtain the final training model as the prediction model for predicting the traffic information.
It should be noted that, because of some accidental factors, when the error between the predicted traffic information obtained by training and the corresponding actual traffic information is smaller than a certain value, the training is triggered to end to obtain the predicted model, but the obtained predicted learning model may be unstable, and therefore, after each training, if the error between the compared predicted traffic information and the actual traffic information is smaller than the certain value, it is necessary to determine whether all reference values of the training samples participate in the training, if so, the obtained model is determined to be the final predicted model, and if not, the training is continued. Therefore, the stability of the obtained prediction model can be ensured to a certain extent, and the accuracy of the predicted traffic information obtained by the prediction model is also ensured to a certain extent. Based on the traffic information prediction method based on machine learning, the embodiment of the invention further provides an embodiment of a device for realizing each step and method in the embodiment of the method.
Please refer to fig. 3, which is a block diagram illustrating an apparatus according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first acquiring unit 31, a second acquiring unit 32, a determining unit 33, an associated grid selecting unit 34, a third acquiring unit 35, and a predicting unit 36.
The first obtaining unit 31 is configured to select any one grid from multiple grids of a city as a target grid, and obtain first historical traffic information of the target grid before a predicted time period.
Specifically, the first historical traffic information at least includes: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
A second obtaining unit 32, configured to obtain, from the map information, target road information of the target mesh and other road information of other meshes than the target mesh among the plurality of meshes.
A determining unit 32, configured to determine, according to the target road information and the other road information, a connectivity of each other mesh with the target mesh;
the associated grid selecting unit 34 is configured to screen out a designated grid, of which connectivity meets a preset condition, from other grids, and use the designated grid as an associated grid of the target grid;
a third obtaining unit 35, configured to obtain second historical traffic information of the associated mesh before the predicted time period, where the second historical traffic information corresponds to the same historical time period as the first historical traffic information.
Wherein the second historical traffic information includes at least: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
And the prediction unit 36 is configured to perform learning processing on the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain predicted traffic information of the target grid in a prediction time period.
In the present invention, optionally, in order to be able to quickly and accurately determine the influence of the traffic condition of the gas grid around the target grid on the target grid, after the determining unit 33 determines the associated grids communicated with the target grid according to the map information of the target grid, the determining unit 33 is further configured to determine the influence level on the target grid for each associated grid according to the connectivity of each associated grid with the target grid; therefore, the prediction unit 36 is configured to perform learning processing on the first historical traffic information, the second historical traffic information corresponding to each associated grid, and the influence level corresponding to each associated grid based on a pre-established prediction model to obtain predicted traffic information of the target grid in the prediction time period.
In the present invention, optionally, the traffic information prediction apparatus based on machine learning provided by the present invention further includes a prediction model establishing unit (not shown in fig. 3), and the prediction model establishing unit is mainly used for establishing a machine model for predicting traffic information. Before the prediction unit 36 is configured to perform learning processing on the first historical traffic information and the second historical traffic information based on the prediction model to obtain the predicted traffic information of the target grid, the prediction model establishing unit is specifically configured to obtain first historical traffic information corresponding to the prediction grid in each unit duration included in the training specified period, and second historical traffic information corresponding to the associated grid of the prediction grid in each unit duration included in the training specified period; thereby, the first historical traffic information and the second historical traffic information are used as input values of the training sample; selecting first historical traffic information corresponding to a specified number of unit time lengths from the specified training time period, and taking the first historical traffic information corresponding to each unit time length as a reference value of the training sample; further, inputting the input value of the training sample into a training model, and training the training model through a machine learning algorithm; and when the error between the output value of the training model and the reference value of the training sample is smaller than a preset threshold value, obtaining a prediction model.
Since each unit in the present embodiment can execute the above-mentioned illustrated method, reference may be made to the related description of the above-mentioned illustrated method for a part of the present embodiment that is not described in detail.
The embodiment of the invention further provides an electronic terminal embodiment for realizing the steps and the method in the embodiment of the method. Please refer to fig. 4, which is a functional block diagram of an electronic terminal according to an embodiment of the present invention. As shown in fig. 4, the electronic terminal includes a memory 41, a processor 42, and a computer program stored in the memory 41 and executable on the processor 42, and when the processor 42 executes the computer program, the processor 42 implements any one of the above-mentioned traffic information prediction methods based on machine learning.
An embodiment of the present invention is a non-transitory computer-readable storage medium having computer-readable instructions stored thereon, which, when read and executed by a computer, cause the computer to implement any one of the above-mentioned traffic information prediction methods based on machine learning.
According to the technical scheme provided by the invention, based on the grid formation of a city, historical traffic information of a certain grid in a specific time period is obtained, and the mutual influence among the grids in a spatial dimension is considered, and the historical traffic information of an associated grid of the grid is also obtained, so that the grid is analyzed from multiple dimensions according to the historical traffic information of the grid and the historical traffic information of the associated grid, and the prediction of the traffic information of the grid is realized.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A traffic information prediction method based on machine learning is characterized in that the traffic information prediction method based on machine learning comprises the following steps:
selecting any grid from a plurality of grids of a city as a target grid, and acquiring first historical traffic information of the target grid before a prediction time period;
acquiring target road information of the target grid and other road information of other grids except the target grid from map information;
determining the connectivity of each other grid and the target grid according to the target road information and the other road information;
screening out the designated grids with the connectivity meeting a preset condition from the other grids to serve as the associated grids of the target grid;
acquiring second historical traffic information of the associated grid before the predicted time period, wherein the second historical traffic information and the first historical traffic information correspond to the same historical time period;
learning the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain predicted traffic information of the target grid in the prediction time period;
determining the connectivity of each other grid and the target grid according to the target road information and the other road information, wherein the determining the connectivity of each other grid and the target grid comprises:
screening the other grids according to a preset distance threshold value to obtain other grids with the distance to the target grid smaller than or equal to the preset distance threshold value;
and determining the connectivity between the other screened grids and the target grid according to the target road information and the other road information corresponding to the other screened grids.
2. The method according to claim 1, wherein after the selecting the designated mesh with the connectivity satisfying a preset condition from the other meshes as the associated mesh of the target mesh, the method further comprises:
determining the influence level on the target grid for each associated grid according to the connectivity of each associated grid and the target grid;
and learning the first historical traffic information, the second historical traffic information corresponding to each associated grid and the influence level corresponding to each associated grid based on a pre-established prediction model to obtain the predicted traffic information of the target grid in the prediction time period.
3. The method of claim 1, wherein before the learning of the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain the predicted traffic information of the target mesh in the prediction time period, the method further comprises:
acquiring first historical traffic information corresponding to a prediction grid in each unit time length included in a training designated time period, and second historical traffic information corresponding to an associated grid of the prediction grid in each unit time length included in the training designated time period;
using the first historical traffic information and the second historical traffic information as input values of training samples;
selecting first historical traffic information corresponding to a specified number of unit time lengths from the training specified time period, and taking the first historical traffic information corresponding to each unit time length as a reference value of the training sample;
inputting the input value of the training sample into a training model, and training the training model through a machine learning algorithm;
and when the error between the output value of the training model and the reference value of the training sample is smaller than a preset threshold value, obtaining the prediction model.
4. The method according to any one of claims 1 to 3, characterized in that the first historical traffic information comprises at least: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
5. The method according to any one of claims 1 to 3, characterized in that the second historical traffic information comprises at least: one or more of case data volume of traffic accident, case type, case processing time, case severity, road condition, weather condition.
6. A traffic information prediction apparatus based on machine learning, characterized by comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for selecting any grid from a plurality of grids of a city as a target grid and acquiring first historical traffic information of the target grid before a prediction time period;
a second acquisition unit configured to acquire, from map information, target road information of the target mesh and other road information of meshes other than the target mesh among the meshes;
the determining unit is used for determining the connectivity of each other grid and the target grid according to the target road information and the other road information;
the associated grid selection unit is used for screening out the specified grid of which the connectivity meets the preset condition from the other grids to serve as the associated grid of the target grid;
a third obtaining unit, configured to obtain second historical traffic information of the associated grid before the predicted time period, where the second historical traffic information corresponds to the same historical time period as the first historical traffic information;
the prediction unit is used for learning the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain predicted traffic information of the target grid in the prediction time period;
wherein the determining unit is specifically configured to:
screening the other grids according to a preset distance threshold value to obtain other grids with the distance to the target grid smaller than or equal to the preset distance threshold value;
and determining the connectivity between the other screened grids and the target grid according to the target road information and the other road information corresponding to the other screened grids.
7. The apparatus according to claim 6, wherein after the associated mesh selection unit is configured to screen out the specified mesh with the connectivity satisfying a preset condition from the other meshes as the associated mesh of the target mesh,
the determining unit is further configured to determine, for each associated grid, an influence level on the target grid according to the connectivity of the associated grid with the target grid;
the prediction unit is further configured to perform learning processing on the first historical traffic information, the second historical traffic information corresponding to each associated grid, and the influence level corresponding to each associated grid based on a pre-established prediction model to obtain predicted traffic information of the target grid in the prediction time period.
8. The apparatus according to claim 6, wherein the traffic information prediction apparatus based on machine learning further comprises a prediction model establishing unit, before the prediction unit performs learning processing on the first historical traffic information and the second historical traffic information based on a pre-established prediction model to obtain the predicted traffic information of the target mesh in the prediction time period, the prediction model establishing unit is configured to:
acquiring first historical traffic information corresponding to a prediction grid in each unit time length included in a training designated time period, and second historical traffic information corresponding to an associated grid of the prediction grid in each unit time length included in the training designated time period; and the number of the first and second groups,
using the first historical traffic information and the second historical traffic information as input values of training samples; and the number of the first and second groups,
selecting first historical traffic information corresponding to a specified number of unit time lengths from the training specified time period, and taking the first historical traffic information corresponding to each unit time length as a reference value of the training sample; and the number of the first and second groups,
inputting the input value of the training sample into a training model, and training the training model through a machine learning algorithm; and the number of the first and second groups,
and when the error between the output value of the training model and the reference value of the training sample is smaller than a preset threshold value, obtaining the prediction model.
9. An electronic terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the machine learning-based traffic information prediction method of any one of claims 1-5 when the processor executes the computer program.
10. A non-transitory computer-readable storage medium having computer-readable instructions stored thereon, which, when read and executed by a computer, cause the computer to implement the machine-learning-based traffic information accident prediction method according to any one of claims 1-5.
CN201811469413.9A 2018-11-28 2018-11-28 Traffic information prediction method and device based on machine learning and electronic terminal Active CN109360421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811469413.9A CN109360421B (en) 2018-11-28 2018-11-28 Traffic information prediction method and device based on machine learning and electronic terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811469413.9A CN109360421B (en) 2018-11-28 2018-11-28 Traffic information prediction method and device based on machine learning and electronic terminal

Publications (2)

Publication Number Publication Date
CN109360421A CN109360421A (en) 2019-02-19
CN109360421B true CN109360421B (en) 2022-03-25

Family

ID=65330975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811469413.9A Active CN109360421B (en) 2018-11-28 2018-11-28 Traffic information prediction method and device based on machine learning and electronic terminal

Country Status (1)

Country Link
CN (1) CN109360421B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112884190B (en) * 2019-11-29 2023-11-03 杭州海康威视数字技术股份有限公司 Flow prediction method and device
EP3872594B1 (en) * 2020-02-26 2023-12-06 Volkswagen Ag A method, a computer program, an apparatus, a vehicle, and a network entity for predicting a deadlock situation for an automated vehicle
CN111489553B (en) * 2020-04-26 2022-02-25 百度在线网络技术(北京)有限公司 Route planning method, device, equipment and computer storage medium
CN111626589B (en) * 2020-05-21 2023-06-23 北京骑胜科技有限公司 Method and device for determining siltation area and method and device for scheduling vehicles
CN114333317B (en) * 2021-12-31 2023-06-02 杭州海康威视数字技术股份有限公司 Traffic event processing method and device, electronic equipment and storage medium
CN114627643B (en) * 2022-02-28 2023-07-14 青岛海信网络科技股份有限公司 Highway accident risk prediction method, device, equipment and medium
CN115050178A (en) * 2022-05-12 2022-09-13 长沙朗源电子科技有限公司 Traffic information publishing system based on cloud computing

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007140527A1 (en) * 2006-06-05 2007-12-13 Sensis Pty Ltd System and method for improved road information
CN101364345A (en) * 2008-09-25 2009-02-11 北京航天智通科技有限公司 Real-time dynamic information processing method based on car detecting technique
CN101819717A (en) * 2010-03-05 2010-09-01 吉林大学 Road network performance judgment method based on traffic state space-time model
CN102175206A (en) * 2011-02-21 2011-09-07 合肥工业大学 Method for measuring connectivity of valley based on three-dimensional surface topography instrument
CN102235873A (en) * 2010-04-21 2011-11-09 北京四维图新科技股份有限公司 Processing method and device of navigation electronic map, navigator
CN103077406A (en) * 2013-02-21 2013-05-01 苏州大学 Image recognition method based on grid marks
CN104157139A (en) * 2014-08-05 2014-11-19 中山大学 Prediction method and visualization method of traffic jam
CN104268705A (en) * 2014-09-30 2015-01-07 国家电网公司 Electric power material distribution center location selection method
CN105205196A (en) * 2014-06-27 2015-12-30 国际商业机器公司 Method and system for generating road network
CN106530706A (en) * 2016-12-02 2017-03-22 清华大学 Regional traffic safety evaluation method based on connectivity-based spatial weight matrix
CN106797633A (en) * 2015-04-30 2017-05-31 华为技术有限公司 A kind of resource regulating method, apparatus and system

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09251596A (en) * 1996-03-15 1997-09-22 Hitachi Ltd Method and device for supporting safety at intersection
KR20090016922A (en) * 2007-08-13 2009-02-18 주식회사 세이프온 Method for predicting danger state using danger management system
CN102110365B (en) * 2009-12-28 2013-11-06 日电(中国)有限公司 Road condition prediction method and road condition prediction system based on space-time relationship
JP6045846B2 (en) * 2012-08-08 2016-12-14 株式会社東芝 Traffic accident occurrence prediction device, method and program
CN104200103A (en) * 2014-09-04 2014-12-10 浙江鸿程计算机系统有限公司 Urban air quality grade predicting method based on multi-field characteristics
CN104732075B (en) * 2015-03-06 2017-07-07 中山大学 A kind of Urban Road Traffic Accidents risk real-time predicting method
JP6542008B2 (en) * 2015-04-01 2019-07-10 株式会社東芝 Accident occurrence forecasting device and accident occurrence forecasting method
CN104992557B (en) * 2015-05-13 2017-09-29 浙江银江研究院有限公司 A kind of urban transportation alert grade prediction technique
CN104834977B (en) * 2015-05-15 2018-02-27 浙江银江研究院有限公司 Traffic alert grade prediction technique based on learning distance metric
CN106507315B (en) * 2016-11-24 2019-06-28 西安交通大学 Urban traffic accident prediction technique and system based on network social intercourse media data
CN106991510A (en) * 2017-05-31 2017-07-28 福建江夏学院 A kind of method based on the traffic accident of spatial-temporal distribution characteristic predicted city
CN107798418A (en) * 2017-09-28 2018-03-13 东南大学 A kind of traffic accident frequency Forecasting Methodology based on traffic analysis cell
CN107610469B (en) * 2017-10-13 2021-02-02 北京工业大学 Day-dimension area traffic index prediction method considering multi-factor influence
CN107845262A (en) * 2017-11-09 2018-03-27 山东浪潮云服务信息科技有限公司 A kind of Predictive Methods of Road Accidents and device
CN108256679B (en) * 2018-01-11 2022-04-19 福建榕基软件股份有限公司 Custom event occurrence prediction method and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007140527A1 (en) * 2006-06-05 2007-12-13 Sensis Pty Ltd System and method for improved road information
CN101364345A (en) * 2008-09-25 2009-02-11 北京航天智通科技有限公司 Real-time dynamic information processing method based on car detecting technique
CN101819717A (en) * 2010-03-05 2010-09-01 吉林大学 Road network performance judgment method based on traffic state space-time model
CN102235873A (en) * 2010-04-21 2011-11-09 北京四维图新科技股份有限公司 Processing method and device of navigation electronic map, navigator
CN102175206A (en) * 2011-02-21 2011-09-07 合肥工业大学 Method for measuring connectivity of valley based on three-dimensional surface topography instrument
CN103077406A (en) * 2013-02-21 2013-05-01 苏州大学 Image recognition method based on grid marks
CN105205196A (en) * 2014-06-27 2015-12-30 国际商业机器公司 Method and system for generating road network
CN104157139A (en) * 2014-08-05 2014-11-19 中山大学 Prediction method and visualization method of traffic jam
CN104268705A (en) * 2014-09-30 2015-01-07 国家电网公司 Electric power material distribution center location selection method
CN106797633A (en) * 2015-04-30 2017-05-31 华为技术有限公司 A kind of resource regulating method, apparatus and system
CN106530706A (en) * 2016-12-02 2017-03-22 清华大学 Regional traffic safety evaluation method based on connectivity-based spatial weight matrix

Also Published As

Publication number Publication date
CN109360421A (en) 2019-02-19

Similar Documents

Publication Publication Date Title
CN109360421B (en) Traffic information prediction method and device based on machine learning and electronic terminal
Yu et al. Prediction of bus travel time using random forests based on near neighbors
CN107945507B (en) Travel time prediction method and device
KR102124955B1 (en) Method and server for identifying the cause of traffic congestion using visual analytics
EP3318985A1 (en) Driving route matching method and apparatus and storage medium
CN106919957B (en) Method and device for processing data
Chou et al. Simulation-based secondary incident filtering method
CN104331422A (en) Road section type presumption method
CN107067781B (en) GIS road black spot map generation method for advanced driving assistance system application
CN106708837B (en) Interest point searching method and device
CN111881243B (en) Taxi track hot spot area analysis method and system
Zhou Comparative study of approaches to delineating built‐up areas using road network data
CN104422451A (en) Road recognition method and road recognition apparatus
Bhuyan et al. Analysing the causal effect of London cycle superhighways on traffic congestion
Park et al. Spatial analysis methods for identifying hazardous locations on expressways in Korea
CN115691140B (en) Analysis and prediction method for space-time distribution of automobile charging demand
CN110569546A (en) Traffic cell division method and device
Yan et al. A new approach for identifying urban employment centers using mobile phone data: A case study of Shanghai
Croicu et al. A fast spatial multiple imputation procedure for imprecise armed conflict events
Weerakoon GIS integrated spatio-temporal urban growth modelling: Colombo Urban Fringe, Sri Lanka
WO2017193554A1 (en) Area merging method and device
CN116703132B (en) Management method and device for dynamic scheduling of shared vehicles and computer equipment
CN113190769B (en) Communication characteristic data determining method, device, electronic equipment and storage medium
CN113282835B (en) Parking place recommendation method and device and electronic equipment
Xu et al. Analysis of spatiotemporal factors affecting traffic safety based on multisource data fusion

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