Disclosure of Invention
The embodiment of the application provides a real-time traffic flow prediction method and a real-time traffic flow prediction system based on deep learning, which can solve the problems that the prediction is inaccurate enough because the traffic condition of a road is only considered in the traffic flow prediction process and the comprehensive traffic jam information cannot be provided for a user, so that the user cannot be automatically helped to cope with the traffic jam, and the travel experience of the user is further affected.
In a first aspect, an embodiment of the present application provides a method for predicting a traffic flow in real time for deep learning, including:
acquiring traffic data in real time, wherein the traffic data is used for reflecting traffic flow and road conditions;
Inputting the traffic data in the current time period into a prediction model to obtain a road congestion value of each time period in a preset time period after the current time period output by the prediction model, wherein the prediction model is obtained by a deep learning mode;
Acquiring position data of the second electronic equipment;
When the geographic position reflected by the position data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value, generating first road condition information and sending the road condition information to the second electronic equipment, wherein the road condition information is used for indicating the congestion level of a road in the preset geographic column so as to enable a user using the second electronic equipment to select a travel road;
And when the road regulation response of the second electronic equipment is not received in the first period, generating second road condition information and sending the road condition information to the second electronic equipment when the road congestion value in the next period is detected to be higher than a first preset value and the geographic position reflected by the position data is in a preset geographic column.
The technical scheme provided by the embodiment of the application at least has the following technical effects:
According to the deep learning real-time traffic flow prediction method, firstly, traffic data comprising traffic flow and road conditions are obtained in real time, so that more diversified and multidimensional information can be provided, the data used in the subsequent model training and prediction process can be updated, the actual condition of traffic conditions can be reflected in time, and the prediction accuracy is improved. And secondly, inputting the traffic data in the current time period into a prediction model to obtain a road congestion value of each time period in a preset time period after the current time period output by the prediction model, comprehensively considering the influence of various factors on traffic flow and road congestion, providing more referenceable data for real-time traffic flow prediction, and being beneficial to more comprehensively learning and understanding the relevance and regularity between traffic data by a subsequent deep learning model so as to improve prediction accuracy. And then, the position data of the second electronic equipment is acquired, and additional characteristic information such as the running direction, speed, residence time and the like of the vehicle connected with the second electronic equipment can be provided, so that the running state and road condition of the vehicle can be comprehensively known, and the prediction precision and reliability are improved. Then, when the geographic position reflected by the position data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value, generating first road condition information, and sending the road condition information to the second electronic device, the current road congestion condition can be provided for a user in time, the user can be helped to select a travel route more accurately, and accordingly travel time is reduced, traffic congestion is avoided (for example, user use feedback and behavior data can be collected and used for improving prediction performance of a deep learning model, and accordingly a traffic flow prediction system is optimized continuously), and prediction accuracy is improved. And finally, when the road regulation response of the second electronic equipment is not received in the first period, and the road congestion value in the next period is detected to be higher than a first preset value, and the geographic position reflected by the position data is in a preset geographic column, generating second road condition information, and sending the road condition information to the second electronic equipment, so that a user can be helped to make a better trip decision in the next period, traffic congestion is avoided, and the travel efficiency and comfort of the user are improved, and the user experience is improved.
In a possible implementation manner of the first aspect, before the inputting the traffic data of the current time period into a prediction model, obtaining a road congestion value of each time period within a preset time period after the current time period output by the prediction model, the method further includes:
generating first samples according to experience data, wherein the experience data comprises traffic flow and road conditions of a road acquired in a past period, the road conditions comprise weather information and construction road condition information, the weather information comprises information of whether the road is in a rainy season or not, the construction road condition information comprises information of whether a road construction plan exists or not and arrangement information of a construction period in a schedule, each first sample comprises road congestion values corresponding to each period in a day, and the road congestion values are determined according to congestion time lengths acquired every day;
adding identification information to the traffic data, wherein the identification information is used for indicating a current road congestion value corresponding to the traffic data in a current time period;
the traffic data and the first sample added with the identification information are sent to a server;
receiving an updated prediction model sent by the server, wherein the updated prediction model is obtained by the server through training according to the received traffic data added with the identification information and the first sample;
and updating the current prediction model into the updated prediction model.
In a possible implementation manner of the first aspect, after generating first road condition information and sending the first road condition information to the second electronic device when the geographic location reflected by the location data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value, the method further includes:
determining a use state of the second electronic equipment under the condition that the first electronic equipment does not receive a road adjustment response of the second electronic equipment, wherein the road adjustment response carries road selection information corresponding to the road condition information;
The first electronic equipment sends the first road condition information to the second electronic equipment in a first preset duration when the using state is a first motion state, wherein the user is using navigation application of the second electronic equipment when the second electronic equipment is in the first motion state;
And under the condition that the using state is a second motion state, the first electronic equipment does not send the first road condition information to the second electronic equipment within a second preset time period, wherein the user does not use the navigation application of the second electronic equipment when the second electronic equipment is in the second motion state.
In a possible implementation manner of the first aspect, the determining, in a case that the first electronic device does not receive the road adjustment response of the second electronic device, the usage state of the second electronic device includes:
If the first electronic device does not receive the road adjustment response corresponding to the road condition information from the second electronic device within a second preset time period, the first electronic device acquires selection data and/or movement data of the second electronic device, wherein the selection data is used for indicating whether the second electronic device uses navigation application of the second electronic device for road selection, and the movement data is used for indicating whether a running path of a vehicle connected with the second electronic device is deviated from a preset running path;
Determining that the use state of the second electronic equipment is the first motion state when the selection data indicates that the second electronic equipment performs road selection by using a navigation application of the second electronic equipment and/or the motion data indicates that a travel path of a vehicle connected with the second electronic equipment is not deviated from a preset travel path;
and determining that the use state of the second electronic equipment is the second motion state when the selection data indicates that the second electronic equipment does not use the navigation application of the second electronic equipment for road selection and/or the motion data indicates that the driving path of a vehicle connected with the second electronic equipment is zero.
In a possible implementation manner of the first aspect, after the inputting the traffic data of the current time period into a prediction model, obtaining a road congestion value of each time period within a preset time period after the current time period output by the prediction model, the method further includes:
Judging whether the road condition of the current time period is a first road condition or not based on the traffic data of the current time period, wherein the first road condition is a road condition of at least two adjacent intersections in a preset path;
if the road condition is the first road condition, a first signal equipment list is obtained, wherein the first signal equipment list comprises at least one signal equipment;
acquiring signal equipment period information of each signal equipment in the first signal equipment list;
And synchronously setting the signal equipment period information and the first road condition to obtain green wave band control information, wherein the green wave band control information is used for controlling signal equipment between adjacent intersections so that vehicles can continuously and smoothly pass through the adjacent intersections.
In a possible implementation manner of the first aspect, the performing synchronization setting based on the signal device period information and the first path condition to obtain green band control information includes:
when the first road condition indicates that the traffic flow is greater than a first threshold value and the duration value in the signal equipment period information is a first duration value, obtaining first control information in the green wave band control information, wherein the first control information is used for controlling signal equipment to prolong the green light duration;
And when the first road condition indicates that the traffic flow is smaller than a first threshold value and the time length value in the signal equipment period information is a second time length value, obtaining second control information in the green wave band control information, wherein the second control information is used for controlling the signal equipment to shorten the period time length of the signal equipment.
In a possible implementation manner of the first aspect, after the synchronizing setting based on the signal device period information and the first path condition to obtain green band control information, the method further includes:
the bus driving data in the first road condition is obtained, wherein the bus driving data are used for indicating the daily departure shift data and average speed data of a bus;
Obtaining third control information in green wave band control information according to the departure shift data and the average speed data, wherein the third control information is used for adjusting the phase difference of signal equipment;
And obtaining traffic management decision information according to the first control information, the second control information and the third control information.
In a possible implementation manner of the first aspect, the road includes at least two signal devices, the first electronic device is communicatively connected to the signal devices, and after the setting is performed synchronously based on the signal device period information and the first road condition, so as to obtain green band control information, the method further includes:
Controlling the first signal equipment to enter a signal adjustment state based on the green wave band control information, wherein the signal adjustment state is used for reminding a user of time or priority of the signal equipment;
If the first electronic device cannot receive a control response fed back by any one of the two signal devices, and the first signal device receives a first adjustment signal sent by a second signal device under the condition that the first signal device enters a signal adjustment state, wherein the first adjustment signal is used for determining the signal duration adjustment condition of the second signal device;
The first signal equipment sends a first adjustment response to the second signal equipment, wherein the first adjustment response is used for indicating the second signal equipment to keep the signal adjustment state after receiving the first adjustment response, and the second signal equipment is in the signal adjustment state when sending the first adjustment signal.
In a possible implementation manner of the first aspect, after the synchronizing setting based on the signal device period information and the first path condition to obtain green band control information, the method further includes:
If the first electronic device cannot receive a control response fed back by any one of the two signal devices, and the first signal device receives a second adjustment signal sent by the second signal device under the condition that the first signal device enters a non-signal adjustment state;
in response to receiving the second adjustment signal, the first signal device does not send a second adjustment response to the second signal device to cause the second signal device to exit the signal adjustment state.
In a possible implementation manner of the first aspect, the generating the first road condition information when the geographic location reflected by the location data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value includes:
Dividing road sections in the preset geographic columns to obtain traffic flow data in each area;
acquiring vehicle speed data in the traffic data;
And generating the first road condition information in each area based on the vehicle speed data and the vehicle flow data.
In a second aspect, an embodiment of the present application provides a real-time traffic flow prediction system based on deep learning, including:
the system comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring traffic data in real time, and the traffic data is used for reflecting traffic flow and road conditions;
the determining unit is used for inputting the traffic data in the current time period into a prediction model to obtain a road congestion value of each time period in a preset time period after the current time period output by the prediction model, wherein the prediction model is obtained by a deep learning mode;
a second acquiring unit, configured to acquire position data of the second electronic device;
The first generation unit is used for generating first road condition information and sending the road condition information to the second electronic equipment when the geographic position reflected by the position data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value, wherein the first road condition information is used for indicating the congestion level of a road in the preset geographic column so as to enable a user using the second electronic equipment to select a travel road;
And the second generation unit is used for generating second road condition information and sending the second road condition information to the second electronic equipment when the road congestion value of the second electronic equipment is detected to be higher than a first preset value and the geographic position reflected by the position data is in a preset geographic column in the first period.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program implementing the method according to any one of the first aspects when executed by the processor.
It will be appreciated that the advantages of the second to third aspects may be found in the relevant description of the first aspect, and are not described in detail herein.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Traffic flow prediction refers to collecting vehicle operation data on roads by using traffic monitoring equipment, cameras, sensors and other equipment, and analyzing and predicting the traffic flow on roads, intersections or road sections.
The traditional traffic flow prediction only considers the traffic condition of the road, and is difficult to comprehensively consider the influence of external factors (such as weather, road construction activities and the like) on the traffic flow, so that the prediction is inaccurate, and the travel experience of a user is further influenced.
In order to solve the problems, the embodiment of the application provides a real-time traffic flow prediction method and a real-time traffic flow prediction system based on deep learning.
In the method, firstly, traffic data comprising traffic flow and road conditions are acquired in real time, so that more diversified and multidimensional information can be provided, the data used in the subsequent model training and prediction process can be updated, the actual condition of the traffic condition can be reflected in time, and the prediction accuracy is improved. And secondly, inputting the traffic data in the current time period into a prediction model to obtain a road congestion value of each time period in a preset time period after the current time period output by the prediction model, comprehensively considering the influence of various factors on traffic flow and road congestion, providing more referenceable data for real-time traffic flow prediction, and being beneficial to more comprehensively learning and understanding the relevance and regularity between traffic data by a subsequent deep learning model so as to improve prediction accuracy. And then, the position data of the second electronic equipment is acquired, and additional characteristic information such as the running direction, speed, residence time and the like of the vehicle connected with the second electronic equipment can be provided, so that the running state and road condition of the vehicle can be comprehensively known, and the prediction precision and reliability are improved. Then, when the geographic position reflected by the position data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value, generating first road condition information, and sending the road condition information to the second electronic device, the current road congestion condition can be provided for a user in time, the user can be helped to select a travel route more accurately, and accordingly travel time is reduced, traffic congestion is avoided (for example, user use feedback and behavior data can be collected and used for improving prediction performance of a deep learning model, and accordingly a traffic flow prediction system is optimized continuously), and prediction accuracy is improved. And finally, when the road regulation response of the second electronic equipment is not received in the first period, and the road congestion value in the next period is detected to be higher than a first preset value, and the geographic position reflected by the position data is in a preset geographic column, generating second road condition information, and sending the road condition information to the second electronic equipment, so that a user can be helped to make a better trip decision in the next period, traffic congestion is avoided, and the travel efficiency and comfort of the user are improved, and the user experience is improved.
The real-time traffic flow prediction method based on the deep learning provided by the embodiment of the application can be applied to the first electronic equipment, and the first electronic equipment is the execution subject of the real-time traffic flow prediction method based on the deep learning provided by the embodiment of the application, and the embodiment of the application does not limit the specific type of the first electronic equipment.
For example, the first electronic device may be a mobile terminal such as a tablet, a notebook, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a desktop, a smart-large-screen, a computing device with wireless communication capabilities, or other processing device connected to a wireless modem, a car networking terminal, a computer, a laptop, a handheld communication device, a handheld computing device, or the like.
The second electronic device may be a mobile terminal such as a tablet computer, a notebook computer, a netbook, a handheld communication device, a vehicle-mounted device, and the like. The first electronic device is communicatively coupled to the second electronic device.
In order to better understand the real-time traffic flow prediction method based on deep learning provided by the embodiment of the application, the specific implementation process of the real-time traffic flow prediction method based on deep learning provided by the embodiment of the application is described in an exemplary manner.
Fig. 1 shows a schematic flow chart of a real-time traffic flow prediction method based on deep learning, which is provided by an embodiment of the application, and includes:
S100, acquiring traffic data in real time. The traffic data are used for reflecting traffic flow and road conditions.
For example, traffic monitoring cameras can be arranged on traffic intersections and roads of cities, information such as traffic flow, vehicle speed and traffic density can be obtained through real-time monitoring of images and video data, and the obtained information can be sent to the first electronic device in a wired or wireless mode. Or traffic sensor devices such as a ground induction coil, a microwave radar, an infrared sensor and the like can be arranged on the road, the sensors can detect the traffic flow and the speed of a vehicle in real time when the vehicle passes, help to monitor the traffic flow and the road condition of the road, and send the acquired information to the first electronic device in a wired or wireless mode.
By means of the arrangement, traffic data comprising traffic flow and road conditions are obtained in real time, diversified and multidimensional information can be provided, the data used in the subsequent model training and prediction process can be updated, the actual conditions of traffic conditions can be reflected in time, and the prediction accuracy is improved.
And S200, inputting the traffic data of the current time period into a prediction model to obtain the road congestion value of each time period in the preset time period after the current time period output by the prediction model. The prediction model is obtained by means of deep learning.
By way of example, using traffic data over a current time period as a training set, features such as time, location, traffic flow, vehicle speed, etc., are extracted from the traffic data, which will be used as inputs to a deep learning model, which is input to the deep learning model for training, and model weights are updated by a back propagation algorithm to learn patterns and rules in the existing data to obtain a predictive model. And inputting the traffic data in the current time period into a prediction model for prediction, wherein the prediction model predicts the road congestion value of each time period in the preset time period after the current time period according to the mode and rule learned by the traffic data. For example, the current time is 8 a.m., and the road congestion value of 30 minutes per segment in the future 2 hours is predicted. Road congestion values between 8:30 and 9:00 are 75, indicating light congestion of the urban high-speed road section, and road congestion values between 9:30 and 10:00 are 85, indicating medium congestion of the urban central road. For another example, the current time is 5 pm on friday, the road congestion condition of each 15 minutes in each section in the future 1 hour is predicted, and the road congestion value is 95 between 5:45 and 6:00, which indicates that the main road entering the urban area is severely congested.
The traffic data in the current time period is input into the prediction model to obtain the road congestion value of each time period in the preset time period after the current time period output by the prediction model, the influence of various factors on traffic flow and road congestion can be comprehensively considered, more referenceable data are provided for real-time traffic flow prediction, and the subsequent deep learning model is facilitated to learn and understand the relevance and regularity between traffic data more comprehensively so as to improve the prediction accuracy.
In one possible implementation manner, referring to fig. 2, in step S200, before inputting the traffic data of the current time period into the prediction model to obtain the road congestion value of each time period in the preset time period after the current time period output by the prediction model, the real-time traffic flow prediction method based on deep learning further includes:
S210, generating a first sample according to experience data. The experience data comprise traffic flow and road conditions of a road obtained in a past period, the road conditions comprise weather information and construction road condition information, the weather information comprises information of whether the road is in a rainy season, and the construction road condition information comprises information of whether a road construction plan exists or not and arrangement information of a construction period in a schedule. Each first sample comprises a road congestion value corresponding to each time period in one day, and the road congestion value is determined according to the congestion time length acquired every day.
It will be appreciated that empirical data including road traffic data, weather information and construction road condition information may be collected over time, and may be obtained from related institutions such as traffic authorities, weather authorities, construction companies, etc., or may be collected via cameras. Features are extracted from the collected data for generating a first sample, and may include time periods, such as early peak, late peak, etc., for each time period of the day. Road information, road name or ID. Traffic flow, the number of vehicles on the road per time period. Weather information such as whether it is raining, whether it is haze, etc. And constructing road condition information such as whether a road construction plan exists, construction period arrangement and the like.
By the arrangement, the first sample is generated according to the experience data, data support can be provided for training of a subsequent model, the model is helped to accurately predict traffic conditions, and the feature engineering comprehensively considering various features is helpful for improving the prediction effect.
S220, adding identification information to the traffic data. The identification information is used for indicating a current road congestion value corresponding to traffic data in a current time period.
For example, road congestion values may be divided into several levels, e.g., clear, creep, congestion levels, which may be denoted by A, B, C, which are added to traffic data. For example, if the traffic flow of a certain road in the early peak period exceeds 2 times of the average value, the traffic flow is identified as congestion (A), and if the traffic flow in the evening period is below the average value, the traffic flow is identified as smoothness (C).
By the arrangement, the identification information is added for the traffic data, so that the model can more accurately know the road congestion condition of the current time period in the subsequent model training process, the model can be helped to better capture the traffic characteristics and rules of the specific time period, and the prediction accuracy is improved.
And S230, the traffic data and the first sample after the identification information is added are sent to the server.
It will be appreciated that the connection between the first electronic device and the server is established using an appropriate communication protocol (e.g., HTTP, webSocket, etc.). And sending the traffic data added with the identification information to the server, and returning a response to confirm the receiving or provide a further processing result once the server receives the data, so that the first electronic device can process the response returned by the server to judge whether the server receives the traffic data successfully.
By means of the arrangement, the traffic data and the first sample after the identification information is added are sent to the server, real-time traffic data updating and prediction can be achieved, the fact that the deep learning model can timely acquire the latest traffic information can be guaranteed, and therefore accurate real-time traffic prediction is achieved.
S240, receiving the updated prediction model sent by the server. The updating prediction model is obtained by training the server according to the received traffic data added with the identification information and the first sample.
It can be understood that the first electronic device sends a request to the server, and after the server receives the request, the server trains according to the received traffic data added with the identification information and the first sample, and generates a new prediction model. The server packages the new model into response data and sends it back to the first electronic device. After receiving the response of the server, the first electronic device needs to analyze the response data and extract an updated prediction model. Once the first electronic device successfully parses the updated predictive model, it can be applied to the actual traffic flow prediction task and used to make real-time traffic flow predictions.
By means of the arrangement, the real-time traffic data updating and prediction can be achieved through the updated prediction model sent by the receiving server, so that the deep learning model can be ensured to timely acquire the latest traffic information, and therefore more accurate real-time traffic flow prediction is achieved.
S250, updating the current prediction model into an updated prediction model.
It will be appreciated that the first electronic device needs to request the download of the updated predictive model file sent by the server over the network. The server will typically send the model files to the first electronic device in a particular format (e.g. h5, pt, etc.). The first electronic device needs to load the downloaded update model file using an appropriate tool or library, for example, a library such as TensorFlow, pyTorch may be used in the deep learning field to load the neural network model. And loading the model into the memory by using a corresponding loading function according to the format and the type of the model file. Once the updated model is successfully loaded, the first electronic device can deploy the updated model into an application program for tasks such as real-time traffic flow prediction and the like, and can replace the current prediction model to ensure that the new model can be called by the application program and perform actual prediction operations.
The method has the advantages that the current prediction model is updated to be the updated prediction model, the prediction accuracy and effect can be improved and optimized continuously, the method is favorable for building a continuously improved intelligent traffic management system, and better support is provided for urban traffic flow management.
S300, acquiring position data of the second electronic equipment.
For example, the position data of the second electronic device may be obtained through a GPS chip built in the second electronic device, or the real-time position data of the second electronic device may be obtained through a positioning service on the second electronic device.
By the arrangement, the position data of the second electronic equipment is acquired, additional characteristic information such as the running direction, speed, residence time and the like of the vehicle connected with the second electronic equipment can be provided, the running state and road condition of the vehicle can be comprehensively known, and the prediction accuracy and reliability are improved.
And S400, when the geographic position reflected by the position data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value, generating first road condition information and transmitting the road condition information to second electronic equipment. The road condition information is used for indicating the congestion level of the road in the preset geographic bar so as to enable a user using the second electronic equipment to conduct travel road selection.
For example, a preset geographical column range may be set in the system, which is used to determine whether the position of the second electronic device is within the range, compare the geographical position in the position data of the second electronic device with the preset geographical column, if the geographical position is within the preset geographical column range and the road congestion value of the current period is higher than the first preset value, generate the first road condition information (for example, the user using the second electronic device is within the preset geographical column range, which indicates that the user travels within the preset geographical column range, and when the road congestion occurs within the user travels range, that is, the road congestion value of the current period is higher than the first preset value, send the name of the congested road of the current period, the congestion degree, or select other information of the non-congested road to the second electronic device), for example, the first road condition information may include the road name of the current period, the congestion level (such as mild, moderate, severe), the estimated delay time, and so on. And sending the generated first road condition information to the second electronic equipment, wherein the first road condition information can be sent in the forms of push notification, short message, in-application message and the like.
When the geographic position reflected by the position data is in the preset geographic column and the road congestion value in the current time period is higher than the first preset value, first road condition information is generated and sent to the second electronic equipment, the current road congestion condition can be provided for the user in time, the user can be helped to select a travel route more accurately, travel time is shortened, traffic congestion is avoided (for example, the use feedback and behavior data of the user can be collected and used for improving the prediction performance of a deep learning model, so that a traffic flow prediction system is optimized continuously), and the prediction accuracy is improved.
In a possible implementation manner, referring to fig. 3, in step S400, when the geographic location reflected by the location data is in the preset geographic column and the road congestion value in the current time period is higher than the first preset value, the method for predicting the real-time traffic flow based on the deep learning further includes:
S410, determining the use state of the second electronic device under the condition that the first electronic device does not receive the road adjustment response of the second electronic device. The road adjustment response carries road selection information corresponding to the road condition information.
It will be appreciated that the first electronic device may be provided with a transponder to obtain the status of use of the second electronic device by sending a request message to the second electronic device and periodically checking the response of the second electronic device. And if the first electronic device does not receive the road adjustment response of the second electronic device within a certain time, determining the using state of the second electronic device. For example, the first electronic device sends first road condition information of the current time period to the second electronic device, the first road condition information comprises road selection information, non-congestion road selection can be provided for the user, the second electronic device is interactive, the user can input information or perform operation on the second electronic device, and the input state of the user can be checked to know the current use condition of the user. For example, if the user stops inputting or operating the device, it means that they have made a road adjustment before receiving the first road condition information, and are traveling on a non-congested road or do not need to make a road adjustment for a while. For another example, if the first electronic device does not receive the road adjustment response of the second electronic device, it is indicated that the first road condition information is sent to fail, so that the first electronic device does not receive the road adjustment response of the second electronic device.
By the arrangement, under the condition that the first electronic equipment does not receive the road adjustment response of the second electronic equipment, the use state of the second electronic equipment is determined, and data support can be provided for subsequent rapid corresponding processing and adjustment, so that the operation efficiency and response speed of the system are improved.
In one possible implementation, referring to fig. 4, s410, in a case that the first electronic device does not receive the road adjustment response of the second electronic device, determining the usage status of the second electronic device includes:
S411, if the first electronic device does not receive the road adjustment response of the corresponding road condition information from the second electronic device within the second preset time period, the first electronic device acquires the selection data and/or the movement data of the second electronic device. The selection data is used for indicating whether the second electronic equipment uses the navigation application of the second electronic equipment to perform road selection, and the movement data is used for indicating whether the running path of the vehicle connected with the second electronic equipment is deviated from a preset running path.
It can be understood that after the first electronic device sends the road condition information, a second preset duration is set as the waiting time, if no response from the second electronic device is received within the duration, the second electronic device does not receive the road condition information, and under the condition that the second electronic device does not receive the road condition information, the selection data of the second electronic device is obtained and is used for indicating whether the second electronic device uses the navigation application of the second electronic device to perform road selection. The selection data may be obtained through a communication means or API. And meanwhile, acquiring motion data of the second electronic equipment, which is used for indicating whether a running path of a vehicle connected with the second electronic equipment deviates from a preset running path, wherein the motion data can comprise acceleration, position information and the like and can be acquired through a sensor or a positioning function of the second electronic equipment.
If the first electronic device does not receive the road adjustment response of the corresponding road condition information from the second electronic device within the second preset time, the first electronic device acquires the selection data and/or the motion data of the second electronic device, so that the state of the second electronic device can be known in real time, such as the selection state and the movement condition, the first electronic device is facilitated to make corresponding operations in time, changes of traffic conditions are dealt with, and instantaneity and accuracy are improved.
And S412, determining that the using state of the second electronic equipment is the first moving state when the selection data indicates that the second electronic equipment performs road selection by using the navigation application of the second electronic equipment and/or the moving data indicates that the running path of the vehicle connected with the second electronic equipment is deviated from the preset running path.
For example, if the selection data indicates that the second electronic device is performing road selection in the navigation application using the second electronic device, it is indicated that the user has a travel requirement after the road selection is completed, so the use state of the second electronic device is determined as the first motion state. For example, the road selection may be performed using a navigation application on the second electronic device, or the road selection may be performed using a navigation application on a vehicle connected to the second electronic device. Or if the movement data indicates that the travel path of the vehicle connected with the second electronic device is deviated from the preset travel path, the travel path of the user is different from the preset travel path, for example, the preset travel path may be a travel path which the user has planned before traveling, but the travel path is modified halfway by the user, so that the travel path of the vehicle is deviated from the preset travel path, and therefore, it is determined that the user using the second electronic device needs new first road condition information, and corresponding actions, such as resending the first road condition information, can be selected.
In this way, when the selection data indicates that the second electronic device performs road selection in the navigation application using the second electronic device and/or the movement data indicates that the driving path of the vehicle connected with the second electronic device deviates from the preset driving path, the use state of the second electronic device is determined to be the first movement state, which is helpful for timely tracking information such as the position, the speed and the direction of the vehicle in the traffic management and intelligent transportation system, so as to more effectively manage and optimize the traffic flow.
S413, determining that the usage state of the second electronic device is the second motion state when the selection data indicates that the second electronic device does not use the navigation application of the second electronic device for road selection and/or the motion data indicates that the travel path of the vehicle connected to the second electronic device is zero.
For example, if the selection data indicates that the second electronic device does not use the navigation application of the second electronic device for road selection, it indicates that the user has no travel requirement, so the use state of the second electronic device is determined as the second motion state. Or if the motion data indicates that the driving path of the vehicle connected with the second electronic device is zero, the user is not going out, for example, the user stops the vehicle in a parking lot, so that the driving path of the vehicle is zero, thereby determining that the user using the second electronic device does not need the first road condition information, and selecting to take corresponding actions, such as not sending the first road condition information.
The method and the device have the advantages that when the selection data indicate that the second electronic equipment does not use the navigation application of the second electronic equipment for road selection and/or the motion data indicate that the driving path of the vehicle connected with the second electronic equipment is zero, the use state of the second electronic equipment is determined to be the second motion state, the travel requirement of the user can be known, the user can be helped to plan a route more accurately, congestion or other road problems can be avoided, and user experience is improved.
S420, under the condition that the using state is the first motion state, the first electronic equipment sends road condition information to the second electronic equipment within a first preset duration. Wherein the user is using a navigation-like application of the second electronic device while the second electronic device is in the first motion state.
For example, the first electronic device may communicate with the second electronic device to obtain information of a currently active application program in the second electronic device by calling an associated API of the second electronic device, so as to determine whether the application program is a navigation application. For example, if navigational class application activity is acquired (e.g., may be the user frequently operating the screen of the second electronic device or interacting with the navigational application, such as the user frequently operating the screen of the second electronic device interacting with the navigational application may be making a road selection in the navigational application), the user is using the navigational class application of the second electronic device, and if navigational class application hibernation is acquired, the user is not using the navigational class application of the second electronic device. When the second electronic device is confirmed to be in the first motion state, namely, the user is using the navigation application, the first electronic device can send first road condition information to the second electronic device within a first preset duration.
The first electronic equipment sends the first road condition information to the second electronic equipment within the first preset duration under the condition that the using state is the first motion state, so that a user can be helped to plan a route more accurately, congestion or other road problems can be avoided, and user experience is improved.
S430, under the condition that the using state is the second motion state, the first electronic equipment does not send the first road condition information to the second electronic equipment within the second preset duration. And when the second electronic equipment is in the second motion state, the user does not use the navigation application of the second electronic equipment.
It will be appreciated that the first electronic device may communicate with the second electronic device to retrieve information of the currently active application program in the second electronic device by calling the associated API to determine whether it is a navigation-like application. For example, if navigational class application activity is acquired (e.g., the user frequently operates a screen of the second electronic device or interacts with the navigational application), the user is using the navigational class application of the second electronic device, and if navigational class application hibernation is acquired, the user is not using the navigational class application of the second electronic device. When the second electronic device is confirmed to be in the second motion state, that is, the user does not use the navigation application, the first electronic device can not send the first road condition information to the second electronic device within the second preset duration.
The first electronic equipment does not send the first road condition information to the second electronic equipment in the second preset duration under the condition that the using state is the second motion state, so that a user can be helped to plan a route more accurately, congestion or other road problems can be avoided, and user experience is improved.
In one possible implementation manner, referring to fig. 5, in step S200, after inputting the traffic data of the current time period into the prediction model to obtain the road congestion value of each time period in the preset time period after the current time period output by the prediction model, the real-time traffic flow prediction method based on deep learning further includes:
S260, judging whether the road condition of the current time period is the first road condition or not based on the traffic data of the current time period. The first road condition is a road condition including at least two adjacent intersections in a preset path.
It can be understood that, according to the collected traffic data, the intersection on the current road is identified, and when the road conditions of at least two adjacent intersections are included in the preset path, the road condition of the current time period is determined to be the first road condition.
The method comprises the steps of setting the traffic data of the current time period, judging whether the road condition of the current time period is the first road condition or not based on the traffic data of the current time period, wherein the estimated road condition is not only the condition of a single road section, but also the traffic condition of a plurality of areas, so that the traffic condition of the area can be more comprehensively known to take corresponding measures for intervention without waiting for the aggravation of traffic problems to take action.
S270, if the road condition is the first road condition, a first signal device list is obtained. Wherein the first list of signal devices comprises at least one signal device.
It can be understood that after determining that the road condition is the first road condition, the related traffic management database or the traffic planning system may be queried to obtain the first signal device list of the road section. The first list of signalling devices records at least one signalling device on the road section, which may be a traffic light or the like, for example.
Thus, if the road condition is the first road condition, the first signal equipment list is acquired, so that the following traffic sequence of vehicles can be controlled by using the signal equipment, and the traffic signal timing is optimized, thereby improving the traffic efficiency and reducing the congestion.
S280, acquiring signal equipment period information of each signal equipment in the first signal equipment list.
It will be appreciated that for each signal device recorded in the first list of signal devices, its signal device period may be obtained. The signaling device cycle refers to the length of time that the signal is completed once in a complete cycle from green to yellow to red. For example, it may be determined by measuring the duration of the signal lamp in different states.
The setting is that signal equipment period information of each signal equipment in the first signal equipment list is obtained, data support can be provided for the green light, yellow light and red light time of the signal lamp which is adjusted according to road flow conditions and traffic demands subsequently, so that the traffic smoothness is improved, congestion is reduced, and user experience is improved.
S290, synchronous setting is carried out based on the signal equipment period information and the first road condition so as to obtain green wave band control information. The green wave band control information is used for controlling signal equipment between adjacent intersections so that vehicles can continuously and smoothly pass through the adjacent intersections.
It will be appreciated that first, the cycle information of each signaling device is analyzed, including green light time, yellow light time, and red light time. Then, the first road condition, that is, the information such as the traffic flow and the vehicle running speed of the adjacent road junction, is analyzed, and the information can be obtained through the data provided by the traffic monitoring device, the sensor or the traffic management department. The first road condition information may help determine parameters such as time and vehicle density required for the vehicle to pass through the adjacent intersection. The synchronous setting is performed based on the signal equipment period information and the first road condition to obtain green wave band control information, for example, the beat, green time and transition time of the signal lamps of the adjacent intersections can be adjusted to ensure that the vehicles can continuously and smoothly pass through the adjacent intersections. For example, when a vehicle travels on a road of 500m at 3 adjacent intersections, the vehicle travel speed is 30km/h, that is, (30 km/h×1000 m/km/3600 s) =8.33 m/s, the time required for the vehicle to travel on the road of 500m is 500 m/8.33 m/s=60 seconds, and the cycle of the traffic light is reset according to the time required for the vehicle to travel on the road of 500m, and since there are 3 adjacent intersections, the vehicle needs to pass through all three intersections, the cycle of the traffic light at each intersection needs to take into consideration the time required for the vehicle to pass through and the waiting time. Assuming that the driving time of each intersection is 60 seconds, the whole green wave band needs 6 intersection periods, namely 6×60 seconds=360 seconds, 360 seconds are evenly distributed to 3 intersections, the signal lamp period of each intersection is 360 seconds/3=120 seconds, and the signal lamp control of the intersection is adjusted according to the recalculated signal lamp period, namely, the green lamp time is set to be 60 seconds and the red lamp time is set to be 60 seconds on each intersection, so that vehicles can pass through roads within a limited time. The device is arranged in such a way that the device is synchronously arranged based on the period information of the signal equipment and the first road condition to obtain the green wave band control information, so that vehicles can realize continuous smooth passing between adjacent intersections, the pause and waiting time are reduced, and the traffic efficiency is improved.
In one possible implementation, referring to fig. 6, s290, the synchronization setting is performed based on the signal device period information and the first channel condition to obtain the green band control information, including:
and S291, when the first road condition indicates that the traffic flow is greater than a first threshold value and the duration value in the signal equipment period information is a first duration value, obtaining first control information in the green wave band control information. The first control information is used for controlling the signal equipment to prolong the green light duration.
It can be understood that when the first road condition indicates that the traffic flow is greater than the first threshold, it indicates that congestion occurs in the first road condition, and the duration value in the period information of the signal device is the first duration value, it indicates that the duration value in the period information of the signal device cannot meet the requirement that the vehicle continuously passes through the two intersections, and then first control information in the green wave band control information is generated. For example, the first control information may be to increase green light time or decrease red light time so that the vehicle may pass through the road in the signal light period.
When the first road condition indicates that the traffic flow is greater than the first threshold value and the duration value in the period information of the signal equipment is the first duration value, the first control information in the green wave band control information is obtained, so that the passing time of the vehicles passing through the signal equipment is prolonged, and the number of the vehicles passing through the signal equipment in unit time is increased. This helps to improve the traffic capacity of the signalling device, reduce the parking waiting time of the vehicle, and relieve traffic pressure.
S292, when the first road condition indicates that the traffic flow is smaller than a first threshold value and the duration value in the signal equipment period information is a second duration value, obtaining second control information in the green wave band control information. The second control information is used for controlling the signal equipment to shorten the period duration of the signal equipment.
It can be understood that when the first road condition indicates that the traffic flow is smaller than the first threshold, it indicates that the first road condition is unobstructed, and the duration value in the signal equipment period information is the second duration value, it indicates that the duration value in the signal equipment period information has time redundancy under the condition that the vehicle continuously passes through the two intersections, and then generates the second control information in the green wave band control information. For example, the second control information may be to shorten the period duration of the signaling device, so that the vehicle may match the period duration of the signaling device with the unobstructed road condition while passing through the road in the period of the signal lamp.
When the first road condition indicates that the traffic flow is smaller than the first threshold value and the time length value in the period information of the signal equipment is the second time length value, the second control information in the green wave band control information is obtained, and the vehicle can pass through the signal equipment more smoothly, so that the traffic smoothness is improved, the traffic jam and congestion are reduced, and the overall traffic efficiency of the road is improved.
In a possible implementation manner, referring to fig. 7, in step S290, after the synchronization setting is performed based on the signal device period information and the first road condition to obtain the green band control information, the real-time traffic flow prediction method based on deep learning further includes:
s293, acquiring bus driving data in the first road condition. The bus driving data are used for indicating the departure shift data and the average speed data of the bus every day.
It can be appreciated that modern buses are equipped with GPS positioning systems, which can track the position and operating state of the bus in real time. By collecting these GPS data, information such as the travel path, speed, departure time, etc. of each bus can be obtained, and thus the departure shift and average vehicle speed data per day can be deduced.
By the arrangement, the bus driving data in the first road condition is acquired, and important references can be provided for traffic planning, so that the traffic smoothness is optimized, traffic jam and congestion are reduced, and the overall traffic efficiency of the road is improved.
S294, obtaining third control information in the green wave band control information according to the departure shift data and the average speed data. Wherein the third control information is used to adjust the phase difference of the signal device.
It will be appreciated that with analysis of the collected departure shift data and average vehicle speed data, methods and algorithms in traffic engineering may be used to calculate the signal phase difference. The signal phase difference refers to the difference between the phases of adjacent traffic signals (i.e. green light duration), and the coordination of traffic signals can be realized by adjusting the signal phase difference, so that green wave band control is formed. For example, the phase difference of signals can be adjusted according to the departure shift and average speed data of buses and traffic flow conditions, for example, when the density of buses on a certain road section is high or the traffic flow speed is low, the phase difference of signal lamps can be properly adjusted, and the green light time is prolonged, so that the buses can quickly pass through the intersection.
According to the setting, the third control information in the green wave band control information is obtained according to the departure shift data and the average speed data, the effect of green wave band control can be evaluated, and then the adjustment strategy is continuously optimized, so that the traffic efficiency and the service quality are improved.
S295, traffic management decision information is obtained according to the first control information, the second control information and the third control information.
It is understood that the first control information and the second control information may include control strategies of the traffic lights, such as green band control, including phase difference setting of traffic signals, green time duration, timing scheme of the traffic lights, and the like. The collected data may be signal control parameters and timing plans for the respective intersections. The third control information may be a control strategy for specific traffic needs or events, such as bus priority, emergency vehicle traffic, etc. The information may be an adjustment strategy based on bus shift data, average speed data, and special vehicle priority traffic. And comprehensively analyzing the collected first, second and third control information. This includes integrating and evaluating data of traffic flow, signal lamp control schemes, and special traffic demands, and by analyzing the data, traffic bottlenecks, congestion points can be identified, and traffic management decision information can be determined. For example, the first control information, real-time traffic data for lanes a and B, contains traffic statistics per hour. Traffic speed data for the A and B routes. Vehicle queuing length and time at each intersection. And the second control information is traffic signal lamp timing scheme of the intersections of the A path and the B path, and the traffic signal lamp timing scheme comprises green light time and red light time. Green band control scheme for intersections. And third control information, namely bus shift data, including bus routes and schedules passing through the intersections of the A path and the B path. Special traffic demand data such as emergency vehicle traffic priority, pedestrian crossing time, etc. And analyzing the traffic flow data of the A path and the B path, and identifying the peak time and the congestion time. The period of highest traffic flow at the intersection and the cause of vehicle retention are determined. And (5) evaluating a timing scheme of the intersection signal lamp, and checking whether green light duration and red light duration are matched with actual traffic flow. And (5) evaluating the traffic conditions of buses and special vehicles, and determining the influence degree of traffic jams on the buses and the special vehicles. And according to the traffic flow and the data of the peak time, the green light and red light time length of the intersection signal lamp is adjusted so as to better match the traffic flow. According to the shift data of the buses, the schedule of the buses passing through the intersections is adjusted so as to reduce the residence time of the buses at the intersections. Priority traffic is provided to emergency vehicles, such as for example, a temporary signal light adjustment during periods of congestion to ensure that emergency vehicles pass quickly.
By the arrangement, the traffic management decision information is obtained according to the first control information, the second control information and the third control information, and the operation and the service quality of the traffic system can be optimized.
In a possible implementation manner, referring to fig. 8, the road includes at least two signal devices, and in step S290, after the synchronization setting is performed based on the period information of the signal devices and the first road condition to obtain the green band control information, the real-time traffic flow prediction method based on deep learning further includes:
s296, based on the green band control information, controls the first signal device to enter a signal adjustment state. The signal adjustment state is used for reminding the user of time or priority of the signal equipment.
It will be appreciated that the first signal device is controlled in accordance with the green band control information to bring the first signal device into a signal conditioning state. Once the first signaling device enters the signal conditioning state, the user may be alerted to the time or priority of the signaling device in different ways. For example, a countdown or related prompts may be displayed on an information panel of the system.
The first signal equipment is controlled to enter a signal adjustment state based on the green wave band control information, so that the signal equipment can be coordinated and matched in a certain range to form a continuous green light passing time window. Therefore, vehicles can pass through a plurality of adjacent intersections in a smoother mode, the stopping time and delay are reduced, and the overall traffic efficiency is improved.
S297, if the first electronic device cannot receive the control response fed back by any one of the two signal devices, the first signal device receives the first adjustment signal sent by the second signal device when the first signal device enters the signal adjustment state. The first adjusting signal is used for determining the signal duration adjusting condition of the second signal equipment.
It will be appreciated that the system may be provided with a monitoring mechanism for detecting whether a control response of either of the first signal device and the second signal device has been received. If the system fails to receive any control response, it is indicated that a communication failure or control failure may exist. When the first signal device enters the signal adjustment state, the first signal device receives a first adjustment signal sent by the second signal device, and the first signal device may use the first adjustment signal to determine a signal duration adjustment condition of the second signal device, where the first adjustment signal may include information about a working state, a duration adjustment progress, or other relevant information of the second signal device.
If the first electronic device cannot receive the control response fed back by any one of the two signal devices, the first signal device receives the first adjustment signal sent by the second signal device when the first signal device enters the signal adjustment state, so that the first signal device and the second signal device can share adjustment data, and coordination and cooperation between the first signal device and the second signal device can realize collaborative operation of signal adjustment work even if the system cannot control the first signal device or the second signal device.
S298, the first signal device transmits a first adjustment response to the second signal device. The first adjustment response is used for indicating the second signal equipment to maintain the signal adjustment state after receiving the first adjustment response, and the second signal equipment is in the signal adjustment state when sending out the first adjustment signal.
It will be appreciated that when the first signal device detects that the second signal device is in a signal adjustment state via the first adjustment signal and it is required to send an adjustment response, it will send a first adjustment response to the second signal device in accordance with the communication protocol, the first adjustment response containing information about the adjustment state and progress of the signal duration of the first signal device. After receiving the first adjustment response, the second signal device needs to analyze and process the first adjustment response, and can adjust its own adjustment state according to the information of the first adjustment response so as to ensure coordination and synchronization with the first signal device, for example, further signal adjustment work is performed according to the information in the first adjustment response, or its own working state is adjusted so as to adapt to the requirements of the first signal device, so as to realize cooperative work.
The first signal equipment sends the first adjustment response to the second signal equipment, so that the work of the two signal equipment can be effectively coordinated and synchronized, traffic jam is avoided, travel efficiency and comfort of a user are improved, and user experience is improved.
In a possible implementation manner, referring to fig. 9, in step S290, after the synchronization setting is performed based on the signal device period information and the first road condition to obtain the green band control information, the real-time traffic flow prediction method based on deep learning further includes:
S2991, if the first electronic device cannot receive the control response fed back by any one of the two signal devices, and if the first signal device enters the non-signal adjustment state, the first signal device receives the second adjustment signal sent by the second signal device. Wherein the second signal device is in a signal conditioning state when the second conditioning signal is sent out.
It will be appreciated that the system may be provided with a monitoring mechanism for detecting whether a control response of either of the first signal device and the second signal device has been received. If the system fails to receive any control response, it is indicated that a communication failure or control failure may exist. And under the condition that the first signal equipment enters a non-signal adjustment state, the first signal equipment receives a second adjustment signal sent by the second signal equipment. This may be the case where the first signal and the second signal do not require signal conditioning, so that when the first signal device enters a non-signal conditioning state, the second signal is required to also enter a non-signal conditioning state.
If the first electronic device cannot receive the control response fed back by any one of the two signal devices, the first signal device receives the second adjustment signal sent by the second signal device when the first signal device enters the non-signal adjustment state, so that the first signal device and the second signal device can share adjustment data, and coordination and cooperation between the first signal device and the second signal device can realize collaborative operation of signal adjustment work even if the system cannot control the first signal device or the second signal device.
S2992, in response to receiving the second adjustment signal, the first signal device does not send a second adjustment response to the second signal device, so that the second signal device exits the signal adjustment state.
It can be appreciated that after the first signal device receives the second adjustment signal, whether the second adjustment response needs to be sent may be determined according to a preset protocol or a signal analysis mechanism. The first signal device may choose not to send the second adjustment response if it is desired to take the second signal device out of the signal adjustment state. In the case that the first signal device does not send the second adjustment response, the second signal device may set a timeout mechanism, and if the second adjustment response of the first signal device is not received within a certain time, the adjustment state is automatically exited, so that the first signal and the second signal may not be subjected to signal adjustment.
Thus, in response to receiving the second adjustment signal, the first signal device does not send the second adjustment response to the second signal device, so that the second signal device exits the signal adjustment state, the work of the two signal devices can be effectively coordinated and synchronized, and the traffic management efficiency is improved.
In a possible implementation manner, referring to fig. 10, in step S400, when the geographic location reflected by the location data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value, generating first road condition information includes:
S440, dividing road sections in a preset geographic column to obtain traffic flow data in each area.
It is understood that the range of road segments contained within the geographic bar may be determined. Road segments within a geographic column are divided into multiple regions, each of which may be an intersection, road segment, or other specific geographic area. The division of the areas can be performed according to the change of traffic flow, the structure of the road network and other relevant factors. Vehicle monitoring devices, such as traffic cameras, vehicle sensors or vehicle counters, etc., are installed in each of the divided areas, and can be used to monitor the passing condition of the vehicle in real time and record vehicle flow data.
The road sections in the preset geographic columns are divided to obtain the traffic flow data in each area, so that a decision maker can be helped to determine the traffic bottleneck area and optimize the road layout and the timing scheme, the problem of traffic jam is solved, and the overall traffic efficiency is improved.
S450, acquiring vehicle speed data in the traffic data.
For example, traffic sensors and monitoring devices, such as traffic cameras, radar or sensors, may be mounted on the roadway. These devices can calculate the average speed of the vehicle by measuring the time and location of the vehicle's passage. .
By the arrangement, the data support can be provided for the follow-up optimization of road layout and timing scheme by acquiring the vehicle speed data in the traffic data, so that the traffic jam problem is solved, and the overall traffic efficiency is improved.
S460, generating first road condition information in each area based on the vehicle speed data and the vehicle flow data.
It will be appreciated that the average speed of the vehicles in each zone is calculated and combined with the traffic flow data to generate a traffic situation index. For example, vehicle speed data may be divided into several ranges (e.g., clear, creep, congested), and traffic condition indices calculated based on the number of vehicles and speed profile. This may provide information about the degree of traffic congestion in different areas. Traffic congestion hotspots in each region are identified based on vehicle speed and traffic flow data. By analysing the decrease in vehicle speed and the increase in vehicle flow, the location and severity of the congestion can be determined, which can provide information about which areas have congestion problems, i.e. first road situation information. For example, vehicle speed data may be used to calculate average vehicle speed and minimum vehicle speed, while vehicle flow data may be used to determine vehicle density on a road. If the average vehicle speed is below a certain threshold (e.g., 40 km/h) and the vehicle density is above a certain level, it may be determined that traffic congestion is present in the area.
The road condition information in each area is generated based on the vehicle speed data and the vehicle flow data, and the road congestion condition can be timely identified and monitored, so that corresponding traffic management measures such as adjusting the duration of a signal lamp, optimizing traffic flow distribution, providing traffic guiding service and the like are adopted, the traffic congestion is effectively relieved, and the road traffic efficiency is improved.
S500, when a road adjustment response of the second electronic device is not received in the first period, generating second road condition information when the road congestion value of the next period is detected to be higher than a first preset value and the geographic position reflected by the position data is in a preset geographic column, and transmitting the road condition information to the second electronic device.
For example, when the road adjustment response of the second electronic device is not received in the first period, it is indicated that the user using the second electronic device stops the vehicle in the parking area without traveling demand, or delays the current traveling plan, the road congestion value of the next period may be obtained, the position data of the second electronic device is checked, whether the position data is within the preset geographical area is confirmed, and whether the road congestion condition meets the condition of generating the second road condition information is determined by comparing the road congestion value of the next period with the first preset value. If the position data is in the geographical area and the road congestion value is higher than the first preset value, generating second road condition information according to the actual condition, including a road name, a congestion level, a predicted passing time, a traffic condition description and the like, and sending the generated second road condition information to the second electronic equipment in a pushing notification, a short message, an in-application message and the like mode so as to remind a user of the road condition of the next period and suggest a proper trip route.
When the road adjustment response of the second electronic device is not received in the first period, and the road congestion value of the next period is detected to be higher than the first preset value, and the geographic position reflected by the position data is in the preset geographic column, second road condition information is generated, and the road condition information is sent to the second electronic device, so that a user can be helped to make a better trip decision in the next period, traffic congestion is avoided, trip efficiency and comfort of the user are improved, and user experience is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Corresponding to the real-time traffic flow prediction method based on deep learning described in the above embodiment, the embodiment of the present application further provides a real-time traffic flow prediction system based on deep learning, where each unit of the system may implement each step of the real-time traffic flow prediction method based on deep learning. Fig. 11 is a block diagram of a real-time traffic flow prediction system based on deep learning according to an embodiment of the present application, and only a portion related to the embodiment of the present application is shown for convenience of explanation.
Referring to fig. 11, a real-time traffic flow prediction system based on deep learning, comprising:
the first acquisition unit is used for acquiring traffic data in real time. The traffic data are used for reflecting traffic flow and road conditions.
The determining unit is used for inputting the traffic data of the current time period into the prediction model to obtain the road congestion value of each time period in the preset time period after the current time period output by the prediction model. The prediction model is obtained by means of deep learning.
And the second acquisition unit is used for acquiring the position data of the second electronic equipment.
The first generation unit is used for generating first road condition information and sending the road condition information to the second electronic equipment when the geographic position reflected by the position data is in a preset geographic column and the road congestion value in the current time period is higher than a first preset value. The first road condition information is used for indicating the congestion level of the road in the preset geographic bar so as to enable a user using the second electronic equipment to conduct travel road selection.
The second generating unit is used for generating second road condition information when the road adjustment response of the second electronic device is not received in the first period, and the road congestion value of the next period is detected to be higher than a first preset value and the geographic position reflected by the position data is in a preset geographic column, and sending the second road condition information to the second electronic device.
It should be noted that, because the content of information interaction and execution process between the above systems/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that the above-described functional units are merely illustrated in terms of their division for convenience and brevity, and that in practical applications, the above-described functional units may be allocated to different functional units as needed, i.e., the internal structure of the system may be divided into different functional units to perform all or part of the above-described functions. The functional units in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application. The specific working process of the units in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a first electronic device, and fig. 12 is a schematic structural diagram of the first electronic device according to an embodiment of the application. As shown in fig. 12, the first electronic device 6 of this embodiment includes at least one processor 60 (only one is shown in fig. 12), at least one memory 61 (only one is shown in fig. 12), and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60, which when executed by the processor 60 causes the first electronic device 6 to implement the steps of any of the respective deep learning based real-time traffic flow prediction method embodiments described above, or causes the first electronic device 6 to implement the functions of the respective units of the system embodiments described above.
Illustratively, the computer program 62 may be partitioned into one or more units that are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more elements may be a series of computer program instruction segments capable of performing the specified functions describing the execution of the computer program 62 in the first electronic device 6.
For example, the first electronic device may be a mobile terminal such as a tablet, a notebook, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a desktop, a smart-large-screen, a computing device with wireless communication capabilities, or other processing device connected to a wireless modem, a car networking terminal, a computer, a laptop, a handheld communication device, a handheld computing device, or the like. The first electronic device 6 may include, but is not limited to, a processor 60, a memory 61. It will be appreciated by those skilled in the art that fig. 12 is merely an example of the first electronic device 6 and is not meant to be limiting as to the first electronic device 6, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, buses, etc.
The Processor 60 may be a central processing unit (Central Processing Unit, CPU), the Processor 60 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may in some embodiments be an internal storage unit of the first electronic device 6, such as a hard disk or a memory of the first electronic device 6. The memory 61 may also be an external storage device of the first electronic device 6 in other embodiments, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the first electronic device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the first electronic device 6. The memory 61 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 61 may also be used for temporarily storing data that has been output or is to be output.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, performs the steps of any of the various method embodiments described above.
Embodiments of the present application provide a computer program product for causing a first electronic device to carry out the steps of any of the respective method embodiments described above when the computer program product is run on the first electronic device.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium can include at least any entity or means capable of carrying computer program code to a first electronic device, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed first electronic device and the real-time traffic flow prediction method based on deep learning may be implemented in other manners. For example, the first electronic device embodiment described above is merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing embodiments are merely illustrative of the technical solutions of the present application, and not restrictive, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that modifications may still be made to the technical solutions described in the foregoing embodiments or equivalent substitutions of some technical features thereof, and that such modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.