Traffic passing demand prediction method, storage medium and system
By combining traffic flow and traffic flow in red lights, traffic traffic is predicted, and the problem of large prediction errors in the existing technology is solved, and more accurate traffic demand prediction and optimized traffic signal control is achieved.
Patent Information
- Application Number
- CN202311824470.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
When the prior art uses traffic flow to predict traffic demand, the error is large, and the predicted traffic demand is not accurate enough, resulting in unoptimized traffic signal control and further aggravate congestion.
Combining the traffic flow through and the traffic flow waiting for red lights, the actual traffic demand is predicted by obtaining the number of vehicles in the historical sliding window at the target lane stop line and the number of vehicles that have not passed the stop line but are within a preset distance.
It improves the accuracy of traffic demand, avoids errors caused by ignoring the traffic demand of congested vehicles, and ensures the optimization effect of traffic signal control.
Smart Images

Figure CN120220381A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic control, and in particular, to a traffic passing demand prediction method, a storage medium, and a system. Background Art
[0002] With the continuous increase in the number of motor vehicles, urban roads are often congested.
[0003] In order to relieve the congestion of urban roads, a time series prediction model can be established based on the relationship between the traffic volume passing through in the historical traffic signal cycle and the traffic volume passing through in the current traffic signal cycle to predict the traffic volume passing through in the future traffic signal cycle, and the predicted traffic volume passing through in the future traffic signal cycle can be used as the passing demand, and the traffic signal can be controlled and adjusted according to the passing demand.
[0004] However, at present, the error of the passing demand prediction scheme using the traffic volume passing through is relatively large, and the predicted passing demand is not accurate enough. Summary of the Invention
[0005] Based on the above technical problems, the present application provides a traffic passing demand prediction method, a storage medium, and a system, which can combine the traffic volume passing through and the traffic volume waiting for the red light to obtain the actual passing demand for prediction, so as to predict a more accurate passing demand.
[0006] In a first aspect, the present application provides a traffic passing demand prediction method, which includes: obtaining the historical passing demands corresponding to M historical sliding windows at the stop line of the target lane; the historical passing demand is used to indicate the sum of a first number of vehicles and a second number of vehicles; the first number of vehicles is the number of vehicles passing through the stop line of the target lane within the corresponding historical sliding window; the second number of vehicles is the number of vehicles that have not passed through the stop line of the target lane and are within a preset distance after the stop line of the target lane at the end of the corresponding historical sliding window; M is a positive integer; predicting the target passing demand at the stop line of the target lane according to the M historical passing demands; the target passing demand is used to indicate the number of vehicles passing through the stop line of the target lane within a preset time period after the M historical sliding windows.
[0007] It should be understood that the current solution of using traffic flow to determine traffic demand ignores the traffic demand of vehicles that are stuck behind the lane stop line and do not pass through the intersection, resulting in large errors and inaccurate predicted traffic demand. For example, vehicles in the north-south direction are moving slowly, and vehicles in the east-west direction are blocked by vehicles moving slowly in the north-south direction, resulting in a small traffic flow in the east-west direction within a traffic signal cycle. In fact, there are many vehicles stuck in the east-west direction, and the actual traffic demand is large. At this time, if the traffic flow is used as the traffic demand, the traffic demand is small. When controlling and adjusting the traffic signal, it will be mistakenly believed that the traffic demand in the east-west direction is small, and the traffic time (green light duration) of the traffic signal cycle will be reduced, and the non-traffic time (red light duration) will be increased, which will further aggravate the traffic congestion in the east-west direction and form a negative optimization situation.
[0008] The traffic demand prediction method provided by the present application can determine the traffic demand by combining the number of vehicles that pass the stop line of the target lane in the historical sliding window and the number of vehicles that do not pass the stop line of the target lane and are within a preset distance after the stop line of the target lane at the end of the historical sliding window. This can avoid errors caused by ignoring the traffic demand of vehicles that are stuck in the lane and do not pass the intersection after the stop line of the lane. The determined traffic demand is more realistic and more accurate. The traffic signal timing plan formulated according to the traffic demand determined in this way has a better optimization effect.
[0009] Optionally, each historical sliding window includes multiple historical traffic signal cycles; for a first sliding window among the M historical sliding windows, the first sliding window is any one of the M historical sliding windows; obtaining the historical traffic demands corresponding to each of the M historical sliding windows at the stop line of the target lane includes: obtaining the sum of the number of vehicles passing through the stop line of the target lane during the passing time of all traffic signal cycles of the first sliding window, to obtain a first vehicle number; obtaining the number of vehicles that did not pass through the stop line of the target lane and were within a preset distance after the stop line of the target lane at the end of the passing time of the last traffic signal cycle of the first sliding window, to obtain a second vehicle number; obtaining the historical traffic demand corresponding to the first sliding window according to the first vehicle number and the second vehicle number.
[0010] It should be understood that the passing traffic flow is a continuous sequence, which can be collected and calculated according to a sliding window of any duration to represent the traffic flow in a certain time period. In this application, the passing demand takes the unpassed vehicles in the previous traffic signal cycle as the passing vehicles in the next traffic signal cycle, which is a discrete sequence. The predictability of the passing demand will decrease as the statistical duration (i.e., the duration of the sliding window or the historical period) decreases. The duration of a single traffic signal cycle is mostly 1-3 minutes. If a single traffic signal cycle is used as a sliding window, the predictability of the passing demand may be relatively low. The traffic passing demand prediction method provided by this application can use multiple traffic signal cycles as a historical sliding window, increasing the duration of the historical sliding window and the predictability of the passing demand.
[0011] Optionally, the preset time period is a sliding window after M historical sliding windows.
[0012] Optionally, obtaining the historical passing demand corresponding to the first sliding window according to the first vehicle number and the second vehicle number includes: obtaining the required passing vehicle number within the first sliding window according to the sum of the first vehicle number and the second vehicle number; obtaining the passing demand conversion flow rate within the first sliding window as the historical passing demand corresponding to the first sliding window according to the quotient of the required passing vehicle number and the total duration of the historical period.
[0013] It should be understood that the passing traffic flow can be collected according to a sliding window of a fixed duration, so it can be modeled and predicted as a standard time series prediction problem, that is, predicting the passing traffic flow of the next sliding window with the passing traffic flow of one sliding window. The passing demand in this application is strongly bound to the traffic signal cycle and needs to be modeled as an irregular time series. The traffic passing demand prediction method provided by this application can take the average value of the required passing vehicle number within the first sliding window (i.e., the passing demand conversion flow rate within the first sliding window) as the historical passing demand, and obtain the traffic flow that needs to pass per unit time, eliminating the influence of the time length on the historical passing demand, and predicting the passing prediction demand of the next sliding window with the historical passing demand of multiple sliding windows.
[0014] Optionally, obtaining the required passing vehicle number within the first sliding window according to the sum of the first vehicle number and the second vehicle number includes: calculating the required passing vehicle number according to the following formula:
[0015]
[0016] where D n represents the historical passing demand corresponding to the first sliding window including n traffic signal cycles; V i represents the number of vehicles passing through the stop line of the target lane in the i-th traffic signal cycle; represents the first vehicle number; Q n represents the second vehicle number.
[0017] Optionally, according to the quotient of the number of passing vehicles required and the total duration of the historical period, obtain the passing demand conversion flow rate within the first sliding window as the historical passing demand corresponding to the first sliding window, including: calculating the passing demand conversion flow rate according to the following formula:
[0018]
[0019] where s1 represents the passing demand conversion flow rate within the first sliding window including n traffic signal cycles. t i represents the duration of the i-th traffic signal cycle.
[0020] Optionally, according to M historical passing demands, predict the target passing demand at the stop line of the target lane, including: inputting the M historical passing demands into a preset passing demand prediction model to obtain the target passing demand; the passing demand prediction model is used to predict the target passing demand within a preset period after the M historical sliding windows according to the historical passing demands of the M historical sliding windows.
[0021] Optionally, the method further includes: obtaining a training sample set; the training sample set includes a plurality of training samples; each training sample includes the passing demand corresponding to each of the M training sliding windows at the training lane stop line, and a label; the label is the passing demand within a preset period after the M training sliding windows; training a preset regression model based on the training sample set to obtain a passing demand prediction model.
[0022] In a second aspect, the present application provides a traffic passing demand prediction device, which includes each functional module for the method described in the first aspect above.
[0023] In a third aspect, the present application provides an electronic device, which includes a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method described in the first aspect above.
[0024] In a fourth aspect, the present application provides a computer program product, when the computer program product runs in an electronic device, the electronic device is enabled to execute the related method described in the first aspect above to implement the method described in the first aspect above.
[0025] In a fifth aspect, the present application provides a readable storage medium, which includes: software instructions; when the software instructions run in an electronic device, the electronic device is enabled to implement the method described in the first aspect above.
[0026] Sixth aspect, the present application provides a traffic passing demand prediction system, which includes: a vehicle perception device and a traffic signal controller; the vehicle perception device is used to perceive the number of vehicles at the stop line of the target lane; the traffic signal controller is used to predict the target passing demand at the stop line of the target lane according to the number of vehicles perceived by the vehicle perception device by using the method described in the first aspect above.
[0027] The beneficial effects of the second to sixth aspects above can be referred to those described in the first aspect and will not be elaborated here. Description of the Drawings
[0028] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0029] Figure 1 It is a schematic diagram of the composition of the traffic passing demand prediction system provided by the embodiment of the present application;
[0030] Figure 2 It is a schematic diagram of the composition of the electronic device provided by the embodiment of the present application;
[0031] Figure 3 It is a schematic flow chart of the traffic passing demand prediction method provided by the embodiment of the present application;
[0032] Figure 4 It is a schematic diagram of the composition of the passing demand provided by the embodiment of the present application;
[0033] Figure 5 It is a schematic diagram of the prediction comparison between the passing traffic flow and the actual passing demand provided by the embodiment of the present application;
[0034] Figure 6 It is another schematic flow chart of the traffic passing demand prediction method provided by the embodiment of the present application;
[0035] Figure 7 It is a schematic diagram of the release relationship provided by the embodiment of the present application;
[0036] Figure 8 It is another schematic flow chart of the traffic passing demand prediction method provided by the embodiment of the present application;
[0037] Figure 9 It is another schematic flow chart of the traffic passing demand prediction method provided by the embodiment of the present application;
[0038] Figure 10 It is another schematic flow chart of the traffic passing demand prediction method provided by the embodiment of the present application;
[0039] Figure 11 This is a schematic diagram of the composition of the traffic passing demand prediction device provided by the embodiment of the present application. Detailed implementation manners
[0040] Hereinafter, terms such as "first", "second", and "third" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", or "third", etc. may explicitly or implicitly include one or more of such features.
[0041] With the continuous increase in the number of motor vehicles, urban roads are often congested.
[0042] In order to alleviate the congestion of urban roads, a time series prediction model can be established based on the relationship between the traffic volume passing through in the historical traffic signal cycle and the traffic volume passing through in the current traffic signal cycle to predict the traffic volume passing through in the future traffic signal cycle, and the predicted traffic volume passing through in the future traffic signal cycle can be used as the passing demand, and the traffic signal can be controlled and adjusted according to the passing demand.
[0043] For example, the configuration duration of different signals in the traffic signal cycle can be adjusted according to the preset passing demand.
[0044] However, currently, the scheme for predicting the passing demand using the traffic volume passing through has a large error, and the predicted passing demand is not accurate enough.
[0045] Based on this, the embodiment of the present application provides a traffic passing demand prediction method, a storage medium, and a system, which can combine the traffic volume passing through and the traffic volume waiting for the red light to obtain the actual passing demand for prediction, so as to predict a more accurate passing demand.
[0046] The following is an introduction with reference to the accompanying drawings.
[0047] Figure 1 This is a schematic diagram of the composition of the traffic passing demand prediction system provided by the embodiment of the present application. As Figure 1 shown, the system may include: a vehicle perception device 100 and a traffic passing demand prediction device 200. The vehicle perception device 100 and the traffic passing demand prediction device 200 may be connected through a wired network or a wireless network.
[0048] The vehicle perception device 100 may be a device such as a camera, a radar-vision vehicle detector, an induction coil, a geomagnetic detector, etc. that is set at a road intersection and can perceive the passing of vehicles, Figure 1 and the camera is taken as an example for illustration.
[0049] The vehicle sensing device 100 can be used to sense the number of vehicles at the stop line of the target lane.
[0050] For example, the number of vehicles at the stop line of the target lane may include the number of vehicles passing through the lane stop line.
[0051] For another example, the number of vehicles at the stop line of the target lane may further include the number of vehicles within a preset distance after the lane stop line.
[0052] In some embodiments, the vehicle sensing device 100 can also be used to send the sensed number of vehicles to the traffic demand prediction device 200.
[0053] For example, the vehicle sensing device 100 can send sensing information to the traffic demand prediction device 200 according to a preset period (such as a traffic signal period). The sensing information includes the start timestamp (of a traffic signal period), the end timestamp (of the traffic signal period), the number of vehicles passing through the lane stop line between the start timestamp and the end timestamp, and the number of vehicles that have not passed through the lane stop line and are within a preset distance after the end timestamp.
[0054] As described above, the vehicle sensing device 100 and the traffic demand prediction device 200 can be connected through a wired network or a wireless network. Optionally, the wired network or wireless network may include one or more media or devices capable of transmitting the sensing information from the vehicle sensing device 100 to the traffic demand prediction device 200.
[0055] In some embodiments, the wired network or wireless network may include one or more communication media that enable the vehicle sensing device 100 to directly send the sensing information to the traffic demand prediction device 200. In this embodiment, the vehicle sensing device 100 can modulate the sensing information according to a communication standard (such as a wireless communication protocol) and send the modulated sensing information to the traffic demand prediction device 200. The one or more communication media may include wireless, and / or, wired communication media, such as the radio frequency (RF) spectrum or one or more physical transmission lines.
[0056] Optionally, the one or more communication media may form part of a packet-based network, and the packet-based network may be, for example, a local area network, a wide area network, or a global network (such as the Internet).
[0057] Optionally, the one or more communication media may further include routers, switches, base stations, or devices that facilitate communication from the vehicle sensing device 100 to the traffic demand prediction device 200.
[0058] The traffic passing demand prediction device 200 may be a traffic signal controller or other devices connected to the traffic signal controller. The traffic signal controller and other devices may be collectively referred to as electronic devices. Figure 1 Taking a computer as an example for illustration.
[0059] Among them, the other device may be a computing device with computing and processing functions such as a computer, a server, or an algorithm box. The server may be a single server, or alternatively, it may be a server cluster composed of multiple servers. In some embodiments, the server cluster may also be a distributed cluster. Optionally, the server may also be implemented on a cloud platform. For example, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, and a multi-cloud, etc., or any combination thereof. The embodiments of the present application do not limit this.
[0060] The traffic passing demand prediction device 200 may be used to predict the passing demand according to the number of vehicles at the stop line of the target lane sent by the vehicle sensing device 100. The specific process may refer to the traffic passing demand prediction method in the following embodiments and will not be elaborated here.
[0061] In some embodiments, the traffic signal controller may also control the traffic signal lights to emit traffic signals according to the target traffic signal timing plan. The target traffic signal configuration plan is determined based on the passing demand predicted by the traffic passing demand prediction device 200.
[0062] For example, taking the traffic passing demand prediction device 200 as the traffic signal controller, the traffic signal controller may obtain the number of vehicles sent by the vehicle sensing device 100, predict the passing demand according to the number of vehicles, and then determine the target traffic signal timing plan according to the predicted passing demand.
[0063] For another example, taking the above traffic passing demand prediction device 200 as other devices connected to the traffic signal controller, the other device may obtain the number of vehicles sent by the vehicle sensing device 100, predict the passing demand according to the number of vehicles, and then send the predicted passing demand to the traffic signal controller, and the traffic signal controller determines the target traffic signal timing plan according to the predicted passing demand.
[0064] For yet another example, still taking the above traffic passing demand prediction device 200 as other devices connected to the traffic signal controller, the other device may obtain the number of vehicles sent by the vehicle sensing device 100, predict the passing demand according to the number of vehicles, then determine the target traffic signal timing plan according to the predicted passing demand, and then send the target traffic signal timing plan to the traffic signal controller.
[0065] It should be noted that in the above Figure 1 the vehicle perception device 100 and the traffic demand prediction device 200 are taken as examples of independent devices respectively. Optionally, the vehicle perception device 100 and the traffic demand prediction device 200 may also be integrated into one device. That is to say, the vehicle perception device 100 or its corresponding function, and the traffic demand prediction device 200 or its corresponding function may be integrated on one device. For example, as described above, the traffic demand prediction device 200 may be other devices connected to the traffic signal controller, and the other devices may be vehicle perception devices with traffic demand prediction functions. The embodiments of the present application do not limit this.
[0066] The execution subject of the traffic demand prediction method provided by the embodiments of the present application is the above-mentioned traffic demand prediction device 200. As described above, the traffic demand prediction device may be a traffic signal controller or other devices connected to the traffic signal controller (the traffic signal controller or the other devices may be collectively referred to as electronic devices). Optionally, the traffic demand prediction device 200 may also be an application program (APP) installed in the foregoing electronic device and having a traffic demand prediction function; or, the traffic demand prediction device 200 may also be a processor (such as a central processing unit (CPU)) in the foregoing electronic device; or, the traffic demand prediction device 200 may also be a functional module in the foregoing electronic device for executing the traffic demand prediction method. The embodiments of the present application do not limit this.
[0067] For simplicity of description, hereinafter, the traffic demand prediction device 200 is uniformly taken as an example of an electronic device for introduction.
[0068] Figure 2 is a schematic diagram of the composition of the electronic device provided by the embodiments of the present application. As Figure 2 shown, the electronic device may include: a processor 10, a memory 20, a communication line 30, and a communication interface 40.
[0069] Among them, the processor 10, the memory 20, and the communication interface 40 may be connected through the communication line 30.
[0070] A processor 10 is configured to execute instructions stored in a memory 20 to implement the traffic demand prediction method provided in the following embodiments of this application. The processor 10 may be a CPU, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontrol unit (MCU) / single-chip microcomputer, a programmable logic device (PLD), or any combination thereof. The processor 10 may also be any other device with processing capabilities, such as a circuit, a device, or a software module, and the embodiments of this application do not limit this. In one example, the processor 10 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 in Figure 2 shown as an example by a dashed line. As an alternative implementation, the electronic device may include multiple processors. For example, in addition to the processor 10, it may also include a processor 50 (
[0071] shown as an example by a dashed line in
[0072] The memory 20 is configured to store instructions executable by the processor 10. For example, the instructions may be a computer program. Optionally, the memory 20 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or it may be a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, and the embodiments of this application do not limit this.
[0072] It should be noted that the memory 20 may exist independently of the processor 10 or may be integrated with the processor 10. The memory 20 may be located inside the electronic device or outside the electronic device, and the embodiments of this application do not limit this.
[0073] A communication line 30 is configured to transmit information between components included in the electronic device.
[0074] A communication interface 40 for communicating with other devices (such as the vehicle sensing device 100 described above) or other access networks. The other access network can be an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 40 can be a module, a circuit, a transceiver, or any device capable of enabling communication.
[0075] It should be noted that Figure 2 the structure shown in Figure 2 does not constitute a limitation on the electronic device. In addition to the components shown, the electronic device may include more or fewer components than those shown in the figure (for example, only including a processor 10 and a memory 20), or a combination of certain components, or a different component arrangement.
[0076] The following introduces the jigsaw method provided by the embodiments of the present application.
[0077] Figure 3 is a schematic flowchart of the traffic access demand prediction method provided by the embodiments of the present application. Optionally, this method can be executed by an electronic device having the above Figure 2 shown hardware structure. As Figure 3 shown, this method includes S101 to S102.
[0078] S101. Obtain the historical access demands corresponding to M historical sliding windows at the stop line of the target lane.
[0079] Among them, M is a positive integer, and M can be preset in the electronic device by a manager. For example, M can be 5, 6, or 7, etc. The embodiments of the present application do not limit the specific value of M. The historical access demand is used to indicate the sum of the first vehicle number and the second vehicle number. The first vehicle number is the number of vehicles passing through the stop line of the target lane within the corresponding historical sliding window. The second vehicle number is the number of vehicles that have not passed through the stop line of the target lane and are within a preset distance after the stop line of the target lane at the end of the corresponding historical sliding window.
[0080] As described above, the number of vehicles at the stop line of the target lane can be sensed by the vehicle sensing device 100. In this case, the preset distance can be understood as the maximum distance that the vehicle sensing device 100 can sense, or a preset distance within this maximum distance.
[0081] Exemplarily, Figure 4 is a schematic diagram of the composition of the access demand provided by the embodiments of the present application. As Figure 4As shown in the figure, taking a historical sliding window as a traffic signal cycle as an example, a traffic signal cycle can include pass time (green light time) and non-pass time (red light time). Assuming that there are many vehicles congested in the lane, only some vehicles pass during the pass time of a traffic signal cycle ( Figure 4 Five vehicles passing the stop line are shown as an example), and some vehicles are congested in the lane ( Figure 4 (The three vehicles stuck in front of the stop line are used as an example in the figure), but in fact, these stuck vehicles also have a demand to pass through this traffic signal cycle. Therefore, these stuck vehicles can also be counted in the traffic demand.
[0082] S101 can refer to the following Figure 6 S1011 to S1013 are described above and will not be repeated here.
[0083] S102. Predict a target traffic demand at a stop line of a target lane based on M historical traffic demands.
[0084] The target traffic demand is used to indicate the number of vehicles that pass through the stop line of the target lane within a preset period after M historical sliding windows.
[0085] S102 can refer to the following Figure 9 The above is described in S1021, which will not be repeated here.
[0086] For example, Figure 5 This is a schematic diagram of the predicted comparison of traffic flow and actual traffic demand provided in the embodiment of the present application. Figure 5 As shown, the traffic demand determined by the current scheme of determining the traffic demand using the traffic volume is usually small, smaller than the actual traffic demand.
[0087] It should be understood that the current solution of using traffic flow to determine traffic demand ignores the traffic demand of vehicles that are stuck behind the lane stop line and do not pass through the intersection, resulting in large errors and inaccurate predicted traffic demand. For example, vehicles in the north-south direction are moving slowly, and vehicles in the east-west direction are blocked by vehicles moving slowly in the north-south direction, resulting in a small traffic flow in the east-west direction within a traffic signal cycle. In fact, there are many vehicles stuck in the east-west direction, and the actual traffic demand is large. At this time, if the traffic flow is used as the traffic demand, the traffic demand is small. When controlling and adjusting the traffic signal, it will be mistakenly believed that the traffic demand in the east-west direction is small, and the traffic time (green light duration) of the traffic signal cycle will be reduced, and the non-traffic time (red light duration) will be increased, which will further aggravate the traffic congestion in the east-west direction and form a negative optimization situation.
[0088] In the traffic passing demand prediction method provided by the embodiments of the present application, the electronic device can determine the passing demand by combining the number of vehicles passing through the stop line of the target lane within the historical sliding window and the number of vehicles that have not passed through the stop line of the target lane and are within a preset distance after the stop line of the target lane at the end of the historical sliding window. This can avoid errors caused by ignoring the passing demand of vehicles that are congested and have not passed through the intersection after the lane stop line, and the determined passing demand is more in line with the actual situation and more accurate. The traffic signal timing plan formulated according to the passing demand determined in this way has a better optimization effect.
[0089] The above S101 will be introduced below.
[0090] In some possible embodiments, each historical sliding window may include multiple historical traffic signal cycles. For the first sliding window among the M historical sliding windows, the first sliding window is any one of the M historical sliding windows. Figure 6 It is another schematic flowchart of the traffic passing demand prediction method provided by the embodiments of the present application. As Figure 6 shown, the above S101 may specifically include S1011 to S1013.
[0091] S1011. Obtain the total number of vehicles passing through the stop line of the target lane during the passing time of all traffic signal cycles in the first sliding window to obtain the first number of vehicles.
[0092] Among them, the traffic signal cycle may include passing time and non-passing time. Taking traffic lights as an example, the passing time can be understood as the green light time, and the non-passing time may include the red light time.
[0093] S1012. Obtain the number of vehicles that have not passed through the stop line of the target lane and are within a preset distance after the stop line of the target lane at the end of the passing time of the last traffic signal cycle in the first sliding window to obtain the second number of vehicles.
[0094] S1013. Obtain the historical passing demand corresponding to the first sliding window according to the first number of vehicles and the second number of vehicles.
[0095] In a possible implementation manner, the electronic device can directly use the sum of the first number of vehicles and the second number of vehicles as the historical traffic demand corresponding to the first sliding window.
[0096] Exemplarily, Figure 7 It is a schematic diagram of the release relationship provided by the embodiments of the present application. As Figure 7As shown, taking the first sliding window including three traffic signal cycles from top to bottom as an example, in the first traffic signal cycle, some passing vehicles passed, and some vehicles did not pass the lane stop line, which can be understood as non-passing vehicles. The non-passing vehicles in the first traffic signal cycle wait until the second traffic signal cycle and can pass the lane stop line as passing vehicles in the second traffic signal cycle. And so on, the non-passing vehicles in the second traffic signal cycle can pass the lane stop line as passing vehicles in the third traffic signal cycle. Then the historical traffic demand corresponding to the first sliding window (that is, the total passing demand of these three traffic signal cycles) can be understood as the sum of the number of vehicles passing the lane stop line during the passing time of the three traffic signal cycles and the number of congested vehicles that did not pass the lane stop line during the passing time of the third traffic signal cycle.
[0097] In another possible implementation, the electronic device can take the average value of the number of vehicles demanding to pass within the first sliding window as the historical passing demand. In this case, Figure 8 is another flowchart of the traffic passing demand prediction method provided by the embodiments of the present application. As Figure 8 shown, the above S1013 may specifically include S10131 to S10132.
[0098] S10131. Obtain the number of vehicles demanding to pass within the first sliding window according to the sum of the first vehicle number and the second vehicle number.
[0099] Optionally, the electronic device may specifically calculate the number of vehicles demanding to pass according to the following formula (1):
[0100]
[0101] In formula (1), D n represents the historical passing demand corresponding to the first sliding window including n traffic signal cycles. V i represents the number of vehicles passing the target lane stop line in the i-th traffic signal cycle. represents the first vehicle number. Q n represents the number of vehicles that did not pass the target lane stop line and are within a preset distance after the target lane stop line at the end of the passing time of the n-th traffic signal cycle, that is, the second vehicle number.
[0102] S10132. Obtain the passing demand conversion flow rate within the first sliding window as the historical passing demand corresponding to the first sliding window according to the quotient of the number of vehicles demanding to pass and the total duration of the historical period.
[0103] Optionally, the electronic device may specifically calculate the passing demand conversion flow rate according to the following formula (2):
[0104]
[0105] In formula (2), s1 represents the converted flow rate of the traffic demand within the first sliding window (including n traffic signal cycles). t i represents the duration of the i-th traffic signal cycle.
[0106] It should be understood that the passing traffic flow can be collected according to a sliding window with a fixed duration, so it can be modeled and predicted as a standard time series prediction problem, that is, predicting the passing traffic flow of the next sliding window with the passing traffic flow of one sliding window. However, the traffic demand in this application is strongly bound to the traffic signal cycle and needs to be modeled as an irregular time series. In the traffic demand prediction method provided in the embodiments of this application, the electronic device can take the average value of the number of vehicles demanding to pass within the first sliding window (that is, the converted flow rate of the traffic demand within the first sliding window) as the historical traffic demand, and what is obtained is the traffic flow that needs to pass within a unit time, eliminating the influence of the time length on the historical traffic demand, which can enable the electronic device to predict the passing prediction demand of the next sliding window with the historical traffic demands of multiple sliding windows.
[0107] Optionally, the preset time period is a sliding window after multiple historical sliding windows included in the historical time period.
[0108] It should be understood that the passing traffic flow is a continuous sequence and can be collected and calculated according to a sliding window of any duration to represent the traffic flow in a certain time period. However, in this application, the traffic demand takes the unpassed vehicles in the previous traffic signal cycle as the passed vehicles in the next traffic signal cycle, which is a discrete sequence. The predictability of the traffic demand will decrease as the statistical duration (that is, the duration of the sliding window or the historical time period) decreases. The duration of a single traffic signal cycle is mostly 1 - 3 minutes. If a single traffic signal cycle is used as a sliding window, it may lead to a low predictability of the traffic demand. In the traffic demand prediction method provided in the embodiments of this application, the electronic device can use multiple traffic signal cycles as a historical sliding window, increasing the duration of the historical sliding window and increasing the predictability of the traffic demand.
[0109] Optionally, before S1011, the electronic device can also obtain the duration of the historical sliding window. For example, assuming that the duration of a single traffic signal cycle is a minutes, if it is necessary to extend the historical sliding window to more than b minutes, then at least the traffic demands of [a / b] (rounded up) traffic signal cycles need to be added for one historical sliding window. Therefore, P = [a / b] (rounded up) can be used as the duration of a historical sliding window.
[0110] It should be noted that the above S1011 to S1013 introduce the process of obtaining the historical traffic demand by taking one historical sliding window among M historical sliding windows as an example. The historical traffic demands corresponding to all M historical sliding windows can be obtained according to the above process, and then the historical traffic demand sequence {D1, D2,..., D within the research time period (including M historical sliding windows) can be obtained.M}.
[0111] The above S102 is introduced below.
[0112] In some possible embodiments, the electronic device may use a traffic demand prediction model to predict the target traffic demand. In this case, Figure 9 This is another flowchart of the traffic demand prediction method provided by the embodiment of the present application. As Figure 9 shown, the above S102 may specifically include S1021.
[0113] S1021: Input M historical traffic demands into a preset traffic demand prediction model to obtain the target traffic demand.
[0114] Among them, the traffic demand prediction model is used to predict the target traffic demand within a preset time period after M historical sliding windows according to the historical traffic demands of M historical sliding windows. The specific training process of the traffic demand prediction model can be referred to in the following embodiments and will not be elaborated here.
[0115] In some embodiments, before the above S101, the electronic device may also obtain a trained traffic demand prediction model.
[0116] In one possible implementation, the electronic device may directly obtain a trained traffic demand prediction model from other devices.
[0117] For example, the electronic device may download from other electronic devices or transfer and store from other electronic devices through an intermediate storage medium to obtain a trained traffic demand prediction model.
[0118] In another possible implementation, the electronic device may train to obtain a traffic demand prediction model. In this case, Figure 10 This is another flowchart of the traffic demand prediction method provided by the embodiment of the present application. As Figure 10 shown, the method may further include S201 to S202.
[0119] S201: Obtain a training sample set.
[0120] Among them, the training sample set includes multiple training samples. Each training sample includes the traffic demand corresponding to each of the M training sliding windows at the training lane stop line, and a label, where the label is the traffic demand within a preset time period after the M training sliding windows. The training lane stop line may be the same as or different from the target lane stop line, and the present application embodiment does not limit this. The duration of the training sliding window may be the same as or different from that of the historical sliding window, and the present application embodiment also does not limit this.
[0121] S202. Train a preset regression model based on the training sample set to obtain a traffic demand prediction model.
[0122] Among them, the regression model can be a random forest model or other regression models. The specific type of the regression model is not limited in the embodiments of the present application.
[0123] Optionally, as described above, the training sample set may include multiple training samples. The electronic device can input one or more training samples into the preset regression model each time to obtain the predicted value (the target traffic demand in the preset time period) output by the regression model, and calculate the loss function (loss) based on the traffic demand and the predicted value in the label of the training sample, and update the parameters in the regression model until the regression model converges to obtain the traffic demand prediction model.
[0124] Optionally, the conditions for the regression model to converge (or end training) include: the number of times of inputting the training sample into the regression model reaches the preset number threshold, or the error between the predicted value of the regression model and the label is less than the error threshold.
[0125] Among them, the number threshold can be preset by the administrator in the electronic device. For example, the number threshold can be 10,000 times, 20,000 times, or 30,000 times, etc. The specific value of the number threshold is not limited in the embodiments of the present application. The error threshold can also be preset by the administrator in the electronic device. For example, the error threshold can be 80%, 85%, or 90%, etc. The specific value of this error threshold is also not limited in the embodiments of the present application.
[0126] The above mainly introduces the solution provided by the embodiments of the present application from the perspective of the method. To implement the above functions, it includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0127] In an exemplary embodiment, the embodiments of the present application further provide a traffic demand prediction device. Figure 11 It is a schematic diagram of the composition of the traffic demand prediction device provided by the embodiments of the present application. As Figure 11 shown, the device includes: an acquisition module 1101 and a processing module 1102.
[0128] An acquisition module 1101 is configured to acquire respective historical traffic demands within M historical sliding windows at a target lane stop line; the historical traffic demand is used to indicate the sum of a first vehicle number and a second vehicle number; the first vehicle number is the number of vehicles passing through the target lane stop line within the corresponding historical sliding window; the second vehicle number is the number of vehicles that have not passed through the target lane stop line and are within a preset distance after the target lane stop line at the end of the corresponding historical sliding window; M is a positive integer.
[0129] A processing module 1102 is configured to predict a target traffic demand at the target lane stop line according to the M historical traffic demands; the target traffic demand is used to indicate the number of vehicles passing through the target lane stop line within a preset time period after the M historical sliding windows.
[0130] In some possible embodiments, each historical sliding window includes a plurality of historical traffic signal cycles; for the first sliding window among the M historical sliding windows, the first sliding window is any one of the M historical sliding windows; the acquisition module 1101 is specifically configured to acquire the total number of vehicles passing through the target lane stop line during the passing time of all traffic signal cycles of the first sliding window to obtain the first vehicle number; acquire the number of vehicles that have not passed through the target lane stop line and are within a preset distance after the target lane stop line at the end of the passing time of the last traffic signal cycle of the first sliding window to obtain the second vehicle number; and obtain the historical traffic demand corresponding to the first sliding window according to the first vehicle number and the second vehicle number.
[0131] In some other possible embodiments, the preset time period is one sliding window after the M historical sliding windows.
[0132] In some other possible embodiments, the acquisition module 1101 is specifically configured to obtain the number of vehicles with required passage within the first sliding window according to the sum of the first vehicle number and the second vehicle number; and obtain the converted flow rate of the traffic demand within the first sliding window as the historical traffic demand corresponding to the first sliding window according to the quotient of the number of vehicles with required passage and the total duration of the historical time period.
[0133] In some other possible embodiments, the processing module 1102 is specifically configured to calculate the number of vehicles with required passage according to the following formula:
[0134]
[0135] where D n represents the historical traffic demand corresponding to the first sliding window including n traffic signal cycles; V i represents the number of vehicles passing through the target lane stop line within the i-th traffic signal cycle; represents the first vehicle number; Q n represents the second vehicle number.
[0136] In some other possible embodiments, the processing module 1102 is specifically configured to calculate the converted flow rate of the traffic demand according to the following formula:
[0137]
[0138] where s1 represents the converted flow rate of the traffic demand within the first sliding window including n traffic signal cycles. t i represents the duration of the i-th traffic signal cycle.
[0139] In some other possible embodiments, the processing module 1102 is specifically configured to input M historical traffic demands into a preset traffic demand prediction model to obtain a target traffic demand; the traffic demand prediction model is used to predict the target traffic demand within a preset time period after M historical sliding windows according to the historical traffic demands of M historical sliding windows.
[0140] In some other possible embodiments, the acquisition module 1101 is further configured to acquire a training sample set; the training sample set includes multiple training samples; each training sample includes the traffic demand corresponding to each of the M training sliding windows at the stop line of the training lane, and a label; the label is the traffic demand within a preset time period after the M training sliding windows; the processing module 1102 is further configured to train a preset regression model based on the training sample set to obtain a traffic demand prediction model.
[0141] It should be noted that Figure 11 the division of the modules herein is illustrative only, and is merely a logical function division. In actual implementation, there may be other division methods. For example, two or more functions may also be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or in the form of software functional units.
[0142] In an exemplary embodiment, the embodiment of the present application further provides a readable storage medium, including software instructions, which when running on an electronic device, cause the electronic device to execute any one of the methods provided in the above embodiments.
[0143] In an exemplary embodiment, the embodiment of the present application further provides a computer program product containing computer execution instructions, which when running on an electronic device, cause the electronic device to execute any one of the methods provided in the above embodiments.
[0144] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer-executable instructions. When the computer-executable instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer-executable instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer-executable instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), etc.
[0145] Although the present application has been described in conjunction with various embodiments, however, in the process of implementing the claimed present application, those skilled in the art can understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude a plurality. A single processor or other unit can implement several functions recited in the claims. Certain measures are recited in mutually different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0146] Although the present application has been described in conjunction with specific features and their embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the present specification and the drawings are merely exemplary descriptions of the present application defined by the appended claims and are considered to have covered any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.
[0147] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A traffic demand prediction method, characterized in that, The method includes: Obtaining the historical traffic demands corresponding to M historical sliding windows at the stop line of the target lane; the historical traffic demand is used to indicate the sum of the first number of vehicles and the second number of vehicles; the first number of vehicles is the number of vehicles passing through the stop line of the target lane within the corresponding historical sliding window; the second number of vehicles is the number of vehicles that have not passed through the stop line of the target lane and are within a preset distance after the stop line of the target lane at the end of the corresponding historical sliding window; M is a positive integer; Predicting the target traffic demand at the stop line of the target lane according to the M historical traffic demands; the target traffic demand is used to indicate the number of vehicles passing through the stop line of the target lane within a preset time period after the M historical sliding windows.
2. The method according to claim 1, characterized in that, Each historical sliding window includes a plurality of historical traffic signal cycles; for the first sliding window among the M historical sliding windows, the first sliding window is any one of the M historical sliding windows; the obtaining the historical traffic demands corresponding to M historical sliding windows at the stop line of the target lane includes: Obtaining the total number of vehicles passing through the stop line of the target lane during the passing time of all traffic signal cycles of the first sliding window to obtain the first number of vehicles; Obtaining the number of vehicles that have not passed through the stop line of the target lane and are within a preset distance after the stop line of the target lane at the end of the passing time of the last traffic signal cycle of the first sliding window to obtain the second number of vehicles; Obtaining the historical traffic demand corresponding to the first sliding window according to the first number of vehicles and the second number of vehicles.
3. The method according to claim 2, wherein The preset time period is one sliding window after the M historical sliding windows.
4. The method according to claim 2, wherein The obtaining the historical traffic demand corresponding to the first sliding window according to the first number of vehicles and the second number of vehicles includes: Obtaining the number of vehicles with demand to pass within the first sliding window according to the sum of the first number of vehicles and the second number of vehicles; Obtaining the converted flow rate of the traffic demand within the first sliding window as the historical traffic demand corresponding to the first sliding window according to the quotient of the number of vehicles with demand to pass and the total duration of the historical time period.
5. The method according to claim 4, characterized in that, The obtaining the number of vehicles with demand to pass within the first sliding window according to the sum of the first number of vehicles and the second number of vehicles includes: Calculating the number of vehicles with demand to pass according to the following formula: Among them, D n represents the historical traffic demand corresponding to the first sliding window including n traffic signal cycles; V i represents the number of vehicles passing through the stop line of the target lane in the i-th traffic signal cycle; represents the first number of vehicles; Q n represents the second number of vehicles.
6. The method according to claim 4, characterized in that, The obtaining the converted flow rate of the traffic demand within the first sliding window as the historical traffic demand corresponding to the first sliding window according to the quotient of the number of vehicles with demand to pass and the total duration of the historical time period includes: Calculating the converted flow rate of the traffic demand according to the following formula: Among them, s1 represents the converted flow rate of the traffic demand within the first sliding window including n traffic signal cycles, and t i represents the duration of the i-th traffic signal cycle.
7. The method according to any one of claims 1-6, characterized in that, The predicting the target traffic demand at the stop line of the target lane according to the M historical traffic demands includes: Inputting the M historical traffic demands into a preset traffic demand prediction model to obtain the target traffic demand; the traffic demand prediction model is used to predict the target traffic demand within the preset time period after the M historical sliding windows according to the historical traffic demands of the M historical sliding windows.
8. The method according to claim 7, wherein The method further includes: Obtain a training sample set; the training sample set includes a plurality of training samples; each training sample includes the respective traffic demands corresponding to M training sliding windows at the training lane stop line, and a label; the label is the traffic demand in the preset time period after the M training sliding windows. Train a preset regression model based on the training sample set to obtain the traffic demand prediction model.
9. A readable storage medium, characterized in that, The readable storage medium includes: software instructions. When the software instructions run in an electronic device, the electronic device is caused to implement the method according to any one of claims 1-8.
10. A traffic demand prediction system, characterized in that, The system includes: a vehicle perception device and a traffic signal controller. The vehicle perception device is used to perceive the number of vehicles at the target lane stop line. The traffic signal controller is used to predict the target traffic demand at the target lane stop line according to the number of vehicles perceived by the vehicle perception device, according to the method according to any one of claims 1-8.