Road condition prediction method, device and readable storage medium
By acquiring road segment information and vehicle dynamic parameters, and combining them with historical road conditions, the decision tree GBDT model is used to predict road conditions, solving the problem of low accuracy in road condition prediction in navigation applications and achieving more accurate road condition prediction and travel planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2026-03-24
AI Technical Summary
Current navigation applications rely solely on vehicle location information for traffic prediction without considering specific road conditions, resulting in low prediction accuracy.
By acquiring road segment information, the number, speed, and location of various vehicles, as well as historical road conditions, vehicle dynamic parameters are determined. Combining road segment information and historical road conditions, the decision tree GBDT model is used to predict the target road conditions.
It improves the accuracy of traffic forecasts, helping users plan their routes more effectively and increase travel efficiency.
Smart Images

Figure CN116704765B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of road safety, and particularly relate to a road condition prediction method and device and a readable storage medium. BACKGROUND
[0002] Generally, in order to facilitate travel, users will install various navigation applications in terminals, and these navigation applications mostly have a display function of real-time road conditions and a prediction function of road conditions in a future period of time, which can more reasonably arrange a travel route for users and improve the travel efficiency of users.
[0003] At present, when using the above-mentioned road condition prediction function, the navigation application usually obtains position information of all vehicles in a road section based on a global positioning system (GPS) of a vehicle, and predicts road conditions of the road section in a future period of time according to the position information of all vehicles. However, the above-mentioned road condition prediction function only uses the position information for prediction and does not combine with a specific road section scene, which may result in a low accuracy rate of the predicted road conditions. SUMMARY
[0004] The present application provides a road condition prediction method, device and readable storage medium, which are used to improve the accuracy rate of predicted road conditions.
[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0006] In a first aspect, a road condition prediction method is provided, comprising: obtaining road section information of a target road section, a number of a plurality of vehicles, speeds of the plurality of vehicles, positions of the plurality of vehicles and a historical road condition in a historical time period; the plurality of vehicles include vehicles that have left the target road section in the historical time period and vehicles that have not left the target road section in the historical time period; determining vehicle dynamic parameters according to the number of the plurality of vehicles, the speeds of the plurality of vehicles and the positions of the plurality of vehicles, the vehicle dynamic parameters being used to represent congestion of the target road section; and predicting a target road condition of the target road section in a target time period according to the road section information, the vehicle dynamic parameters and the historical road condition.
[0007] Based on the technical solutions provided in the present application, after obtaining the road section information of the target road section, the number of the plurality of vehicles, the speed of the plurality of vehicles, the position of the plurality of vehicles, and the historical road condition in the historical time period, the vehicle dynamic parameters are determined according to the number of the plurality of vehicles, the speed of the plurality of vehicles, and the position of the plurality of vehicles. Since the plurality of vehicles includes the vehicles that have driven away from the target road section in the historical time period and the vehicles that have not driven away from the target road section in the historical time period, the congestion of the vehicles on the target road section can be reflected. Further, the target road condition of the target road section in the target time period is predicted according to the road section information, the vehicle dynamic parameters, and the historical road condition. In this way, the target road condition of the target road section in the target time period can be predicted by diversely combining the congestion of the target road section, the road section information, and the historical road condition, the accuracy of predicting the road condition is improved, and the travel route of the user can be more reasonably arranged, thereby improving the travel efficiency of the user.
[0008] Optionally, the vehicle dynamic parameters include a vehicle type proportion; and determining the vehicle dynamic parameters according to the number of the plurality of vehicles, the speed of the plurality of vehicles, and the position of the plurality of vehicles includes: determining the vehicle type proportion according to a ratio of the number of each type of vehicle in the plurality of vehicles to the number of the plurality of vehicles.
[0009] Optionally, the vehicle dynamic parameters include a road section aggregation proportion; and determining the vehicle dynamic parameters according to the number of the plurality of vehicles, the speed of the plurality of vehicles, and the position of the plurality of vehicles includes: determining the aggregation vehicles in the plurality of vehicles and the aggregation times of the aggregation vehicles according to the speed of the plurality of vehicles and the position of the plurality of vehicles, the aggregation vehicles satisfying an aggregation condition, the aggregation condition including: the speed of the aggregation vehicles is less than a first preset speed, and the speed of an adjacent vehicle that is less than a preset distance from the aggregation vehicles is less than a second preset speed; and determining the road section aggregation proportion according to a ratio of the number of the aggregation vehicles to the number of each type of vehicle in different sub-road sections of the target road section for each type of vehicle according to the position of the aggregation vehicles.
[0010] Optionally, the vehicle dynamic parameters include an aggregation times parameter; the aggregation times parameter includes at least one of an aggregation vehicle proportion parameter, an aggregation time parameter, a driving time parameter, and a queue length parameter; and determining the vehicle dynamic parameters according to the number of the plurality of vehicles, the speed of the plurality of vehicles, and the position of the plurality of vehicles includes: determining at least one of the aggregation vehicle proportion parameter, the aggregation time parameter, the driving time parameter, and the queue length parameter according to the speed of the plurality of vehicles and the position of the plurality of vehicles, and determining the at least one of the aggregation vehicle proportion parameter, the aggregation time parameter, the driving time parameter, and the queue length parameter as the aggregation times parameter.
[0011] Optionally, based on road segment information, vehicle dynamic parameters, and historical road conditions, the target road conditions of the target road segment within the target time period are predicted, including: determining the historical congestion value corresponding to the historical road conditions based on historical road conditions and a first mapping relationship; the first mapping relationship includes different road conditions and their corresponding congestion values, and the historical congestion value is positively correlated with the congestion situation represented by the historical road conditions; inputting the road segment information, vehicle dynamic parameters, and historical congestion values into the road condition prediction model to obtain the target congestion value of the target road segment, and determining the target road conditions based on the target congestion value and the first mapping relationship.
[0012] Optionally, the method further includes: acquiring multiple sets of sample data, including road segment information of sample road segments, sample vehicle dynamic parameters and sample road conditions of sample road segments in a first time period, and sample road conditions in a second time period; and training a preset decision tree GBDT model based on the multiple sets of sample data to obtain a road condition prediction model.
[0013] Secondly, a road condition prediction device is provided, including an acquisition unit, a determination unit, and a prediction unit;
[0014] The acquisition unit is used to acquire road segment information, the number of various types of vehicles, the speed of various types of vehicles, the location of various types of vehicles, and historical road conditions within a historical time period for the target road segment; the various types of vehicles include vehicles that left the target road segment within the historical time period and vehicles that did not leave the target road segment within the historical time period; the determination unit is used to determine vehicle dynamic parameters based on the number of various types of vehicles, the speed of various types of vehicles, and the location of various types of vehicles, and the vehicle dynamic parameters are used to characterize the congestion situation of the target road segment; the prediction unit is used to predict the target road conditions of the target road segment within a target time period based on the road segment information, vehicle dynamic parameters, historical road conditions, and a road condition prediction model.
[0015] Optionally, vehicle dynamic parameters include the proportion of vehicle types; the determining unit is specifically used to: determine the proportion of vehicle types based on the ratio of the number of each type of vehicle to the total number of all types of vehicles.
[0016] Optionally, vehicle dynamic parameters include the road segment aggregation ratio; the determining unit is specifically used to: determine the aggregation vehicles and the aggregation frequency of the aggregation vehicles among the various vehicles based on the speed and position of the various vehicles, wherein the aggregation vehicles meet the aggregation conditions, including: the speed of the aggregation vehicle is less than a first preset speed, and the speed of the adjacent vehicles whose distance from the aggregation vehicle is less than a preset distance is less than a second preset speed; and determine the ratio of the number of aggregation vehicles to the number of each type of vehicle in different sub-segments of the target road segment based on the position of the aggregation vehicles, thereby determining the road segment aggregation ratio.
[0017] Optionally, the vehicle dynamic parameters include the number of aggregations parameter; the number of aggregations parameter includes at least one of the following: the proportion of aggregation vehicles, the aggregation duration parameter, the travel duration parameter, and the queue length parameter. The determining unit is specifically used to: determine at least one of the following parameters based on the speed and position of multiple vehicles: the proportion of aggregation vehicles, the aggregation duration parameter, the travel duration parameter, and the queue length parameter, and determine at least one of the following parameters as the number of aggregations parameter.
[0018] Optionally, the prediction unit is specifically used to: determine the historical congestion value corresponding to the historical road conditions based on historical road conditions and a first mapping relationship; the first mapping relationship includes different road conditions and their corresponding congestion values, and the historical congestion value is positively correlated with the congestion situation represented by the historical road conditions; input the road segment information, vehicle dynamic parameters and historical congestion values into the road condition prediction model to obtain the target congestion value of the target road segment, and determine the target road condition based on the target congestion value and the first mapping relationship.
[0019] Optionally, the device further includes: a training unit; an acquisition unit, which is further configured to: acquire multiple sets of sample data, including road segment information of sample road segments, sample vehicle dynamic parameters and sample road conditions of sample road segments in a first time period and sample road conditions in a second time period; and a training unit, which is configured to train a preset decision tree GBDT model based on the multiple sets of sample data to obtain a road condition prediction model.
[0020] Thirdly, a traffic condition prediction device is provided, which can realize the functions performed by the traffic condition prediction device in the above-mentioned aspects or possible designs. The functions can be implemented by hardware. For example, in one possible design, the traffic condition prediction device may include a processor and a communication interface. The processor can be used to support the traffic condition prediction device in realizing the functions involved in the first aspect or any possible design of the first aspect.
[0021] In another possible design, the traffic prediction device may further include a memory for storing necessary computer execution instructions and data. When the traffic prediction device is running, the processor executes the computer execution instructions stored in the memory to cause the traffic prediction device to perform the first aspect or any of the possible traffic prediction methods described above.
[0022] Fourthly, a computer-readable storage medium is provided, which may be a readable non-volatile storage medium storing computer instructions or programs that, when executed on a computer, enable the computer to perform the traffic prediction method described in the first aspect or any of the possible methods described above.
[0023] Fifthly, a computer program product containing instructions is provided, which, when run on a computer, enables the computer to execute the traffic prediction method of the first aspect or any possible design of the above aspects.
[0024] In a sixth aspect, a traffic prediction device is provided, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions, which, when executed by the one or more processors, cause the traffic prediction device to perform a traffic prediction method as described in the first aspect or any possible design of the first aspect.
[0025] In a seventh aspect, a chip system is provided, the chip system including a processor and a communication interface, the chip system being used to implement the functions performed by the traffic prediction device in the first aspect or any possible design of the first aspect.
[0026] In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of chips or may include chips and other discrete devices; there is no limitation. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the structure of a traffic prediction system provided in an embodiment of this application;
[0028] Figure 2 This is a schematic diagram of the structure of a road condition prediction device provided in an embodiment of this application;
[0029] Figure 3 A schematic flowchart illustrating a road condition prediction method provided in an embodiment of this application;
[0030] Figure 4 A flowchart illustrating another road condition prediction method provided in an embodiment of this application;
[0031] Figure 5 A flowchart illustrating another road condition prediction method provided in an embodiment of this application;
[0032] Figure 6 A flowchart illustrating another road condition prediction method provided in an embodiment of this application;
[0033] Figure 7 A schematic diagram illustrating the accuracy of a road condition prediction model before and after optimization, provided as an embodiment of this application;
[0034] Figure 8 A schematic diagram illustrating a target road condition predicted using a road condition prediction model, provided as an embodiment of this application;
[0035] Figure 9 A schematic diagram illustrating a target road condition predicted without using a road condition prediction model, as provided in an embodiment of this application;
[0036] Figure 10 This is a schematic diagram of another road condition prediction device provided in an embodiment of this application. Detailed Implementation
[0037] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0038] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0039] It should also be understood that the term "comprising" indicates the presence of the described feature, whole, step, operation, element and / or component, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements and / or components.
[0040] Before introducing the embodiments of this application, the terms used in this application will be explained:
[0041] 1. Road Link: A link is the smallest digital unit that makes up a road. A road segment typically consists of one or more links. For example, road segment A, which is 500m long, can consist of 3 links. The length of each link can be the same or different. The length of a link can be set according to the actual conditions of the road. Each link has its own unique identifier (ID), and each link has corresponding link information. For example, link information may also include the link's location information, length, etc. The location information of a link may include multiple latitude and longitude coordinates.
[0042] Generally, to facilitate travel, users will install various navigation applications on their devices. Most of these navigation applications have the function of displaying real-time traffic conditions and predicting traffic conditions in the future, which can more reasonably arrange travel routes for users and improve their travel efficiency.
[0043] Currently, when using the aforementioned traffic condition prediction function, navigation applications typically obtain the location information of all vehicles on a road segment based on the vehicle's GPS, and then predict the traffic conditions of that segment over a future period based on the location information of all vehicles. However, the aforementioned traffic condition prediction function only uses location information for prediction and does not take into account the specific road segment scenario, which may result in a low accuracy rate of the predicted traffic conditions.
[0044] In view of this, embodiments of this application provide a traffic condition prediction method, including: acquiring road segment information of a target road segment, the number of various types of vehicles, the speed of various types of vehicles, the location of various types of vehicles, and historical traffic conditions within a historical time period; the various types of vehicles include vehicles that left the target road segment within the historical time period and vehicles that did not leave the target road segment within the historical time period; determining vehicle dynamic parameters based on the number of various types of vehicles, the speed of various types of vehicles, and the location of various types of vehicles, the vehicle dynamic parameters being used to characterize the congestion situation of the target road segment; and predicting the target traffic conditions of the target road segment within a target time period based on the road segment information, vehicle dynamic parameters, and historical traffic conditions.
[0045] The methods provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0046] It should be noted that the network system described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network systems and the emergence of other network systems, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0047] Figure 1 The diagram shown is a structural schematic of a road condition prediction system provided in an embodiment of this application. Figure 1 As shown, the traffic prediction system may include a data storage device 11 and a traffic prediction device 12.
[0048] In the embodiments of this application, the data storage device 11 may be a road network database, etc. The embodiments of this application do not limit the specific technology, quantity, or form of the data storage device 11.
[0049] The traffic prediction device 12 involved in the embodiments of this application may also be referred to as a server, computer, etc. The embodiments of this application do not limit the specific technology, quantity, or form of the traffic prediction device 12.
[0050] The data storage device 11 stores road segment information of the target road segment, as well as vehicle dynamic parameters and historical road conditions of the target road segment during a historical time period. It then feeds this stored information back to the traffic prediction device 12. The traffic prediction device 12 receives the road segment information, vehicle dynamic parameters, and historical road conditions of the target road segment from the data storage device 11, and determines the traffic condition status of the target road segment during a target time period based on this information.
[0051] In different application scenarios, the data storage device 11 and the traffic condition prediction device 12 can be independent devices or integrated into the same device. This embodiment of the invention does not impose specific limitations on this.
[0052] It should be noted that, Figure 1 This is just an example framework diagram. Figure 1 The names of the various devices included are unrestricted, and except for Figure 1 In addition to the functional nodes shown, other nodes may also be included, but this application embodiment does not limit this.
[0053] In practical implementation, Figure 1 Each device in the process can be adopted Figure 2 The shown composition structure, or including Figure 2 The components shown. Figure 2 This is a schematic diagram illustrating the composition of a traffic condition prediction device 200 provided in an embodiment of this application. The traffic condition prediction device 200 can be a server, or it can be a chip or system-on-a-chip within a server. Figure 2 As shown, the traffic prediction device 200 includes a processor 201, a communication interface 202, and a communication line 203.
[0054] Furthermore, the traffic prediction device 200 may also include a memory 204. The processor 201, memory 204, and communication interface 202 can be connected via a communication line 203.
[0055] The processor 201 can be a CPU, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 201 can also be other devices with processing capabilities, such as circuits, devices, or software modules, without limitation.
[0056] Communication interface 202 is used to communicate with other devices or other communication networks. Communication interface 202 can be a module, circuit, communication interface, or any device capable of enabling communication.
[0057] Communication line 203 is used to transmit information between the components included in the traffic prediction device 200.
[0058] Memory 204 is used to store instructions. These instructions can be computer programs.
[0059] The memory 204 can be a read-only memory (ROM) or other type of static storage device that can store static information and / or instructions; it can also be a random access memory (RAM) or other type of dynamic storage device that can store information and / or instructions; it can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.
[0060] It should be noted that the memory 204 can exist independently of the processor 201 or can be integrated with the processor 201. The memory 204 can be used to store instructions, program code, or some data, etc. The memory 204 can be located inside or outside the traffic prediction device 200, without limitation. The processor 201 is used to execute the instructions stored in the memory 204 to implement the traffic prediction method provided in the following embodiments of this application.
[0061] In one example, processor 201 may include one or more CPUs, for example, Figure 2 CPU0 and CPU1 in the CPU.
[0062] As an optional implementation, the traffic prediction device 200 includes multiple processors, for example, in addition to Figure 2 In addition to processor 201, it may also include processor 205.
[0063] It should be pointed out that, Figure 2 The composition shown does not constitute a basis for the interpretation of this invention. Figure 1 The limitations of each device in the process, except Figure 2 In addition to the components shown, Figure 1The various devices may include more Figure 2 More or fewer components, or combinations of certain components, or different arrangements of components.
[0064] In this embodiment of the application, the chip system may be composed of chips or may include chips and other discrete devices.
[0065] Furthermore, the actions, terms, etc., involved in the various embodiments of this application can be referenced interchangeably without limitation. The message names or parameter names in the messages exchanged between the various devices in the embodiments of this application are merely examples, and other names may be used in specific implementations without limitation.
[0066] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0067] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0068] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0069] The following is combined Figure 1 The traffic prediction system shown describes the traffic prediction method provided in the embodiments of this application.
[0070] Figure 3 This application provides a traffic condition prediction method, which can be applied to a server or a traffic condition prediction device. The traffic condition prediction device can...Figure 1 The road condition prediction device 12 can also be a component within the road condition prediction device 12, such as a chip. This application's embodiments are illustrated using an application to the road condition prediction device 12 as an example. Figure 3 As shown, the method includes the following steps S301-S303:
[0071] S301. Obtain road segment information for the target road segment, including the number of various types of vehicles, their speeds, their locations, and historical road conditions within a given time period.
[0072] The term "vehicles" includes vehicles that left the target road segment during the historical time period (also referred to as "npass vehicles") and vehicles that did not leave the target road segment during the historical time period. Vehicles leaving the target road segment can be those that passed through the corresponding traffic lights. Vehicles that did not leave the target road segment during the historical time period can include vehicles in the first historical time period (also referred to as "fast vehicles") and vehicles in the second historical time period (also referred to as "near vehicles"). For example, if the historical time period is 5 minutes before the current time, the first historical time period is 5 to 4 minutes before the current time, and the second historical time period is 3 minutes before the current time. For example, if the current time is 8:00 and the historical time period is 7:55-7:59, the first historical time period is 7:55-7:56, and the second historical time period is 7:57-7:59.
[0073] Road segment information includes at least one of the following: road segment length, number of lanes, road segment width, and time stamp. The time stamp indicates the time interval in which the historical time period falls, and the time interval includes peak intervals and off-peak intervals. For example, as shown in Table 1 below, peak intervals can include morning peak intervals and evening peak intervals, while off-peak intervals can include late-night intervals and other intervals.
[0074] Table 1. Time Interval Diagram
[0075]
[0076]
[0077] It should be noted that the data in Table 1 is merely exemplary. In this embodiment of the application, the time interval can be divided in other ways, and there are no limitations.
[0078] The target road segment can be a fixed-length segment. For example, it can be a single link or a group of links (also called a linkGroup). The scenario for the target road segment can be a segment in front of a traffic light. The historical time period can be a period preceding the current moment. For example, it can be the 5 minutes preceding the current moment. Historical traffic conditions can include the traffic conditions for each minute within the historical time period, as well as the standard deviation of the traffic conditions for each minute. For example, if the historical time period is the 5 minutes preceding the current moment, the standard deviation of the traffic conditions for each minute (last5minStd) can be... status indicates the traffic congestion value per minute.
[0079] As one possible implementation, road segment information, vehicle dynamic parameters, and historical road conditions can be obtained through software-defined radio (SDR).
[0080] S302. Determine vehicle dynamic parameters based on the number of vehicles, speed of vehicles, and position of vehicles.
[0081] Vehicle dynamic parameters are used to characterize the congestion situation of the target road segment. These parameters can include vehicle type percentage, segment clustering percentage, and clustering frequency parameter. Vehicle type percentage is the ratio of the number of each type of vehicle to the total number of all other vehicle types on the target road segment. Segment clustering percentage is the ratio of clustered vehicles of each type of vehicle in different sub-segments of the target road segment to the total number of all other vehicle types. The clustering frequency parameter indicates the severity of clustering at different frequencies for each type of vehicle.
[0082] It should be noted that the specific implementation methods for determining the vehicle type ratio, road segment clustering ratio, and clustering frequency parameters can be found in the subsequent explanations, and will not be elaborated upon here.
[0083] S303: Based on road segment information, vehicle dynamic parameters, and historical road conditions, predict the target road conditions for the target road segment within the target time period.
[0084] The target time period can be set as needed. For example, it could be 6 minutes after the current time. The specific traffic prediction model can also be set as needed. For example, it could be a gradient boosting decision tree (GBDT) model.
[0085] As one possible approach, after obtaining road segment information, vehicle dynamic parameters, and historical road conditions, the road segment information, vehicle dynamic parameters, and historical road conditions can be input into a road condition prediction model to predict the target road conditions of the target road segment within a target time period.
[0086] As another possible implementation, after obtaining road segment information, vehicle dynamic parameters and historical road conditions, the road segment information, vehicle dynamic parameters and historical road conditions can be encoded and the data format converted. The processed road segment information, vehicle dynamic parameters and historical road conditions can then be input into the road condition prediction model to predict the target road conditions of the target road segment within the target time period.
[0087] It should be noted that the encoding process can be one-hot encoding. The converted data can be in libsvm format, or other formats, without restriction.
[0088] Based on the technical solution provided in this application, after obtaining road segment information, the number of various types of vehicles, their speeds, and locations, as well as historical road conditions within a historical time period, vehicle dynamic parameters can be determined based on the number, speed, and location of various vehicles. Since the various types of vehicles include those that left the target road segment during the historical time period and those that did not, the congestion situation on the target road segment can be reflected. Furthermore, based on the road segment information, vehicle dynamic parameters, and historical road conditions, the target road conditions for the target road segment within a target time period can be predicted. In this way, the current congestion situation, road segment information, and historical road conditions of the target road segment can be combined in a diversified manner to predict the target road conditions for the target road segment within a target time period, improving the accuracy of road condition prediction. This, in turn, allows for more reasonable route planning for users, improving their travel efficiency.
[0089] In one possible embodiment, the vehicle dynamic parameters include the proportion of vehicle types. In order to determine the proportion of vehicle types, the road condition prediction method of this application may specifically include the following S401.
[0090] S401. Determine the proportion of vehicle types based on the ratio of the quantity of each type of vehicle to the total quantity of all types of vehicles.
[0091] Among them, the historical congestion value is positively correlated with the congestion situation represented by historical road conditions.
[0092] One possible approach is to determine the proportion of vehicle types based on a random sequence and the ratio of the number of each type of vehicle to the total number of all types of vehicles.
[0093] As another possible implementation, the proportion of vehicle types can be determined according to a pre-set sequence, based on the ratio of the number of each type of vehicle to the total number of all types of vehicles.
[0094] For example, if the vehicles include the above-mentioned npass vehicles, fast vehicles, and near vehicles, the pre-set sequence can be npass vehicles, fast vehicles, and near vehicles.
[0095] The ratio of each type of vehicle to the number of multiple types of vehicles can include: npass vehicles / (npass vehicles + fast vehicles + near vehicles), fast vehicles / (npass vehicles + fast vehicles + near vehicles), and near vehicles / (npass vehicles + fast vehicles + near vehicles).
[0096] One possible implementation, such as Figure 4 As shown, the vehicle dynamic parameters include the road segment clustering ratio. In order to determine the road segment clustering ratio, the road condition prediction method of this application may further include the following S501-S502.
[0097] S501. Based on the speed and position of various vehicles, determine the vehicles that cluster together and the number of times the vehicles cluster together.
[0098] Among these conditions, the vehicles that gather meet the gathering criteria, which include: the speed of the vehicles gathering is less than a first preset speed, and the speed of adjacent vehicles that are less than a preset distance from the vehicles gathering is less than a second preset speed. For example, the first preset speed can be 1, the preset distance can be 20 meters, and the second preset speed can be 5 meters per second.
[0099] As one possible implementation, when it is determined that the speed of the first vehicle is less than a first preset speed, and the speed of adjacent vehicles that are less than a preset distance from the first vehicle is less than a second preset speed, the first vehicle is determined to be a clustering vehicle, and a clustering count is accumulated for the first vehicle, thus obtaining the clustering vehicle and the clustering count of the clustering vehicle among various types of vehicles.
[0100] The first vehicle can be any one of several vehicles.
[0101] As another possible implementation, the first vehicle can be identified as a group of vehicles when its speed is equal to a first preset speed and the speeds of adjacent vehicles less than a preset distance from the first vehicle are less than a second preset speed.
[0102] S502. Determine the ratio of the number of clustered vehicles to the number of each type of vehicle in different sub-segments of the target road segment based on the location of the clustered vehicles, and determine the clustering ratio of the road segment.
[0103] The target road segment can be divided into different sub-segments as needed. For example, it can include a first sub-target road segment, a second sub-target road segment, a third sub-target road segment, a fourth sub-target road segment, and a fifth sub-target road segment. The first sub-target road segment can be a segment within 80 meters of the target road segment's traffic lights, the second sub-target road segment can be a segment within 160 meters of the target road segment's traffic lights, the third sub-target road segment can be a segment within 240 meters of the target road segment's traffic lights, the fourth sub-target road segment can be a segment within 300 meters of the target road segment's traffic lights, and the fifth sub-target road segment can be a segment more than 300 meters away from the target road segment's traffic lights.
[0104] For example, in different sub-segments of the target road segment, the ratio of clustered vehicles to the number of each type of vehicle can be:
[0105]
[0106] Where i represents the sub-segment identifier. factors i near CarNumList represents the cluster of vehicles in the i-th sub-target segment of the target road segment. i near This represents the total number of near vehicles in the i-th sub-target road segment. (factors) i fast CarNumList represents the aggregated vehicles of the fast vehicle in the i-th sub-target segment of the target road segment. i fast This represents the total number of fast vehicles in the i-th sub-target road segment. (factors) i npass CarNumList represents the aggregated vehicles of the npass vehicles in the i-th sub-target segment of the target road segment. i npass This represents the total number of npass vehicles in the i-th sub-target road segment.
[0107] In one possible embodiment, the vehicle dynamic parameters include a clustering frequency parameter; the clustering frequency parameter includes at least one of a clustered vehicle proportion parameter, a clustering duration parameter, a travel duration parameter, and a queue length parameter. To determine the clustering frequency parameter, the traffic condition prediction method of this application may further include the following step S601.
[0108] S601. Based on the speed and location of various vehicles, determine at least one of the following parameters: the proportion of vehicles in a cluster, the cluster duration, the travel time, and the queue length. And determine at least one of the following parameters as the cluster count parameter.
[0109] As one possible implementation, the aggregation frequency parameter can be determined by selecting a parameter greater than a preset number from the parameters of the proportion of vehicles in aggregation, aggregation duration, travel time, and queue length. For example, the preset number could be 3.
[0110] As another possible implementation, the confidence levels of parameters such as the proportion of clustered vehicles, cluster duration, travel time, and queue length can be determined, and parameters among these parameters with confidence levels greater than a confidence threshold can be defined as clustering frequency parameters. For example, the confidence threshold can be 0.9.
[0111] The following sections explain the percentage of vehicles in a cluster, the cluster duration parameter, and the queue length parameter.
[0112] 1. Percentage of vehicles clustered together.
[0113] The percentage of vehicles that cluster together is the ratio of the number of vehicles that cluster together at different times to the total number of vehicles of each type.
[0114] The number of gatherings can be categorized as needed. For example, it can include vehicles with a gathering count of 0, vehicles with a gathering count of 1, vehicles with a gathering count of 2, vehicles with a gathering count of 3, and vehicles with a gathering count greater than a certain number.
[0115] For example, the ratio of vehicles with different numbers of aggregations to the total number of vehicles in each category can be:
[0116]
[0117] Where m represents the number of aggregations, and m can take values of 0, 1, 2, 3, or >3. (carnum) m near num represents the number of near vehicles that cluster at a frequency of m on the target road segment. near Carnum represents the total number of vehicles in the nearest neighborhood. m fast num represents the number of times the target road segment is clustered in the Fast vehicles. fast This indicates the total number of vehicles in the FAST (Fast) system. (carnum) m npass num represents the number of npass vehicles that cluster at the target road segment a number of times. npass This represents the total number of vehicles that pass.
[0118] 2. Aggregation duration parameter.
[0119] The aggregation duration parameter includes at least one of the mean, variance, maximum, and minimum aggregation durations of vehicles with different aggregation times for each type of vehicle; the aggregation duration is the duration for which the aggregation conditions are met.
[0120] It should be noted that the gathering time of the vehicles is the duration during which the vehicles meet the gathering conditions.
[0121] For example, for each type of vehicle, the average gathering time for vehicles with different gathering frequencies can be: [Avg([waittime])] m near [Avg([waittime])] m fast [Avg([waittime])] m npass .
[0122] Among them, [Avg([waittime])] m near This represents the average waiting time for vehicles that have gathered m times among the nearby vehicles. [Avg([waittime])] m fast Let `Avg([waittime])` be the average aggregation time of vehicles that aggregate m times in the `fast` category. m npass Let m be the average aggregation duration of vehicles that aggregate m times among the npass vehicles.
[0123] For example, for each type of vehicle, the variance of the aggregation duration for aggregations of different aggregation numbers can be: [Variance([waittime])] m near [Variance([waittime])] m fast [Variance([waittime])] m npass .
[0124] Among them, [Variance([waittime])] m near Let Variance([waittime]) be the variance of the aggregation duration of vehicles that aggregate m times from the nearest group. m fast Let Variance([waittime]) be the variance of the aggregation duration of vehicles that aggregate m times in the fast vehicle pool. m npass Let m be the variance of the aggregation duration of vehicles that aggregate m times among the n-pass vehicles.
[0125] For example, for each type of vehicle, the maximum aggregation time for vehicles with different aggregation frequencies can be: [Max([waittime])] m near [Max([waittime])] m fast [Max([waittime])] m npass .
[0126] Among them, [Max([waittime])] m nearThis represents the maximum aggregation time for vehicles that have aggregated m times among the nearest vehicles. [Max([waittime])] m fast This represents the maximum aggregation time for vehicles that aggregate m times within the fast-aggregate network. [Max([waittime])] m npass This represents the maximum aggregation duration for vehicles that aggregate m times among the npass vehicles.
[0127] For example, for each type of vehicle, the minimum gathering time for vehicles with different gathering frequencies can be: [Min([waittime])] m near [Min([waittime])] m fast [Min([waittime])] m npass .
[0128] Among them, [Min([waittime])] m near This represents the minimum aggregation time for vehicles that aggregate m times from the nearest group. [Min([waittime])] m fast Let [Min([waittime])] be the minimum aggregation time for vehicles that aggregate m times in the fast-paced category. m npass Let m be the minimum aggregation duration for vehicles that aggregate m times among the npass vehicles.
[0129] 3. Driving time parameters.
[0130] Among them, the travel time parameter includes the mean, variance, maximum and minimum time for vehicles of each type to pass through the target road segment at different aggregation times.
[0131] For example, for each type of vehicle, the average time taken for vehicles to pass through the target road segment at different aggregation times can be: [Avg([travelTime])] m near [Avg([travelTime])] m fast [Avg([travelTime])] m npass .
[0132] Among them, [Avg([travelTime])] m near This represents the average time taken for vehicles that clustered m times among the near vehicles to pass through the target road segment. [Avg([travelTime])] m fast Let be the average time taken for vehicles that cluster m times within the fast-moving traffic group to travel through the target road segment. [Avg([travelTime])] m npassLet be the average time taken for vehicles that have aggregated m times among the npass vehicles to pass through the target road segment.
[0133] For example, for each type of vehicle, the variance of the time taken for vehicles to travel through the target road segment at different aggregation times can be expressed as: [Variance([travelTime])] m near [Variance([travelTime])] m fast [Variance([travelTime])] m npass .
[0134] Among them, [Variance([travelTime])] m near Let Variance([travelTime]) be the variance of the travel time of vehicles that cluster m times from the nearest point along the target road segment. m fast Let Variance([travelTime]) be the variance of the travel time of vehicles that cluster m times within the fast-moving traffic group, traversing the target road segment. m npass Let m be the variance of the time taken for vehicles that have been clustered m times to pass through the target road segment.
[0135] For example, for each type of vehicle, the maximum time for vehicles to travel through the target road segment after different numbers of aggregations can be: [Max([travelTime])] m near [Max([travelTime])] m fast [Max([travelTime])] m npass .
[0136] Among them, [Max([travelTime])] m near This represents the maximum time taken for vehicles that have clustered m times among the near vehicles to travel through the target road segment. [Max([travelTime])] m fast This represents the maximum time taken for vehicles that have aggregated m times within the fast-paced network to travel through the target road segment. [Max([travelTime])] m npass This represents the maximum time taken for vehicles that have been clustered m times among the npass vehicles to pass through the target road segment.
[0137] For example, for each type of vehicle, the minimum time for vehicles to pass through the target road segment after different numbers of aggregations can be: [Min([waittime])] m near [Min([waittime])] m fast [Min([waittime])] m npass .
[0138] Among them, [Min([waittime])] m near This represents the minimum time taken for vehicles that have clustered m times among the near vehicles to pass through the target road segment. [Min([waittime])] m fast Let [Min([waittime])] be the minimum time taken for a group of vehicles that have clustered m times to pass through the target road segment. m npass Let m be the minimum time taken for a group of n-pass vehicles to pass through the target road segment.
[0139] 4. Queue length parameter.
[0140] The queue length parameter includes at least one of the mean, variance, maximum and minimum values of the queue length for each type of vehicle with different number of gatherings; the queue length is the distance between the farthest gathering vehicle and the point where it leaves the target road segment, and the farthest gathering vehicle is the gathering vehicle with the longest distance from the point where it leaves the target road segment.
[0141] For example, for each type of vehicle, the average queue length for vehicles that have gathered at different times can be: [Avg([QueueLen]) m near [Avg([QueueLen])] m fast [Avg([QueueLen])] m npass .
[0142] Among them, [Avg([QueueLen])] m near This represents the average queue length of vehicles that have clustered m times among the nearest vehicles. [Avg([QueueLen])] m fast Let `Avg([QueueLen])` be the average queue length of vehicles that have clustered m times in the `fast` category. m npass Let be the average queue length of the vehicles that have clustered m times among the n-pass vehicles.
[0143] For example, the variance of the queue length of vehicles with different numbers of aggregations for each type of vehicle can be: [Variance([QueueLen])] m near [Variance([QueueLen])] m fast [Variance([QueueLen])] m npass .
[0144] Among them, [Variance([QueueLen])] m nearLet [Variance([QueueLen])] be the variance of the queue length of vehicles that cluster m times in the nearest cluster. m fast Let [Variance([QueueLen])] be the variance of the queue length of vehicles that cluster m times in the fast queue. m npass Let m be the variance of the queue length of vehicles that have clustered m times among the n-pass vehicles.
[0145] For example, the maximum queue length for each type of vehicle, considering different numbers of gatherings, can be: [Max([QueueLen])] m near [Max([QueueLen])] m fast [Max([QueueLen])] m npass .
[0146] Among them, [Max([QueueLen]) m near This represents the maximum queue length for vehicles that have clustered m times among the nearest vehicles. [Max([QueueLen])] m fast Let `QueueLen` be the maximum queue length for vehicles that have aggregated m times in the `fast` category. m npass This represents the maximum queue length of vehicles that have aggregated m times among the n-pass vehicles.
[0147] For example, for each type of vehicle, the minimum queue length for vehicles that have gathered at different times can be: [Min([QueueLen])] m near 、[Min([QueueLen]) m fast 、[Min([QueueLen]) m npass .
[0148] Among them, [Min([QueueLen])] m near Let [Min([QueueLen])] be the minimum queue length of vehicles that have clustered m times among the nearest vehicles. m fast Let [Min([QueueLen])] be the minimum queue length for vehicles that have aggregated m times in the fast queue. m npass Let m be the minimum queue length of the vehicles that have clustered m times among the n-pass vehicles.
[0149] One possible implementation, such as Figure 5 As shown, in order to predict the target road conditions of the target road segment within the target time period, the road condition prediction method of this application may further include the following S701-S702.
[0150] S701. Determine the historical congestion value corresponding to the historical traffic conditions based on historical traffic conditions and the first mapping relationship.
[0151] The first mapping relationship includes different road conditions and their corresponding congestion values, with historical congestion values being positively correlated with the congestion situation represented by historical road conditions.
[0152] For example, when the congestion value is 0, the road condition is smooth; when the congestion value is 0.6, the road condition is slow; and when the congestion value is 1, the road condition is congested.
[0153] S702. Input the road segment information, vehicle dynamic parameters and historical congestion values into the road condition prediction model to obtain the target congestion value of the target road segment, and determine the target road condition based on the target congestion value and the first mapping relationship.
[0154] The target congestion value is positively correlated with the congestion level represented by the target road condition. The road condition prediction model can be pre-configured or obtained from other devices, without restriction.
[0155] As one possible implementation, with a pre-configured traffic prediction model, road segment information, vehicle dynamic parameters, and historical congestion values are directly input into the traffic prediction model to obtain the target congestion value of the target road condition. Furthermore, after determining the target congestion value of the target road condition, the target road condition can be determined based on the first mapping relationship and the target congestion value.
[0156] As another possible implementation, with a pre-configured traffic prediction model, road segment information, vehicle dynamic parameters, and historical congestion values can be cleaned and the cleaned data can be input into the traffic prediction model to obtain the target congestion value of the target road condition. Furthermore, after determining the target congestion value of the target road condition, the target road condition can be determined based on the first mapping relationship and the target congestion value.
[0157] It should be noted that if the first mapping relationship is: when the congestion value is 0, the road condition is smooth; when the congestion value is 0.6, the road condition is slow; and when the congestion value is 1, the road condition is congested. If the target congestion value is not a congestion value in the first mapping relationship, the target road condition can be determined based on how close the target congestion value is to the congestion value in the first mapping relationship.
[0158] For example, if the target congestion value is 0.7, which is close to 0.6, then the target traffic condition is determined to be slow. If the target congestion value is 0.8, which is close to 1, then the target traffic condition is determined to be congested. If the target congestion value is 0.2, which is close to 0, then the target traffic condition is determined to be smooth.
[0159] In this way, the target congestion value of the target road condition can be determined based on road segment information, vehicle dynamic parameters and historical congestion values, and the target road condition can be determined based on the target congestion value. The congestion situation can be specifically quantified in the form of congestion value, which can improve the accuracy of predicting road condition status.
[0160] One possible implementation, such as Figure 6 As shown, in order to obtain a well-trained traffic prediction model, the traffic prediction method of this application may further include the following S801-S802.
[0161] S801, Obtain multiple sets of sample data.
[0162] The sample data includes multiple sets of data, such as road segment information, dynamic parameters of sample vehicles and sample road conditions within the first time period, and sample road conditions within the second time period. The second time period follows the first time period.
[0163] S802. Based on multiple sets of sample data, train the preset decision tree GBDT model to obtain the road condition prediction model.
[0164] One possible implementation is to distinguish and label the road segment information, the dynamic parameters of sample vehicles and the sample road conditions in the first time period, and the sample road conditions in the second time period. Based on a preset ratio, the labeled multiple sets of sample data are then divided into a training set and a test set. For example, the preset ratio could be 9:1, 7:1, or 4:1, etc.
[0165] Furthermore, the road segment information of the sample road segments in the training set, the dynamic parameters of the sample vehicles in the first time period, and the sample road conditions are input into the road condition prediction model for training. The model parameters in the road condition prediction model are adjusted until the output result is the same as the corresponding labeled result, thus obtaining the trained road condition prediction model.
[0166] Furthermore, the road segment information of the sample road segments in the test set, the vehicle dynamic parameters of the sample road segments in the first time period, and the real road conditions are input into the trained road condition prediction model. If the accuracy of the output result is greater than the second threshold, the trained road condition prediction model is determined to be a well-trained road condition prediction model.
[0167] Different labels can be assigned to different real-world traffic conditions. For example, the label for congested traffic can be set to 2, the label for slow-moving traffic to 1, and the label for unobstructed traffic to 0.
[0168] The second threshold can be set as needed. For example, it can be 80%, 90%, or 95%, etc.
[0169] In practical applications, to prevent excessive iterations from affecting computational efficiency, a range of model parameter values or an iteration threshold can be set.
[0170] For example, such as Figure 7 The diagram illustrates the overall accuracy, smooth traffic accuracy, and congestion accuracy of a traffic prediction model before and after optimization. The congestion accuracy is significantly improved after optimization compared to before.
[0171] For example, such as Figure 8 As shown, a schematic diagram illustrating the prediction of target road conditions using a road condition prediction model is presented, such as... Figure 9 As shown, a schematic diagram of a target road condition not predicted by the road condition prediction model in this application is illustrated.
[0172] In practical applications, the system can obtain the road status of every link in the target city every minute, and then provide a real-time data service interface. Terminals can use this interface to obtain the current and next minute's road conditions for the entire city. The terminal can then depict the road conditions of each road for use in various scenarios, such as application software, navigation systems, or big data platform road monitoring.
[0173] In this way, the traffic prediction model can be iteratively trained using sample data until the accuracy of the output result of the iteratively trained traffic prediction model is greater than the second threshold. Since the output result of the iteratively trained traffic prediction model has a higher accuracy, it can more accurately predict the target traffic conditions.
[0174] In one possible embodiment, to more accurately predict target road conditions, the road condition prediction method of this application may further include filtering abnormal data. For example, data with a vehicle count of -1 may be deleted, data with a cluster duration exceeding a preset duration threshold may be deleted, and data with a clustered vehicle number exceeding a preset clustered vehicle number threshold may be deleted. The preset duration threshold and the preset clustered vehicle number threshold can be set as needed. For example, the preset duration can be 12 hours, and the preset clustered vehicle number threshold can be 220.
[0175] The various solutions in the above embodiments of this application can be combined without contradiction.
[0176] This application embodiment can divide the traffic condition prediction device into functional modules or functional units according to the above method examples. For example, each function can be divided into its own functional modules or functional units, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module or functional unit. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0177] When dividing each function into modules according to its corresponding function. Figure 10 A schematic diagram of a traffic condition prediction device is shown. This traffic condition prediction device can be a server or a chip applied in a server. This traffic condition prediction device can be used to perform the functions of the server involved in the above embodiments. Figure 10 The traffic prediction device shown may include: an acquisition unit 901, a determination unit 902, and a prediction unit 903; the acquisition unit 901 is used to acquire road segment information of the target road segment, the number of various types of vehicles, the speed of various types of vehicles, the location of various types of vehicles, and historical traffic conditions within a historical time period; the various types of vehicles include vehicles that left the target road segment within the historical time period and vehicles that did not leave the target road segment within the historical time period; the determination unit 902 is used to determine vehicle dynamic parameters based on the number of various types of vehicles, the speed of various types of vehicles, and the location of various types of vehicles, the vehicle dynamic parameters being used to characterize the congestion situation of the target road segment; the prediction unit 903 is used to predict the target traffic conditions of the target road segment within a target time period based on the road segment information, vehicle dynamic parameters, and historical traffic conditions.
[0178] In one possible design, the vehicle dynamic parameters include the proportion of vehicle types; the determining unit 902 is specifically used to: determine the proportion of vehicle types based on the ratio of the number of each type of vehicle to the total number of all types of vehicles.
[0179] In one possible design, vehicle dynamic parameters include the road segment aggregation ratio; the determining unit 902 is specifically used to: determine the aggregation vehicles and the aggregation frequency of the aggregation vehicles among the various vehicles based on the speed and position of the various vehicles, wherein the aggregation vehicles meet aggregation conditions, including: the speed of the aggregation vehicle is less than a first preset speed, and the speed of adjacent vehicles whose distance from the aggregation vehicle is less than a preset distance is less than a second preset speed; and determine the ratio of the number of aggregation vehicles to the number of each type of vehicle in different sub-segments of the target road segment based on the position of the aggregation vehicles, thereby determining the road segment aggregation ratio.
[0180] In one possible design, the vehicle dynamic parameters include a clustering frequency parameter; the clustering frequency parameter includes at least one of a clustered vehicle proportion parameter, a clustering duration parameter, a travel duration parameter, and a queue length parameter. The determining unit 902 is specifically used to: determine at least one of the clustered vehicle proportion parameter, the clustering duration parameter, the travel duration parameter, and the queue length parameter based on the speed and position of multiple vehicles, and determine at least one of the clustered vehicle proportion parameter, the clustering duration parameter, the travel duration parameter, and the queue length parameter as the clustering frequency parameter.
[0181] In one possible design, the prediction unit 903 is specifically used to: determine the historical congestion value corresponding to the historical road conditions based on historical road conditions and a first mapping relationship; the first mapping relationship includes different road conditions and their corresponding congestion values, and the historical congestion value is positively correlated with the congestion situation represented by the historical road conditions; input the road segment information, vehicle dynamic parameters and historical congestion values into the road condition prediction model to obtain the target congestion value of the target road segment, and determine the target road condition based on the target congestion value and the first mapping relationship.
[0182] In one possible design, the device further includes: a training unit 904; an acquisition unit 901, which is further configured to: acquire multiple sets of sample data, including road segment information of sample road segments, sample vehicle dynamic parameters and sample road conditions of sample road segments in a first time period and sample road conditions in a second time period; and the training unit 904, which is configured to train a preset decision tree GBDT model based on the multiple sets of sample data to obtain a road condition prediction model.
[0183] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be implemented by a computer program instructing related hardware. This program can be stored in the computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be an internal storage unit of the traffic prediction device (including a data transmitter and / or a data receiver) of any of the foregoing embodiments, such as the hard disk or memory of the traffic prediction device. The computer-readable storage medium can also be an external storage device of the terminal device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal device. Further, the computer-readable storage medium can include both the internal storage unit of the traffic prediction device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the traffic prediction device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0184] It should be noted that the terms "first" and "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0185] It should be understood that in this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0186] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0187] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0188] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0189] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0190] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0191] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A road condition prediction method, characterized in that, The method includes: The system acquires road segment information of the target road segment, the number of various types of vehicles, the speed of the various types of vehicles, the location of the various types of vehicles, and historical road conditions within a historical time period; the various types of vehicles include vehicles that left the target road segment within the historical time period and vehicles that did not leave the target road segment within the historical time period. Vehicle dynamic parameters are determined based on the number of vehicles, the speed of vehicles, and the position of vehicles. These vehicle dynamic parameters are used to characterize the congestion situation of the target road segment. Based on the road segment information, the vehicle dynamic parameters, and the historical road conditions, predict the target road conditions of the target road segment within the target time period; The vehicle dynamic parameters include the road segment clustering ratio; determining the vehicle dynamic parameters based on the number of the various types of vehicles, the speed of the various types of vehicles, and the position of the various types of vehicles includes: Based on the speed and position of the various vehicles, determine the clustered vehicles and the number of times the clustered vehicles cluster. The clustered vehicles meet the clustering conditions, which include: the speed of the clustered vehicles is less than a first preset speed, and the speed of adjacent vehicles that are less than a preset distance from the clustered vehicles is less than a second preset speed. Based on the location of the clustered vehicles, determine the ratio of the number of clustered vehicles to the number of each type of vehicle in different sub-segments of the target road segment, and determine the clustering ratio of the road segment.
2. The method according to claim 1, characterized in that, The vehicle dynamic parameters include the proportion of vehicle types; determining the vehicle dynamic parameters based on the quantity of the various types of vehicles, the speed of the various types of vehicles, and the position of the various types of vehicles includes: The proportion of vehicle types is determined based on the ratio of the quantity of each type of vehicle to the total quantity of all types of vehicles.
3. The method according to claim 1 or 2, characterized in that, The vehicle dynamic parameters include the number of aggregations parameter; the number of aggregations parameter includes at least one of the following: the proportion of aggregation vehicles, the aggregation duration parameter, the travel duration parameter, and the queue length parameter; the proportion of aggregation vehicles parameter represents the ratio of the number of aggregation vehicles with different aggregation times to the number of vehicles of each type. The aggregation duration parameter represents at least one of the mean, variance, maximum, and minimum values of the aggregation duration for vehicles with different aggregation times for each type of vehicle. The aggregation duration is the duration required to satisfy the aggregation conditions. The travel time parameter represents the mean, variance, maximum, and minimum time for vehicles of each type to travel through the target road segment at different aggregation times. The queue length parameter represents at least one of the mean, variance, maximum and minimum values of the queue length of vehicles with different number of gatherings for each type of vehicle. The queue length represents the distance between the farthest gathering vehicle and the point where it leaves the target road segment. The farthest gathering vehicle represents the gathering vehicle with the longest distance from the point where it leaves the target road segment. The process of determining vehicle dynamic parameters based on the number of vehicles, the speed of vehicles, and the position of vehicles includes: Based on the speed and position of the various vehicles, at least one of the following parameters is determined: the proportion of vehicles in a cluster, the cluster duration, the travel time, and the queue length. At least one of these parameters is then used as the cluster count parameter.
4. The method according to claim 1 or 2, characterized in that, The step of predicting the target road conditions of the target road segment within a target time period based on the road segment information, the vehicle dynamic parameters, and the historical road conditions includes: The historical congestion value corresponding to the historical road conditions is determined based on the historical road conditions and the first mapping relationship; the first mapping relationship includes different road conditions and their corresponding congestion values, and the historical congestion value is positively correlated with the congestion situation represented by the historical road conditions; The road segment information, vehicle dynamic parameters, and historical congestion values are input into the traffic condition prediction model to obtain the target congestion value of the target road segment, and the target traffic condition is determined based on the target congestion value and the first mapping relationship.
5. The method according to claim 1 or 2, characterized in that, The method further includes: Multiple sets of sample data are acquired, including road segment information of sample road segments, sample vehicle dynamic parameters and sample road conditions of the sample road segments in a first time period, and sample road conditions in a second time period; the second time period is located after the first time period. Based on the multiple sets of sample data, the preset decision tree GBDT model is trained to obtain the road condition prediction model.
6. A road condition prediction device, characterized in that, The device includes an acquisition unit, a determination unit, and a prediction unit; The acquisition unit is used to acquire road segment information of the target road segment, the number of various vehicles, the speed of the various vehicles, the location of the various vehicles, and historical road conditions within a historical time period; the various vehicles include vehicles that left the target road segment within the historical time period and vehicles that did not leave the target road segment within the historical time period. The determining unit is used to determine vehicle dynamic parameters based on the number of the various types of vehicles, the speed of the various types of vehicles, and the position of the various types of vehicles. The vehicle dynamic parameters are used to characterize the congestion situation of the target road segment. The prediction unit is used to predict the target road conditions of the target road segment within a target time period based on the road segment information, the vehicle dynamic parameters, and the historical road conditions. The vehicle dynamic parameters include the road segment aggregation ratio; the determining unit is specifically used to: determine the aggregation vehicles and the aggregation number of the aggregation vehicles among the various vehicles based on the speed and position of the various vehicles, wherein the aggregation vehicles meet the aggregation conditions, and the aggregation conditions include: the speed of the aggregation vehicles is less than a first preset speed, and the speed of adjacent vehicles whose distance from the aggregation vehicles is less than a preset distance is less than a second preset speed. Based on the location of the clustered vehicles, determine the ratio of the number of clustered vehicles to the number of each type of vehicle in different sub-segments of the target road segment, and determine the clustering ratio of the road segment.
7. The apparatus according to claim 6, characterized in that, The vehicle dynamic parameters include the proportion of vehicle types; the determining unit is specifically used for: The proportion of vehicle types is determined based on the ratio of the quantity of each type of vehicle to the total quantity of all types of vehicles.
8. A computer-readable storage medium storing instructions or a computer program, and / or a computer program, characterized in that, When the instructions or computer program are executed, the method as described in any one of claims 1-5 is implemented.
9. An electronic device, characterized in that, include: A processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the traffic prediction method according to any one of claims 1-5.
Citation Information
Patent Citations
Road traffic incident detection method and device based on checkpoint data, and medium
CN113256967A
Congestion state prediction method and device, electronic equipment and storage medium
CN114639233A