Method for predicting road congestion and electronic device
By combining the Traffic Congestion Index (TPI) of the target road segment and other road segments within the road network, and using a pre-trained model to predict road congestion, the low accuracy problem caused by the failure to consider the road network relationship in existing technologies is solved, and more accurate congestion prediction is achieved.
Patent Information
- Application Number
- CN202311308195.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-10-10
AI Technical Summary
In existing technologies, road congestion prediction methods fail to fully consider the road network relationships, resulting in low prediction accuracy.
By utilizing the Traffic Congestion Index (TPI) of the target road segment over multiple second-specified time periods, as well as the TPIs of other road segments within the target road network area (excluding the target road segment) over multiple second-specified time periods, and combining them with a pre-trained congestion prediction model, the relationship between the target road segment and related road segments is analyzed to predict congestion.
It improves the accuracy of road congestion prediction by combining historical actual congestion data with road segment relationships to achieve more comprehensive congestion prediction analysis.
Smart Images

Figure CN119811065B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent transportation, in particular to a road congestion prediction method and an electronic device. BACKGROUND
[0002] Traffic congestion has been one of the main problems faced by cities for a long time, and alleviating urban congestion is also a major measure to improve the happiness index of residents. The key function of efficient traffic in the field of intelligent transportation is traffic flow induction and control, and a good control scheme depends on real-time perception and accurate prediction of traffic conditions.
[0003] In the prior art, the prediction method of road congestion is mostly to use a congestion prediction algorithm to predict the congestion of each to-be-analyzed road section based on the congestion indicators of each to-be-analyzed road section. However, this method does not consider the overall relationship of the actual road network, so the accuracy of the congestion prediction of the to-be-analyzed road section is low. SUMMARY
[0004] In the exemplary embodiments of the present disclosure, a road congestion prediction method and an electronic device are provided to improve the accuracy of road congestion prediction.
[0005] The first aspect of the present disclosure provides a road congestion prediction method, the method comprising:
[0006] Every first specified time length, based on the link data of each link in the target road section, obtain the traffic congestion index TPI of the target road section in a plurality of second specified time lengths, wherein the link data is the average speed of the link in the second specified time length, and the first specified time length is greater than the second specified time length;
[0007] Using the TPI of the target road section in a plurality of second specified time lengths and the TPI of other road sections in the target road network region except the target road section in a plurality of second specified time lengths, obtain other target road sections associated with the target road section in the target road network region, wherein the target road network region is obtained according to the position of the target road section;
[0008] Input the TPI of the target road section in the plurality of second specified time lengths and the TPI of other target road sections associated with the target road section in the plurality of second specified time lengths into a pre-trained congestion prediction model for congestion prediction, to obtain the predicted TPI of the target road section in the next first specified time length;
[0009] Obtain the congestion prediction result of the target road section by the predicted TPI of the target road section in the next first specified time length.
[0010] In this embodiment, the TPI of the target road section in the plurality of second specified time lengths and the TPI of other target road sections associated with the target road section in the plurality of second specified time lengths are obtained by using the TPI of the target road section in the plurality of second specified time lengths and the TPI of other road sections in the target road network region except the target road section in the plurality of second specified time lengths. The TPI of the target road section in the plurality of second specified time lengths and the TPI of other target road sections associated with the target road section in the plurality of second specified time lengths are input into a pre-trained congestion prediction model to perform congestion prediction, to obtain the predicted TPI of the target road section in the next first specified time length. Finally, the congestion prediction result of the target road section is obtained by using the predicted TPI of the target road section in the next first specified time length. Thus, in the embodiments of the present application, other target road sections associated with the target road section are obtained by analyzing the historical actual congestion situation, and the TPI of the target road section and the TPI of other target road sections associated with the target road section are combined to predict the congestion of the target road section, so that the congestion prediction analysis can be more comprehensive, and the accuracy of the congestion prediction result is improved.
[0011] In one embodiment, the traffic congestion index TPI of the target road section in the plurality of second specified time lengths is obtained based on the link data of each link in the target road section, comprising:
[0012] For any one link in the target road section, the following steps are performed:
[0013] For any one second specified time length, the target link interval in which the link is located is determined based on the link data of the link in the second specified time length;
[0014] The target traffic congestion function corresponding to the link interval is determined by using the correspondence between the link interval and the traffic congestion function;
[0015] The link data of the link is input into the target traffic congestion function to obtain the TPI of the link in the second specified time length;
[0016] The TPI of each link in the target road section in each second specified time length is determined as the TPI of the target road section in the plurality of second specified time lengths.
[0017] In the embodiment, a target traffic congestion function corresponding to a target link interval in which the link data of each link in the target road section is located is determined, and then the link data of the link is input into the target traffic congestion function to obtain the TPI of the link in a second specified time length. The TPI of each link in the target road section in the plurality of second specified time lengths is determined as the TPI of the target road section in the plurality of second specified time lengths. Thus, the TPI of the target road section in the plurality of second specified time lengths is obtained based on the link data of each link in the embodiment, which ensures the accuracy of the determined TPI of the target road section.
[0018] In one embodiment, the target road network region corresponding to the target link is determined by the following method:
[0019] A region with the position of the target road section as the center and a specified length as the radius is determined as the target road network region corresponding to the target link.
[0020] In one embodiment, the other target road sections associated with the target road section in the target road network region are obtained by using the TPI of the target road section in the plurality of second specified time lengths and the TPI of other road sections in the target road network region in the plurality of second specified time lengths, including:
[0021] For any one other road section, a first correlation coefficient is obtained according to the TPI of the target road section in the plurality of second specified time lengths, the TPI of the other road section in the plurality of second specified time lengths, the average of the TPI of the target road section in the plurality of second specified time lengths, and the average of the TPI of the other road section in the plurality of second specified time lengths; and
[0022] A second correlation coefficient is obtained according to the TPI of the target road section in the plurality of second specified time lengths, the TPI of the other road section in the plurality of second specified time lengths, and the average of the TPI of the target road section in the plurality of second specified time lengths; and
[0023] The target correlation coefficient between the target road section and the other road section in the first specified time length is obtained by using the first correlation coefficient and the second correlation coefficient.
[0024] The other road sections are sorted in ascending order of the target correlation coefficient, and the first specified number of other road sections are determined as the other target road sections associated with the target road section.
[0025] In the embodiment, the target correlation coefficient between the target road section and other road sections is determined by the TPI of the target road section in the plurality of second specified time lengths and the TPI of other road sections in the target road network region except the target road section in the plurality of second specified time lengths, and then the other target road sections associated with the target road section are determined based on the correlation coefficient. Therefore, in the embodiment, the association relationship between road sections is analyzed by combining the actual traffic congestion, so that the accuracy of the other target road sections associated with the target road section is ensured.
[0026] In one embodiment, for any one other road section, the first correlation coefficient is obtained according to the TPI of the target road section in the plurality of second specified time lengths, the TPI of the other road section in the plurality of second specified time lengths, the average of the TPI of the target road section in the plurality of second specified time lengths, and the average of the TPI of the other road section in the plurality of second specified time lengths, and the first correlation coefficient comprises:
[0027] The first correlation coefficient is obtained by the following formula:
[0028]
[0029] Wherein, r1 is the first correlation coefficient, x i is the TPI of the target road section in the second specified time length i, is the average of the TPI of the target road section in the plurality of second specified time lengths, y i is the TPI of the other road section in the second specified time length i, is the average of the TPI of the target road section in the plurality of second specified time lengths, and N is the number of the plurality of second specified time lengths.
[0030] The second correlation coefficient is obtained according to the TPI of the target road section, the TPI of the other road section, and the average of the TPI of the target road section, and the second correlation coefficient comprises:
[0031] The second correlation coefficient is obtained by the following formula:
[0032]
[0033] Wherein, r2 is the second correlation coefficient.
[0034] The target correlation coefficient between the target road section and the other road sections is obtained by using the first correlation coefficient and the second correlation coefficient, and the target correlation coefficient comprises:
[0035] The target correlation coefficient is obtained by the following formula:
[0036]
[0037] wherein D is the target correlation coefficient.
[0038] In one embodiment, before the target road section TPIs in the plurality of second specified time durations and the TPIs of other road sections in the target road network region except the target road section in the plurality of second specified time durations are used to obtain other target road sections associated with the target road section in the target road network region, the method further comprises:
[0039] abnormal data of the target road section TPIs in the plurality of second specified time durations is identified to obtain abnormal TPIs;
[0040] the abnormal TPIs are repaired using target data, wherein the target data includes in-link passing vehicle data or historical TPIs corresponding to the abnormal TPIs, the passing vehicle data includes start time and end time of each vehicle passing through the link, and the historical TPIs include each historical TPI of the link.
[0041] In this embodiment, abnormal data of the target road section TPIs in the plurality of second specified time durations is identified to obtain abnormal TPIs, and the abnormal TPIs are repaired using target data. Thus, the quality of data is ensured to further improve the accuracy of road congestion prediction.
[0042] In one embodiment, the abnormal TPIs are repaired using target data, comprising:
[0043] if the target data is passing vehicle data, then based on the start time, end time of each vehicle passing through the link and the length of the link, the corresponding repair link data of the link is obtained, and based on the repair link data, the target TPI of the link is obtained, and the abnormal TPI is replaced by the target TPI; or,
[0044] if the target data is historical TPI, then the average value of each historical TPI of the link in a fourth specified time duration is determined as the target TPI of the link, and the abnormal TPI is replaced by the target TPI, wherein the fourth specified time duration is greater than the second specified time duration.
[0045] In this embodiment, the abnormal TPIs are repaired by passing vehicle data or historical TPIs, so that the abnormal TPIs can be repaired, and the accuracy of road congestion prediction is ensured.
[0046] In one embodiment, after the congestion prediction result of the target road section is obtained by the predicted TPI of the target road section in the next first specified time duration, the method further comprises:
[0047] obtain an error value based on the predicted TPI and the actual TPI of the target road section in each first specified time length within the third specified time length, wherein the third specified time length is greater than the first specified time length;
[0048] When the error value meets a specified condition, the congestion prediction model is retrained using training data in a target specified time length, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0049] In the embodiment, the congestion prediction model is dynamically adjusted by determining the error value between the predicted TPI and the actual TPI of the target road section in each first specified time length within the third specified time length, so as to ensure the accuracy of the road congestion prediction result.
[0050] In one embodiment, the error value includes a first error value and a second error value.
[0051] The error value is obtained based on the predicted TPI and the actual TPI of the target road section in each first specified time length within the third specified time length, and includes:
[0052] The first error value is obtained by the following formula:
[0053]
[0054] wherein u1 is the first error value, p j is the predicted TPI of the target road section in the first specified time length j, q j is the actual TPI of the target road section in the first specified time length j, and n is the total number of first specified time lengths.
[0055] The second error value is obtained by the following formula:
[0056]
[0057] wherein u2 is the second error value.
[0058] The second aspect of the present disclosure provides an electronic device, including a memory and a processor, including a processor and a memory, and the processor and the memory are connected through a bus;
[0059] The memory stores a computer program, and the processor is configured to execute the following operations based on the computer program:
[0060] obtain, based on link data of each link in the target road section, traffic congestion indexes TPIs of the target road section in a plurality of second designated time lengths, wherein the link data is an average speed of the link in the second designated time length, and the first designated time length is greater than the second designated time length;
[0061] obtain, based on link data of each link in the target road section, traffic congestion indexes TPIs of the target road section in a plurality of second designated time lengths, wherein the link data is an average speed of the link in the second designated time length, and the first designated time length is greater than the second designated time length;
[0062] obtain, based on link data of each link in the target road section, traffic congestion indexes TPIs of the target road section in a plurality of second designated time lengths, wherein the link data is an average speed of the link in the second designated time length, and the first designated time length is greater than the second designated time length;
[0063] obtain, based on link data of each link in the target road section, traffic congestion indexes TPIs of the target road section in a plurality of second designated time lengths, wherein the link data is an average speed of the link in the second designated time length, and the first designated time length is greater than the second designated time length;
[0064] obtain, based on link data of each link in the target road section, traffic congestion indexes TPIs of the target road section in a plurality of second designated time lengths, wherein the link data is an average speed of the link in the second designated time length, and the first designated time length is greater than the second designated time length;
[0065] for any one link in the target road section, the following steps are performed:
[0066] for any one second designated time length, a target link interval in which the link is located is determined based on link data of the link in the second designated time length;
[0067] a target traffic congestion function corresponding to the link interval is determined by using a correspondence between the link interval and the traffic congestion function;
[0068] the link data of the link is input into the target traffic congestion function to obtain the TPI of the link in the second designated time length;
[0069] the TPIs of each link in the target road section in the second designated time length are determined as the TPIs of the target road section in the plurality of second designated time lengths.
[0070] in an embodiment, the processor is further configured to:
[0071] the target road network region is determined by:
[0072] A region centered at the location of the target link and having a specified length as a radius is determined as the target road network region corresponding to the target link.
[0073] In one embodiment, the processor performing the obtaining of the other target links associated with the target link in the target road network region by using the TPIs of the target link in a plurality of second specified time lengths and the TPIs of other links in the target road network region except the target link in the plurality of second specified time lengths is specifically configured to:
[0074] For any one other link, a first correlation coefficient is obtained according to the TPIs of the target link in a plurality of second specified time lengths, the TPIs of the other link in the plurality of second specified time lengths, an average of the TPIs of the target link in the plurality of second specified time lengths, and an average of the TPIs of the other link in the plurality of second specified time lengths; and
[0075] A second correlation coefficient is obtained according to the TPIs of the target link in a plurality of second specified time lengths, the TPIs of the other link in the plurality of second specified time lengths, and an average of the TPIs of the target link in the plurality of second specified time lengths; and
[0076] The target correlation coefficient between the target link and the other link in the first specified time length is obtained by using the first correlation coefficient and the second correlation coefficient.
[0077] The other links are sorted in ascending order of the target correlation coefficients, and a front specified number of other links are determined as the other target links associated with the target link.
[0078] In one embodiment, the processor performing the obtaining of the first correlation coefficient for any one other link according to the TPIs of the target link in a plurality of second specified time lengths, the TPIs of the other link in the plurality of second specified time lengths, an average of the TPIs of the target link in the plurality of second specified time lengths, and an average of the TPIs of the other link in the plurality of second specified time lengths is specifically configured to:
[0079] The first correlation coefficient is obtained by the following formula:
[0080]
[0081] wherein r1 is the first correlation coefficient, xi is the TPI of the target link in a second specified time length i, yi is the TPI of the other link in the second specified time length i, is an average of the TPIs of the target link in the plurality of second specified time lengths, and yi is the TPI of the other link in the second specified time length i. an average value of TPIs of the target road section in a plurality of second specified time lengths, N being a number of the plurality of second specified time lengths;
[0082] obtaining a second correlation coefficient according to the TPI of the target road section, the TPI of the other road section and the average value of the TPIs of the target road section in the plurality of second specified time lengths, comprising:
[0083] the second correlation coefficient is obtained by the following formula:
[0084]
[0085] wherein r2 is the second correlation coefficient;
[0086] obtaining a target correlation coefficient between the target road section and the other road section by using the first correlation coefficient and the second correlation coefficient, comprising:
[0087] the target correlation coefficient is obtained by the following formula:
[0088]
[0089] wherein D is the target correlation coefficient.
[0090] In one embodiment, the processor is further configured to:
[0091] performing identification of abnormal data on the TPIs of the target road section in the plurality of second specified time lengths before obtaining the other target road sections associated with the target road section in the target road network area by using the TPIs of the target road section in the plurality of second specified time lengths and the TPIs of the other road sections except the target road section in the target road network area in the plurality of second specified time lengths, to obtain abnormal TPIs;
[0092] repairing the abnormal TPIs by using target data, wherein the target data comprises in-link passing vehicle data or historical TPIs corresponding to the abnormal TPIs, the passing vehicle data comprises start time and end time of each vehicle passing through the link, and the historical TPIs comprise each historical TPI of the link.
[0093] In one embodiment, the processor performing the repairing of the abnormal TPIs by using the target data is specifically configured to:
[0094] if the target data is the passing vehicle data, obtaining repair link data corresponding to the link based on the start time, the end time of each vehicle passing through the link and the length of the link, obtaining target TPIs of the link based on the repair link data, and replacing the abnormal TPIs by using the target TPIs; or,
[0095] If the target data is historical TPI, an average value of each historical TPI of the link within a fourth specified time length is determined as a target TPI of the link, and the target TPI is used to replace the abnormal TPI, where the fourth specified time length is greater than the second specified time length.
[0096] In an embodiment, the processor is further configured to:
[0097] After obtaining the congestion prediction result of the target road section by the predicted TPI of the target road section within a next first specified time length, every third specified time length, an error value is obtained based on the predicted TPI and the actual TPI of the target road section within each first specified time length within the third specified time length, where the third specified time length is greater than the first specified time length.
[0098] When the error value meets a specified condition, the congestion prediction model is retrained by using training data within a target specified time length, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0099] In an embodiment, the error value includes a first error value and a second error value.
[0100] The processor performing the obtaining of the error value based on the predicted TPI and the actual TPI of the target road section within each first specified time length within the third specified time length is specifically configured to:
[0101] The first error value is obtained by the following formula:
[0102]
[0103] Wherein, u1 is the first error value, p j is the predicted TPI of the target road section within a first specified time length j, q j is the actual TPI of the target road section within the first specified time length j, and n is the total number of first specified time lengths.
[0104] The second error value is obtained by the following formula:
[0105]
[0106] Wherein, u2 is the second error value.
[0107] According to a third aspect provided by the embodiments of the present disclosure, a computer storage medium is provided, which stores a computer program for executing the method according to the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0108] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained based on these drawings without creative labor.
[0109] Figure 1 An application scenario according to an embodiment of the present disclosure;
[0110] Figure 2 One of the flowcharts of the road congestion prediction method according to an embodiment of the present disclosure;
[0111] Figure 3 The flowchart of the method for determining the TPI of the target road section in a plurality of second specified time periods according to an embodiment of the present disclosure;
[0112] Figure 4 The schematic diagram of the target road section according to an embodiment of the present disclosure;
[0113] Figure 5 The flowchart of the method for repairing abnormal data according to an embodiment of the present disclosure;
[0114] Figure 6 The flowchart of the method for determining other target road sections associated with the target road section in the target road network area according to an embodiment of the present disclosure;
[0115] Figure 7 The flowchart of the method for retraining the congestion prediction model according to an embodiment of the present disclosure;
[0116] Figure 8 The second flowchart of the road congestion prediction method according to an embodiment of the present disclosure;
[0117] Figure 9 The road congestion prediction device according to an embodiment of the present disclosure;
[0118] Figure 10 The structural schematic diagram of the electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0119] In order to make the purposes, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present disclosure.
[0120] The term "and / or" in the embodiments of the present disclosure describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship.
[0121] The application scenarios described in the embodiments of the present disclosure are used to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those of ordinary skill in the art can know that, as new application scenarios appear, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems. In the description of the present disclosure, unless otherwise specified, the meaning of "multiple" is two or more.
[0122] In the prior art, the prediction method of road congestion is mostly to use a congestion prediction algorithm to predict the congestion of each to-be-analyzed road section based on the congestion indicators of each to-be-analyzed road section. However, this method does not consider the overall actual road network association relationship, so it will lead to a low accuracy rate of the congestion prediction of the to-be-analyzed road section.
[0123] Therefore, the disclosure provides a road congestion prediction method. The target road section TPI in a plurality of second specified time lengths and the TPI of other road sections in the target road network region except the target road section in a plurality of second specified time lengths are used to obtain other target road sections associated with the target road section in the target road network region. The TPI of the target road section in the plurality of second specified time lengths and the TPI of the other target road sections associated with the target road section in the plurality of second specified time lengths are input into a pre-trained congestion prediction model to perform congestion prediction to obtain the predicted TPI of the target road section in the next first specified time length. Finally, the congestion prediction result of the target road section is obtained through the predicted TPI of the target road section in the next first specified time length. Thus, in the embodiment of the present application, the other target road sections associated with the target road section are obtained by analyzing the actual congestion situation, and the TPI of the target road section and the TPI of the other target road sections associated with the target road section are combined to predict the congestion of the target road section, which can more comprehensively analyze the congestion prediction and improve the accuracy of the congestion prediction result. Next, the scheme of the present disclosure will be described in detail in combination with the drawings.
[0124] As shown in Figure 1 , a road congestion prediction method is applied in a scene including a terminal device 110 and a server 120.
[0125] In a possible application scenario, every first specified time length, the server 120 obtains the traffic congestion index TPI of the target road section in a plurality of second specified time lengths based on the link data of each link in the target road section, wherein the link data is the average speed of the link in the second specified time length, and the first specified time length is greater than the second specified time length; and obtains other target road sections associated with the target road section in the target road network region by using the TPI of the target road section in a plurality of second specified time lengths and the TPI of other road sections in the target road network region except the target road section in a plurality of second specified time lengths, wherein the target road network region is obtained according to the position of the target road section; then the server 120 inputs the TPI of the target road section in the plurality of second specified time lengths and the TPI of the other target road sections associated with the target road section in the plurality of second specified time lengths into a pre-trained congestion prediction model to perform congestion prediction, and obtains the predicted TPI of the target road section in the next first specified time length; finally, the server 120 obtains the congestion prediction result of the target road section through the predicted TPI of the target road section in the next first specified time length, and sends the congestion prediction result to the terminal device 110 for display.
[0126] wherein, Figure 1The terminal device 110 and the server 120 can interact information through a communication network, wherein the communication network can adopt a wireless communication mode or a wired communication mode.
[0127] For example, the server 120 can access the network through a cellular mobile communication technology to communicate with the terminal device 110, wherein the cellular mobile communication technology can include a 5th Generation Mobile Networks (5G) technology.
[0128] Optionally, the server 120 can access the network through a short-range wireless communication mode to communicate with the terminal device 110, wherein the short-range wireless communication mode can include a Wireless Fidelity (Wi-Fi) technology.
[0129] In the description of the present application, only a single terminal device 110 and a single server 120 are described in detail, but those skilled in the art should understand that the terminal device 110 and the server 120 shown are intended to represent the operation of the terminal device 110 and the server 120 involved in the technical solution of the present application. It is not implied that the number, type or location of the terminal device 110 and the server 120 is limited. It should be noted that if additional modules are added to the illustrated environment or individual modules are removed therefrom, the underlying concept of the example embodiments of the present application will not change.
[0130] It should be noted that the road congestion prediction method proposed in the present application is not only applicable to Figure 1 the application scenarios shown, but also applicable to any road congestion prediction device.
[0131] The road congestion prediction method of the example embodiments of the present application will be described below in combination with the above-described application scenarios and with reference to the accompanying drawings. It should be noted that the above-described application scenarios are only shown to facilitate understanding of the method and principles of the present application, and the embodiments of the present application are not limited in this respect.
[0132] As Figure 2 shown, a flowchart of the road congestion prediction method of the present disclosure can include the following steps:
[0133] Step 201: Based on the link data of each link in the target road section, obtain the traffic congestion index TPI of the target road section in a plurality of second specified time periods, wherein the link data is the average speed of the link in the second specified time period, and the first specified time period is greater than the second specified time period.
[0134] In this application embodiment, any road segment includes multiple links, and a link is the basic unit that makes up a road segment. The link data in this application embodiment is directly obtainable. The first specified duration and the second specified duration in this application embodiment can be set according to actual conditions; this application embodiment does not limit the specific values of the first specified duration and the second specified duration.
[0135] like Figure 3 The diagram shown illustrates the process for determining the TPI of a target road segment within multiple second specified time periods, and may include the following steps:
[0136] Step 301: For any link in the target road segment, perform the following steps: For any second specified time period, based on the link data of the link within the second specified time period, determine the target link interval where the link is located;
[0137] In one embodiment, step 301 may be specifically implemented as: comparing the link data with each link interval to determine the target link interval where the link data is located.
[0138] Step 302: Using the correspondence between link intervals and traffic congestion functions, determine the target traffic congestion function corresponding to the link interval; wherein, Table 1 shows the correspondence between the link intervals and traffic congestion functions:
[0139] Table 1:
[0140] Link interval Congestion function 0 < v k < v1 w1v k +b1]]> [v1≤v k <v2]] w2v k +b2 <!-- 9 -->]]> …… …… v k ≥v n ]]> w n v k +b n ]]>
[0141] Among them, v in Table 1 k For link data, w1~w n For the pre-set weight values, b1~b n It is a pre-set constant value.
[0142] Step 303: Input the link data of the link into the target traffic congestion function to obtain the TPI of the link within the second specified time period;
[0143] Step 304: Determine the TPI of each link in the target road segment within each of the second specified time periods as the TPI of the target road segment within the plurality of second specified time periods.
[0144] For example, such as Figure 4 The target road segment includes Link 1, Link 2, Link 3, and Link 4. Wherein, and the second specified duration is 5 minutes, then the TPI of Link 1 during 00:00 to 00:05 is v. a The TPI of link 2 during 00:05 to 00:10 is v bLink 3 has a TPI of v in the time period from 00:10 to 00:15 c Link 4 has a TPI of v in the time period from 00:15 to 00:20 d Then, the TPIs of the target link in the plurality of second specified time periods are determined as follows: v a , v b , v c , and v d .
[0145] In order to further ensure the quality of the TPI data and further improve the accuracy of the congestion prediction result, in an embodiment, before step 202 is performed, a process for repairing abnormal data is performed, as shown in FIG. 6. The process can include the following steps: Figure 5
[0146] Step 501: Identify abnormal data of the TPIs of the target link in the plurality of second specified time periods to obtain abnormal TPIs.
[0147] In an embodiment, step 501 can be specifically implemented as follows: for any one of the second specified time periods of the target link, it is determined whether the TPI in the second specified time period is within a specified range. If yes, it is determined that the TPI is not an abnormal TPI. If no, it is determined that the TPI is an abnormal TPI.
[0148] Step 502: Repair the abnormal TPIs using target data, wherein the target data includes passing vehicle data or historical TPIs of the link corresponding to the abnormal TPIs, the passing vehicle data includes start time and end time of each vehicle passing through the link, and the historical TPIs include historical TPIs of the link.
[0149] In an embodiment, step 502 can be specifically implemented in the following two ways:
[0150] Way one: if the target data is passing vehicle data, then based on the start time, end time of each vehicle passing through the link and the length of the link, repair link data corresponding to the link is obtained, and based on the repair link data, target TPIs of the link are obtained, and the abnormal TPIs are replaced by the target TPIs.
[0151] In an embodiment, the target TPIs of the link are obtained in the following way:
[0152] For any given vehicle, the end time of the vehicle's passage through the link is subtracted from the start time of the vehicle's passage through the link to obtain the duration of the vehicle's passage through the link. The length of the link is then divided by the duration of the link to obtain the speed of the vehicle passing through the link. The average speed of all vehicles passing through the link is determined as the corresponding repair link data. Using the correspondence between link intervals and traffic congestion functions, the target traffic congestion function corresponding to the link interval where the repair link data is located is determined. The repair link data is input into the target traffic congestion function to obtain the target TPI of the link.
[0153] Method 2: If the target data is a historical TPI, then the average value of each historical TPI of the link within the fourth specified time period is determined as the target TPI of the link, and the abnormal TPI is replaced by the target TPI, wherein the fourth specified time period is longer than the second specified time period.
[0154] Step 202: Using the TPI of the target road segment within multiple second specified time periods and the TPI of other road segments within the target road network area other than the target road segment within multiple second specified time periods, obtain other target road segments within the target road network area associated with the target road segment, wherein the target road network area is obtained based on the location of the target road segment;
[0155] like Figure 6 The diagram shown illustrates the process for determining other target road segments associated with a target road segment within a target road network area. This process may include the following steps:
[0156] Step 601: For any other road segment, obtain a first correlation coefficient based on the TPI of the target road segment over multiple second specified time periods, the TPI of the other road segments over multiple second specified time periods, the average TPI of the target road segment over multiple second specified time periods, and the average TPI of the other road segments over multiple second specified time periods; wherein, the first correlation coefficient can be obtained through formula (1):
[0157]
[0158] Where r1 is the first correlation coefficient, x i The TPI of the target road segment within the second specified time period i. The average TPI of the target road segment over multiple second specified time periods, y i For other road segments, the TPI within the second specified time period i, The average TPI of the target road segment over multiple second specified time periods is N, where N is the number of the multiple second specified time periods.
[0159] Step 602: obtaining a second correlation coefficient according to the TPI of the target road section in a plurality of second specified time lengths, the TPI of the other road sections in the plurality of second specified time lengths, and the average value of the TPI of the target road section in the plurality of second specified time lengths; wherein the second correlation coefficient can be obtained by formula (2):
[0160]
[0161] wherein r2 is the second correlation coefficient.
[0162] Step 603: obtaining a target correlation coefficient between the target road section and the other road sections in the first specified time length by using the first correlation coefficient and the second correlation coefficient; wherein the target correlation coefficient can be obtained by formula (3):
[0163]
[0164] wherein D is the target correlation coefficient.
[0165] Step 604: sorting the other road sections according to the target correlation coefficient from small to large, and determining the first specified number of other road sections as the other target road sections associated with the target road section.
[0166] It should be noted that the specified number in the embodiments of the present application can be set according to actual conditions, and the embodiments of the present application do not set the specified number here.
[0167] Step 203: inputting the TPI of the target road section in the plurality of second specified time lengths and the TPI of the other target road sections associated with the target road section in the plurality of second specified time lengths into a pre-trained congestion prediction model to perform congestion prediction, and obtaining the predicted TPI of the target road section in the next first specified time length;
[0168] The congestion prediction model in the embodiments of the present application can be an LSTM (Long Short-Term Memory) model, but the specific congestion prediction model can be set according to actual conditions, and the embodiments of the present application do not limit the specific structure of the congestion prediction model here.
[0169] Step 204: obtaining the congestion prediction result of the target road section by using the predicted TPI of the target road section in the next first specified time length.
[0170] In one embodiment, step 204 can be implemented as follows: determining a target congestion level corresponding to the TPI interval in which the predicted TPI is located, using the pre-set correspondence between TPI intervals and congestion levels, and determining the target congestion level as the congestion prediction result of the target road section.
[0171] To further improve the accuracy of the congestion prediction result, in one embodiment, after step 204 is performed, the process shown in FIG. 7 can be performed to re-train the congestion prediction model, which can include the following steps: Figure 7
[0172] Step 701: every third specified time length, based on the predicted TPI and the actual TPI of the target road section in each first specified time length within the third specified time length, obtain an error value, wherein the third specified time length is greater than the first specified time length;
[0173] The error value in the embodiments of the present application includes a first error value and a second error value; wherein the first error value can be obtained by formula (4):
[0174]
[0175] Wherein, u1 is the first error value, pj is the predicted TPI of the target road section in the first specified time length j, qj is the actual TPI of the target road section in the first specified time length j, and n is the total number of first specified time lengths.
[0176] The second error value can be obtained by formula (5):
[0177]
[0178] Wherein, u2 is the second error value.
[0179] Step 702: when the error value meets a specified condition, the congestion prediction model is re-trained using the training data in the target specified time length, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0180] In one embodiment, step 702 can be implemented as follows: if the first error value is greater than a first specified threshold, and the second error value is greater than a second specified threshold, it is determined that the error value meets the specified condition; otherwise, it is determined that the error value does not meet the specified condition.
[0181] To further understand the technical solutions of the present disclosure, the following will be described in detail in combination with Figure 8 The process shown in FIG. 7 can include the following steps:
[0182] Step 801: every first specified time length, based on link data of each link in a target road section, obtain traffic congestion indexes TPI of the target road section in a plurality of second specified time lengths, wherein the link data is an average speed of the link in the second specified time length, and the first specified time length is greater than the second specified time length;
[0183] Step 802: identify abnormal data of the TPI of the target road section in the plurality of second specified time lengths, to obtain an abnormal TPI;
[0184] Step 803: repair the abnormal TPI by using target data, wherein the target data includes pass-through data or historical TPI in a link corresponding to the abnormal TPI, the pass-through data includes start time and end time when each vehicle passes through the link, and the historical TPI includes each historical TPI of the link;
[0185] Step 804: for any one other road section, according to the TPI of the target road section in the plurality of second specified time lengths, the TPI of the other road section in the plurality of second specified time lengths, an average value of the TPI of the target road section in the plurality of second specified time lengths, and an average value of the TPI of the other road section in the plurality of second specified time lengths, obtain a first correlation coefficient;
[0186] Step 805: according to the TPI of the target road section in the plurality of second specified time lengths, the TPI of the other road section in the plurality of second specified time lengths, and the average value of the TPI of the target road section in the plurality of second specified time lengths, obtain a second correlation coefficient;
[0187] Step 806: using the first correlation coefficient and the second correlation coefficient, obtain a target correlation coefficient between the target road section and the other road section in the first specified time length;
[0188] Step 807: sort the other road sections in ascending order of the target correlation coefficient, and determine a front specified number of other road sections as other target road sections associated with the target road section;
[0189] Step 808: input the TPI of the target road section in the plurality of second specified time lengths and the TPI of the other target road sections associated with the target road section in the plurality of second specified time lengths into a pre-trained congestion prediction model to perform congestion prediction, to obtain a predicted TPI of the target road section in a next first specified time length;
[0190] Step 809: obtain a congestion prediction result of the target road section by using the predicted TPI of the target road section in the next first specified time length;
[0191] Step 810: every third specified time length, based on the predicted TPI and the actual TPI of the target road section in each first specified time length within the third specified time length, an error value is obtained, wherein the third specified time length is greater than the first specified time length;
[0192] Step 811: when the error value meets a specified condition, the congestion prediction model is retrained using training data in a target specified time length, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0193] Based on the same inventive concept, the road congestion prediction method as described above can also be implemented by a road congestion prediction device. The road congestion prediction device has similar effects to the aforementioned method, and will not be described here.
[0194] Figure 9 The structure diagram of the road congestion prediction device according to an embodiment of the present disclosure.
[0195] As shown in Figure 9 The road congestion prediction device 900 of the present disclosure can include a link traffic congestion index determination module 910, an associated road section determination module 920, a congestion prediction module 930, and a congestion prediction result determination module 940.
[0196] The link traffic congestion index determination module 910 is configured to obtain, every first specified time length, traffic congestion indexes TPI of a target road section in a plurality of second specified time lengths based on link data of each link in the target road section, wherein the link data is the average speed of the link in the second specified time length, and the first specified time length is greater than the second specified time length;
[0197] The associated road section determination module 920 is configured to obtain other target road sections associated with the target road section in a target road network region based on the TPI of the target road section in the plurality of second specified time lengths and the TPI of other road sections in the target road network region except the target road section in the plurality of second specified time lengths, wherein the target road network region is obtained according to the location of the target road section.
[0198] The congestion prediction module 930 is configured to input the TPI of the target road section in the plurality of second specified time lengths and the TPI of the other target road sections associated with the target road section in the plurality of second specified time lengths into a pre-trained congestion prediction model to perform congestion prediction and obtain the predicted TPI of the target road section in the next first specified time length.
[0199] The congestion prediction result determination module 940 is configured to obtain the congestion prediction result of the target road segment by the predicted TPI of the target road segment in the next first specified time length.
[0200] In an embodiment, the link traffic congestion index determination module 910 is specifically configured to:
[0201] For any one link in the target road segment, the following steps are performed:
[0202] For any one second specified time length, a target link interval in which the link is located is determined based on the link data of the link in the second specified time length;
[0203] A target traffic congestion function corresponding to the link interval is determined by using the correspondence between the link interval and the traffic congestion function;
[0204] The link data of the link is input into the target traffic congestion function to obtain the TPI of the link in the second specified time length;
[0205] The TPIs of each link in the target road segment in the respective second specified time lengths are determined as the TPIs of the target road segment in the plurality of second specified time lengths.
[0206] In an embodiment, the device further comprises:
[0207] The target road network area determination module 950 is configured to determine the target road network area by:
[0208] An area with the position of the target road segment as the center and a specified length as the radius is determined as the target road network area corresponding to the target link.
[0209] In an embodiment, the associated road segment determination module 920 is specifically configured to:
[0210] For any one other road segment, a first correlation coefficient is obtained according to the TPIs of the target road segment in the plurality of second specified time lengths, the TPIs of the other road segment in the plurality of second specified time lengths, the average of the TPIs of the target road segment in the plurality of second specified time lengths, and the average of the TPIs of the other road segment in the plurality of second specified time lengths; and
[0211] A second correlation coefficient is obtained according to the TPIs of the target road segment in the plurality of second specified time lengths, the TPIs of the other road segment in the plurality of second specified time lengths, and the average of the TPIs of the target road segment in the plurality of second specified time lengths; and
[0212] The first correlation coefficient and the second correlation coefficient are used to obtain a target correlation coefficient between the target road segment and the other road segments in the first specified time length.
[0213] The other road segments are sorted according to the target correlation coefficients in ascending order, and a front specified number of other road segments are determined as other target road segments associated with the target road segment.
[0214] In an embodiment, the associated road segment determination module 920 is further configured to:
[0215] The first correlation coefficient is obtained by the following formula:
[0216]
[0217] wherein r1 is the first correlation coefficient, x i is a TPI of the target road segment in a second specified time length i, is an average value of the TPI of the target road segment in a plurality of second specified time lengths, y i is a TPI of the other road segment in the second specified time length i,
[0218] is a TPI of the other road segment in the second specified time length i, is an average value of the TPI of the target road segment in a plurality of second specified time lengths, and N is a number of the plurality of second specified time lengths;
[0219] The second correlation coefficient is obtained by the following formula:
[0220]
[0221] wherein r2 is the second correlation coefficient.
[0222] The first correlation coefficient and the second correlation coefficient are used to obtain a target correlation coefficient between the target road segment and the other road segments in the first specified time length.
[0223] The target correlation coefficient is obtained by the following formula:
[0224]
[0225] wherein D is the target correlation coefficient.
[0226] In an embodiment, the apparatus further comprises:
[0227] The data repairing module 960 is configured to, before the target TPI of the target link in the second specified time period is obtained by using the TPI of the target link in the second specified time period and the TPI of other links in the target road network region except the target link in the second specified time period, and the target TPI of other target links associated with the target link in the target road network region is obtained, identify abnormal data in the target TPI of the target link in the second specified time period to obtain an abnormal TPI.
[0228] The abnormal TPI is repaired by using target data, wherein the target data includes in-link passing vehicle data or historical TPI corresponding to the abnormal TPI, the passing vehicle data includes start time and end time of each vehicle passing through the link, and the historical TPI includes each historical TPI of the link.
[0229] In one embodiment, the data repairing module 960 is further configured to:
[0230] If the target data is the passing vehicle data, target link data corresponding to the link is obtained based on the start time, the end time of each vehicle passing through the link and the length of the link, target TPI of the link is obtained based on the target link data, and the abnormal TPI is replaced by using the target TPI; or,
[0231] If the target data is the historical TPI, an average value of each historical TPI of the link in a fourth specified time period is determined as the target TPI of the link, and the abnormal TPI is replaced by using the target TPI, wherein the fourth specified time period is longer than the second specified time period.
[0232] In one embodiment, the apparatus further comprises:
[0233] The model retraining module 970 is configured to, after the congestion prediction result of the target link is obtained by using the predicted TPI of the target link in the next first specified time period, obtain an error value based on the predicted TPI and the actual TPI of the target link in each first specified time period within a third specified time period every third specified time period, wherein the third specified time period is longer than the first specified time period.
[0234] When the error value meets a specified condition, the congestion prediction model is retrained by using training data in a target specified time period, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0235] In one embodiment, the error value includes a first error value and a second error value; and the apparatus further comprises:
[0236] The error value determination module 980 is configured to obtain the first error value u1 according to the following formula:
[0237]
[0238] wherein u1 is the first error value, p j is a predicted TPI of the target road section in a first specified time length j, q j is an actual TPI of the target road section in the first specified time length j, and n is a total number of the first specified time lengths.
[0239] The second error value u2 is obtained according to the following formula:
[0240]
[0241] wherein u2 is the second error value.
[0242] After introducing the road congestion prediction method and device according to the example embodiment of the present disclosure, next, the electronic device according to another example embodiment of the present disclosure is introduced.
[0243] Those skilled in the art can understand that each aspect of the present disclosure can be implemented as a system, a method or a program product. Therefore, each aspect of the present disclosure can be embodied as a whole hardware embodiment, a whole software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system".
[0244] In some possible embodiments, the electronic device according to the present disclosure can include at least one processor and at least one computer storage medium. The computer storage medium stores program codes which, when executed by the processor, cause the processor to perform the steps in the road congestion prediction method according to various example embodiments of the present disclosure described above in the specification. For example, the processor can perform steps 201-204 as shown in Figure 2
[0245] The electronic device 1000 according to this embodiment of the present disclosure is described below with reference to Figure 10 Figure 10 The displayed electronic device 1000 is only an example and should not limit the functions and use range of the embodiments of the present disclosure.
[0246] As shown in Figure 10 As shown, the electronic device 1000 is in the form of a general electronic device. Components of the electronic device 1000 can include, but are not limited to, the at least one processor 1001 described above, the at least one computer storage medium 1002 described above, and a bus 1003 that connects the different system components, including the computer storage medium 1002 and the processor 1001.
[0247] The bus 1003 represents one or more of any of several bus structures, including a computer storage bus or computer storage bus controller, a peripheral bus, a processor or local bus using any of a variety of bus structures.
[0248] The computer storage medium 1002 can include read-only computer storage media in the form of volatile computer storage media, such as random access computer storage media (RAM) 1021 and / or cache memory computer storage media 1022, and further can include read-only computer storage media (ROM) 1023.
[0249] The computer storage medium 1002 can further include program / utility 1025 having a set of programs / modules 1024, including but not limited to, operating systems, one or more application programs, other program modules, and program data, each of which or a combination thereof, can include implementation of a network environment as in each of these examples or some combination thereof.
[0250] The electronic device 1000 can also communicate with one or more external devices 1004 such as a keyboard or a pointing device, through an input / output (I / O) interface(s) 1005. And, the electronic device 1000 can communicate with one or more devices that enable user interaction with the electronic device 1000, and / or one or more devices that enable communication of the electronic device 1000 with one or more other electronic devices. This communication can be facilitated via an I / O interface 1005. Further, the electronic device 1000 can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or the public network, such as the Internet) through a network adapter 1006. As depicted, the network adapter 1006 is in communication with the other components of the electronic device 1000 through the bus 1003. It should be appreciated that although not shown, other hardware and / or software components that can be used in conjunction with the electronic device 1000 can include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0251] In some possible implementation, each aspect of the method for predicting road congestion provided by the present disclosure can also be implemented in the form of a program product, which includes program codes for causing a computer device to execute the steps of the method for predicting road congestion according to various exemplary embodiments of the present disclosure described above in the specification when the program product is run on the computer device.
[0252] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access computer storage medium (RAM), a read-only computer storage medium (ROM), an erasable programmable read-only computer storage medium (EPROM or flash memory), an optical fiber, a portable compact disc read-only computer storage medium (CD-ROM), an optical computer storage medium, a magnetic computer storage medium, or any suitable combination of the above.
[0253] The program product for predicting road congestion of the embodiments of the present disclosure can adopt a portable compact disc read-only computer storage medium (CD-ROM) and include program codes, and can be run on an electronic device. However, the program product of the present disclosure is not limited thereto, and in this document, the readable storage medium can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, device or apparatus.
[0254] The readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, in which readable program codes are borne. Such a propagated data signal can take on many forms, including but not limited to electro-magnetic signal, optical signal or any suitable combination thereof. The readable signal medium can also be any readable medium that is not a readable storage medium and that can transmit, propagate or transport program for use by or in connection with an instruction execution system, device or apparatus.
[0255] The program codes contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0256] Program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's electronic device, partly on the user's electronic device, as a stand-alone software package, partly on the user's electronic device and partly on a remote electronic device or entirely on the remote electronic device or server. In the latter scenario, the remote electronic device can be connected to the user's electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external electronic device (for example, through the Internet using an Internet Service Provider). The application program code can be embodied in any
[0257] It should be noted that, although several modules of an apparatus are referred to in the foregoing detailed description, such partitioning is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, features and functions of two or more modules described above can be embodied in a single module. Conversely, a module described above can be partitioned into multiple modules to perform the features and functions described above.
[0258] Furthermore, although the operations of the method(s) of the present disclosure are described in a particular, sequential order for purposes of illustration, this is not a requirement of the present disclosure, and any number of the described operations can be performed in any order, and many of the described operations can be performed in parallel. Additionally or alternatively, certain of the described operations can be omitted, combined with other operations, or performed in sub-operations.
[0259] Those skilled in the art will appreciate that embodiments of the present disclosure can be devised for a system, method, or computer program product. Accordingly, the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical, and the like) embodying computer readable program code.
[0260] The computer program instructions can also be loaded onto 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 functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 one or more flowcharts and / or blocks
[0261] 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 Figure 1 one or more flowcharts and / or blocks Figure 1 one or more flowcharts and / or blocks
[0262] The computer program instructions can also be loaded onto 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 functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 one or more flowcharts and / or blocks
[0263] Obviously, numerous modifications and variations of the present disclosure are possible in light of the above teachings. It is therefore to be understood that within the scope of the apparatuses and computing machine program products according to the present disclosure. It is to be understood that any feature described in relation to a particular aspect of the present disclosure can be incorporated into any other aspect of the present disclosure, and vice versa. As such, the foregoing description is provided as an exemplification of the present disclosure and is not intended to limit the scope of the present disclosure. Having described the features of the present disclosure, the manner in which it is constructed and used, and its preferred mode of operation, we claim as our application that which is set forth in the following claims.
Claims
1. A method for predicting road congestion, characterized in that, The method includes: Every first specified time interval, based on the link data of each link in the target road segment, the Traffic Congestion Index (TPI) of the target road segment is obtained within multiple second specified time intervals, wherein the link data is the average speed of the link within the second specified time interval, and the first specified time interval is longer than the second specified time interval. For any other road segment within the target road network area, excluding the target road segment, a first correlation coefficient is obtained based on the TPI of the target road segment over multiple second specified time periods, the TPI of the other road segments over multiple second specified time periods, the average TPI of the target road segment over multiple second specified time periods, and the average TPI of the other road segments over multiple second specified time periods; wherein, the target road network area is obtained based on the location of the target road segment; A second correlation coefficient is obtained based on the TPI of the target road segment over multiple second specified time periods and the TPI of the other road segments over multiple second specified time periods; wherein, the second correlation coefficient is obtained by the following formula: ; in, This is the second correlation coefficient. The TPI of the target road segment within the second specified time period i. For other road segments, the TPI within the second specified time period i; Using the first correlation coefficient and the second correlation coefficient, the target correlation coefficient between the target road segment and the other road segments within the first specified time period is obtained; wherein, the target correlation coefficient is obtained by the following formula: ; in, The target correlation coefficient, The first correlation coefficient; The other road segments are sorted in ascending order of their target correlation coefficients, and the first specified number of other road segments are identified as other target road segments associated with the target road segment. The TPI of the target road segment within the plurality of second specified time periods and the TPI of other target road segments associated with the target road segment within the plurality of second specified time periods are input into a pre-trained congestion prediction model to predict congestion, thereby obtaining the predicted TPI of the target road segment in the next first specified time period; The congestion prediction result of the target road segment is obtained by predicting the TPI of the target road segment in the next first specified time period.
2. The method according to claim 1, characterized in that, The Traffic Congestion Index (TPI) for the target road segment over multiple second specified time periods is obtained based on the link data of each link in the target road segment, including: For any link in the target road segment, perform the following steps: For any given second specified duration, based on the link data of the link within the second specified duration, determine the target link interval where the link is located; By utilizing the correspondence between link intervals and traffic congestion functions, the target traffic congestion function corresponding to the link interval is determined; The link data of the link is input into the target traffic congestion function to obtain the TPI of the link within the second specified time period; The TPI of each link in the target road segment within each of the second specified time periods is determined as the TPI of the target road segment within the plurality of second specified time periods.
3. The method according to claim 1, characterized in that, The target road network area is determined in the following manner: The area centered on the location of the target road segment and with a radius of a specified length is defined as the target road network area corresponding to the target road segment.
4. The method according to claim 1, characterized in that, For any other road segment, a first correlation coefficient is obtained based on the TPI of the target road segment over multiple second specified time periods, the TPI of the other road segments over multiple second specified time periods, the average TPI of the target road segment over multiple second specified time periods, and the average TPI of the other road segments over multiple second specified time periods, including: The first correlation coefficient is obtained using the following formula: ; in, The first correlation coefficient, The TPI of the target road segment within the second specified time period i. The average TPI of the target road segment over multiple second specified time periods. For other road segments, the TPI within the second specified time period i, The average TPI of the target road segment over multiple second specified time periods is N, where N is the number of the multiple second specified time periods.
5. The method according to claim 1, characterized in that, Before obtaining other target road segments associated with the target road segment within the target road network area by utilizing the TPI of the target road segment within multiple second specified time periods and the TPI of other road segments within the target road network area other than the target road segment within multiple second specified time periods, the method further includes: The TPIs of the target road segment within the multiple second specified time periods are identified as abnormal data to obtain abnormal TPIs. The abnormal TPI is repaired using target data, wherein the target data includes vehicle passage data or historical TPIs within the link corresponding to the abnormal TPI, and the vehicle passage data includes the start time and end time when each vehicle passes through the link, and the historical TPIs include each historical TPI of the link.
6. The method according to claim 5, characterized in that, The method of repairing the abnormal TPI using target data includes: If the target data is vehicle passage data, then based on the start time and end time of each vehicle passing through the link and the length of the link, the corresponding repair link data is obtained, and the target TPI of the link is obtained based on the repair link data. The abnormal TPI is then replaced using the target TPI; or, If the target data is a historical TPI, then the average value of each historical TPI of the link within the fourth specified time period is determined as the target TPI of the link, and the abnormal TPI is replaced by the target TPI, wherein the fourth specified time period is longer than the second specified time period.
7. The method according to claim 1, characterized in that, After obtaining the congestion prediction result of the target road segment by predicting the TPI of the target road segment within the next first specified time period, the method further includes: Every third specified time interval, an error value is obtained based on the predicted TPI and actual TPI of the target road segment in each first specified time interval within the third specified time interval, wherein the third specified time interval is longer than the first specified time interval; When the error value meets the specified conditions, the congestion prediction model is retrained using the training data within the specified target time period, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
8. The method according to claim 7, characterized in that, The error value includes a first error value and a second error value; The error value is obtained based on the predicted TPI and actual TPI of the target road segment within each of the first specified time periods within the third specified time period, including: The first error value is obtained using the following formula: ; in, The first error value, The predicted TPI for the target road segment within the first specified time period j. The actual TPI of the target road segment within the first specified time period j, where n is the total number of the first specified time period; The second error value is obtained using the following formula: ; in, This is the second error value.
9. An electronic device, characterized in that, It includes a memory and a processor, wherein the processor and the memory are connected via a bus; The memory stores a computer program, and the processor is configured to perform the following operations based on the computer program: Every first specified time interval, based on the link data of each link in the target road segment, the Traffic Congestion Index (TPI) of the target road segment is obtained within multiple second specified time intervals, wherein the link data is the average speed of the link within the second specified time interval, and the first specified time interval is longer than the second specified time interval. For any other road segment within the target road network area, excluding the target road segment, a first correlation coefficient is obtained based on the TPI of the target road segment over multiple second specified time periods, the TPI of the other road segments over multiple second specified time periods, the average TPI of the target road segment over multiple second specified time periods, and the average TPI of the other road segments over multiple second specified time periods; wherein, the target road network area is obtained based on the location of the target road segment; A second correlation coefficient is obtained based on the TPI of the target road segment over multiple second specified time periods and the TPI of the other road segments over multiple second specified time periods; wherein, the second correlation coefficient is obtained by the following formula: ; in, This is the second correlation coefficient. The TPI of the target road segment within the second specified time period i. For other road segments, the TPI within the second specified time period i; Using the first correlation coefficient and the second correlation coefficient, the target correlation coefficient between the target road segment and the other road segments within the first specified time period is obtained; wherein, the target correlation coefficient is obtained by the following formula: ; in, The target correlation coefficient, The first correlation coefficient; The other road segments are sorted in ascending order of their target correlation coefficients, and the first specified number of other road segments are identified as other target road segments associated with the target road segment. The TPI of the target road segment within the plurality of second specified time periods and the TPI of other target road segments associated with the target road segment within the plurality of second specified time periods are input into a pre-trained congestion prediction model to predict congestion, thereby obtaining the predicted TPI of the target road segment in the next first specified time period; The congestion prediction result of the target road segment is obtained by predicting the TPI of the target road segment in the next first specified time period.
Citation Information
Patent Citations
Depth learning-based road network traffic situation forecast method and system
CN110570651A
Speed limit value determination method and device, equipment and medium
CN115083150A