Road congestion prediction method and electronic equipment
By considering the road network correlation in road congestion prediction and using the traffic congestion index of the target section and the associated section for prediction, the problem of low prediction accuracy in the prior art is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202311308195.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2043-10-10
AI Technical Summary
The prior art fails to effectively consider the road network association relationship in road congestion prediction, resulting in a low prediction accuracy.
The traffic congestion index TPI is calculated based on the link data of the target section every certain period of time, and combined with the TPI of other sections in the target road network area, other sections associated with the target road section are determined, and finally input these data to the pre-trained congestion prediction model for prediction.
By considering the overall correlation relationship of the road network, the accuracy of road congestion prediction is improved and a more comprehensive congestion prediction analysis is provided.
Smart Images

Figure CN119811065A_ABST
Abstract
Description
Background Art
[0002] Traffic congestion has long been one of the main problems facing cities, and alleviating urban congestion is also a major measure to improve residents' happiness index. The key function of efficient transportation in the field of intelligent transportation lies in traffic flow induction and control, and a good control plan depends on real-time perception and accurate prediction of traffic conditions.
[0003] In the prior art, the method of predicting road congestion mostly utilizes a congestion prediction algorithm to predict the congestion situation of each road section to be analyzed based on the congestion index of each road section to be analyzed. However, this method does not take the actual road network correlation into consideration as a whole, so it will result in a low accuracy rate in congestion prediction of the road section to be analyzed. Summary of the invention
[0004] In an exemplary embodiment of the present disclosure, a method for predicting road congestion and an electronic device are provided to improve the accuracy of road congestion prediction.
[0005] A first aspect of the present disclosure provides a method for predicting road congestion, the method comprising:
[0006] At every first designated time, based on the link data of each link in the target road section, a traffic congestion index TPI of the target road section within a plurality of second designated time periods is obtained, wherein the link data is an average speed of the link within the second designated time period, and the first designated time period is greater than the second designated time period;
[0007] Using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods, other target road segments associated with the target road segment within the target road network area are obtained, wherein the target road network area is obtained according to the position of the target road segment;
[0008] Inputting 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 into a pre-trained congestion prediction model for congestion prediction, and obtaining a predicted TPI of the target road segment within the next first specified time period;
[0009] The congestion prediction result of the target road section is obtained by predicting the TPI of the target road section within the next first specified time period.
[0010] In this embodiment, by using the TPI of the target section within multiple second specified time periods and the TPI of other sections except the target section within the target road network area within multiple second specified time periods, other target sections associated with the target section in the target road network area are obtained, and the TPI of the target section within the multiple second specified time periods and the TPI of other target sections associated with the target section within the multiple second specified time periods are input into a pre-trained congestion prediction model for congestion prediction, and the predicted TPI of the target section within the next first specified time period is obtained, and finally the congestion prediction result of the target section is obtained by the predicted TPI of the target section within the next first specified time period. Therefore, in the embodiment of the present application, other target sections associated with the target section are obtained by analyzing the actual historical congestion situation, and the TPI of the target section is combined with the TPI of other target sections associated with the target section to perform congestion prediction on the target section, so that a more comprehensive congestion prediction analysis can be performed, and the accuracy of the congestion prediction result is improved.
[0011] In one embodiment, obtaining the traffic congestion index TPI of the target road section within a plurality of second specified time periods based on the link data of each link in the target road section includes:
[0012] For any link in the target segment, perform the following steps:
[0013] For any second specified time period, determining a target link section where the link is located based on link data of the link within the second specified time period;
[0014] Determine a target traffic congestion function corresponding to the link interval by using the corresponding relationship between the link interval and the traffic congestion function;
[0015] Inputting 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;
[0016] The TPI of each link in the target segment within each of the second specified time periods is determined as the TPI of the target segment within the plurality of second specified time periods.
[0017] In this embodiment, the target traffic congestion function corresponding to the target link interval is determined by the target link interval where the link data of each link in the target section is located, and then 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 length, and the TPI of each link in the target section within each second specified time length is determined as the TPI of the target section within the multiple second specified time lengths. Thus, in the embodiment of the present application, the TPI of the target section within multiple second specified time lengths is obtained based on the link data of each link, which ensures the accuracy of the determined TPI of the target section.
[0018] In one embodiment, the target road network area is determined by:
[0019] An area with the position of the target road section as the center and a radius of a specified length is determined as the target road network area corresponding to the target link.
[0020] In one embodiment, the method of obtaining other target road segments associated with the target road segment in the target road network area by using the TPI of the target road segment within multiple second specified time periods and the TPI of other road segments other than the target road segment within the target road network area within multiple second specified time periods includes:
[0021] For any other road section, a first correlation coefficient is obtained according to the TPI of the target road section within multiple second specified time periods, the TPI of the other road sections within multiple second specified time periods, the average value of the TPI of the target road section within multiple second specified time periods, and the average value of the TPI of the other road sections within multiple second specified time periods; and
[0022] Obtaining a second correlation coefficient according to the TPI of the target section within a plurality of second specified time periods, the TPI of the other sections within a plurality of second specified time periods, and an average value of the TPI of the target section within a plurality of second specified time periods; and
[0023] Using the first correlation coefficient and the second correlation coefficient, obtaining a target correlation coefficient between the target road section and the other road sections within the first specified time period;
[0024] The other road sections are sorted in ascending order according to the target correlation coefficients, and the first specified number of other road sections are determined as other target road sections associated with the target road section.
[0025] In this embodiment, the target correlation coefficient between the target section and other sections is determined by the TPI of the target section within multiple second specified time periods and the TPI of other sections in the target road network area except the target section within multiple second specified time periods, and then other target sections associated with the target section are determined based on the correlation coefficient. Therefore, in the embodiment of the present application, the correlation relationship between the sections is analyzed in combination with the actual traffic congestion situation, so the accuracy of the other target sections associated with the target section is guaranteed.
[0026] In one embodiment, for any other road segment, the first correlation coefficient is obtained according to the TPI of the target road segment within multiple second specified time lengths, the TPI of the other road segments within multiple second specified time lengths, the average value of the TPI of the target road segment within multiple second specified time lengths, and the average value of the TPI of the other road segments within multiple second specified time lengths, including:
[0027] The first correlation coefficient is obtained by the following formula:
[0028]
[0029] Among them, r1 is the first correlation coefficient, x i is the TPI of the target section within the second specified time i, is the average value of the TPI of the target section within multiple second specified time periods, y i is the TPI of other sections within the second specified time i, is the average value of the TPI of the target road segment within a plurality of second specified time periods, and N is the number of the plurality of second specified time periods;
[0030] The obtaining of a second correlation coefficient according to the TPI of the target section, the TPIs of the other sections, and the average value of the TPI of the target section includes:
[0031] The second correlation coefficient is obtained by the following formula:
[0032]
[0033] Wherein, r2 is the second correlation coefficient;
[0034] The obtaining of a target correlation coefficient between the target road section and the other road sections by using the first correlation coefficient and the second correlation coefficient includes:
[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 obtaining other target road segments associated with the target road segment in the target road network area by using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods, the method further includes:
[0039] Identifying abnormal data of the TPI of the target section within the plurality of second specified time periods to obtain abnormal TPI;
[0040] The abnormal TPI is repaired using target data, wherein the target data includes vehicle passing data or historical TPI in a link corresponding to the abnormal TPI, and the vehicle passing data includes a start time and an end time when each vehicle passes through the link, and the historical TPI includes each historical TPI of the link.
[0041] This embodiment obtains abnormal TPI by identifying abnormal data of the TPI of the target road section within the plurality of second specified time periods, and repairs the abnormal TPI using the target data, thereby ensuring the quality of the data and further improving the accuracy of road congestion prediction.
[0042] In one embodiment, the repairing the abnormal TPI using the target data includes:
[0043] If the target data is vehicle passing data, then based on the start time and end time of each vehicle passing through the link and the length of the link, the repair link data corresponding to 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 a historical TPI, the average value of the historical TPIs of the link within a 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 greater than the second specified time period.
[0045] In this embodiment, the abnormal TPI is repaired by using the passing vehicle data or the historical TPI, thereby ensuring that the abnormal TPI can be repaired and the accuracy of the road congestion prediction is ensured.
[0046] In one embodiment, 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:
[0047] At every third designated time, based on the predicted TPI and the actual TPI of the target road segment in each first designated time within the third designated time, an error value is obtained, wherein the third designated time is greater than the first designated time;
[0048] When the error value satisfies a specified condition, the congestion prediction model is retrained using training data within a target specified time period, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0049] In this 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 within the third specified time period within each first specified time period 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 step of obtaining an error value based on the predicted TPI and the actual TPI of the target road section within the third specified time period within each first specified time period comprises:
[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 segment within the first specified duration j, q j is the actual TPI of the target segment within the first specified duration j, and n is the total number of the first specified duration;
[0055] The second error value is obtained by the following formula:
[0056]
[0057] Wherein, u2 is the second error value.
[0058] A second aspect of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the processor and the memory are connected via a bus;
[0059] The memory stores a computer program, and the processor is configured to perform the following operations based on the computer program:
[0060] At every first designated time, based on the link data of each link in the target road section, a traffic congestion index TPI of the target road section within a plurality of second designated time periods is obtained, wherein the link data is an average speed of the link within the second designated time period, and the first designated time period is greater than the second designated time period;
[0061] Using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods, other target road segments associated with the target road segment within the target road network area are obtained, wherein the target road network area is obtained according to the position of the target road segment;
[0062] Inputting 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 into a pre-trained congestion prediction model for congestion prediction, and obtaining a predicted TPI of the target road segment within the next first specified time period;
[0063] The congestion prediction result of the target road section is obtained by predicting the TPI of the target road section within the next first specified time period.
[0064] In one embodiment, the processor executes the link data based on each link in the target road section to obtain the traffic congestion index TPI of the target road section within multiple second specified time periods, and is specifically configured as follows:
[0065] For any link in the target segment, perform the following steps:
[0066] For any second specified time period, determining a target link section where the link is located based on link data of the link within the second specified time period;
[0067] Determine a target traffic congestion function corresponding to the link interval by using the corresponding relationship between the link interval and the traffic congestion function;
[0068] Inputting 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;
[0069] The TPI of each link in the target segment within each of the second specified time periods is determined as the TPI of the target segment within the plurality of second specified time periods.
[0070] In one embodiment, the processor is further configured to:
[0071] The target road network area is determined by:
[0072] An area with the position of the target road section as the center and a radius of a specified length is determined as the target road network area corresponding to the target link.
[0073] In one embodiment, the processor performs the step of using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods to obtain other target road segments associated with the target road segment within the target road network area, and is specifically configured as follows:
[0074] For any other road section, a first correlation coefficient is obtained according to the TPI of the target road section within multiple second specified time periods, the TPI of the other road sections within multiple second specified time periods, the average value of the TPI of the target road section within multiple second specified time periods, and the average value of the TPI of the other road sections within multiple second specified time periods; and
[0075] Obtaining a second correlation coefficient according to the TPI of the target section within a plurality of second specified time periods, the TPI of the other sections within a plurality of second specified time periods, and an average value of the TPI of the target section within a plurality of second specified time periods; and
[0076] Using the first correlation coefficient and the second correlation coefficient, obtaining a target correlation coefficient between the target road section and the other road sections within the first specified time period;
[0077] The other road sections are sorted in ascending order according to the target correlation coefficients, and the first specified number of other road sections are determined as other target road sections associated with the target road section.
[0078] In one embodiment, the processor executes the step of obtaining a first correlation coefficient for any other road segment according to the TPI of the target road segment within multiple second specified time lengths, the TPI of the other road segments within multiple second specified time lengths, the average value of the TPI of the target road segment within multiple second specified time lengths, and the average value of the TPI of the other road segments within multiple second specified time lengths, and is specifically configured as follows:
[0079] The first correlation coefficient is obtained by the following formula:
[0080]
[0081] Among them, r1 is the first correlation coefficient, xi is the TPI of the target section within the second specified time i, is the average value of the TPI of the target section within multiple second specified time periods, yi is the TPI of other sections within the second specified time period i, is the average value of the TPI of the target road segment within a plurality of second specified time periods, and N is the number of the plurality of second specified time periods;
[0082] The obtaining of a second correlation coefficient according to the TPI of the target section, the TPIs of the other sections, and the average value of the TPI of the target section includes:
[0083] The second correlation coefficient is obtained by the following formula:
[0084]
[0085] Wherein, r2 is the second correlation coefficient;
[0086] The obtaining of a target correlation coefficient between the target road section and the other road sections by using the first correlation coefficient and the second correlation coefficient includes:
[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] Before obtaining other target road segments associated with the target road segment in the target road network area by using the TPI of the target road segment in the multiple second specified time periods and the TPI of other road segments in the target road network area except the target road segment in the multiple second specified time periods, abnormal data is identified for the TPI of the target road segment in the multiple second specified time periods to obtain abnormal TPI;
[0092] The abnormal TPI is repaired using target data, wherein the target data includes vehicle passing data or historical TPI in a link corresponding to the abnormal TPI, and the vehicle passing data includes a start time and an end time when each vehicle passes through the link, and the historical TPI includes each historical TPI of the link.
[0093] In one embodiment, the processor executes the repairing of the abnormal TPI by using the target data, and is specifically configured to:
[0094] If the target data is vehicle passing data, then based on the start time and end time of each vehicle passing through the link and the length of the link, the repair link data corresponding to 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,
[0095] If the target data is a historical TPI, the average value of the historical TPIs of the link within a 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 greater than the second specified time period.
[0096] In one embodiment, the processor is further configured to:
[0097] After obtaining the congestion prediction result of the target road segment by predicting the TPI of the target road segment in the next first specified time, obtaining the error value based on the predicted TPI and the actual TPI of the target road segment in each first specified time within the third specified time every third specified time, wherein the third specified time is greater than the first specified time;
[0098] When the error value satisfies a specified condition, the congestion prediction model is retrained using training data within a target specified time period, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0099] In one embodiment, the error value includes a first error value and a second error value;
[0100] The processor executes the predicted TPI and the actual TPI based on the target road section within the third specified time period within each first specified time period to obtain an error value, and is specifically configured as follows:
[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 segment within the first specified duration j, q j is the actual TPI of the target segment within the first specified duration j, and n is the total number of the first specified duration;
[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 an embodiment of the present disclosure, a computer storage medium is provided, wherein the computer storage medium stores a computer program, and the computer program is used to execute the method as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0108] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0109] Figure 1 A schematic diagram of an applicable scenario in an embodiment of the present disclosure;
[0110] Figure 2 This is one of the flowcharts of a road congestion prediction method according to an embodiment of the present disclosure;
[0111] Figure 3 It is a flowchart of a method for determining the TPI of a target road segment within a plurality of second specified time periods according to an embodiment of the present disclosure;
[0112] Figure 4 is a schematic diagram of a target road section according to an embodiment of the present disclosure;
[0113] Figure 5 A schematic diagram of a process for repairing abnormal data according to an embodiment of the present disclosure;
[0114] Figure 6 A schematic diagram of a process of determining other target road segments associated with a target road segment in a target road network area according to an embodiment of the present disclosure;
[0115] Figure 7 A schematic diagram of a process of retraining a 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] Fig. 9 A road congestion prediction device according to an embodiment of the present disclosure;
[0118] Fig.10 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0119] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0120] In the embodiments of the present disclosure, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0121] The application scenarios described in the embodiments of the present disclosure are intended 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. It is known to those skilled in the art that with the emergence of new application scenarios, 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 method of predicting road congestion mostly utilizes a congestion prediction algorithm to predict the congestion situation of each road section to be analyzed based on the congestion index of each road section to be analyzed. However, this method does not take the actual road network correlation into consideration as a whole, so it will result in a low accuracy rate in congestion prediction of the road section to be analyzed.
[0123] Therefore, the present disclosure provides a method for predicting road congestion, by using the TPI of the target road section within multiple second specified time lengths and the TPI of other road sections other than the target road section within the target road network area within multiple second specified time lengths, obtaining other target road sections associated with the target road section within the target road network area, inputting the TPI of the target road section within the multiple second specified time lengths and the TPI of other target road sections associated with the target road section within the multiple second specified time lengths into a pre-trained congestion prediction model for congestion prediction, obtaining the predicted TPI of the target road section within the next first specified time length, and finally obtaining the congestion prediction result of the target road section through the predicted TPI of the target road section within the next first specified time length. Thus, in the embodiment of the present application, other target road sections associated with the target road section are obtained by analyzing the actual historical congestion situation, and the TPI of the target road section is combined with the TPI of other target road sections associated with the target road section to predict congestion for the target road section, which can perform more comprehensive congestion prediction analysis and improve the accuracy of congestion prediction results. The scheme of the present disclosure is described in detail below with reference to the accompanying drawings.
[0124] like Figure 1 As shown, an application scenario of a method for predicting road congestion includes a terminal device 110 and a server 120.
[0125] In a possible application scenario, at every first specified time period, the server 120 obtains the traffic congestion index TPI of the target road section within multiple second specified time periods based on the link data of each link in the target road section, wherein the link data is the average speed of the link within the second specified time period, and the first specified time period is greater than the second specified time period; and uses the TPI of the target road section within multiple second specified time periods and the TPI of other road sections in the target road network area except the target road section within multiple second specified time periods to obtain other target road sections associated with the target road section in the target road network area, wherein, The target road network area is obtained according to the position of the target road segment; then the server 120 inputs the TPI of the target road segment within the multiple second specified time periods and the TPI of other target road segments associated with the target road segment within the multiple second specified time periods into a pre-trained congestion prediction model for congestion prediction, and obtains the predicted TPI of the target road segment within the next first specified time period; finally, the server 120 obtains the congestion prediction result of the target road segment through the predicted TPI of the target road segment within the next first specified time period, and sends the congestion prediction result to the terminal device 110 for display.
[0126] in, Figure 1The terminal device 110 and the server 120 may exchange information via a communication network, wherein the communication mode adopted by the communication network may be divided into a wireless communication mode or a wired communication mode.
[0127] Exemplarily, the server 120 can access the network through cellular mobile communication technology to communicate with the terminal device 110, wherein the cellular mobile communication technology, for example, includes the fifth generation mobile communication (5th Generation Mobile Networks, 5G) technology.
[0128] Optionally, the server 120 may access the network and communicate with the terminal device 110 via short-range wireless communication, wherein the short-range wireless communication method, for example, includes Wireless Fidelity (Wi-Fi) technology.
[0129] Among them, only a single terminal device 110 and a single server 120 are described in detail in the description of this application, but those skilled in the art should understand that the terminal device 110 and the server 120 shown are intended to represent the operations of the terminal device 110 and the server 120 involved in the technical solution of this application. It does not imply any limitation on the number, type or location of the terminal device 110 and the server 120. It should be noted that if additional modules are added to the illustrated environment or individual modules are removed therefrom, the underlying concepts of the exemplary embodiments of this application will not be changed.
[0130] It should be noted that the road congestion prediction method proposed in this application is not only applicable to Figure 1 The application scenario shown is also applicable to any device that predicts road congestion.
[0131] The following describes the road congestion prediction method of the exemplary embodiment of the present application in combination with the application scenario described above and with reference to the accompanying drawings. It should be noted that the above application scenario is only shown to facilitate understanding of the method and principle of the present application, and the implementation of the present application is not limited in this respect.
[0132] like Figure 2 FIG. 1 is a flow chart of the road congestion prediction method disclosed in the present invention, which may include the following steps:
[0133] Step 201: obtaining a traffic congestion index TPI of the target road section within a plurality of second specified time periods based on link data of each link in the target road section at every first specified time period, wherein the link data is an average speed of the link within the second specified time period, and the first specified time period is greater than the second specified time period;
[0134] Any road section in the embodiment of the present application includes multiple links, and the link is the basic unit of the road section. And the link data in the embodiment of the present application can be directly obtained. The first specified duration and the second specified duration in the embodiment of the present application can be set according to actual conditions, and the embodiment of the present application does not limit the specific values of the first specified duration and the second specified duration.
[0135] like Figure 3 As shown, a flow chart for determining the TPI of a target road segment within a plurality of second specified time periods may include the following steps:
[0136] Step 301: for any link in the target section, perform the following steps: for any second specified duration, based on the link data of the link within the second specified duration, determine the target link section where the link is located;
[0137] In one embodiment, step 301 may be specifically implemented as follows: comparing the link data with each link interval respectively to determine the target link interval where the link data is located.
[0138] Step 302: using the correspondence between the link interval and the traffic congestion function, determine the target traffic congestion function corresponding to the link interval; wherein Table 1 is the correspondence between the link interval and the traffic congestion function:
[0139] Table 1:
[0140] Link interval Traffic congestion function <![CDATA[0<v k <v1]]> <![CDATA[w1v k +b1]]> <h2 style=";text-align:left;direction:ltr"><![CDATA[v1≤v <h2 style=";text-align:left;direction:ltr"> k <h2 style=";text-align:left;direction:ltr"> <v2]]><h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"><![CDATA[w2v <h2 style=";text-align:left;direction:ltr"> k <h2 style=";text-align:left;direction:ltr"> +b2<h2 style=";text-align:left;direction:ltr"><!-- 9 --> ]]><h2 style=";text-align:left;direction:ltr"> …… …… <![CDATA[v k ≥v n ]]> <![CDATA[w n v k +b n ]]>
[0141] Among them, v in Table 1 k is the link data, w1~w n are pre-set weight values, b1~b n A preset constant value.
[0142] Step 303: inputting 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 segment within each of the second specified time periods as the TPI of the target segment within the plurality of second specified time periods.
[0144] For example, Figure 4 The target sections include Link 1, Link 2, Link 3 and Link 4. If the second specified time is 5 minutes, the TPI of Link 1 between 00:00 and 00:05 is v a , the TPI of link 2 between 00:05 and 00:10 is v b, the TPI of link 3 between 00:10 and 00:15 is v c , the TPI of link 4 between 00:15 and 00:20 is v d Then the TPI of the target road section within the second specified time period is determined as follows: a 、v b 、v c and v d .
[0145] In order to further ensure the quality of TPI data and further improve the accuracy of congestion prediction results, in one embodiment, before executing step 202, Figure 5 As shown, it is a schematic diagram of the process of repairing abnormal data, which may include the following steps:
[0146] Step 501: identifying abnormal data of the TPI of the target road section within the plurality of second specified time periods to obtain abnormal TPI;
[0147] In one embodiment, step 501 may be specifically implemented as follows: for the target road segment in any second specified time period, determine whether the TPI within the second specified time period is within a specified range; if so, determine that the TPI is not an abnormal TPI; if not, determine that the TPI is an abnormal TPI.
[0148] Step 502: Repair the abnormal TPI using target data, wherein the target data includes vehicle passing data or historical TPI in the link corresponding to the abnormal TPI, and the vehicle passing data includes the start time and end time when each vehicle passes through the link, and the historical TPI includes each historical TPI of the link.
[0149] In one embodiment, step 502 can be specifically implemented in the following two ways:
[0150] Method 1: If the target data is vehicle passing data, then based on the start time, end time and length of each vehicle passing through the link, the repair link data corresponding to 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.
[0151] In one embodiment, the target TPI corresponding to the link is obtained in the following manner:
[0152] For any vehicle, the end time of the vehicle passing through the link is subtracted from the start time of the vehicle passing through the link to obtain the duration of the vehicle passing through the link, and the length of the link is divided by the duration of the link to obtain the speed of the vehicle passing through the link; the average value of the speed of each vehicle passing through the link is determined as the corresponding repair link data, and the corresponding relationship between the link interval and the traffic congestion function is used to determine the target traffic congestion function corresponding to the link interval where the repair link data is located, and 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 historical TPI, the average value of the historical TPIs of the link within a 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 greater than the second specified time period.
[0154] Step 202: using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods, obtaining other target road segments associated with the target road segment within the target road network area, wherein the target road network area is obtained according to the position of the target road segment;
[0155] like Figure 6 As shown, a flow chart for determining other target road segments associated with a target road segment in a target road network area may include the following steps:
[0156] Step 601: For any other road segment, a first correlation coefficient is obtained according to the TPI of the target road segment within multiple second specified time periods, the TPI of the other road segments within multiple second specified time periods, the average value of the TPI of the target road segment within multiple second specified time periods, and the average value of the TPI of the other road segments within multiple second specified time periods; wherein the first correlation coefficient can be obtained by formula (1):
[0157]
[0158] Among them, r1 is the first correlation coefficient, x i is the TPI of the target section within the second specified time i, is the average value of the TPI of the target section within multiple second specified time periods, y i is the TPI of other sections within the second specified time i, is the average value of the TPI of the target segment within multiple second specified time periods, and N is the number of the multiple second specified time periods.
[0159] Step 602: Obtain a second correlation coefficient according to the TPI of the target section within a plurality of second specified time periods, the TPI of the other sections within a plurality of second specified time periods, and the average value of the TPI of the target section within a plurality of second specified time periods; wherein the second correlation coefficient can be obtained by formula (2):
[0160]
[0161] Wherein, r2 is the second correlation coefficient.
[0162] Step 603: using the first correlation coefficient and the second correlation coefficient, obtaining a target correlation coefficient between the target road segment and the other road segments within the first specified time period; wherein the target correlation coefficient can be obtained by formula (3):
[0163]
[0164] Wherein, D is the target correlation coefficient.
[0165] Step 604: Sort the other road sections in ascending order according to the target correlation coefficient, and determine the first specified number of other road sections as other target road sections associated with the target road section.
[0166] It should be noted that the specified number in the embodiment of the present application can be set according to actual conditions, and the embodiment of the present application does not set the specified number here.
[0167] Step 203: inputting the TPI of the target road segment within the plurality of second specified time periods and the TPIs of other target roads associated with the target road segment within the plurality of second specified time periods into a pre-trained congestion prediction model to perform congestion prediction, and obtaining a predicted TPI of the target road segment within the next first specified time period;
[0168] The congestion prediction model in the embodiment of the present application may be an LSTM (Long Short-Term Memory) model, but the specific congestion prediction model may be set according to actual conditions, and the embodiment of the present application does not limit the specific structure of the congestion prediction model.
[0169] Step 204: Obtain a congestion prediction result of the target road section by predicting the TPI of the target road section within the next first specified time period.
[0170] In one embodiment, step 204 may be specifically implemented as follows: utilizing the pre-set correspondence between TPI intervals and traffic congestion levels to determine a target congestion level corresponding to the TPI interval where the predicted TPI is located, and determining the target congestion level as the congestion prediction result of the target road section.
[0171] In order to further improve the accuracy of the congestion prediction result, in one embodiment, after executing step 204, Figure 7 FIG. 1 is a flow chart of retraining the congestion prediction model, which may include the following steps:
[0172] Step 701: every third designated time, based on the predicted TPI and the actual TPI of the target road segment in each first designated time within the third designated time, an error value is obtained, wherein the third designated time is greater than the first designated time;
[0173] The error value in the embodiment 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] Among them, u1 is the first error value, pj is the predicted TPI of the target segment within the first specified time j, qj is the actual TPI of the target segment within the first specified time j, and n is the total number of the first specified time.
[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 satisfies a specified condition, the congestion prediction model is retrained using training data within a target specified time period, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
[0180] In one embodiment, step 702 may be specifically 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, determining that the error value satisfies the specified condition; otherwise, determining that the error value does not satisfy the specified condition.
[0181] In order to further understand the technical solution of the present disclosure, Figure 8 A detailed description may include the following steps:
[0182] Step 801: obtaining a traffic congestion index TPI of the target road section within a plurality of second specified time periods based on link data of each link in the target road section at every first specified time period, wherein the link data is an average speed of the link within the second specified time period, and the first specified time period is greater than the second specified time period;
[0183] Step 802: identifying abnormal data of the TPI of the target road section within the plurality of second specified time periods to obtain abnormal TPI;
[0184] Step 803: Repair the abnormal TPI using target data, wherein the target data includes vehicle passing data or historical TPI in the link corresponding to the abnormal TPI, and the vehicle passing data includes the 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 other road segment, a first correlation coefficient is obtained according to the TPI of the target road segment within a plurality of second specified time periods, the TPI of the other road segments within a plurality of second specified time periods, the average value of the TPI of the target road segment within a plurality of second specified time periods, and the average value of the TPI of the other road segments within a plurality of second specified time periods;
[0186] Step 805: Obtain a second correlation coefficient according to the TPI of the target section within a plurality of second specified time periods, the TPI of the other sections within a plurality of second specified time periods, and the average value of the TPI of the target section within a plurality of second specified time periods;
[0187] Step 806: using the first correlation coefficient and the second correlation coefficient, obtaining a target correlation coefficient between the target road segment and the other road segments within the first specified time period;
[0188] Step 807: sorting the other road sections in ascending order of target correlation coefficients, and determining the first specified number of other road sections as other target road sections associated with the target road section;
[0189] Step 808: inputting the TPI of the target road segment within the plurality of second specified time periods and the TPIs of other target roads associated with the target road segment within the plurality of second specified time periods into a pre-trained congestion prediction model to perform congestion prediction, and obtaining a predicted TPI of the target road segment within the next first specified time period;
[0190] Step 809: Obtaining a congestion prediction result of the target road section by predicting the TPI of the target road section within the next first specified time period;
[0191] Step 810: Obtaining an error value every third designated time based on the predicted TPI and the actual TPI of the target road segment within the third designated time within each first designated time, wherein the third designated time is greater than the first designated time;
[0192] Step 811: when the error value satisfies a specified condition, the congestion prediction model is retrained using training data within a target specified time period, 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 disclosed above can also be implemented by a road congestion prediction device. The effect of the road congestion prediction device is similar to that of the above method, and will not be repeated here.
[0194] Fig. 9 The figure is a schematic diagram of the structure of a device for predicting road congestion according to an embodiment of the present disclosure.
[0195] like Fig. 9 As shown, the road congestion prediction device 900 of the present disclosure may include a link traffic congestion index determination module 910 , an associated road segment 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 used to obtain the traffic congestion index TPI of the target road section within multiple second specified time periods based on the link data of each link in the target road section at every first specified time period, wherein the link data is the average speed of the link within the second specified time period, and the first specified time period is greater than the second specified time period;
[0197] The associated road segment determination module 920 is used to obtain other target road segments associated with the target road segment in the target road network area by using the TPI of the target road segment within multiple second specified time periods and the TPI of other road segments other than the target road segment within multiple second specified time periods in the target road network area, wherein the target road network area is obtained according to the position of the target road segment;
[0198] The congestion prediction module 930 is used to input the TPI of the target road segment within the multiple second specified time periods and the TPI of other target roads associated with the target road segment within the multiple second specified time periods into a pre-trained congestion prediction model to perform congestion prediction, and obtain a predicted TPI of the target road segment within the next first specified time period;
[0199] The congestion prediction result determination module 940 is used to obtain the congestion prediction result of the target road section by predicting the TPI of the target road section within the next first specified time period.
[0200] In one embodiment, the link traffic congestion index determination module 910 is specifically configured to:
[0201] For any link in the target segment, perform the following steps:
[0202] For any second specified time period, determining a target link section where the link is located based on link data of the link within the second specified time period;
[0203] Determine a target traffic congestion function corresponding to the link interval by using the corresponding relationship between the link interval and the traffic congestion function;
[0204] Inputting 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;
[0205] The TPI of each link in the target segment within each of the second specified time periods is determined as the TPI of the target segment within the plurality of second specified time periods.
[0206] In one embodiment, the apparatus further comprises:
[0207] The target road network area determination module 950 is used to determine the target road network area by:
[0208] An area with the position of the target road section as the center and a radius of a specified length is determined as the target road network area corresponding to the target link.
[0209] In one embodiment, the associated road section determination module 920 is specifically configured to:
[0210] For any other road section, a first correlation coefficient is obtained according to the TPI of the target road section within multiple second specified time periods, the TPI of the other road sections within multiple second specified time periods, the average value of the TPI of the target road section within multiple second specified time periods, and the average value of the TPI of the other road sections within multiple second specified time periods; and
[0211] Obtaining a second correlation coefficient according to the TPI of the target section within a plurality of second specified time periods, the TPI of the other sections within a plurality of second specified time periods, and an average value of the TPI of the target section within a plurality of second specified time periods; and
[0212] Using the first correlation coefficient and the second correlation coefficient, obtaining a target correlation coefficient between the target road section and the other road sections within the first specified time period;
[0213] The other road sections are sorted in ascending order according to the target correlation coefficients, and the first specified number of other road sections are determined as other target road sections associated with the target road section.
[0214] In one embodiment, the associated road section determination module 920 is further configured to:
[0215] The first correlation coefficient is obtained by the following formula:
[0216]
[0217] Among them, r1 is the first correlation coefficient, x i is the TPI of the target section within the second specified time i, is the average value of the TPI of the target section within multiple second specified time periods, y i For other sections
[0218] 2. TPI within a specified time period i, is the average value of the TPI of the target road segment within a plurality of second specified time periods, and N is the number of the plurality of second specified time periods;
[0219] The second correlation coefficient is obtained by the following formula:
[0220]
[0221] Wherein, r2 is the second correlation coefficient;
[0222] The obtaining of a target correlation coefficient between the target road section and the other road sections by using the first correlation coefficient and the second correlation coefficient includes:
[0223] The target correlation coefficient is obtained by the following formula:
[0224]
[0225] Wherein, D is the target correlation coefficient.
[0226] In one embodiment, the apparatus further comprises:
[0227] A data repair module 960 is used for identifying abnormal data of the TPI of the target road section within the multiple second specified time lengths to obtain abnormal TPI before obtaining other target road sections associated with the target road section within the target road network area by using the TPI of the target road section within the multiple second specified time lengths and the TPI of other road sections other than the target road section within the target road network area within the multiple second specified time lengths;
[0228] The abnormal TPI is repaired using target data, wherein the target data includes vehicle passing data or historical TPI in a link corresponding to the abnormal TPI, and the vehicle passing data includes a start time and an end time when each vehicle passes through the link, and the historical TPI includes each historical TPI of the link.
[0229] In one embodiment, the data repair module 960 is further configured to:
[0230] If the target data is vehicle passing data, then based on the start time and end time of each vehicle passing through the link and the length of the link, the repair link data corresponding to 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,
[0231] If the target data is a historical TPI, the average value of the historical TPIs of the link within a 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 greater than the second specified time period.
[0232] In one embodiment, the apparatus further comprises:
[0233] A model retraining module 970 is configured to obtain an error value based on the predicted TPI of the target road section in each first specified time period and the actual TPI of the target road section in the third specified time period after obtaining the congestion prediction result of the target road section by predicting the TPI of the target road section in the next first specified time period, and the third specified time period is greater than the first specified time period;
[0234] When the error value satisfies a specified condition, the congestion prediction model is retrained using training data within 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; the device further includes:
[0236] The error value determination module 980 is used to obtain the first error value by the following formula:
[0237]
[0238] Wherein, u1 is the first error value, p j is the predicted TPI of the target segment within the first specified duration j, q j is the actual TPI of the target segment within the first specified duration j, and n is the total number of the first specified duration;
[0239] The second error value is obtained by the following formula:
[0240]
[0241] Wherein, u2 is the second error value.
[0242] After introducing a method and apparatus for predicting road congestion according to an exemplary embodiment of the present disclosure, next, an electronic device according to another exemplary embodiment of the present disclosure is introduced.
[0243] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0244] In some possible implementations, the electronic device according to the present disclosure may include at least one processor and at least one computer storage medium. The computer storage medium stores program code, and when the program code is executed by the processor, the processor executes the steps of the method for predicting road congestion according to various exemplary embodiments of the present disclosure described above in this specification. For example, the processor may execute the following steps: Figure 2 Steps 201-204 shown in .
[0245] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present disclosure is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0246] like Fig.10As shown, the electronic device 1000 is in the form of a general electronic device. The components of the electronic device 1000 may include but are not limited to: the at least one processor 1001, the at least one computer storage medium 1002, and a bus 1003 connecting different system components (including the computer storage medium 1002 and the processor 1001).
[0247] Bus 1003 represents one or more of several types of bus structures, including a computer storage media bus or computer storage media controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
[0248] The computer storage medium 1002 may include readable media in the form of volatile computer storage media, such as random access computer storage media (RAM) 1021 and / or cache storage media 1022 , and may further include read-only computer storage media (ROM) 1023 .
[0249] The computer storage medium 1002 may also include a program / utility 1025 having a set (at least one) of program modules 1024, such program modules 1024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0250] The electronic device 1000 may also communicate with one or more external devices 1004 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1005. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1006. As shown, the network adapter 1006 communicates with other modules for the electronic device 1000 via a bus 1003. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0251] In some possible implementations, various aspects of a method for predicting road congestion provided by the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the 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 this specification.
[0252] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, 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 disk 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 of the road congestion prediction of the embodiment of the present disclosure can adopt a portable compact disk read-only computer storage medium (CD-ROM) and include program code, and can be run on an electronic device. However, the program product of the present disclosure is not limited to this. In this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0254] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0255] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0256] Program code for performing the disclosed operations may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user electronic device, partially on the user device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In the case of a remote electronic device, the remote electronic device may be connected to the user electronic device via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0257] It should be noted that although several modules of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be embodied.
[0258] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0259] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk computer storage media, CD-ROM, optical computer storage media, etc.) containing computer-usable program codes.
[0260] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0261] These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable computer storage medium produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0262] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0263] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A method for predicting road congestion, characterized in that: The method comprises: At every first designated time, based on the link data of each link in the target road section, a traffic congestion index TPI of the target road section within a plurality of second designated time periods is obtained, wherein the link data is an average speed of the link within the second designated time period, and the first designated time period is greater than the second designated time period; Using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods, other target road segments associated with the target road segment within the target road network area are obtained, wherein the target road network area is obtained according to the position of the target road segment; Inputting 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 into a pre-trained congestion prediction model for congestion prediction, and obtaining a predicted TPI of the target road segment within the next first specified time period; The congestion prediction result of the target road section is obtained by predicting the TPI of the target road section within the next first specified time period.
2. The method according to claim 1, characterized in that: The step of obtaining the traffic congestion index TPI of the target road section within a plurality of second specified time periods based on the link data of each link in the target road section includes: For any link in the target segment, perform the following steps: For any second specified time period, determining a target link section where the link is located based on link data of the link within the second specified time period; Determine a target traffic congestion function corresponding to the link interval by using the corresponding relationship between the link interval and the traffic congestion function; Inputting 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; The TPI of each link in the target segment within each of the second specified time periods is determined as the TPI of the target 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 by: An area with the position of the target road section as the center and a radius of a specified length is determined as the target road network area corresponding to the target link.
4. The method according to claim 1, characterized in that: The method of obtaining other target road segments associated with the target road segment in the target road network area by using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods comprises: For any other road section, a first correlation coefficient is obtained according to the TPI of the target road section within multiple second specified time periods, the TPI of the other road sections within multiple second specified time periods, the average value of the TPI of the target road section within multiple second specified time periods, and the average value of the TPI of the other road sections within multiple second specified time periods; and Obtaining a second correlation coefficient according to the TPI of the target section within a plurality of second specified time periods, the TPI of the other sections within a plurality of second specified time periods, and an average value of the TPI of the target section within a plurality of second specified time periods; and Using the first correlation coefficient and the second correlation coefficient, obtaining a target correlation coefficient between the target road section and the other road sections within the first specified time period; The other road sections are sorted in ascending order according to the target correlation coefficients, and the first specified number of other road sections are determined as other target road sections associated with the target road section.
5. The method according to claim 4, characterized in that For any other road section, obtaining a first correlation coefficient according to the TPI of the target road section within multiple second specified time lengths, the TPI of the other road sections within multiple second specified time lengths, the average value of the TPI of the target road section within multiple second specified time lengths, and the average value of the TPI of the other road sections within multiple second specified time lengths, includes: The first correlation coefficient is obtained by the following formula: Among them, r1 is the first correlation coefficient, x i is the TPI of the target section within the second specified time i, is the average value of the TPI of the target section within multiple second specified time periods, y i is the TPI of other road sections within the second specified time i, is the average value of the TPI of the target road segment within a plurality of second specified time periods, and N is the number of the plurality of second specified time periods; The obtaining of a second correlation coefficient according to the TPI of the target section, the TPIs of the other sections, and the average value of the TPI of the target section includes: The second correlation coefficient is obtained by the following formula: Wherein, r2 is the second correlation coefficient; The using the first correlation coefficient and the second correlation coefficient to obtain a target correlation coefficient between the target road section and the other road sections includes: The target correlation coefficient is obtained by the following formula: Wherein, D is the target correlation coefficient.
6. The method according to claim 1, characterized in that Before obtaining other target road segments associated with the target road segment in the target road network area by using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods, the method further includes: Identifying abnormal data of the TPI of the target section within the plurality of second specified time periods to obtain abnormal TPI; The abnormal TPI is repaired using target data, wherein the target data includes vehicle passing data or historical TPI in a link corresponding to the abnormal TPI, and the vehicle passing data includes a start time and an end time when each vehicle passes through the link, and the historical TPI includes each historical TPI of the link.
7. The method according to claim 6, characterized in that The repairing of the abnormal TPI by using the target data includes: If the target data is vehicle passing data, then based on the start time and end time of each vehicle passing through the link and the length of the link, the repair link data corresponding to 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, If the target data is a historical TPI, the average value of the historical TPIs of the link within a 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 greater than the second specified time period.
8. The method according to claim 1, characterized in that After obtaining the congestion prediction result of the target road section by predicting the TPI of the target road section within the next first specified time period, the method further includes: At every third designated time, based on the predicted TPI and the actual TPI of the target road segment in each first designated time within the third designated time, an error value is obtained, wherein the third designated time is greater than the first designated time; When the error value satisfies a specified condition, the congestion prediction model is retrained using training data within a target specified time period, and the trained congestion prediction model is determined as the pre-trained congestion prediction model.
9. The method according to claim 8, characterized in that The error value includes a first error value and a second error value; The step of obtaining an error value based on the predicted TPI and the actual TPI of the target road section within the third specified time period within each first specified time period comprises: The first error value is obtained by the following formula: Wherein, u1 is the first error value, p j is the predicted TPI of the target segment within the first specified duration j, q j is the actual TPI of the target segment within the first specified duration j, and n is the total number of the first specified duration; The second error value is obtained by the following formula: Wherein, u2 is the second error value.
10. An electronic device, characterized in that: The method comprises 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: At every first designated time, based on the link data of each link in the target road section, a traffic congestion index TPI of the target road section within a plurality of second designated time periods is obtained, wherein the link data is an average speed of the link within the second designated time period, and the first designated time period is greater than the second designated time period; Using the TPI of the target road segment within a plurality of second specified time periods and the TPI of other road segments other than the target road segment within a target road network area within a plurality of second specified time periods, other target road segments associated with the target road segment within the target road network area are obtained, wherein the target road network area is obtained according to the position of the target road segment; Inputting 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 into a pre-trained congestion prediction model for congestion prediction, and obtaining a predicted TPI of the target road segment within the next first specified time period; The congestion prediction result of the target road section is obtained by predicting the TPI of the target road section within the next first specified time period.
Citation Information
Patent Citations
Urban road network traffic state evaluation method and apparatus
CN108492555A
Depth learning-based road network traffic situation forecast method and system
CN110570651A
Traffic flow prediction method, device, equipment and medium
CN111627210A
Urban road section traffic jam space-time accurate judgment method based on SVR-DEA model
CN113470362A
Road condition determination method and device and computer readable storage medium
CN114724361A