A flow rate prediction method, apparatus and device
By acquiring historical signal cycle traffic data of the target intersection and combining it with the signal cycle duration, the target flow rate is predicted, solving the problem of inaccurate traffic flow prediction in existing technologies and realizing flow rate and traffic volume prediction at the signal cycle level.
Patent Information
- Application Number
- CN202310710702.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-06-14
AI Technical Summary
The lack of effective methods in the current technology to accurately and reliably predict traffic flow over a future period results in insufficient accuracy of traffic flow prediction at the signal cycle level.
By acquiring traffic flow data from multiple historical signal cycles at the target intersection, utilizing machine-readable storage media, analyzing license plate recognition data to obtain vehicle traffic flow, and combining this with signal cycle duration, the target traffic flow rate is predicted based on historical traffic rates, thereby achieving traffic rate and flow prediction at the signal cycle level.
It improves the accuracy and precision of traffic flow prediction, realizes the prediction of flow rate and volume at the signal cycle level, and solves the problem of insufficient prediction accuracy in existing technologies.
Smart Images

Figure CN119152669B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent transportation, and particularly relates to a flow rate prediction method, device and equipment. BACKGROUND
[0002] Accurate and real-time traffic prediction is an important part of an intelligent transportation system, and is of great significance to urban traffic planning, traffic management and traffic control. For example, in an intelligent transportation system, signal periods and phases are often finely adjusted in combination with flow and other indicators in a future period of time, so as to better meet actual traffic demand, and therefore, flow in the future period of time needs to be predicted.
[0003] However, how to predict flow in a future period of time does not have a reasonable prediction manner in the related art, and there are problems of low prediction accuracy, inability to obtain accurate and reliable flow, and the like. SUMMARY
[0004] The present application provides a flow rate prediction method, which comprises:
[0005] acquiring flow data of a target intersection in a plurality of historical signal periods in front of a current signal period; wherein the flow data comprises flow of each lane and signal period duration of the historical signal period; wherein signal period durations of different historical signal periods are the same or different;
[0006] for each historical signal period, determining a historical flow rate of each lane in the historical signal period corresponding to the historical signal period based on the flow data of the historical signal period; wherein the historical flow rate of each lane in the historical signal period corresponding to the historical signal period is determined based on the flow of the lane and the signal period duration;
[0007] predicting a target flow rate of each lane in a target signal period corresponding to the target signal period based on the historical flow rates of each lane in the plurality of historical signal periods corresponding to the target signal period, the target signal period being located behind the current signal period.
[0008] The present application provides a flow rate prediction device, which comprises:
[0009] an acquisition module, configured to acquire flow data of a target intersection in a plurality of historical signal periods in front of a current signal period; wherein the flow data comprises flow of each lane and signal period duration of the historical signal period; wherein signal period durations of different historical signal periods are the same or different;
[0010] The processing module is configured to determine, for each historical signal period, a historical flow rate of each lane in the historical signal period based on traffic data of the historical signal period, wherein the historical flow rate of each lane in the historical signal period is determined based on traffic of the lane and a signal period duration.
[0011] The historical flow rate of each lane in the historical signal period is determined based on traffic of the lane and a signal period duration.
[0012] The historical flow rate of each lane in the historical signal period is determined based on traffic of the lane and a signal period duration.
[0013] The historical flow rate of each lane in the historical signal period is determined based on traffic of the lane and a signal period duration. BRIEF DESCRIPTION OF DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the description of the embodiments of the present application or the prior art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art according to these drawings of the embodiments of the present application.
[0015] Figure 1 is a flowchart of the flow rate prediction method in an embodiment of the present application;
[0016] Figure 2 is a flowchart of the flow rate prediction method in an embodiment of the present application;
[0017] Figure 3 is a flowchart of the flow rate prediction method in an embodiment of the present application;
[0018] Figure 4is a flowchart of a process of predicting a target flow rate and a target flow in an embodiment of the present application;
[0019] Figure 5A is a structural diagram of a target prediction model in an embodiment of the present application;
[0020] Figure 5B is a diagram of a training process of a target prediction model in an embodiment of the present application;
[0021] Figure 5C is a diagram of a target flow rate prediction process in an embodiment of the present application;
[0022] Figure 6A is a structural diagram of a target prediction model in an embodiment of the present application;
[0023] Figure 6B is a diagram of a training process of a target prediction model in an embodiment of the present application;
[0024] Figure 6C is a diagram of a target flow rate and target flow prediction process in an embodiment of the present application;
[0025] Figure 7 is a structural diagram of a flow rate prediction device in an embodiment of the present application;
[0026] Figure 8 is a hardware structural diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the description of the embodiments of the present application and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0028] It should be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order of the information. These terms are used only to distinguish one type of information from another. For example, a first information can be termed a second information, and similarly, a second information can be termed a first information, without departing from the scope of the present application. Furthermore, the word "if" can be interpreted as meaning "when" or "upon" or "in response to determining" depending on the context.
[0029] An embodiment of the present application proposes a flow rate prediction method, as shown in Figure 1 the method comprises:
[0030] Step 101: Obtain traffic flow data for multiple historical signal cycles preceding the current signal cycle at the target intersection; wherein, the traffic flow data may include the traffic flow of each lane and the signal cycle duration of the historical signal cycle; wherein, the signal cycle duration of different historical signal cycles may be the same or different.
[0031] Step 102: For each historical signal cycle, determine the historical flow rate of each lane in that historical signal cycle based on the traffic flow data of that historical signal cycle; wherein, the historical flow rate of each lane in that historical signal cycle can be determined based on the traffic flow of that lane and the duration of the signal cycle.
[0032] Step 103: Based on the historical flow rates of each lane in multiple historical signal cycles, predict the target flow rate of each lane in the target signal cycle, where the target signal cycle is located after the current signal cycle.
[0033] For example, the signal cycle duration corresponding to the target signal cycle can also be obtained; for each lane, the target flow rate corresponding to the target signal cycle can be determined based on the target flow rate of the lane and the signal cycle duration of the target signal cycle.
[0034] For example, determining the target flow rate of the lane in the target signal period based on the target flow rate of the lane in that target signal period and the signal period duration of the target signal period may include, but is not limited to: determining the target flow rate v of the lane in the target signal period. i The signal period duration C corresponding to the target signal period, and the obtained weight parameter matrix W. i Determine the target flow rate Q of the lane corresponding to the target signal cycle. i For example, the target flow rate Q for that lane during the target signal cycle can be determined using the following formula. i Q i =W i Cv i Of course, the above formula is just an example and is not intended to be limiting.
[0035] For example, determining the historical flow rate for each lane in a given historical signal period based on traffic flow data can include, but is not limited to, using the following formula to determine the historical flow rate for each lane in that historical signal period: In the above formula, v i,j Q represents the historical flow rate of the i-th lane in the j-th historical signal period. i,j C represents the traffic flow of the i-th lane in the j-th historical signal cycle. ja signal cycle duration representing a jth signal cycle.
[0036] In a possible implementation, the weight parameter matrix can be a parameter in the target prediction model, and the target prediction model can include but is not limited to a conversion layer and a prediction layer. Based on this, the flow data of a plurality of historical signal cycles can be input to the conversion layer, and the conversion layer can determine the historical flow rate of each lane in the plurality of historical signal cycles based on the flow data of the plurality of historical signal cycles. Then, the historical flow rate of each lane in the plurality of historical signal cycles is input to the prediction layer, and the prediction layer can predict the target flow rate of each lane in the target signal cycle based on the historical flow rate.
[0037] In a possible implementation, the target prediction model can further include an inverse conversion layer. Based on this, the target flow rate of each lane in the target signal cycle and the signal cycle duration of the target signal cycle can also be input to the inverse conversion layer. The inverse conversion layer can determine the target flow of each lane in the target signal cycle based on the signal cycle duration of the target signal cycle, the target flow rate, and the weight parameters in the inverse conversion layer.
[0038] Additionally, the target prediction model can be trained by the following steps: obtaining sample data and label data. The sample data can include first flow data of a plurality of sample signal cycles, and the first flow data includes the flow of each lane and the signal cycle duration. The label data can include second flow data of a future signal cycle of the plurality of sample signal cycles, and the second flow data includes the real flow rate of each lane and the real flow of each lane. The sample data is input to an initial prediction model, so that the initial prediction model determines the sample flow rate of each lane in the future signal cycle based on the sample data, and determines the sample flow of each lane in the future signal cycle based on the sample data. Based on the difference between the sample flow rate and the real flow rate, and the difference between the sample flow and the real flow, a loss value is calculated, the network parameters of the initial prediction model are adjusted based on the loss value, and the target prediction model is determined based on the adjusted prediction model.
[0039] Additionally, the signal cycle is the total cycle required for all phases of the target intersection to be released once.
[0040] From the above technical solutions, in the embodiments of the present application, the target flow rate of each lane in the target signal period can be predicted based on the flow data of multiple historical signal periods, the flow rate in a future period of time (i.e., the target flow rate of each lane in the target signal period) can be predicted, the prediction accuracy and the prediction precision can be improved, and an accurate and reliable flow rate can be obtained. By introducing the flow of each lane at the signal period level and the signal period length, the flow prediction is converted into flow rate prediction, and then the flow rate prediction at the signal period level is realized. Based on the flow rate prediction result, the flow prediction result can also be obtained, so as to realize the flow prediction at the signal period level, that is, a signal period level urban road network lane flow prediction method is proposed, the prediction result at the signal period level can be obtained, and the flow rate prediction and flow prediction at the signal period level are realized.
[0041] The above technical solutions of the embodiments of the present application will be described below in combination with specific application scenarios.
[0042] Before introducing the technical solutions of the embodiments of the present application, technical terms related to the present application are introduced.
[0043] Equal-interval prediction and unequal-interval prediction: Equal-interval prediction refers to prediction based on equal-interval sampled time series data, such as collecting multiple 5-minute time series data and predicting based on the multiple 5-minute time series data. Unequal-interval prediction refers to prediction based on unequal-interval sampled time series data (i.e., time series data with uneven sampling intervals), such as collecting 1-minute time series data, 2-minute time series data, 3-minute time series data, etc., and predicting based on these time series data.
[0044] Signal control scheme: Based on the signal control scheme, the signal light can be used to allocate the right-of-way to vehicles or pedestrians in certain directions in turn, that is, the signal control scheme is used to control the order of the signal light in each direction.
[0045] Target intersection: The intersection to be predicted is referred to as a target intersection, and the target intersection can be any intersection. The target intersection can correspond to multiple phases, and a phase is a signal state corresponding to one or more traffic flows that obtain the right-of-way at the same time. There can be multiple phases in a signal period, for example, the east-west direction is one phase, and the north-south direction is another phase, and the two form a signal period.
[0046] In addition, the target intersection can include multiple lanes, and in the present application, the flow rate prediction and flow prediction are performed at the lane level, such as 3 lanes in the north-south direction and 4 lanes in the east-west direction.
[0047] Signal cycle: the total cycle required for all phases of the target intersection to be released once, that is, the total cycle length required for the signal control scheme to release all phases once. For example, assuming that the target intersection corresponds to phase A and phase B, the time required for phase A to be released once is 50 seconds, and the time required for phase B to be released once is 100 seconds, then the signal cycle is 150 seconds. The total length of different signal cycles can be the same or different, for example, the total length of each signal cycle is 150 seconds during the time period of 8:00-9:00, and the total length of each signal cycle is 200 seconds during the time period of 9:00-10:00.
[0048] Effective green time: the length of the effective vehicle passing time in a signal cycle or a single phase time, after removing the start-up loss time, driver reaction loss time, yellow light time and all-red light time.
[0049] Flow: the number of vehicles passing through the target intersection in a certain statistical cycle, such as 5-minute flow, 15-minute flow, etc., such as 5-minute flow refers to the number of vehicles passing through the target intersection in a lane within 5 minutes.
[0050] Flow rate: the number of vehicles passing through the target intersection in a lane per unit time, such as the number of vehicles passing per hour in the case of a statistical time less than 1 hour.
[0051] In the intelligent transportation system, it is often necessary to combine the flow and other indicators in the future period of time to finely adjust the signal cycle and phase, so as to meet the actual traffic demand, therefore, it is necessary to predict the flow in the future period of time. However, how to predict the flow in the future period of time, there is no reasonable prediction method in the related art, there are problems of low prediction accuracy, inability to obtain accurate and reliable flow, etc.
[0052] For example, in the related art, an equal-interval prediction scheme is usually used, that is, a plurality of time series data (i.e., flow data) are sampled at equal intervals, such as collecting a plurality of 5-minute flow data, and predicting based on the plurality of 5-minute flow data. However, when collecting flow data at a granularity of 5 minutes, the 5-minute flow data will include flow data of multiple signal cycles, and the last signal cycle in the 5-minute time window may be cut off. When predicting the flow in the future period of time with 5-minute granularity flow data, accurate and reliable flow cannot be predicted, which will cause a large precision loss.
[0053] For the above finding, the embodiment of the present application proposes a flow rate prediction method. By introducing the flow of each lane in the signal cycle level and the signal cycle length, the flow prediction is converted into the flow rate prediction, and the flow rate prediction in the signal cycle level is realized. Based on the flow rate prediction result, the flow prediction result can also be obtained, so as to realize the flow prediction in the signal cycle level. That is, a lane flow prediction method in the signal cycle level of urban road network is proposed, which can obtain the prediction result in the signal cycle level, realize the flow rate prediction and flow prediction in the signal cycle level.
[0054] By using the flow data in the signal cycle for prediction, non-equidistant prediction is realized, that is, the flow data in the signal cycle of 1 minute, the flow data in the signal cycle of 2 minutes, the flow data in the signal cycle of 3 minutes, etc. are collected. Based on these flow data in the signal cycle, non-equidistant prediction is realized. The flow in a future period of time is predicted based on the flow data in the signal cycle level, and an accurate and reliable prediction result can be obtained. By proposing a signal cycle level road network lane flow prediction scheme based on license plate recognition data, the lane flow prediction in the signal cycle level is realized by introducing the lane flow data in the signal cycle level and the signal timing scheme, and the problem of loss of signal control algorithm accuracy caused by equidistant prediction is solved.
[0055] It should be noted that all the data (such as flow data, signal cycle length, etc.) involved in the embodiment are obtained and used only under the premise that the relevant users are informed and authorized.
[0056] First, in order to realize the flow rate prediction in the signal cycle level, the flow data in the signal cycle level needs to be obtained. The flow data can include the flow of each lane in the signal cycle corresponding to the signal cycle length. Referring to FIG. 1, it is a flowchart for obtaining flow data. The process can include: Figure 2
[0057] Step 201, license plate recognition based on image to obtain original vehicle passing data.
[0058] For example, by analyzing the image, the license plate identifier can be obtained, and the time point at which the license plate identifier passes each intersection can be determined. The relationship between the license plate identifier and the time point at which the license plate identifier passes each intersection constitutes the original vehicle passing data. That is, the original vehicle passing data can include a plurality of vehicle data, and each vehicle data includes the relationship between a license plate identifier and the time point at which the license plate identifier passes each intersection.
[0059] Step 202, counting the number of vehicle passes according to the signal cycle to obtain the flow corresponding to each lane.
[0060] For example, the target intersection can include multiple lanes, all the license plate identifiers passing through the target intersection can be found from the original passing vehicle data, and based on the time points of each intersection passed by the license plate identifier, the driving direction of the license plate identifier can be known, such as east-west driving, west-east driving, north-south driving, north-south driving, etc., and then the lane corresponding to the license plate identifier is known.
[0061] For each lane of the target intersection, based on the lanes corresponding to all the license plate identifiers passing through the target intersection, the number of passing vehicles for each lane can be counted, so that for each signal period, the number of passing vehicles corresponding to each lane in the signal period can be counted. For example, the number of passing vehicles corresponding to lane A in signal period T1, the number of passing vehicles corresponding to lane B in signal period T1, the number of passing vehicles corresponding to lane A in signal period T2, the number of passing vehicles corresponding to lane B in signal period T2, and so on.
[0062] After obtaining the number of passing vehicles corresponding to the lane in the signal period, the traffic corresponding to the lane in the signal period can be determined based on the number of passing vehicles, that is, the number of vehicles for the lane in the signal period. For example, the traffic corresponding to lane A in signal period T1, the traffic corresponding to lane B in signal period T1, the traffic corresponding to lane A in signal period T2, the traffic corresponding to lane B in signal period T2, and so on.
[0063] For example, after obtaining the traffic corresponding to each lane in the signal period, preprocessing operations such as outlier filtering and missing value filling can also be performed. The outlier filtering refers to removing abnormal traffic, and the missing value filling refers to filling missing traffic.
[0064] Step 203, obtaining signal period level traffic data, which can include the traffic corresponding to each lane in the signal period and the signal period duration of the signal period.
[0065] For example, assuming that the target intersection corresponds to lane A and lane B, the traffic data includes the traffic corresponding to lane A in signal period T1, the traffic corresponding to lane B in signal period T1, the signal period duration of signal period T1 (the signal period duration can be a parameter of the signal light of the target intersection, and the acquisition method is not limited), the traffic corresponding to lane A in signal period T2, the traffic corresponding to lane B in signal period T2, the signal period duration of signal period T2, and so on. The traffic data of multiple signal periods is obtained.
[0066] It should be noted that the total duration of different signal periods can be the same or different, for example, the total duration of signal period T1 and the total duration of signal period T2 can be the same or different.
[0067] Second, based on the traffic data of multiple signal periods, the target flow rate of each lane in the target signal period can be predicted, see Figure 3 The flowchart for predicting the target flow rate is shown in FIG. 3, and the process includes:
[0068] Step 301, obtain the traffic data of multiple historical signal periods before the current signal period, which can include the traffic of each lane and the signal period length of the historical signal period.
[0069] The current signal period is the signal period currently being executed at the target intersection, and the signal period before the current signal period is referred to as a historical signal period. For example, the K signal periods before the current signal period are historical signal periods, and the K signal periods can be consecutive signal periods or non-consecutive signal periods.
[0070] For each historical signal period, the traffic data of the historical signal period can be obtained, and the obtaining method can refer to Figure 2 The traffic data includes the traffic of each lane corresponding to the historical signal period and the signal period length corresponding to the historical signal period, which will not be repeated here.
[0071] For example, the total length of different historical signal periods can be the same, and the total length of different historical signal periods can also be different, i.e. the traffic data of historical signal periods with different lengths can be obtained.
[0072] Step 302, for each historical signal period, determine the historical flow rate of each lane corresponding to the historical signal period based on the traffic data of the historical signal period, i.e. determine the historical flow rate of the lane corresponding to the historical signal period based on the traffic of the lane corresponding to the historical signal period and the signal period length.
[0073] For example, the historical flow rate of lane A corresponding to historical signal period T1 is determined based on the traffic of lane A corresponding to historical signal period T1 and the signal period length of historical signal period T1, the historical flow rate of lane B corresponding to historical signal period T1 is determined based on the traffic of lane B corresponding to historical signal period T1 and the signal period length of historical signal period T1, the historical flow rate of lane A corresponding to historical signal period T2 is determined based on the traffic of lane A corresponding to historical signal period T2 and the signal period length of historical signal period T2, and the historical flow rate of lane B corresponding to historical signal period T2 is determined based on the traffic of lane B corresponding to historical signal period T2 and the signal period length of historical signal period T2, and so on.
[0074] In one possible implementation, the historical flow rate can be determined by using the following formula: v i = Q i / G i . Wherein, vi Q represents the historical flow rate of the i-th lane in the j-th historical signal cycle. i G represents the flow of the i-th lane in the j-th historical signal cycle. i C represents the signal cycle duration of the j-th signal cycle. Of course, the above formula is only an example, and the determination of the historical flow rate is not limited.
[0075] In another possible implementation, since the lane flow rate at the signal cycle level has large fluctuation, the accuracy of direct prediction is relatively low, and therefore, the average flow rate of the m historical signal cycles before the j-th historical signal cycle (including the j-th historical signal cycle itself) can be taken as the historical flow rate of the j-th historical signal cycle, and the flow data of the adjacent n historical signal cycles are taken as input to calculate the historical flow rate of each lane in the historical signal cycle. For example, the historical flow rate of the lane in the historical signal cycle can be determined by using the following formula (1), and of course, the formula (1) is only an example.
[0076]
[0077] In the formula (1), v i,j Q represents the historical flow rate of the i-th lane (the i-th lane can be any lane) in the j-th historical signal cycle. i,j G represents the flow of the i-th lane in the j-th historical signal cycle. i,j-m+1 + Q i,j-m+2 + Q i,j C represents the sum of the flows of the m historical signal cycles before the j-th historical signal cycle. j C represents the signal cycle duration of the j-th signal cycle. j-m+1 + C j-m+2 + C j C represents the sum of the signal cycle durations of the m historical signal cycles before the j-th historical signal cycle. As can be seen, the historical flow rate v i,j represents the average flow rate of the m historical signal cycles before the j-th historical signal cycle.
[0078] Step 303, predicting the target flow rate of each lane in the target signal cycle based on the historical flow rate of each lane in the multiple historical signal cycles, and the target flow rate is the flow rate prediction result.
[0079] Exemplarily, a signal period behind the current signal period can be referred to as a target signal period, i.e., a signal period in a future period of time, the number of target signal periods can be 1, and the number of target signal periods can also be multiple. Taking 1 target signal period as an example, the target signal period can be an Mth signal period behind the current signal period, M can be 1, 2, 3, etc., and the value of M is not limited.
[0080] After obtaining the historical flow rates of each lane corresponding to the multiple historical signal periods, the target flow rates of each lane corresponding to the target signal period can be predicted based on the historical flow rates. The prediction manner of the target flow rates is not limited as long as the target flow rates can be predicted. For example, the target flow rate of lane A corresponding to the target signal period and the target flow rate of lane B corresponding to the target signal period are predicted.
[0081] For example, all the historical flow rates can be input into a network model (such as a neural network model, a deep learning network model, etc.), and the network model outputs the target flow rates of each lane corresponding to the target signal period. Of course, other algorithms can also be used to obtain the target flow rates of each lane corresponding to the target signal period.
[0082] Thirdly, based on the traffic data of multiple signal periods, the target flow rates of each lane corresponding to the target signal period can be predicted, and the target flow of each lane corresponding to the target signal period can be predicted. Referring to FIG. 4, which is a flowchart for predicting the target flow rate and the target flow, the process can include: Figure 4
[0083] Step 401, obtaining the traffic data of multiple historical signal periods in front of the current signal period, the traffic data can include the flow of each lane and the signal period duration of the historical signal period.
[0084] Step 402, for each historical signal period, determining the historical flow rate of each lane corresponding to the historical signal period based on the traffic data of the historical signal period, i.e., determining the historical flow rate of the lane corresponding to the historical signal period based on the flow of the lane corresponding to the historical signal period and the signal period duration.
[0085] Step 403, predicting the target flow rate of each lane corresponding to the target signal period based on the historical flow rates of each lane corresponding to the multiple historical signal periods, and the target flow rate is the flow rate prediction result.
[0086] Step 404, obtaining the signal period duration corresponding to the target signal period.
[0087] Exemplarily, the signal period duration corresponding to the target signal period can be configured by the user, indicating that the target signal period is controlled by using the configured signal period duration, or the signal period duration corresponding to the target signal period can be obtained by using an algorithm, and no limitation is made in this regard.
[0088] At step 405, for each lane, the target flow rate of the lane in the target signal period is determined based on the target flow rate of the lane in the target signal period and the signal period duration of the target signal period, and the target flow rate is the flow prediction result, i.e., the flow in the target signal period.
[0089] For example, the target flow rate of lane A in the target signal period is determined based on the target flow rate of lane A in the target signal period and the signal period duration of the target signal period, the target flow rate of lane B in the target signal period is determined based on the target flow rate of lane B in the target signal period and the signal period duration of the target signal period, and so on.
[0090] In a possible implementation, the target flow rate can be determined by using the following formula: Q i = Cv i . Wherein, Q i represents the target flow rate of the ith lane in the target signal period, C represents the signal period duration of the target signal period, and v i represents the target flow rate of the ith lane in the target signal period. Of course, the above formula is only an example, and no limitation is made to the determination manner of the target flow rate.
[0091] In a possible implementation, the target flow rate of the lane in the target signal period can be determined based on the target flow rate of the lane in the target signal period, the signal period duration of the target signal period, and the obtained weight parameter matrix. The weight parameter matrix can be a parameter in the target prediction model, can be a pre-configured parameter, or can be a parameter obtained by using other manners, and no limitation is made in this regard. For example, the target flow rate can be determined by using the following formula: Q i = W i Cv i . W i represents the weight parameter matrix corresponding to the ith lane, and the addition of the weight parameter matrix W i can improve the adaptability of the flow prediction of different lanes and further improve the prediction accuracy. As to the obtaining manner of the weight parameter matrix W i , the parameters in the target prediction model can be trained to be used as the weight parameter matrix, and no limitation is made in this regard.
[0092] Fourth, based on the flow data of multiple signal periods, the flow data of multiple signal periods is input to the target prediction model to obtain the target flow rate of each lane corresponding to the target signal period, that is, the target prediction model predicts the target flow rate of each lane corresponding to the target signal period. The structure of the target prediction model, the training process of the target prediction model, and the target flow rate prediction process based on the target prediction model are described below.
[0093] Referring to Figure 5A As shown in the structure diagram of the target prediction model, the target prediction model can include a conversion layer and at least one prediction layer. For example, the target prediction model can be a prediction model based on a neural network, or a prediction model based on deep learning, such as a time series model or a time series model, etc. For example, it can be a prediction model based on LSTM (Long Short Term Memory), a prediction model based on GRU (Gate Recurrent Unit), a prediction model based on TCN, a prediction model based on STGCN, a prediction model based on ASTGCN, a prediction model based on STAWnet, etc. The type of target prediction model is not limited.
[0094] The input data of the target prediction model is the flow data of multiple historical signal periods, which includes the flow of each lane and the signal period length of the historical signal period. The total length of different historical signal periods can be the same or different, that is, the total length of the historical signal period can be non-equidistant. The output data of the target prediction model is the target flow rate of each lane corresponding to the target signal period, that is, the flow rate prediction result.
[0095] For the conversion layer, the conversion layer is used to convert the flow data into the historical flow rate of each lane corresponding to the historical signal period. For example, the historical flow rate of each lane is obtained by the flow of each lane of the historical signal period and the signal period length corresponding to the historical signal period. Since the lane flow rate at the signal period level has large volatility, the accuracy of direct prediction is relatively low, so the average flow rate of the m historical signal periods (including the jth historical signal period itself) before the jth historical signal period can be taken as the historical flow rate of the jth historical signal period. A total of n adjacent historical signal periods are used as the input of the prediction layer, so that the prediction layer calculates the historical flow rate of each lane corresponding to the historical signal period. The calculation formula of the prediction layer can be referred to the above formula (1), which will not be repeated here.
[0096] For n prediction layers, the n prediction layers can include multiple layers of neural network hidden layers for predicting a target flow rate of each lane in a target signal period, i.e., a flow rate prediction result. For example, the n prediction layers can perform convolution operations, activation operations, fully connected operations, etc., and finally predict the target flow rate. For example, the prediction layers can be LSTM, GRU, TCN in a time sequence model, or STGCN, ASTGCN, STAWnet in a space-time sequence model, and the structure of the prediction layers is not limited.
[0097] Referring to Figure 5B As shown in the figure, the process can include:
[0098] In step 511, a training set is obtained, which can include sample data and label data corresponding to the sample data, and the number of sample data can be multiple. For each sample data, the sample data includes first traffic data of multiple sample signal periods, and the first traffic data includes traffic of each lane and signal period duration. The label data corresponding to the sample data includes second traffic data of a future signal period of the multiple sample signal periods, and the second traffic data includes real flow rates of each lane.
[0099] For example, a certain signal period can be taken as a reference signal period (i.e., a current signal period), K signal periods before the reference signal period can be taken as K sample signal periods (i.e., historical signal periods), and the Mth signal period after the reference signal period can be taken as a future signal period (i.e., a target signal period).
[0100] Referring to Figure 2 As shown in the figure, traffic data of each signal period can be obtained, i.e., first traffic data of each sample signal period and second traffic data of a future signal period. For each sample signal period, the first traffic data of the sample signal period includes traffic of each lane in the sample signal period and signal period duration of the sample signal period. For the future signal period, the second traffic data of the future signal period includes real flow rates of each lane in the future signal period. Since the traffic of each lane in the future signal period can be obtained, the traffic can be converted into real flow rates.
[0101] In step 512, an initial prediction model is obtained, which can include a conversion layer and at least one prediction layer. For example, n prediction layers are taken, and referring to Figure 5A As shown in the figure, the initial prediction model can be a pre-configured model or a model obtained in other ways, and the initial prediction model is not limited.
[0102] Step 513, inputting the sample data in the training set into the initial prediction model, so that the initial prediction model determines the sample flow rate of each lane corresponding to the future signal period based on the sample data.
[0103] For example, after inputting the sample data (such as multiple sample data) in the training set into the initial prediction model, the first flow data can be converted into the flow rate of each lane corresponding to the sample signal period by the conversion layer of the initial prediction model, for example, the flow rate is converted by the above formula (1). Then, the flow rate of each lane corresponding to the sample signal period can be input into the prediction layer, and the sample flow rate of each lane corresponding to the future signal period is predicted by n prediction layers, and the prediction process is not limited.
[0104] Step 514, calculating the loss value based on the difference between the sample flow rate and the true flow rate, and adjusting the network parameters of the initial prediction model based on the loss value to obtain an adjusted prediction model.
[0105] Suppose that the target intersection corresponds to lane A and lane B, the loss value can be calculated based on the difference between the sample flow rate of lane A in the future signal period and the true flow rate of lane A in the future signal period, and the difference between the sample flow rate of lane B in the future signal period and the true flow rate of lane B in the future signal period.
[0106] For example, the loss function can be designed in advance, the input of the loss function is the difference between the sample flow rate and the true flow rate, and the output of the loss function is the loss value, so that after the difference between the sample flow rate and the true flow rate (such as the difference between the sample flow rate and the true flow rate of lane A, and the difference between the sample flow rate and the true flow rate of lane B) is substituted into the loss function, the loss value can be obtained, and the loss function is not limited.
[0107] After obtaining the loss value, the network parameters (such as the network parameters of the conversion layer and the network parameters of each prediction layer) of the initial prediction model can be adjusted based on the loss value, such as using gradient descent method to adjust the network parameters, and the adjustment method is not limited, to obtain an adjusted prediction model.
[0108] Step 515, determining the target prediction model based on the adjusted prediction model. For example, if the adjusted prediction model has converged, the adjusted prediction model can be used as the target prediction model, if the adjusted prediction model has not converged, the adjusted prediction model can be used as the initial prediction model, and the process returns to step 513, and so on, until the adjusted prediction model has converged, and the adjusted prediction model is used as the target prediction model.
[0109] Exemplarily, a test set can be acquired in the same way as the training set, and the test set includes sample data and label data corresponding to the sample data. For each sample data, the sample data includes first traffic data of a plurality of sample signal periods, and the first traffic data includes traffic of each lane and signal period duration. The label data corresponding to the sample data includes second traffic data of a future signal period of the plurality of sample signal periods, and the second traffic data includes a real flow rate of each lane.
[0110] The prediction accuracy corresponding to the adjusted prediction model can be determined based on the test set. If the prediction accuracy corresponding to the adjusted prediction model is greater than a convergence threshold (the convergence threshold can be configured according to experience, such as 95%, 98%, etc.), it can be determined that the adjusted prediction model has converged. If the prediction accuracy corresponding to the adjusted prediction model is not greater than the convergence threshold, it can be determined that the adjusted prediction model has not converged. For example, after the sample data is input into the adjusted prediction model, if the prediction result is the same as the label data, the number of correct predictions is increased by 1, and if the prediction result is different from the label data, the number of incorrect predictions is increased by 1. In this way, the number of correct predictions p1 and the number of incorrect predictions p2 can be counted, and the prediction accuracy corresponding to the adjusted prediction model can be determined based on the number p1 and the number p2, such as the prediction accuracy can be p1 / (p1+p2).
[0111] In another possible implementation, if the number of iterations of the adjusted prediction model is greater than a preset number threshold (which can be configured according to experience), it is determined that the adjusted prediction model has converged. If the number of iterations of the adjusted prediction model is not greater than the preset number threshold, it is determined that the adjusted prediction model has not converged.
[0112] In another possible implementation, if the iteration duration of the adjusted prediction model is greater than a preset duration threshold (which can be configured according to experience), it is determined that the adjusted prediction model has converged. If the iteration duration of the adjusted prediction model is not greater than the preset duration threshold, it is determined that the adjusted prediction model has not converged.
[0113] Of course, the above is only an example, and the convergence condition in the present embodiment is not limited.
[0114] Referring to Figure 5C As shown in the figure, it is a schematic diagram of a target flow rate prediction process based on a target prediction model.
[0115] In step 521, traffic data of a plurality of historical signal periods before the current signal period is acquired, and the traffic data can include traffic of each lane and signal period duration corresponding to the historical signal periods.
[0116] Exemplarily, the total time length of different historical signal periods can be the same, and the total time length of different historical signal periods can also be different, that is, the traffic data of historical signal periods with different time lengths can be obtained.
[0117] In step 522, the traffic data of multiple historical signal periods is input to a conversion layer of the target prediction model, and for each historical signal period, the historical flow rate of each lane in the historical signal period is determined by the conversion layer based on the traffic data of the historical signal period, that is, the historical flow rate of each lane in the historical signal period is determined based on the traffic of the lane in the historical signal period and the signal period time length of the historical signal period.
[0118] For example, the conversion layer can determine the historical flow rate by using the above formula (1), which will not be described here.
[0119] In step 523, the historical flow rate of each lane in multiple historical signal periods is input to the prediction layer, and the target flow rate of each lane in the target signal period is predicted by the prediction layer based on the historical flow rate.
[0120] For example, after obtaining the historical flow rate of each lane in multiple historical signal periods, the prediction layer can predict the target flow rate of each lane in the target signal period based on the historical flow rate, and the prediction method of the target flow rate is not limited as long as the target flow rate can be predicted.
[0121] Fifthly, the traffic data of multiple historical signal periods and the signal period time length corresponding to the target signal period are input to the target prediction model, and the target flow rate of each lane in the target signal period and the target flow rate are predicted by the target prediction model. The structure of the target prediction model, the training process of the target prediction model, and the prediction process of the target flow rate and the target flow rate based on the target prediction model are described below.
[0122] Referring to FIG. 8, Figure 6A As shown in FIG. 8, the structure of the target prediction model can include a conversion layer, at least one prediction layer, and an inverse conversion layer, taking n prediction layers as an example. The input data of the target prediction model is the traffic data of multiple historical signal periods and the signal period time length corresponding to the target signal period, and the total time length of different historical signal periods can be the same or different. The output data of the target prediction model can be the target flow rate of each lane in the target signal period (i.e., the flow rate prediction result) and the target flow rate of each lane in the target signal period (i.e., the flow prediction result).
[0123] For the conversion layer, the conversion layer is used to convert the traffic data into historical flow rates of each lane in a historical signal cycle. For the n prediction layers, the n prediction layers are used to predict target flow rates of each lane in a target signal cycle, i.e., flow rate prediction results of the prediction layers. For the inverse conversion layer, the inverse conversion layer is used to obtain target traffic of each lane in the target signal cycle Q i (i.e., the flow rate prediction results of the prediction layers) and a signal cycle duration C (i.e., the input data) corresponding to the target signal cycle, in combination with a weight parameter matrix W i corresponding to each lane, to obtain the target traffic Q i (i.e., the traffic prediction results of the inverse conversion layer). The addition of the weight parameter matrix can improve the adaptability of the model to the traffic prediction of different lanes, and further improve the prediction accuracy of the model. The specific formula can be as shown below: Q i = W i Cv i .
[0124] Referring to FIG. 7, a schematic diagram of a training process of a target prediction model is shown. The process can include the following steps. Figure 6B In step 611, a training set is obtained. The training set can include sample data and label data corresponding to the sample data, and the number of sample data can be multiple. For each sample data, the sample data can include first traffic data of a plurality of sample signal cycles and a signal cycle duration of a future signal cycle. The first traffic data can include traffic of each lane in the sample signal cycle and a signal cycle duration of the sample signal cycle. The label data corresponding to the sample data can include second traffic data of the future signal cycle. The second traffic data can include real flow rates of each lane and real traffic of each lane.
[0125] In step 612, an initial prediction model is obtained. The initial prediction model can include a conversion layer, at least one prediction layer, and an inverse conversion layer. Referring to FIG. 8, an example of n prediction layers is described.
[0126] Figure 6A In step 613, the sample data in the training set is input to the initial prediction model, so that the initial prediction model determines sample flow rates of each lane corresponding to the future signal cycle based on the sample data, and the initial prediction model determines sample traffic of each lane corresponding to the future signal cycle based on the sample data.
[0127] In step 613, the sample data in the training set is input to the initial prediction model, so that the initial prediction model determines sample flow rates of each lane corresponding to the future signal cycle based on the sample data, and the initial prediction model determines sample traffic of each lane corresponding to the future signal cycle based on the sample data.
[0128] For example, after inputting sample data from the training set into the initial prediction model, the transformation layer of the initial prediction model can convert the first traffic flow data into the flow rate corresponding to each lane in the sample signal period. Then, the flow rate corresponding to each lane in the sample signal period can be input into the prediction layer, and n prediction layers can predict the sample flow rate corresponding to each lane in future signal periods. Then, the sample flow rate corresponding to each lane in future signal periods and the signal period duration of the future signal periods can be input into the inverse transformation layer. In this way, the inverse transformation layer can predict the target flow rate v of each lane in the future signal periods. i The signal cycle duration C of the future signal cycle, combined with the weight parameter matrix W corresponding to each lane. i The sample traffic flow Q for each lane in the future signal cycle is obtained. i , such as Q i =W i Cv i .
[0129] Step 614: Calculate the loss value based on the difference between the sample flow rate and the actual flow rate, and the difference between the sample flow rate and the actual flow rate. Adjust the network parameters of the initial prediction model based on this loss value to obtain the adjusted prediction model. For example, a loss function can be pre-designed. Assuming the target intersection corresponds to lane A and lane B, the inputs to the loss function can be the difference between the sample flow rate and the actual flow rate of lane A in a future signal cycle, the difference between the sample flow rate and the actual flow rate of lane A in a future signal cycle, the difference between the sample flow rate and the actual flow rate of lane B in a future signal cycle, and the difference between the sample flow rate and the actual flow rate of lane B in a future signal cycle. The output of the loss function is the loss value. Obviously, after substituting the above differences into the loss function, the loss value can be obtained.
[0130] Step 615: Determine the target prediction model based on the adjusted prediction model. For example, if the adjusted prediction model has converged, it can be used as the target prediction model; if the adjusted prediction model has not converged, it can be used as the initial prediction model, and the process returns to step 613. This continues until the adjusted prediction model has converged, at which point it is used as the target prediction model.
[0131] See Figure 6C The diagram illustrates the target flow rate prediction process and the target traffic volume prediction process based on the target prediction model. The target flow rate prediction process and the target traffic volume prediction process may include:
[0132] Step 621: Obtain traffic flow data from multiple historical signal cycles preceding the current signal cycle. This traffic flow data may include the traffic flow of each lane and the signal cycle duration of the historical signal cycles.
[0133] For example, the total duration of different historical signal cycles can be the same or different, so that traffic data of historical signal cycles of different durations can be obtained.
[0134] Step 622: Obtain the signal period duration corresponding to the target signal period.
[0135] Step 623: Input the traffic flow data of multiple historical signal cycles into the conversion layer of the target prediction model. For each historical signal cycle, the conversion layer determines the historical flow rate of each lane in that historical signal cycle based on the traffic flow data of that historical signal cycle. That is, the historical flow rate of the lane in that historical signal cycle is determined based on the traffic flow of the lane in that historical signal cycle and the signal cycle duration of the historical signal cycle.
[0136] Step 624: Input the historical flow rate of each lane in multiple historical signal cycles into the prediction layer, and predict the target flow rate of each lane in the target signal cycle based on the historical flow rate.
[0137] Step 625: Input the target flow rate and signal cycle duration for each lane during the target signal cycle into the inverse conversion layer. The inverse conversion layer determines the target flow rate for each lane during the target signal cycle based on the signal cycle duration, the target flow rate, and the weight parameters in the inverse conversion layer.
[0138] For example, the inverse conversion layer can be configured to detect the target flow rate v of each lane during the target signal period. i The signal period duration C corresponding to the target signal period, combined with the weight parameter matrix W corresponding to each lane. i The target flow rate Q for each lane during the target signal period is obtained. i For example, the inverse conversion layer uses the following formula to determine the target flow: Q i =W i Cv i W i W represents the weight parameter matrix corresponding to the i-th lane. i The addition of this feature can improve the adaptability of traffic flow prediction for different lanes and increase prediction accuracy.
[0139] From the above technical solutions, in the embodiments of the present application, the target flow rate of each lane in a target signal period can be predicted based on the flow data of multiple historical signal periods, the flow rate in a future period of time can be predicted, the prediction accuracy and precision can be improved, and an accurate and reliable flow rate can be obtained. By introducing the lane flow of each signal period and the signal period length, any equidistant flow prediction model can be converted into a non-equidistant prediction model, flow prediction is converted into flow rate prediction, and then signal period level flow rate prediction is realized. Based on the flow rate prediction result, the flow prediction result can also be obtained, thereby realizing signal period level flow prediction, i.e., a signal period level urban road network lane flow prediction method is proposed, the prediction result of the signal period level can be obtained, and signal period level flow rate prediction and flow prediction are realized. By increasing the conversion layer and the inverse conversion layer, any equidistant flow prediction model can be converted into a non-equidistant prediction model, and the prediction result of the signal period dimension can be directly output. By introducing the weight parameter matrix in the inverse conversion layer, the adaptability of the model to different lane flow prediction can be improved, and the prediction accuracy is further improved.
[0140] By introducing the lane flow of each signal period and the signal period length, the original traffic flow prediction is converted into flow rate prediction, and then signal period level lane flow prediction is realized, the problem of accuracy loss of signal control algorithm caused by equidistant prediction is solved, and the prediction lag problem during peak period flow sudden change is reduced. By taking the average lane flow rate of the previous several signal periods as the lane flow rate of the current signal period, the volatility of the data is reduced, and the accuracy of the prediction algorithm is improved.
[0141] Based on the same application concept as the above method, in the embodiments of the present application, a flow rate prediction device is proposed, as shown in Figure 7 The device can include:
[0142] The acquisition module 71 is configured to acquire flow data of a target intersection in multiple historical signal periods before a current signal period; wherein the flow data includes the flow of each lane and the signal period length of the historical signal period; wherein the signal period lengths of different historical signal periods are the same or different;
[0143] The processing module 72 is configured to, for each historical signal period, determine the historical flow rate of each lane in the historical signal period based on the flow data of the historical signal period; wherein the historical flow rate of each lane in the historical signal period is determined based on the flow and the signal period length of the lane;
[0144] The target flow rate of each lane in a target signal period is predicted based on the historical flow rate of each lane in the multiple historical signal periods, and the target signal period is located behind the current signal period.
[0145] Exemplarily, the acquisition module 71 is further configured to acquire a signal period duration corresponding to the target signal period; and the processing module 72 is further configured to determine, for each lane, a target traffic flow of the lane in the target signal period based on a target flow rate of the lane in the target signal period and the signal period duration of the target signal period.
[0146] Exemplarily, when determining the target traffic flow of the lane in the target signal period based on the target flow rate of the lane in the target signal period and the signal period duration of the target signal period, the processing module 72 is specifically configured to determine the target traffic flow of the lane in the target signal period based on the target flow rate of the lane in the target signal period v i , the signal period duration C of the target signal period, and the acquired weight parameter matrix W i , by using the following formula: i Q i = W i Cv i .
[0147] Exemplarily, when determining the historical flow rate of each lane in the historical signal period based on the traffic flow data of the historical signal period, the processing module 72 is specifically configured to determine the historical flow rate of the lane in the historical signal period by using the following formula: wherein v i,j represents the historical flow rate of the i-th lane in the j-th historical signal period, Q i,j represents the traffic flow of the i-th lane in the j-th historical signal period, and C j represents the signal period duration of the j-th signal period.
[0148] Exemplarily, the weight parameter matrix is a parameter in a target prediction model, and the target prediction model comprises a conversion layer and a prediction layer; and the processing module 72 is specifically configured to input the traffic flow data of the plurality of historical signal periods to the conversion layer, determine the historical flow rate of each lane in the plurality of historical signal periods based on the traffic flow data by using the conversion layer, input the historical flow rate of each lane in the plurality of historical signal periods to the prediction layer, and predict the target flow rate of each lane in the target signal period based on the historical flow rate by using the prediction layer.
[0149] Exemplarily, if the target prediction model further comprises a reverse conversion layer, the processing module 72 is specifically configured to: input the target flow rate of each lane corresponding to the target signal period and the signal period duration of the target signal period into the reverse conversion layer; and determine the target flow of each lane corresponding to the target signal period based on the signal period duration, the target flow rate and the weight parameter in the reverse conversion layer through the reverse conversion layer.
[0150] Exemplarily, the processing module 72 is further configured to train the target prediction model by: obtaining sample data and label data, wherein the sample data comprises first flow data of a plurality of sample signal periods, and the first flow data comprises flow of each lane and signal period duration; the label data comprises second flow data of a future signal period of the plurality of sample signal periods, and the second flow data comprises real flow rate of each lane and real flow of each lane; inputting the sample data into an initial prediction model, so that the initial prediction model determines sample flow rate of each lane corresponding to the future signal period based on the sample data, and determines sample flow of each lane corresponding to the future signal period based on the sample data; calculating a loss value based on a difference between the sample flow rate and the real flow rate, and a difference between the sample flow and the real flow; adjusting network parameters of the initial prediction model based on the loss value; and determining the target prediction model based on the adjusted prediction model.
[0151] Based on the same application concept as the above method, an electronic device is provided in the embodiments of the present application, as shown in Figure 8 The electronic device comprises a processor 81 and a machine readable storage medium 82, the machine readable storage medium 82 stores machine executable instructions which can be executed by the processor 81; and the processor 81 is configured to execute the machine executable instructions to implement the flow rate prediction method disclosed in the above examples of the present application.
[0152] Based on the same application concept as the above method, the embodiments of the present application further provide a machine readable storage medium, and the machine readable storage medium stores a plurality of computer instructions, and the computer instructions can implement the flow rate prediction method disclosed in the above examples of the present application when executed by a processor.
[0153] The machine-readable storage medium described above can be any electronic, magnetic, optical, or other physical storage device that contains or stores information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be a Random Access Memory (RAM), an Electrically Programmable Memory (EPROM), an Electrically Erasable Programmable Analytical Memory (EEPROM), a flash memory, a hard disk, a solid state drive, any type of storage disk (e.g., a compact disk (CD), a dvd, etc.), or the like. The machine-readable storage medium can also be a combination of these storage devices.
[0154] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by a computer entity or by a product having certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an e-mail device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0155] For the convenience of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of the units can be implemented in one or more software and / or hardware in the implementation of the present application.
[0156] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, a disk storage, a CD-ROM, an optical storage, etc.) containing computer-usable program code.
[0157] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as a combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device implemented in accordance with the flowcharts and / or block diagrams. Figure One The device for implementing the functions specified in one flow or multiple flows and / or one block or multiple blocks. Figure One The device for implementing the functions specified in one flow or multiple flows and / or one block or multiple blocks.
[0158] Moreover, these computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure One The flow Figure One The flow
[0159] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure One The flow Figure One Figure One The flow
[0160] The embodiments of the present application described above are merely given as examples and are not intended to limit the present application. Various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall fall within the scope of claims of the present application.
Claims
1. A flow rate prediction method, characterized in that, The method includes: Obtain traffic flow data for multiple historical signal cycles preceding the current signal cycle at the target intersection; wherein the traffic flow data includes the traffic flow of each lane and the signal cycle duration of the historical signal cycle; wherein the signal cycle durations of different historical signal cycles may be the same or different; For each historical signal cycle, the historical flow rate for each lane in that historical signal cycle is determined based on the traffic flow data. The historical flow rate for each lane in that historical signal cycle is determined based on the traffic flow of that lane and the duration of the signal cycle. Determining the historical flow rate for each lane in that historical signal cycle based on the traffic flow data includes using the following formula: ;in, Indicates the first The first lane in Historical flow rate corresponding to each historical signal period, Indicates the first The first lane in The flow rate of a historical signal cycle Indicates the first The duration of a signal cycle; The target flow rate of each lane in the target signal period is predicted based on the historical flow rate of each lane in the multiple historical signal periods, wherein the target signal period is located after the current signal period; wherein the historical flow rate of each lane in the multiple historical signal periods is input to the target prediction model, and the target prediction model outputs the target flow rate of each lane in the target signal period.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the signal period duration corresponding to the target signal period; For each lane, the target flow rate of the lane in the target signal period is determined based on the target flow rate of the lane in the target signal period and the signal period duration of the target signal period.
3. The method according to claim 2, characterized in that, Determining the target flow rate of the lane in the target signal period based on the target flow rate of the lane in the target signal period and the signal period duration of the target signal period includes: Based on the target flow rate of the lane during the target signal period The signal period duration corresponding to the target signal period The obtained weight parameter matrix The target flow rate for that lane during the target signal period is determined using the following formula. : .
4. The method according to claim 3, characterized in that, The weight parameter matrix is the parameter in the target prediction model, and the target prediction model includes a transformation layer and a prediction layer; The traffic flow data of the multiple historical signal cycles is input to the conversion layer, and the conversion layer determines the historical flow rate of each lane corresponding to the multiple historical signal cycles based on the traffic flow data. The historical flow rate of each lane corresponding to the multiple historical signal periods is input to the prediction layer, and the prediction layer predicts the target flow rate of each lane corresponding to the target signal period based on the historical flow rate.
5. The method according to claim 4, characterized in that, If the target prediction model further includes an inverse conversion layer, then the target flow rate of each lane corresponding to the target signal period and the signal period duration of the target signal period are input to the inverse conversion layer. The inverse conversion layer determines the target flow rate for each lane during the target signal period based on the signal cycle duration, the target flow rate, and the weight parameters in the inverse conversion layer.
6. The method according to claim 5, characterized in that, The method further includes training the target prediction model using the following steps: Acquire sample data and label data. The sample data includes first flow data for multiple sample signal cycles, where the first flow data includes the flow rate and signal cycle duration for each lane. The label data includes second flow data for future signal cycles of the multiple sample signal cycles, where the second flow data includes the actual flow rate and actual flow rate for each lane. The sample data is input into the initial prediction model so that the initial prediction model can determine the sample flow rate of each lane in the future signal cycle based on the sample data, and determine the sample traffic volume of each lane in the future signal cycle based on the sample data. Based on the difference between the sample flow rate and the true flow rate, and the difference between the sample flow rate and the true flow rate, a loss value is calculated. Based on the loss value, the network parameters of the initial prediction model are adjusted, and the target prediction model is determined based on the adjusted prediction model.
7. A flow rate prediction device, characterized in that, The device includes: The acquisition module is used to acquire traffic flow data of the target intersection for multiple historical signal cycles preceding the current signal cycle; wherein, the traffic flow data includes the traffic flow of each lane and the signal cycle duration of the historical signal cycle; wherein, the signal cycle duration of different historical signal cycles may be the same or different; The processing module is used to determine the historical flow rate of each lane for each historical signal cycle based on the traffic flow data of that historical signal cycle; wherein, the historical flow rate of each lane for that historical signal cycle is determined based on the traffic flow of that lane and the duration of the signal cycle; specifically, when determining the historical flow rate of each lane for that historical signal cycle based on the traffic flow data of that historical signal cycle, the processing module uses the following formula to determine the historical flow rate of the lane for that historical signal cycle: ;in, Indicates the first The first lane in Historical flow rate corresponding to each historical signal period, Indicates the first The first lane in The flow rate of a historical signal cycle Indicates the first The duration of a signal cycle; The target flow rate of each lane in the target signal period is predicted based on the historical flow rate of each lane in the multiple historical signal periods, wherein the target signal period is located after the current signal period; wherein the historical flow rate of each lane in the multiple historical signal periods is input to the target prediction model, and the target prediction model outputs the target flow rate of each lane in the target signal period.
8. The apparatus according to claim 7, characterized in that, in, The acquisition module is further configured to acquire the signal cycle duration corresponding to the target signal cycle; the processing module is further configured to, for each lane, determine the target flow rate corresponding to the target signal cycle based on the target flow rate of the lane corresponding to the target signal cycle and the signal cycle duration of the target signal cycle. Specifically, when the processing module determines the target flow rate of the lane in the target signal period based on the target flow rate of the lane in the target signal period and the signal period duration of the target signal period, it is used to: determine the target flow rate of the lane in the target signal period. The signal period duration corresponding to the target signal period The obtained weight parameter matrix The target flow rate for that lane during the target signal period is determined using the following formula. : ; Wherein, the weight parameter matrix is a parameter in the target prediction model, and the target prediction model includes a conversion layer and a prediction layer; the processing module is specifically used to: input the traffic flow data of the multiple historical signal periods to the conversion layer, and determine the historical flow rate of each lane corresponding to the multiple historical signal periods based on the traffic flow data; input the historical flow rate of each lane corresponding to the multiple historical signal periods to the prediction layer, and predict the target flow rate of each lane corresponding to the target signal period based on the historical flow rate; If the target prediction model further includes an inverse conversion layer, the processing module is specifically used to: input the target flow rate of each lane corresponding to the target signal period and the signal period duration of the target signal period to the inverse conversion layer; and determine the target flow rate of each lane corresponding to the target signal period based on the signal period duration, the target flow rate, and the weight parameters in the inverse conversion layer. The processing module is further configured to train a target prediction model using the following steps: acquiring sample data and label data, wherein the sample data includes first flow data for multiple sample signal periods, the first flow data including the flow rate and signal period duration for each lane; the label data includes second flow data for future signal periods of the multiple sample signal periods, the second flow data including the actual flow rate and actual flow rate for each lane; inputting the sample data into an initial prediction model, so that the initial prediction model determines the sample flow rate corresponding to each lane in the future signal period based on the sample data, and determines the sample flow rate corresponding to each lane in the future signal period based on the sample data; calculating a loss value based on the difference between the sample flow rate and the actual flow rate, and the difference between the sample flow rate and the actual flow rate; adjusting the network parameters of the initial prediction model based on the loss value; and determining the target prediction model based on the adjusted prediction model.
9. An electronic device, characterized in that, include: A processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; The processor is configured to execute machine-executable instructions to implement the method of any one of claims 1-6.
Citation Information
Patent Citations
Adaptive signal control method based on adjacent cyclic flow difference value prediction
CN109559513A
Method and device for determining traffic scheme
CN110503822A