Methods, apparatus, and readable storage media for calculating road condition status.
By acquiring and analyzing road connectivity, attributes, vehicle trajectories, and traffic flow information, the problem of inaccurate road condition calculations in existing technologies has been solved, enabling more accurate road condition information provision, reducing traffic congestion for users, and improving travel efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-04
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, methods for calculating road conditions rely excessively on vehicle speed, resulting in inaccurate road condition information calculated under different driving habits of different drivers.
The system acquires connection relationship information, attribute information, vehicle trajectory information, and road traffic flow information of the target road. By extracting vehicle trajectory and road traffic flow information for a specific time period and combining them with connection relationship information, the system determines the road condition status. The system uses a Redis database and Iceberg table format for data storage and verification.
It improves the accuracy of road condition information, reduces traffic congestion for users, and increases travel efficiency.
Smart Images

Figure CN117012025B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of urban transportation technology, and in particular to a method, apparatus, and readable storage medium for calculating road conditions. Background Technology
[0002] With the increasing number of vehicles, urban traffic congestion is becoming more and more serious. To enable users to choose smooth routes, it is necessary to calculate road condition information (such as smooth, slow, or congested) for users to choose from. Currently, the method for calculating real-time road condition information is to calculate the average speed of vehicles based on GPS-transmitted vehicle location information, travel time, direction of travel, and distance traveled. This average speed is then combined with the current road classification and the corresponding speed range to derive the road condition information. However, existing methods for calculating road condition information rely too heavily on vehicle speed, which can easily lead to incorrect road condition information in certain special scenarios. For example, different drivers may have different driving habits. When the road is smooth, but the driver habitually drives slowly, the road condition information obtained based on vehicle speed may be congested, which does not match the actual road condition information. Summary of the Invention
[0003] In view of this, embodiments of this specification provide a method, apparatus, and readable storage medium for calculating road condition status, to solve the problem that the road condition status cannot be accurately determined in the prior art.
[0004] The embodiments in this specification adopt the following technical solutions:
[0005] This specification provides an embodiment of a method for calculating road condition status, including:
[0006] Acquire the connection relationship information, attribute information, vehicle trajectory information, and road traffic flow information of the target road; wherein the road traffic flow information is used to indicate the road congestion status;
[0007] Vehicle trajectory information for a first time period is extracted from the vehicle trajectory information; the start time of the first time period is the current time, and the preset duration is the first duration.
[0008] Road traffic flow information for a second time period is extracted from the road traffic flow information; the start time of the second time period is the current time, and the preset duration is the second duration; wherein the second duration is less than the first duration;
[0009] The road condition of the target road is determined based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information.
[0010] Optionally, obtaining the connection relationship information and attribute information of the target road specifically includes:
[0011] Generate static files based on the connection and attribute information of the target roads;
[0012] Store the static files in a Redis database;
[0013] The static file is retrieved from the Redis database to obtain the connection relationship information and attribute information of the target road.
[0014] Optionally, obtaining the vehicle trajectory information and road traffic flow information of the target road specifically includes:
[0015] Establish a connection with an external data source system; wherein the external data source system is used to pre-determine vehicle trajectory information and road traffic flow information of the target road;
[0016] Vehicle trajectory information and road traffic flow information of the target road are obtained from the external data source system.
[0017] Optionally, after determining the road condition status of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information, the method further includes:
[0018] The determined road condition status of the target road is stored in an Iceberg table format;
[0019] The road condition status of the target road is obtained from the Iceberg table format, and the accuracy of the road condition status of the target road is verified.
[0020] Optionally, determining the road condition status of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information specifically includes:
[0021] The average speed of the vehicle is obtained based on the vehicle trajectory information of the first time period;
[0022] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is smooth, the connection relationship information of the target road indicates that the target road is smoothly connected to other roads within the preset range of the target road, and the average speed belongs to the first speed range corresponding to the target road, the road condition status of the target road is determined to be smooth; the minimum value of the speed range corresponding to the first speed range is greater than the maximum value of another speed range of the target road.
[0023] Optionally, determining the road condition status of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information further includes:
[0024] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is smooth, the connection relationship information of the target road indicates that the target road is connected to other roads within a preset range of the target road and is blocked, the vehicle trajectory information covers the target road, and the average speed belongs to the first speed range corresponding to the target road or is less than the minimum value of the speed range corresponding to the first speed range, the road condition status of the target road is determined to be smooth.
[0025] Optionally, determining the road condition status of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information further includes:
[0026] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is smooth, and the connection relationship information of the target road indicates that the target road is smoothly connected to other roads within the preset range of the target road, and the average speed is less than the minimum value of the second speed interval corresponding to the target road, the road condition status of the target road is determined to be congested; the maximum value of the speed range corresponding to the second speed interval is less than the minimum value of another speed interval of the target road.
[0027] This specification also provides an apparatus for calculating road condition status, comprising:
[0028] The information acquisition module is used to acquire connection relationship information, attribute information, vehicle trajectory information, and road traffic flow information of the target road; wherein the road traffic flow information is used to indicate the road congestion status.
[0029] The data extraction module is used to extract vehicle trajectory information for a first time period from the vehicle trajectory information; the start time of the first time period is the current time, and the preset duration is the first duration; and to extract road traffic flow information for a second time period from the road traffic flow information; the start time of the second time period is the current time, and the preset duration is the second duration; wherein the second duration is less than the first duration.
[0030] The road condition determination module is used to determine the road condition status of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information.
[0031] This specification also provides a non-volatile computer-readable storage medium storing program instructions or a computer program thereon; and / or, a computer program that, when executed by a processor, implements the method for calculating the road condition status of a road as described in any of the preceding embodiments.
[0032] This specification also provides a computer device, including a memory and a processor, wherein the memory stores a control program, and the control program, when executed by the processor, is used to implement the method for calculating the road condition status of a road as described in any of the preceding embodiments.
[0033] The above-described at least one technical solution used in the embodiments of this specification can achieve the following beneficial effects:
[0034] The system acquires connectivity information, attribute information, vehicle trajectory information, and road traffic flow information for the target road. Road traffic flow information indicates the road's congestion status. Vehicle trajectory information for a first time period is extracted from the vehicle trajectory information, with the start time being the current time and a preset duration of one time period. Road traffic flow information for a second time period is extracted from the road traffic flow information, with the start time being the current time and a preset duration of one time period. The second time period is shorter than the first time period. Based on the vehicle trajectory information for the first time period, the road traffic flow information for the second time period, the connectivity information of the target road, and the attribute information, the system determines the road condition status of the target road, providing a highly accurate road condition information for users to choose from, reducing traffic congestion and improving user travel efficiency. Attached Figure Description
[0035] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0036] Figure 1 This is a flowchart of a method for calculating road condition status in one embodiment of this specification;
[0037] Figure 2 This is a schematic diagram of the architecture of a method for calculating road condition status in one embodiment of this specification;
[0038] Figure 3 This is a schematic diagram of a device for calculating road conditions in one embodiment of this specification;
[0039] Figure 4 This is a schematic diagram of a computer device in one embodiment of this specification. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0042] This specification provides an embodiment of a method for calculating road condition status, addressing the problem of inaccurate road condition calculation in existing technologies. Road condition status generally includes one of three conditions: smooth traffic, slow traffic, and congested traffic. This application is applicable to various types of roads, especially closed roads. Closed roads are highways where access is not affected by vehicles from any direction, all intersections are grade-separated, and traffic flows in their designated lanes. Closed roads may include expressways and urban expressways, characterized by physical barriers between motor vehicle lanes and non-motor vehicle lanes, as well as physical barriers between two-way lanes, and grade-separated intersections.
[0043] Figure 1 This is a flowchart illustrating a method for calculating road condition status in one embodiment of this specification. See also... Figure 1 The method is shown below and may include the following steps:
[0044] Step S102: Obtain the connection relationship information, attribute information, vehicle trajectory information, and road traffic flow information of the target road; wherein the road traffic flow information is used to represent the road congestion status. The congestion status may include a smooth state or a congested state; the congestion status may also include a slow state, which is a state between the smooth state and the congested state.
[0045] In this step, the connectivity information of the target road refers to the topological connection between the target road and other roads within a preset length or range. The preset length or range can be set according to actual needs, for example, any value between 50 and 100 meters. Attribute information can include the road's grade, type, and width. The road grade generally includes highways and ordinary urban roads. The road type generally includes auxiliary roads, ramps, main roads, and the number of lanes (e.g., 3 lanes or 4 lanes).
[0046] Step S104: Extract vehicle trajectory information for the first time period from the vehicle trajectory information; the start time of the first time period is the current time, and the preset duration is the first duration;
[0047] In this step, vehicle trajectory information for the first time period can be extracted once at a preset time interval. The preset time interval can be any value between 1 and 3 minutes, or it can be set according to actual needs.
[0048] Step S106: Extract road traffic flow information for the second time period from the road traffic flow information; the start time of the second time period is the current time, and the preset duration is the second duration; wherein the second duration is less than the first duration;
[0049] In this step, road traffic flow information for the second time period can be extracted at preset time intervals. To fully consider vehicle travel routes and improve the accuracy of road condition information, which requires obtaining longer vehicle trajectory information, the first duration of the first time period needs to be longer than the second duration of the second time period. Furthermore, considering that the reference value of road traffic flow information further back to the current time decreases, the second duration is made shorter than the first duration. This avoids extracting a large amount of road traffic flow information while ensuring that the extracted information has higher reference value, facilitating a more accurate determination of the target road's road condition. Both the second and first durations can be set; for example, the first duration can be set to 30 minutes and the second duration to 5 minutes. The first duration is generally 3-8 times the second duration, such as 6 times.
[0050] Step S108: Determine the road condition status of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information.
[0051] In this embodiment, the connection relationship information, attribute information, vehicle trajectory information, and road traffic flow information of the target road are acquired. The road traffic flow information is used to indicate the road's congestion status. Vehicle trajectory information for a first time period is extracted from the vehicle trajectory information, with the start time of the first time period being the current time and a preset duration of a first duration. Road traffic flow information for a second time period is extracted from the road traffic flow information, with the start time of the second time period being the current time and a preset duration of a second duration. The second duration is shorter than the first duration. Based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information, the road condition status of the target road is determined, providing a very accurate road condition status for user selection, reducing traffic congestion and improving user travel efficiency. It can be understood that this embodiment can update the road condition status of the target road at preset time intervals.
[0052] In the embodiments of this specification, obtaining the connection relationship information and attribute information of the target road may specifically include:
[0053] Generate static files based on the connection and attribute information of the target roads;
[0054] Static files are stored in a Redis (Remote Dictionary Server) database;
[0055] Retrieve static files from the Redis database to obtain the connection relationship information and attribute information of the target road.
[0056] In this embodiment, the connection relationship information and attribute information of the target roads can generally be obtained from an externally provided monthly map. The connection relationship information and attribute information of the target roads can be generated into the same static file, or they can be generated into separate static files. The static file format can be XML or properties; for example, the static file can be named config.xml or redisConfig.properties. Redis, or Remote Dictionary Service, is an open-source, ANSI C-language, network-enabled, in-memory or persistent log-structured key-value database. Generating static files based on the connection relationship information and attribute information of the target roads, storing the static files in the Redis database, and retrieving the static files from the Redis database to obtain the connection relationship information and attribute information of the target roads is very simple and fast.
[0057] In the embodiments of this specification, obtaining vehicle trajectory information and road traffic flow information of the target road may specifically include:
[0058] Establish a connection with an external data source system; the external data source system is used to pre-determine vehicle trajectory information and road traffic flow information for the target road;
[0059] Obtain vehicle trajectory information and road traffic flow information for the target road from an external data source system.
[0060] In this embodiment, establishing a connection with an external data source system to obtain vehicle trajectory information and traffic flow information of the target road simplifies the architecture for calculating road conditions and reduces the hardware requirements for running the method, thus saving hardware costs. The vehicle trajectory information and traffic flow information can reside in the same external data source system or in different external data source systems. Generally, the vehicle trajectory information and traffic flow information obtained from the external data source system can be stored in Kafka (a high-throughput distributed publish-subscribe messaging system). Retrieving the vehicle trajectory information and traffic flow information from Kafka can meet the requirements for real-time processing of large amounts of data.
[0061] In this embodiment of the specification, after determining the road condition status of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information, the following may also be included:
[0062] Store the road condition status of the identified target road in an Iceberg table format;
[0063] Retrieve the road condition status of the target road from the Iceberg table format and verify the accuracy of the road condition status.
[0064] In this embodiment, traffic conditions from Kafka are typically stored in an Iceberg table format for later backtracking, further improving the accuracy of the determined traffic information. Iceberg is an open data lake table format designed for analyzing massive amounts of data. Storing the traffic conditions of the determined target road in the Iceberg table format facilitates the processing of large amounts of data. The traffic conditions of the target road are then retrieved from the Iceberg table format, and the accuracy of these conditions is verified. Based on the verification results, the process of determining the traffic conditions of the target road is corrected to ensure improved accuracy.
[0065] In the embodiments of this specification, the road condition status of the target road is determined based on vehicle trajectory information in the first time period, road traffic flow information in the second time period, connection relationship information of the target road, and attribute information. Specifically, it may include:
[0066] The average speed of the vehicle is obtained based on the vehicle trajectory information in the first time period;
[0067] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is smooth, the connection relationship information of the target road indicates that the target road is smoothly connected to other roads within the preset range of the target road, and the average speed belongs to the first speed range corresponding to the target road, the road condition status of the target road is determined to be smooth; the minimum value of the speed range corresponding to the first speed range is greater than the maximum value of the other speed ranges of the target road.
[0068] In this embodiment, for example, the target road is an urban road, with a first speed range of (50-60) km / h; a second speed range of (20-30) km / h; and a third speed range of [50-30) km / h. The trajectory length of the vehicle trajectory information can be determined. The average speed of the vehicle is obtained based on the trajectory length and the first duration of the first time period. Different roads can have different speed ranges defined; for example, the speed range of some highways can be defined as 60-120 km / h, while the speed range of general urban roads can be defined as 50-60 km / h. When the road traffic flow information of the second time period indicates the road congestion of the second time period... The traffic flow is defined as "smooth" when the traffic is congested. The connectivity information of the target road indicates that the target road is smoothly connected to other roads within a preset range. The road condition is considered smooth when the average speed falls within the first speed range corresponding to the target road, demonstrating high accuracy. This can be understood as follows: when there are multiple vehicles on the target road, meaning multiple vehicle trajectory information exists, the trajectory information of these vehicles can be merged to obtain the total trajectory length. Then, the average trajectory length is obtained based on the total trajectory length and the number of vehicle trajectory information. Finally, the average speed of the vehicles is obtained based on the average trajectory length and the first duration of the first time period.
[0069] In the embodiments of this specification, the road condition status of the target road is determined based on vehicle trajectory information in the first time period, road traffic flow information in the second time period, connection relationship information of the target road, and attribute information. Specifically, it may include:
[0070] The average speed of the vehicle is obtained based on the vehicle trajectory information in the first time period;
[0071] Determine if vehicle trajectory information covers the target road in the first time period;
[0072] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is congested, and the connection relationship information of the target road indicates that the target road is blocked when connected to other roads within the preset range of the target road, and the average speed belongs to the first speed range corresponding to the target road, the road condition status of the target road is determined to be smooth; the minimum value of the speed range corresponding to the first speed range is greater than the maximum value of the other speed ranges of the target road.
[0073] In some other cases, the average speed of a vehicle can also be determined in the following ways. Specifically, for example, after determining the trajectory length of the vehicle trajectory information, the target trajectory length on the target road and the target duration of the target trajectory length on the target road can be further determined, so as to obtain the average speed of the vehicle based on the target trajectory length and the target duration.
[0074] In the embodiments of this specification, determining the road condition status of the target road based on vehicle trajectory information in the first time period, road traffic flow information in the second time period, connection relationship information of the target road, and attribute information may further include:
[0075] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is smooth, the connection relationship information of the target road indicates that the target road is blocked when connected to other roads within the preset range of the target road, the vehicle trajectory information covers the target road, and the average speed belongs to the first speed range corresponding to the target road or is less than the minimum value of the speed range corresponding to the first speed range, the road condition status of the target road is determined to be smooth.
[0076] In this embodiment, the blockage connecting the target road with other roads within a preset range of the target road can be understood as a traffic jam preventing vehicles from passing between the target road and other roads within the preset range of the target road. Because the first duration of the first time period corresponding to the vehicle trajectory information is greater than the second duration, the vehicle trajectory information may cover the target road, or it may cover the target road and extend to other roads within the preset range of the target road. If the vehicle trajectory information covers the target road, or if the vehicle trajectory information covers the target road and extends to other blocked roads within the preset range of the target road, and the average speed belongs to the first speed range corresponding to the target road or is less than the minimum value of the speed range corresponding to the first speed range, the road condition of the target road is determined to be smooth. Determining the road condition of the target road to be smooth has a high degree of accuracy.
[0077] In some other cases of this embodiment, a speed coefficient can also be set for the minimum value of the speed range corresponding to the first speed interval of the target road. The more other congested roads within the preset range of the target road, the smaller the speed coefficient; or the more other congested roads within the preset range of the target road to which the vehicle trajectory information extends, the smaller the speed coefficient. That is, the speed coefficient is inversely proportional to the number of other congested roads within the preset range of the target road to which the vehicle trajectory information extends. After setting the speed coefficient for the minimum value of the first speed interval corresponding to the target road, when the average speed is less than the minimum value of the first speed interval corresponding to the target road, it is also necessary to determine whether the average speed satisfies the condition of being greater than the product of the minimum value of the first speed interval corresponding to the target road and the speed coefficient. If it satisfies this condition, the road condition of the target road is determined to be smooth, further ensuring the accuracy of the determined road condition information.
[0078] In the embodiments of this specification, determining the road condition status of the target road based on vehicle trajectory information in the first time period, road traffic flow information in the second time period, connection relationship information of the target road, and attribute information may further include:
[0079] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is smooth, and the connection relationship information of the target road indicates that the target road is smoothly connected to other roads within the preset range of the target road, and the average speed is less than the minimum value of the second speed interval corresponding to the target road, the road condition status of the target road is determined to be congested; the maximum value of the speed range corresponding to the second speed interval is less than the minimum value of another speed interval of the target road.
[0080] In this embodiment, when the road traffic flow information of the second time period indicates that the road congestion status of the second time period is smooth, the connection relationship information of the target road indicates that the target road is smoothly connected with other roads within the preset range of the target road, and the average speed is less than the minimum value of the second speed range corresponding to the target road, the road condition status of the target road is determined to be congested, which has a high accuracy.
[0081] In some other embodiments, determining the road condition status of the target road based on vehicle trajectory information in the first time period, road traffic flow information in the second time period, connectivity information of the target road, and attribute information may further include:
[0082] When the road traffic flow information for the second time period indicates that the road congestion status for the second time period is congested, the connection relationship information of the target road indicates that the target road is smoothly connected to other roads within the preset range of the target road, and the average speed belongs to the first speed range corresponding to the target road, the road condition status of the target road is determined to be smooth.
[0083] In this embodiment, when the road traffic flow information of the second time period indicates that the road congestion status of the second time period is congested, the connection relationship information of the target road indicates that the target road is connected smoothly with other roads within the preset range of the target road, and the average speed belongs to the first speed range corresponding to the target road, the road condition status of the target road is determined to be smooth, which has a high accuracy.
[0084] Figure 2 This is a schematic diagram illustrating the architecture of a method for calculating road condition status in one embodiment of this specification. (In conjunction with...) Figure 2 This paper describes in detail the architecture of a method for calculating road condition status. This architecture includes a Redis database, Kafka (a high-throughput distributed publish-subscribe messaging system), and Iceberg tables. The Redis database stores a topology heat cache file and an initialization configuration file. The initialization configuration file stores the attribute information of the target road; this attribute information is static. Kafka stores vehicle trajectory information and road condition information. The topology heat cache file and the initialization configuration file are static information. The topology heat cache file stores the connection relationships of the target road, which can also be understood as topological features or road condition topology. It can represent the connection relationships between the target road and other roads connected to it through topological assignment states; for example, the topology assignment states can be smooth, congested, or slow. After extracting trajectory information from Kafka, trajectory information that does not meet the conditions needs to be removed, such as trajectory information whose length exceeds a preset length or whose time period exceeds a preset duration. After extracting traffic information from Kafka, when the extracted traffic information includes traffic conditions for multiple road segments, these segments can be grouped. The state standard deviation feature of each group's traffic information is then calculated to obtain the traffic condition information for that group. The traffic condition status of the target road is determined based on trajectory information, traffic information, and static information; that is, feature fusion of trajectory information, traffic information, and static information is used to determine the target road's traffic condition status. Backtracking information, including the traffic condition status (merged feature backtracking information) and intermediate values (trajectory backtracking information and topology backtracking information), is stored in Kafka. Then, the backtracking information in Kafka is stored in Iceberg table format, i.e., backtracking information is fed into the lake. Backtracking information is retrieved from the Iceberg table format and validated, i.e., backtracking is performed. Generally, during validation, the retrieved backtracking information can be expanded; for example, separating the traffic condition status used for backtracking from the intermediate values facilitates validation and display.
[0085] Figure 3This is a schematic diagram of an apparatus for calculating road condition status according to one embodiment of this specification. Based on the same concept, the present invention also provides an apparatus for calculating road condition status, which may include an information acquisition module 602, a data extraction module 603, and a road condition status determination module 604.
[0086] The information acquisition module 602 is used to acquire the connection relationship information, attribute information, vehicle trajectory information and road traffic flow information of the target road; among which, the road traffic flow information is used to indicate the congestion status of the road.
[0087] The data extraction module 603 is used to extract vehicle trajectory information for a first time period from vehicle trajectory information; the start time of the first time period is the current time, and the preset duration is the first duration; and to extract road traffic flow information for a second time period from road traffic flow information; the start time of the second time period is the current time, and the preset duration is the second duration; wherein the second duration is shorter than the first duration.
[0088] The road condition determination module 604 is used to determine the road condition of the target road based on the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information of the target road, and the attribute information.
[0089] Based on the same concept, the present invention also provides a non-volatile computer-readable storage medium having program instructions or a computer program stored thereon; and / or a computer program, wherein when the program instructions or the computer program are executed by a processor, a method for calculating the road condition status of any of the above embodiments is implemented.
[0090] Figure 4 This is a schematic diagram of a computer device according to one embodiment of this specification. See also... Figure 4 Based on the same concept, the present invention also provides a computer device 800, which may include a memory 830 and a processor 810. The memory 830 stores a control program 820, which, when executed by the processor 810, is used to implement the method for calculating the road condition status of any of the above embodiments.
[0091] It should be noted that the apparatus provided in this application corresponds one-to-one with the method provided in this application. Therefore, the apparatus also has similar beneficial technical effects as the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the apparatus will not be repeated here. The various embodiments described above in this application can be combined arbitrarily.
[0092] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0093] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0094] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0095] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0096] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0097] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0098] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0099] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0100] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0101] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0102] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0103] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0104] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0105] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0106] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method of calculating a road condition state of a road, characterized by, The method comprises the following steps: obtaining connection relationship information, attribute information, vehicle trajectory information and road traffic flow information of a target road; wherein the road traffic flow information is used to represent the congestion state of the road; extracting vehicle trajectory information of a first time period from the vehicle trajectory information; the starting time of the first time period is the current time, and the preset time length is a first time length; extracting road traffic flow information of a second time period from the road traffic flow information; the starting time of the second time period is the current time, and the preset time length is a second time length; wherein the second time length is less than the first time length; determining the road condition state of the target road according to the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information and the attribute information of the target road; the method for determining the road condition state of the target road according to the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information and the attribute information of the target road comprises the following steps: obtaining the average speed of the vehicle according to the vehicle trajectory information of the first time period; when the road traffic flow information of the second time period represents that the road congestion state of the second time period is smooth, the connection relationship information of the target road represents that the connection between the target road and other roads within the preset range of the target road is smooth, and the average speed belongs to the first speed interval corresponding to the target road, it is determined that the road condition state of the target road is smooth; the minimum value of the speed range corresponding to the first speed interval is greater than the maximum value of another speed interval of the target road.
2. The method of claim 1, wherein, The method for obtaining the connection relationship information and the attribute information of the target road comprises the following steps: generating a static file according to the connection relationship information and the attribute information of the target road; storing the static file into a redis database; obtaining the connection relationship information and the attribute information of the target road from the static file in the redis database.
3. The method of claim 1, wherein, The method for obtaining the vehicle trajectory information and the road traffic flow information of the target road comprises the following steps: establishing a connection with an external data source system; wherein the external data source system is used to pre-determine the vehicle trajectory information and the road traffic flow information of the target road; obtaining the vehicle trajectory information and the road traffic flow information of the target road from the external data source system.
4. The method of claim 1, wherein, After determining the road condition state of the target road according to the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information and the attribute information of the target road, the method further comprises the following steps: storing the determined road condition state of the target road into an Iceberg table format; obtaining the road condition state of the target road from the Iceberg table format, and verifying the accuracy of the road condition state of the target road.
5. The method according to any one of claims 1 to 4, characterized in that, The method for determining the road condition state of the target road according to the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, the connection relationship information and the attribute information of the target road further comprises the following steps: When the road traffic flow information of the second time period indicates that the road congestion state of the second time period is smooth, the connection relationship information of the target road indicates that the target road is connected to other roads within a preset range of the target road in a jammed manner, the vehicle trajectory information covers the target road, and the average speed belongs to a first speed interval corresponding to the target road or is smaller than a minimum value of a speed range corresponding to the first speed interval, it is determined that the road condition state of the target road is smooth.
6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When the road traffic flow information of the second time period indicates that the road congestion state of the second time period is smooth, the connection relationship information of the target road indicates that the target road is connected to other roads within a preset range of the target road in a smooth manner, and the average speed is smaller than a minimum value of a second speed interval corresponding to the target road, it is determined that the road condition state of the target road is congested; a maximum value of a speed range corresponding to the second speed interval is smaller than a minimum value of another speed interval of the target road.
7. An apparatus for calculating a road condition state of a road, characterized by comprising: The method further includes: An information acquisition module is configured to acquire connection relationship information, attribute information, vehicle trajectory information, and road traffic flow information of a target road. The road traffic flow information is used to indicate a road congestion state. A data extraction module is configured to extract vehicle trajectory information of a first time period from the vehicle trajectory information; a starting time of the first time period is a current time, and a preset time length is a first time length; and extract road traffic flow information of a second time period from the road traffic flow information; a starting time of the second time period is the current time, and a preset time length is a second time length; the second time length is smaller than the first time length. A road condition state determination module is configured to determine a road condition state of the target road according to the vehicle trajectory information of the first time period, the road traffic flow information of the second time period, connection relationship information of the target road, and attribute information of the target road. The road condition state determination module is specifically configured to: Obtain an average speed of a vehicle according to the vehicle trajectory information of the first time period. When the road traffic flow information of the second time period indicates that the road congestion state of the second time period is smooth, the connection relationship information of the target road indicates that the target road is connected to other roads within a preset range of the target road in a smooth manner, and the average speed belongs to a first speed interval corresponding to the target road, it is determined that the road condition state of the target road is smooth; a minimum value of a speed range corresponding to the first speed interval is greater than a maximum value of another speed interval of the target road.
8. A non-transitory computer readable storage medium having stored thereon, program instructions or a computer program; and / or, a computer program, characterized in that, The program instructions or the computer program are executed by the processor to implement the method for calculating a road condition state according to any one of claims 1 to 7. 9.A computer device, comprising a memory and a processor, and characterized in that, The memory stores a control program, and the control program is executed by the processor to implement the method for calculating a road condition state according to any one of claims 1 to 7.
Citation Information
Patent Citations
Road driving speed determination method and device
CN104637313A
Traffic jam simulation processing method and related device
CN110489799A