Intersection passing degree determination method, apparatus and device, and readable storage medium
By acquiring and splitting the traffic data carrying intersection information and direction information, and calculating the number of vehicles passing in each direction, the problem of inaccurate judgment of road traffic in various intersections in the prior art is solved, and the accuracy of judging congestion situations is improved.
Patent Information
- Application Number
- CN202411667785.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art can only simply count vehicles on the road, and cannot accurately determine the passability of each intersection of the road, resulting in low accuracy in judging congestion.
By obtaining the traffic data set sent by roadside equipment, each data carries intersection information and direction information, splits the data set to associate different intersections and directions, calculates the number of vehicles passing in each direction, and then determines the traffic degree of each intersection.
The passability of each intersection is independently and accurately determined, and the accuracy of judging road congestion is improved.
Smart Images

Figure CN119694111A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing, and in particular relates to a method, device, electronic device and readable storage medium for determining the degree of traffic at an intersection. Background Art
[0002] With the development of society, the construction of basic roads has provided better driving conditions for traffic, and at the same time, more and more vehicles are traveling on the road. Road congestion often occurs on the road, resulting in low vehicle driving efficiency.
[0003] Currently, the number of vehicles on the road is counted, the vehicle flow is determined by counting the number of vehicles, and the congestion situation is determined based on the flow.
[0004] However, the current solution can only simply count the vehicles on the road and can only determine the overall congestion situation of the current road, with low accuracy. Summary of the invention
[0005] The present invention provides a method, device, electronic device and readable storage medium for determining the traffic degree at an intersection, so as to solve the problem that the related art can only determine the overall congestion situation of the current road, resulting in low accuracy.
[0006] In a first aspect, the present invention provides a method for determining a traffic degree at an intersection, comprising:
[0007] Acquire a traffic data set sent by a roadside device; the traffic data set includes different types of data; each data carries intersection information and direction information;
[0008] According to the intersection information of each data in the traffic data set, the traffic data set is split to obtain intersection data sets; different intersection data sets are associated with different intersections;
[0009] For each intersection data set, according to the direction information of each data in the intersection data set, the intersection data set is split to obtain direction data sets; different direction data sets correspond to different directions of the target intersection associated with the intersection data set;
[0010] For each direction data set, determining the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set;
[0011] Based on the number of vehicles passing through, the degree of traffic at the target intersection in the target direction is determined.
[0012] In a second aspect, the present invention provides a device for determining a traffic degree at an intersection, comprising:
[0013] A data acquisition module is used to acquire a set of traffic data sent by a roadside device; the traffic data set includes different types of data; each data carries intersection information and direction information;
[0014] An intersection collection module, used for splitting the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set; different intersection data sets are associated with different intersections;
[0015] A direction set module is used for splitting each intersection data set into direction data sets according to the direction information of each data in the intersection data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set;
[0016] A direction quantity module, for determining, for each direction data set, the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set;
[0017] The intersection traffic module is used to determine the traffic degree of the target intersection in the target direction based on the number of vehicles passing through.
[0018] In a third aspect, the present invention provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for determining the degree of traffic at an intersection as described in the first aspect when executing the program.
[0019] In a fourth aspect, the present invention provides a readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method for determining the degree of traffic at an intersection described in the first aspect.
[0020] In summary, by acquiring the traffic data set sent by the roadside equipment, each data carries intersection information and direction information. According to the intersection information of each data in the traffic data set, the traffic data set is split to obtain an intersection data set. Different intersection data sets are associated with different intersections. For each intersection data set, according to the direction information of each data in the intersection data set, the intersection data set is split to obtain a direction data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set. For each direction data set, according to different types of data in the direction data set, the number of vehicles passing in the target direction corresponding to the direction data set is determined, and based on the number of vehicles passing, the degree of traffic of the target intersection where the target direction is located is determined. It is possible to determine the data set corresponding to each intersection including different types of data, and the data set corresponding to each direction, and then independently for each intersection, the degree of traffic of the intersection can be comprehensively determined according to the number of vehicles passing in each direction of the intersection, thereby improving the accuracy of determining the degree of traffic. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 is a flowchart of a method for determining the degree of traffic at an intersection provided by an embodiment of the present invention;
[0023] Figure 2 is a flowchart of another method for determining the degree of traffic at an intersection provided by an embodiment of the present invention;
[0024] Figure 3 is a flowchart of the steps of data acquisition and cleaning provided by an embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of a system architecture for determining the passability of an intersection provided by an embodiment of the present invention;
[0026] Figure 5 is a structural diagram of a device for determining the degree of traffic at an intersection provided by an embodiment of the present invention;
[0027] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] The following is a further description of the method for determining the traffic degree of an intersection of the present application in conjunction with the relevant drawings and embodiments:
[0030] Figure 1 is a flowchart of a method for determining the degree of traffic at an intersection provided by an embodiment of the present invention. Figure 1 , the method may include:
[0031] Step 101, obtaining a set of traffic data sent by a roadside device; the traffic data set includes different types of data; each data carries intersection information and direction information.
[0032] In the disclosed embodiments, the roadside equipment may refer to a roadside unit (RSU), which is installed on the roadside and can communicate with an on-board unit (OBU) using dedicated short-range communication (DSRC) technology and vehicle to everything (V2X) technology. The on-board unit is installed on the vehicle and can realize V2X communication, and is a hardware unit that supports V2X applications.
[0033] The server can obtain the traffic data set sent by the roadside equipment. The data in the traffic data set are of different types, which can be various data sent by radar equipment, cameras, and OBU at the location of the roadside equipment. Among them, the data sent by OBU is mainly used to describe the vehicle posture, such as vehicle speed, heading angle, and other vehicle status information.
[0034] It is understandable that different types of data may be first subjected to mobile edge computing (MEC, Mobile Edge Computing), and the mobile edge computing process may be performed by a dedicated device such as a server. After completing the mobile edge computing, it is sent to the roadside unit. Among them, the mobile edge computing process may be to fuse the radar data of the radar device, the image data of the camera, and the vehicle status information sent by the OBU, for example, to fuse different types of data at the same time and the same location into one data.
[0035] Each data in the traffic data set carries intersection information and direction information. The intersection information and direction information in the data can be collected by radar equipment, cameras and other equipment when collecting data, or can be information added after processing by MEC equipment. There is no limitation on how to carry the intersection information and direction information in each data.
[0036] It is understandable that the intersection information indicates which intersection the current data is targeting and describing. Usually there are multiple intersections on a road. An intersection can refer to the intersection of at least two roads, so each intersection can correspond to at least three directions. Direction information refers to the direction of the current intersection. The direction information can be east, south, west, north, northeast, southwest, etc.
[0037] Step 102: split the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set; different intersection data sets are associated with different intersections.
[0038] In the disclosed embodiment, since each data in the traffic data set carries intersection information and direction information, the intersection information in each data may be different. For example, data A is for the first intersection on Road A, and data B is for the fourth intersection on Road B.
[0039] The traffic data set can be split according to the intersection information, and the data with the same intersection information can be regarded as an intersection data set. Based on this splitting method, various intersection data sets are finally obtained, and each intersection data set is associated with a different intersection.
[0040] Step 103, for each intersection data set, split the intersection data set into direction data sets according to the direction information of each data in the intersection data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set;
[0041] In the embodiment of the present disclosure, similarly, since each data in the traffic data set carries intersection information and direction information, the direction information of the data in each intersection data set can be different. For example, data A is for the east direction of the first intersection on Road A, and data B is for the west direction of the first intersection on Road A.
[0042] Therefore, for each intersection data set, the intersection data set can be further split into direction data sets according to the direction information in the data. Different direction data sets correspond to different directions of the target intersection associated with the intersection data set.
[0043] In the process of obtaining the intersection data set and the direction data set based on the traffic data set, the data with the same intersection information and direction information can be aggregated based on the fuzzy c-means clustering algorithm (FCM). The FCM algorithm mainly includes the membership value formula and the cluster center formula:
[0044]
[0045] In the above membership value formula, U ij is the data point x j The membership degree of cluster i; m is the weighted index, which is a preset constant used to adjust the influence of the membership degree on the calculation of the cluster center; x j represents the jth data point; c i represents the center of the ith cluster, c i is the result to be calculated, c i is a vector (when the data is multidimensional) or a value (when the data is one-dimensional), representing the center position of the i-th cluster in the data space; k represents the total number of clusters; d is the norm symbol.
[0046]
[0047] In the above cluster center formula, c i represents the center of the i-th cluster; U ij Represents data point x j The degree of membership to cluster i; m is the weighted index, x j represents the jth data point; N represents the total number of data points in the data set.
[0048] Step 104 : for each direction data set, determine the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set.
[0049] In the disclosed embodiment, since the traffic data set includes different types of data, the intersection data set obtained by splitting the traffic data set and the direction data set obtained by further splitting the traffic data set may also include different types of data. The number of vehicles passing in the corresponding target direction can be determined based on the different types of data in each direction data set.
[0050] For example, the radar data obtained by detecting vehicles with radar equipment can be used to count the number of vehicles passing in the target direction; the images collected by cameras can be used to identify the images to determine the number of vehicles passing in the target direction; the OBU on the passing vehicles can communicate with the RSU, so that the RSU can determine the number of vehicles passing in the target direction; the number of vehicles passing in the target direction can also be determined through other types of data, without limitation.
[0051] In summary, by acquiring the traffic data set sent by the roadside equipment, each data carries intersection information and direction information. According to the intersection information of each data in the traffic data set, the traffic data set is split to obtain an intersection data set. Different intersection data sets are associated with different intersections. For each intersection data set, according to the direction information of each data in the intersection data set, the intersection data set is split to obtain a direction data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set. For each direction data set, according to different types of data in the direction data set, the number of vehicles passing in the target direction corresponding to the direction data set is determined, and based on the number of vehicles passing, the degree of traffic of the target intersection where the target direction is located is determined. It is possible to determine the data set corresponding to each intersection including different types of data, and the data set corresponding to each direction, and then independently for each intersection, the degree of traffic of the intersection can be comprehensively determined according to the number of vehicles passing in each direction of the intersection, thereby improving the accuracy of determining the degree of traffic.
[0052] Figure 2 Another method for determining the traffic degree of an intersection provided in the embodiment of the present application is as follows: Figure 2 , the methods may include the following methods:
[0053] Step 201, obtaining a set of traffic data sent by a roadside device; the set of traffic data includes different types of data; each data carries intersection information and direction information;
[0054] Step 202, according to the intersection information of each data in the traffic data set, split the traffic data set to obtain intersection data sets; different intersection data sets are associated with different intersections;
[0055] Step 203, for each intersection data set, split the intersection data set into direction data sets according to the direction information of each data in the intersection data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set;
[0056] Step 204, for each direction data set, determining the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set;
[0057] Step 205: Determine the degree of traffic of the target intersection in the target direction based on the number of vehicles passing through.
[0058] For details of steps 201 to 205, please refer to the Figure 1 The embodiments are not described in detail.
[0059] Optionally, after the step of acquiring the traffic data set sent by the roadside equipment, the method further includes:
[0060] Step A1, determining target data that meets a preset data cleaning condition in the pass data set;
[0061] Step A2: deleting the target data to update the traffic data set.
[0062] In the disclosed embodiments, data cleaning conditions may be pre-set, and the traffic data set may be screened by the data cleaning conditions. The data cleaning conditions may be for intersections. For example, there are only 1 to 5 intersections on a road that needs to analyze the trafficability, but the intersection information carried in some data points to the 6th intersection, which exceeds the intersection range and can be determined as target data. It is also possible to determine whether the positioning information is at the intersection or on the lane based on the positioning information of the Global Navigation Satellite System (GNSS) in the data. The data cleaning conditions may also include other content, which is not limited here.
[0063] After determining the target data, the target data in the pass data set can be deleted to update the pass data set. The data cleaning process can be expressed by the following formula:
[0064]
[0065] Where m is the data cleaning condition, x is the data in the pass data set, and when the data cleaning condition m is met, 1 is returned and the data is inserted into the set A, and when m is not met, 0 is returned and the data is discarded. Finally, the set A that passes the data cleaning condition can be obtained: A = {A1, A2, A3, ..., A n}.
[0066] By implementing the embodiments of the present disclosure, target data that meets preset data cleaning conditions is determined in the pass data set, and the target data is deleted to update the pass data set. This can delete data in the pass data set that does not meet the requirements, avoid defective data from participating in calculations, and thus improve the accuracy of the pass data set, and ultimately improve the accuracy of the passability.
[0067] Optionally, the step A1 of determining target data that meets a preset data cleaning condition in the pass data set includes:
[0068] Sub-step A11, obtaining a target position, and indicating a corresponding target field in each data of the traffic data set according to the target position;
[0069] Sub-step A12, when the target field of the data is empty, determining that the data is target data.
[0070] In the disclosed embodiment, the data cleaning condition may be a condition for detecting a specific field of each data. The target position is the position of the specific field in the data, and the corresponding target field may be indicated in each data of the passing data set based on the target position. The target position may be variable to accommodate data of different types and formats, so that the corresponding specific field may be determined in different data.
[0071] The target position can be obtained first, and the corresponding target field can be indicated in each data according to the target position. When the target field of the data is empty, the data is determined to be the target data. It can be understood that the target field can be a field that stores some key information, such as the intersection ID (Road Id), intersection name (Road Name), direction (Direction), flow (Flow) and speed (Speed). When these fields, especially the intersection information and direction information are missing, the data cannot be used to calculate the passability. Therefore, when these target fields are empty, it can be determined that the current data is the target data that needs to be deleted.
[0072] By implementing the embodiments of the present disclosure, by acquiring the target position and indicating the corresponding target field in each data of the traffic data set according to the target position, when the target field of the data is empty, the data is determined to be target data. By detecting whether the target field is empty, the data missing key information can be determined as target data, and these target data can be deleted, which can improve the accuracy of the traffic data set and ultimately improve the accuracy of the traffic degree.
[0073] Optionally, the step 205 of determining the degree of traffic of the target intersection at the target direction based on the number of vehicles passing through includes:
[0074] Sub-step 2051, when there are multiple target directions at the target intersection, determine the traffic degree of each target direction based on the number of vehicles passing in each target direction;
[0075] Sub-step 2052, determining the trafficability of the target intersection based on the trafficabilities corresponding to each of the multiple target directions.
[0076] In the disclosed embodiment, each intersection may have multiple directions, for example, at least three directions. Vehicles may pass through multiple target directions of each intersection, and the number of vehicles passing through different target directions at the same intersection may be different. The traffic degree of the target direction may be determined by the number of vehicles passing through each target direction.
[0077] The number of vehicles passing each target direction can be calculated using the following formula:
[0078]
[0079] In the above formula, cluster Vi is traversed based on U obtained by the membership value formula and the cluster center formula, and each corresponding cluster Vi corresponding to U is obtained. The element V in each cluster Vi is calculated. Vi is a cluster obtained based on the FCM algorithm. Vi represents the relevant data in a target direction. The elements V of n Vi are calculated, and the number of vehicles passing through is the sum of the traffic in the target direction.
[0080] For example, the number of vehicles passing through and the traffic degree may have an inverse proportional relationship, where the greater the number of vehicles passing through, the lower the traffic degree. The relationship between the number of vehicles passing through and the traffic degree may also be further determined by other parameters and formulas, which are not limited here.
[0081] For a specific intersection, after determining the passability in each target direction of the intersection, the passability of the target intersection can be determined based on the passability corresponding to each of the multiple target directions. For example, the passability can be averaged based on the passability corresponding to each of the multiple target directions, or the passability corresponding to each of the multiple target directions can be sorted by size and the median is taken as the passability of the current intersection. How to determine the passability of the intersection based on the passability of multiple target directions is not specifically limited here.
[0082] When implementing an embodiment of the present disclosure, when there are multiple target directions at a target intersection, the trafficability of each target direction is determined based on the number of vehicles passing in each target direction, and the trafficability of the target intersection is determined based on the trafficabilities corresponding to each of the multiple target directions. The trafficability of the intersection can be comprehensively determined based on the trafficabilities of multiple directions at the intersection, so that the determined trafficability of the intersection is more accurate.
[0083] Optionally, when there are multiple target directions at the target intersection, the step of determining the traffic degree of each target direction based on the number of vehicles passing in each target direction includes:
[0084] When there are multiple target directions at the target intersection, determine the reference passing number for each target direction; different target directions correspond to their respective reference passing numbers;
[0085] For each target direction, the degree of traffic of each target direction is determined based on the number of vehicles passing in each target direction and the corresponding reference number of vehicles passing.
[0086] In the disclosed embodiment, when there are multiple target directions at the target intersection, each target direction may correspond to a different reference number of passing vehicles. The reference number of passing vehicles is used to describe the basic traffic capacity of the target direction. For example, the reference number of passing vehicles may be the number of vehicles passing within a certain period of time, such as 10 vehicles, indicating that generally speaking, 10 vehicles can pass through the current target direction within a certain period of time.
[0087] According to the number of vehicles passing in each target direction and the corresponding reference number of vehicles passing, the traffic degree of each target direction can be determined. The traffic degree can also be understood as a congestion index. The traffic degree can be calculated by the following formula:
[0088]
[0089] Among them, CI represents the traffic degree in the target direction, SF represents the number of vehicles passing, and TC represents the reference number of vehicles passing. When SF is larger, CI is smaller, and when TC is larger, CI is larger. The larger the traffic degree, the lower the congestion. For example, when SF is 8 and TC is 10, the traffic degree is 0.2. Different traffic degrees can correspond to smooth, slow, congested and severe congestion, as shown in Table 1 below:
[0090] Table 1: Traffic classification table
[0091] Smooth amble Congestion Severe congestion [0-0.4) [0.4-0.7) [0.7-0.9) [0.9-1.0]
[0092] In the above passability classification table, different passabilities correspond to different judgment results. The above Table 1 is only an example, and other passabilities may correspond to other judgment results.
[0093] By implementing the embodiments of the present disclosure, when there are multiple target directions at a target intersection, a reference passing number of each target direction is determined. For each target direction, the trafficability of each target direction is determined based on the passing number of vehicles in each target direction and the corresponding reference passing number. The trafficability of each target direction can be determined based on the current passing number of vehicles and the existing reference passing number. The trafficability of the target direction can be accurately determined, thereby ultimately improving the trafficability of the target intersection to which the target direction belongs.
[0094] Optionally, the method further includes:
[0095] Obtaining an update interval duration; the update interval duration represents the time interval length between two adjacent triggering updates of the reference pass quantity;
[0096] Each time the update interval passes, the number of vehicles passing in the target direction is determined;
[0097] In a case where the number of passing vehicles is greater than the reference number of passing vehicles, the number of passing vehicles is used as a new reference number of passing vehicles to update the reference number of passing vehicles.
[0098] In the disclosed embodiment, the reference pass number may be a non-fixed value, and the reference pass number may be adjusted and updated, and may be adjusted based on the update interval duration. The update interval duration indicates the time interval length between two adjacent trigger updates of the reference pass number. For example, a trigger update is currently performed, and after the update interval duration is, for example, 10 minutes, another trigger update is performed.
[0099] The update triggering process may be that each time an update is triggered, the number of vehicles passing in the target direction needs to be determined first. If the number of vehicles passing is greater than the existing reference number, the number of vehicles passing is used as the new reference number to update the reference number.
[0100] The above-mentioned triggering update process can be implemented by running a status evaluation program. A basic traffic capacity (i.e., reference number of vehicles passing through) field can be automatically maintained inside the running status evaluation program. The program defaults to a traffic capacity of 10 vehicles in each direction of the intersection in five minutes. The default value is stored in the remote dictionary service (Redis, Remote Dictionary Server) cache. Each time the traffic (number of vehicles passing through) in the target direction exceeds the value in the current cache, it is replaced.
[0101] Among them, Redis is an open source, network-supported, memory-based and persistent log-type, key-value database that provides application programming interfaces (APIs) in multiple languages.
[0102] The running status evaluation program can automatically know the traffic volume in the target direction of the intersection, calculate the number of vehicles passing through a certain target direction every ten minutes, and update the value in the Redis cache if the number of vehicles passing through exceeds the number calculated last time.
[0103] In implementing the embodiments of the present disclosure, by obtaining the update interval duration, the number of vehicles passing in the target direction is determined each time the update interval duration has passed. When the number of vehicles passing is greater than the reference number of vehicles passing, the number of vehicles passing is used as the new reference number of vehicles passing to update the reference number of vehicles passing. The reference number of vehicles passing can be updated in real time according to the vehicle passing situation, so that the reference number of vehicles passing can more accurately describe the basic traffic capacity of the current target direction, and then when the traffic degree of the target direction is calculated based on the basic traffic capacity, the traffic degree result obtained is more accurate.
[0104] Optionally, the step of obtaining the traffic data set sent by the roadside equipment includes:
[0105] Obtaining the acquisition interval duration; the acquisition interval duration indicates the time interval length between two adjacent acquisitions of data;
[0106] Each time the collection interval passes, a set of traffic data sent by the roadside equipment is obtained;
[0107] Each time the traffic data set is acquired, the step of splitting the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set is entered.
[0108] In the embodiment of the present disclosure, the acquisition of the traffic data set from the RSU may be based on the collection interval duration, which indicates the time interval between two adjacent acquisitions of data. That is, the traffic data set sent by the roadside device is acquired every time the collection interval duration passes. For example, a batch of traffic data sets sent by the roadside device are read every 5 minutes.
[0109] If the traffic data set is not obtained, the next acquisition is continued to wait until the traffic data set is obtained, and then the subsequent processing step of splitting the traffic data set into the intersection data set according to the intersection information of each data in the traffic data set can be entered.
[0110] The process of acquiring data based on the above-mentioned collection time interval can be achieved by building an active traffic flow intelligent management and control platform on the server, in which services such as Apache Flink, Apache Kafka, Mysql, and Redis are deployed. Apache Flink is a framework and distributed processing engine for stateful computing on unbounded and bounded data streams. Flink can run in all common cluster environments and can perform computing at any memory speed and any scale. Multiple jobs can be run in flink, and each job corresponds to different computing tasks. Apache Kafka is a distributed stream processing platform for building real-time data stream pipelines and real-time applications. Mysql is an open source relational database management system (RDBMS). Mysql uses structured query language (SQL) to query and manage data.
[0111] The data sent by RSU can be received through the Message Queuing Telemetry Transport (MQTT) technology, and subscribed to the active traffic flow intelligent management and control platform through the MQTT protocol. Among them, MQTT is a message protocol based on the publish-subscribe model under the International Organization for Standardization (ISO), and MQTT is a message protocol based on the Transmission Control Protocol / Internet Protocol (TCP / IP) cluster.
[0112] After receiving the data, the active traffic flow intelligent management and control platform pushes it to Kafka through parsing, connects the computing engine (Caleengine) to the Kafka message queue, configures the Kafka topic (topic) and opens a Flink window, specifies to read a batch of data every five minutes, so as to obtain data based on the collection time interval.
[0113] It is understandable that when reading data based on the set window, the window can be of different types. The windows used to read data in Flink are mainly of the following types:
[0114] 1. Tumbling Windows: Tumbling windows can have a fixed size and do not overlap. For example, a tumbling window of 5 minutes will form a new window every 5 minutes, and the data will be divided into these independent windows. Tumbling windows can improve the processing of periodic statistical tasks at fixed time intervals.
[0115] 2. Sliding Windows: Sliding windows can also have a fixed size, and windows can overlap. Sliding windows include two parameters: window size and sliding step. For example, if the window size is 10 minutes and the sliding step is 2 minutes, a new 10-minute window will be created every 2 minutes, and there will be overlaps between adjacent windows. Sliding windows can be used to observe the changing trend of data in a short period of time, such as real-time monitoring of prices.
[0116] 3. Session Windows: Session windows do not have a fixed size. They can be divided according to the activity gaps in the data. If no data arrives within a period of time (session gap), a new session window can be divided. Session windows can be used to analyze user interaction behaviors, such as analyzing user operation sessions on a website. If a user does not perform an operation for a long time (reaching the session gap time), the previous operations can be analyzed as a session.
[0117] The data obtained from the RSU each time may be data in a specific format, for example, a JSON array based on JavaScript Object Notation (JSON). After the data is obtained, the JSON array may be traversed, and the traversed JSON strings may be serialized into other custom data formats.
[0118] Among them, you need to set the Kafka connection parameters. When transmitting perception data in real time through the Kafka message queue, the parameters that need to be set are:
[0119] Service address (bootstrap.servers), consumer group unique identifier (ID, Identity document) (group.id), whether to automatically commit (enable.auto.commit), consumer offset automatic commit frequency (auto.commit.interval.ms), key serialization class (key.deser ializer), value serialization class (value.deserializer).
[0120] The above Kafka parameters have the following effects:
[0121] The service address (bootstrap.servers) is used to specify the host name and port number of the Kafka cluster so that producers and consumers can connect to the Kafka cluster.
[0122] Consumer group ID (group.id) is used to identify the group to which the consumer belongs. Consumers in the same group can consume messages in the topic together to achieve load balancing and fault tolerance of messages.
[0123] Whether to automatically commit (enable.auto.commit) controls whether the consumer automatically commits the offset. If set to true, the consumer will automatically commit the offset in the background; if set to false, the consumer needs to manually commit the offset.
[0124] Consumer offset auto-commit frequency (auto.commit.interval.ms), specifies the time interval (in milliseconds) for the consumer to automatically commit offsets.
[0125] The key serialization class (key.deserializer) and the value serialization class (value.deserializer) are used to specify how to serialize the key and value of the message into byte arrays for transmission and storage on the network.
[0126] You can also set other Kafka-related parameters, which are not specifically limited here.
[0127] Figure 3 is a flowchart of the steps of data acquisition and cleaning provided by an embodiment of the present disclosure;
[0128] Step 301, the Flink-based distributed computing system obtains and stores the real-time perception data of the intersection (i.e., the traffic data set) through the Kafka message queue;
[0129] Step 302, determine whether the field verification condition is met;
[0130] Step 303, if the condition is not satisfied, filter the current data;
[0131] Step 304, performing calculations based on the cleaned data to determine the passability.
[0132] Figure 4 is a schematic diagram of a system architecture for determining the degree of traffic at an intersection provided by an embodiment of the present disclosure; Figure 4The OBU 401, the flow detector 402, the RSU 403, and the server 404 are included. The flow detector 402 may be a device or system for monitoring and analyzing road traffic flow, and the flow detector may detect vehicles by means of video analysis, microwave detectors, geomagnetic induction, etc. The distributed stream processing platform Kafka in the RSU and the server 404 may transmit data via the MQTT message protocol. The computing engine in the server 404 calculates the passability based on the reference passing number in the redis cache and the passing number of vehicles transmitted by kafka, and stores the calculated result to Mysql through an application program interface such as Java Database Connectivity (JDBC).
[0133] In summary, by acquiring the traffic data set sent by the roadside equipment, each data carries intersection information and direction information. According to the intersection information of each data in the traffic data set, the traffic data set is split to obtain an intersection data set. Different intersection data sets are associated with different intersections. For each intersection data set, according to the direction information of each data in the intersection data set, the intersection data set is split to obtain a direction data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set. For each direction data set, according to different types of data in the direction data set, the number of vehicles passing in the target direction corresponding to the direction data set is determined, and based on the number of vehicles passing, the degree of traffic of the target intersection where the target direction is located is determined. It is possible to determine the data set corresponding to each intersection including different types of data, and the data set corresponding to each direction, and then independently for each intersection, the degree of traffic of the intersection can be comprehensively determined according to the number of vehicles passing in each direction of the intersection, thereby improving the accuracy of determining the degree of traffic.
[0134] Based on the content of the above embodiments, it is possible to deeply integrate vehicles, roads, and clouds to build a collaborative intelligent transportation system, which can effectively solve the current limitations of single-vehicle intelligence and traditional traffic management. It adopts advanced wireless communication and new generation Internet technologies, implements dynamic real-time information interaction between vehicles and roads in all directions, and carries out active vehicle safety control and road collaborative management based on the collection and integration of dynamic traffic information in all time and space, fully realizing the effective coordination of people, vehicles, and roads, ensuring traffic safety, and improving traffic efficiency, which is conducive to the formation of a safe, efficient, and environmentally friendly road traffic system.
[0135] Since the RSU receives GNSS data reported by the OBU, it can analyze and calculate the average speed in each direction of the intersection, integrate it into the traffic detector data, and use the advantages of the vehicle-side GNSS high-precision positioning system to improve the accuracy of the data, rather than relying solely on the traffic detector for video perception analysis. On the one hand, the data accuracy is improved, and on the other hand, the perception burden of the traffic detector is reduced. After analysis and fusion, the front-end RSU equipment pushes more accurate traffic data to the server for intersection traffic evaluation, and can persist the calculated intersection evaluation data including the degree of traffic in the library for easy visualization of the data.
[0136] By counting the traffic volume at the intersection to determine whether the road is congested, and analyzing the traffic volume at different time periods or the same time period every day, we can determine the changing trend of traffic flow over time. We can also further analyze how many vehicles often pass through a certain intersection at the same time period, so as to perform better navigation based on traffic analysis and improve the riding experience.
[0137] Figure 5 is a structural diagram of a device for determining the passability of an intersection provided by an embodiment of the present invention. The device 50 for determining the passability of an intersection may include:
[0138] The data acquisition module 501 is used to acquire a set of traffic data sent by a roadside device; the traffic data set includes different types of data; each data carries intersection information and direction information;
[0139] The intersection collection module 502 is used to split the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set; different intersection data sets are associated with different intersections;
[0140] The direction set module 503 is used for splitting each intersection data set into direction data sets according to the direction information of each data in the intersection data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set;
[0141] A direction quantity module 504 is used to determine, for each direction data set, the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set;
[0142] The intersection traffic module 505 is used to determine the traffic degree of the target intersection in the target direction based on the number of vehicles passing through.
[0143] Optionally, the device further comprises:
[0144] A cleaning condition module, in French, determines target data that meets a preset data cleaning condition in the passing data set;
[0145] Data cleaning deletes the target data to update the pass data set.
[0146] Optional, cleaning condition module, including:
[0147] A field position submodule, used to obtain a target position, and indicate a corresponding target field in each data of the pass data set according to the target position;
[0148] The field detection submodule is used to determine that the data is target data when the target field of the data is empty.
[0149] Optional, intersection access module, including:
[0150] The multi-directional traffic degree submodule is used to determine the traffic degree of each target direction based on the number of vehicles passing in each target direction when there are multiple target directions at the target intersection;
[0151] The comprehensive intersection trafficability submodule is used to determine the trafficability of the target intersection based on the trafficabilities corresponding to each of the multiple target directions.
[0152] Optional, multi-directional traffic submodule, including:
[0153] A reference quantity unit is used to determine the reference passing quantity of each target direction when there are multiple target directions at the target intersection; different target directions correspond to their own reference passing quantities;
[0154] The traffic degree unit for each direction is used to determine the traffic degree of each target direction based on the number of vehicles passing in each target direction and the corresponding reference number of vehicles passing.
[0155] Optionally, the device further comprises:
[0156] An update duration module, used to obtain an update interval duration; the update interval duration represents the time interval between two adjacent triggers to update the reference pass quantity;
[0157] A quantity detection module, used for determining the number of vehicles passing in the target direction every time the update interval has passed;
[0158] The number updating module is used to use the number of vehicle passes as a new reference number of vehicle passes to update the reference number of vehicle passes when the number of vehicle passes is greater than the reference number of vehicle passes.
[0159] Optional, data acquisition module, including:
[0160] The acquisition duration submodule is used to obtain the acquisition interval duration; the acquisition interval duration indicates the time interval length between two adjacent acquisitions of data;
[0161] A triggering collection submodule is used to obtain a set of traffic data sent by the roadside equipment every time the collection interval passes;
[0162] The collection execution submodule is used to enter the step of splitting the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set each time the traffic data set is acquired.
[0163] In summary, by acquiring the traffic data set sent by the roadside equipment, each data carries intersection information and direction information. According to the intersection information of each data in the traffic data set, the traffic data set is split to obtain an intersection data set. Different intersection data sets are associated with different intersections. For each intersection data set, according to the direction information of each data in the intersection data set, the intersection data set is split to obtain a direction data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set. For each direction data set, according to different types of data in the direction data set, the number of vehicles passing in the target direction corresponding to the direction data set is determined, and based on the number of vehicles passing, the degree of traffic of the target intersection where the target direction is located is determined. It is possible to determine the data set corresponding to each intersection including different types of data, and the data set corresponding to each direction, and then independently for each intersection, the degree of traffic of the intersection can be comprehensively determined according to the number of vehicles passing in each direction of the intersection, thereby improving the accuracy of determining the degree of traffic.
[0164] The present invention also provides an electronic device, see Figure 6 , including: a processor 1401, a memory 1402, and a computer program 14021 stored in the memory and executable on the processor, and when the processor executes the program, the method for determining the degree of traffic at an intersection of the foregoing embodiment is implemented.
[0165] Processor 1401, used to obtain a set of traffic data sent by a roadside device; the set of traffic data includes different types of data; each data carries intersection information and direction information;
[0166] According to the intersection information of each data in the traffic data set, the traffic data set is split to obtain intersection data sets; different intersection data sets are associated with different intersections;
[0167] For each intersection data set, according to the direction information of each data in the intersection data set, the intersection data set is split to obtain direction data sets; different direction data sets correspond to different directions of the target intersection associated with the intersection data set;
[0168] For each direction data set, determining the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set;
[0169] Based on the number of vehicles passing through, the degree of traffic at the target intersection in the target direction is determined.
[0170] The processor 1401 is further configured to determine target data that meets a preset data cleaning condition in the pass data set;
[0171] The target data is deleted to update the traffic data set.
[0172] Processor 1401, configured to obtain a target position, and indicate a corresponding target field in each data of the traffic data set according to the target position;
[0173] When the target field of the data is empty, the data is determined to be target data.
[0174] Processor 1401, for determining the traffic degree of each target direction based on the number of vehicles passing in each target direction when there are multiple target directions at the target intersection;
[0175] The trafficability of the target intersection is determined based on the trafficabilities corresponding to each of the multiple target directions.
[0176] Processor 1401, for determining a reference passing number for each target direction when there are multiple target directions at the target intersection; different target directions correspond to their own reference passing numbers;
[0177] For each target direction, the degree of traffic of each target direction is determined based on the number of vehicles passing in each target direction and the corresponding reference number of vehicles passing.
[0178] The processor 1401 is further configured to obtain an update interval duration; the update interval duration indicates the time interval between two adjacent triggering operations to update the reference pass count;
[0179] Each time the update interval passes, the number of vehicles passing in the target direction is determined;
[0180] In a case where the number of passing vehicles is greater than the reference number of passing vehicles, the number of passing vehicles is used as a new reference number of passing vehicles to update the reference number of passing vehicles.
[0181] Processor 1401 is used to obtain a collection interval duration; the collection interval duration indicates the time interval length between two adjacent data acquisitions;
[0182] Each time the collection interval passes, a set of traffic data sent by the roadside equipment is obtained;
[0183] Each time the traffic data set is acquired, the step of splitting the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set is entered.
[0184] The present invention also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method for determining the degree of traffic at an intersection of the aforementioned embodiment.
[0185] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0186] It should be noted that the various information and data obtained in the embodiments of the present invention are all obtained with the authorization of the information / data holder.
[0187] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0188] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0189] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0190] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0191] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0192] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0193] The user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in the present invention are all information authorized by the user or by all parties.
[0194] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0195] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0196] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for determining the traffic degree of an intersection, characterized in that: include: Obtain the traffic data set sent by the roadside equipment; The traffic data set includes different types of data; each data carries intersection information and direction information; According to the intersection information of each data in the traffic data set, the traffic data set is split to obtain intersection data sets; different intersection data sets are associated with different intersections; For each intersection data set, according to the direction information of each data in the intersection data set, the intersection data set is split to obtain direction data sets; different direction data sets correspond to different directions of the target intersection associated with the intersection data set; For each direction data set, determining the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set; Based on the number of vehicles passing through, the degree of traffic at the target intersection in the target direction is determined.
2. The method according to claim 1, characterized in that After the step of acquiring the traffic data set sent by the roadside equipment, the method further includes: Determining target data that meets a preset data cleaning condition in the pass data set; The target data is deleted to update the traffic data set.
3. The method according to claim 2, characterized in that The step of determining target data that meets the preset data cleaning conditions in the pass data set includes: Acquire a target position, and indicate a corresponding target field in each data of the traffic data set according to the target position; When the target field of the data is empty, the data is determined to be target data.
4. The method according to claim 1, characterized in that: The step of determining the degree of traffic of the target intersection at the target direction based on the number of vehicles passing through comprises: When there are multiple target directions at the target intersection, the traffic degree of each target direction is determined based on the number of vehicles passing in each target direction; The trafficability of the target intersection is determined based on the trafficabilities corresponding to each of the multiple target directions.
5. The method according to claim 4, characterized in that The step of determining the traffic degree of each target direction based on the number of vehicles passing in each target direction when there are multiple target directions at the target intersection includes: When there are multiple target directions at the target intersection, determine the reference passing number for each target direction; different target directions correspond to their respective reference passing numbers; For each target direction, the degree of traffic of each target direction is determined based on the number of vehicles passing in each target direction and the corresponding reference number of vehicles passing.
6. The method according to claim 5, characterized in that The method further comprises: Obtaining an update interval duration; the update interval duration represents the time interval length between two adjacent triggering updates of the reference pass quantity; Each time the update interval passes, the number of vehicles passing in the target direction is determined; In a case where the number of passing vehicles is greater than the reference number of passing vehicles, the number of passing vehicles is used as a new reference number of passing vehicles to update the reference number of passing vehicles.
7. The method according to claim 1, characterized in that The step of obtaining the traffic data set sent by the roadside equipment includes: Obtaining the acquisition interval duration; the acquisition interval duration indicates the time interval length between two adjacent acquisitions of data; Each time the collection interval passes, a set of traffic data sent by the roadside equipment is obtained; Each time the traffic data set is acquired, the step of splitting the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set is entered.
8. A device for determining the degree of traffic at an intersection, characterized in that: include: A data acquisition module is used to acquire a set of traffic data sent by a roadside device; the traffic data set includes different types of data; each data carries intersection information and direction information; An intersection collection module, used for splitting the traffic data set into intersection data sets according to the intersection information of each data in the traffic data set; different intersection data sets are associated with different intersections; A direction set module is used for splitting each intersection data set into direction data sets according to the direction information of each data in the intersection data set; different direction data sets correspond to different directions of the target intersection associated with the intersection data set; A direction quantity module, for determining, for each direction data set, the number of vehicles passing in the target direction corresponding to the direction data set according to different types of data in the direction data set; The intersection traffic module is used to determine the traffic degree of the target intersection in the target direction based on the number of vehicles passing through.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.
10. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described in claims 1-7.