Vehicle flow determination method and device, electronic equipment, storage medium and product

By filtering out abnormal data and accurately diverting real-time vehicle traffic data streams, and using traffic flow direction configuration information to determine traffic volume, the problem of insufficient accuracy of traffic volume statistics in existing technologies has been solved, achieving more efficient and accurate traffic volume statistics.

CN122050165APending Publication Date: 2026-05-15BAOTOU CITY CLOUD COMPUTING TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BAOTOU CITY CLOUD COMPUTING TECH CO LTD
Filing Date
2026-03-02
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies that rely on pre-trained target detection algorithms to determine traffic flow suffer from insufficient accuracy.

Method used

By acquiring real-time vehicle passage data streams, filtering out abnormal data, and using the pre-configured vehicle flow direction configuration information, the data streams are precisely divided to obtain the starting point vehicle passage data stream and the ending point vehicle passage data stream, and finally the traffic flow is determined.

Benefits of technology

It significantly improves the accuracy of traffic flow determination, reduces statistical bias caused by mixed counting of traffic flows from different directions, and improves the efficiency and real-time performance of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122050165A_ABST
    Figure CN122050165A_ABST
Patent Text Reader

Abstract

The invention provides a traffic flow determination method and device, electronic equipment, a storage medium and a product. The method comprises the steps that a real-time vehicle passing data stream is obtained, the real-time vehicle passing data stream comprises passing vehicles and a camera shooting the passing vehicles, abnormal data filtering is carried out on the real-time vehicle passing data stream, and an effective real-time vehicle passing data stream is obtained. Pre-configured traffic flow direction configuration information is obtained, the traffic flow direction configuration information comprises a traffic flow starting point adjacency list and a traffic flow end point adjacency list of the target road gate, the traffic flow starting point adjacency list is used for indicating a camera belonging to a traffic flow starting point, and the traffic flow end point adjacency list is used for indicating a camera belonging to a traffic flow end point; and the cameras correspond to different traffic flow directions. And based on the traffic flow starting point adjacency list, the traffic flow terminal point adjacency list and the camera for shooting the passing vehicles, traffic flow division is carried out on the effective real-time passing vehicle data flow to obtain the starting point passing vehicle data flow and the terminal point passing vehicle data flow so as to determine the traffic flow accordingly, and thus the accuracy of traffic flow determination is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, storage medium and product for determining traffic flow. Background Technology

[0002] With the rapid development of intelligent transportation systems, traffic flow statistics, as important data for traffic control, road condition analysis, and road network optimization, are widely used in various traffic scenarios because their accuracy directly affects the scientific and rational nature of traffic management decisions.

[0003] In related technologies, vehicle detection and tracking can be performed on traffic videos captured by cameras based on pre-trained target detection algorithms. When a vehicle is detected crossing a virtual detection line or entering a preset statistical area, a count is triggered to determine the traffic flow.

[0004] However, the traffic flow obtained using the above methods is not accurate enough. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, storage medium, and product for determining traffic flow, in order to solve the technical problem that the obtained traffic flow is not accurate enough.

[0006] Firstly, this application provides a method for determining traffic flow, comprising:

[0007] Acquire real-time vehicle passage data stream, which includes passing vehicles and cameras that capture images of the passing vehicles;

[0008] Abnormal data filtering is performed on the real-time vehicle passage data stream to obtain a valid real-time vehicle passage data stream;

[0009] Obtain pre-configured traffic flow direction configuration information, which includes a traffic flow start adjacency table and a traffic flow end adjacency table for the target road checkpoint. The traffic flow start adjacency table is used to indicate cameras belonging to the traffic flow start point, and the traffic flow end adjacency table is used to indicate cameras belonging to the traffic flow end point. Each camera corresponds to a different traffic flow direction.

[0010] Based on the adjacency list of the starting point of the traffic flow, the adjacency list of the ending point of the traffic flow, and the camera that captures the passing vehicles, the effective real-time passing vehicle data stream is split into starting point passing vehicle data stream and ending point passing vehicle data stream.

[0011] The traffic flow is determined based on the vehicle data streams at the starting point and the vehicle data streams at the destination.

[0012] In this application, by acquiring real-time vehicle data streams containing passing vehicles and their corresponding cameras, and filtering out abnormal data, invalid and interfering data can be effectively eliminated, laying a precise data foundation for subsequent traffic flow determination. Based on this, by introducing pre-configured traffic flow direction information, and according to the target road checkpoint's vehicle flow start-point adjacency table and vehicle flow end-point adjacency table in the configuration information, combined with the characteristics of each camera corresponding to different traffic flow directions, the effective real-time vehicle data stream is accurately split into start-point and end-point vehicle data streams. This clearly distinguishes the affiliation of vehicles from different traffic flow directions, reduces statistical bias caused by mixing traffic flows from different directions, and finally determines the traffic flow based on the split start-point and end-point vehicle data streams, significantly improving the accuracy of traffic flow determination.

[0013] Optionally, in the method described above, the step of splitting the effective real-time vehicle passage data stream into a starting point vehicle passage data stream and an ending point vehicle passage data stream based on the vehicle flow start-up adjacency list, the vehicle flow end-up adjacency list, and the camera capturing the passing vehicles includes:

[0014] Based on the starting camera in the traffic flow starting point adjacency table, search for the first starting camera that matches the starting camera from the cameras that capture the passing vehicles;

[0015] The passing information of passing vehicles captured by the first starting point camera is determined as the starting point vehicle passing data stream;

[0016] Based on the destination cameras in the traffic flow destination adjacency table, search for the first destination camera that matches the destination camera from the cameras that photograph the passing vehicles;

[0017] The passing information of passing vehicles captured by the first destination camera is determined as the destination vehicle passing data stream.

[0018] In this application, based on the adjacency lists of the starting and ending points of the traffic flow, and using the starting and ending cameras in the adjacency lists as benchmarks, a precise search is performed on the cameras capturing passing vehicles to identify the first starting and ending cameras. This clearly distinguishes the capturing devices at the corresponding starting and ending points of the traffic flow. The passing information captured by the two types of cameras is then determined as the starting and ending vehicle data streams, respectively. This achieves effective real-time accurate diversion of the vehicle data streams according to the traffic flow direction, reducing the mixing of traffic flow data from different directions. This provides clear data support for subsequent accurate calculation of traffic flow based on the starting and ending vehicle data streams, ensuring the diversion process conforms to the preset traffic flow direction configuration and improving the accuracy of traffic flow diversion.

[0019] Optionally, in the method described above, the road passage information includes the vehicle passage time, and determining the traffic flow based on the starting point passage data stream and the ending point passage data stream includes:

[0020] Obtain the target passing vehicles, the destination passing time of each target passing vehicle, and vehicle identification information included in the destination passing vehicle data stream;

[0021] Based on the endpoint cameras that capture images of the target passing vehicles, search for the target passing vehicles with the same vehicle identification information from the starting point vehicle passing data stream, and obtain the starting point passing time of each target passing vehicle.

[0022] Traffic flow is determined based on the destination and origin times of each target passing vehicle.

[0023] In this application, based on the characteristic that the transit information includes vehicle transit times, the system accurately obtains each target transit vehicle, its corresponding transit time, and vehicle identification information from the destination transit data stream, providing crucial foundational data for vehicle matching and traffic flow calculation. Using cameras capturing images of the destination of each target transit vehicle as a basis, and combining this with vehicle identification information, the system searches and matches target transit vehicles with the same identification from the origin transit data stream, obtaining their origin transit times. This achieves precise correlation between the origin and destination transit data of the same vehicle, effectively reducing statistical bias caused by data confusion between different vehicles. Furthermore, traffic flow determination is based on the origin and destination transit times of the same vehicle, ensuring that traffic flow determination relies on the complete vehicle travel trajectory, further improving the accuracy of traffic flow determination.

[0024] Optionally, in the method described above, the step of searching for the target passing vehicles with the same vehicle identification information from the starting point vehicle passing data stream based on the endpoint camera that captured the images of each target passing vehicle includes:

[0025] Based on the endpoint cameras that capture the passing vehicles and the traffic flow endpoint adjacency table, the target directed edges of the endpoint cameras are determined. The traffic flow endpoint adjacency table stores each endpoint camera and the directed edges associated with each endpoint camera. The directed edges are used to characterize the correspondence between the endpoint cameras and the starting cameras.

[0026] Based on the target directed edge, determine the target starting camera that has a corresponding relationship with the ending camera;

[0027] Obtain the set of starting point cameras that captured each passing vehicle in the starting point vehicle data stream;

[0028] If the target starting point camera is matched from the set of starting point cameras, then the starting point passing vehicles captured by the target starting point camera are extracted from the starting point passing vehicle data stream;

[0029] The vehicles are matched against the vehicles passing through the starting point based on the vehicle identification information of the target passing vehicle, and the vehicles that are successfully matched are identified as the target passing vehicle.

[0030] In this application, by combining the endpoint cameras capturing images of each target passing vehicle with a pre-defined adjacency list of vehicle flow endpoints, and utilizing the endpoint cameras and their associated directed edges stored in the adjacency list, the target directed edges corresponding to each endpoint camera are accurately determined. Then, based on these target directed edges, the target starting camera with a corresponding relationship to the endpoint camera is locked, thus clarifying the range of cameras to be searched in the starting vehicle data stream and effectively narrowing the search and matching scope. By obtaining the set of starting cameras in the starting vehicle data stream and confirming the existence of the target starting camera, only the starting vehicles captured by that target starting camera are retrieved, further focusing the search object and reducing interference from invalid data. Finally, matching is performed on the focused starting vehicle vehicles based on the vehicle identification information of the target passing vehicles, achieving accurate association of the same target passing vehicle in the starting and ending vehicle data streams. This reduces statistical bias caused by invalid matching across cameras and directions, improving the accuracy and efficiency of vehicle matching.

[0031] Optionally, in the method described above, determining the target directed edge of the endpoint camera based on the endpoint camera capturing the target passing vehicles and the traffic flow endpoint adjacency list includes:

[0032] Using the identifier of the endpoint camera as the retrieval index, a search is performed in the adjacency table of the traffic flow endpoint to retrieve the directed edges associated with the endpoint camera;

[0033] The directed edges that satisfy the preset edge conditions are determined as the target directed edges of the endpoint camera.

[0034] In this application, the destination camera identifier is used as the retrieval index to quickly retrieve associated directed edges from the traffic flow destination adjacency table, improving retrieval efficiency and accuracy. Target directed edges are filtered by preset edge conditions, and invalid edges are removed to ensure that they accurately represent the association between the destination and starting point cameras, thereby guaranteeing the accuracy of subsequent vehicle matching.

[0035] Optionally, in the method described above, determining the traffic flow based on the destination and origin departure times of each target passing vehicle includes:

[0036] The transit time for each target vehicle is determined based on its destination transit time and origin transit time.

[0037] Based on the passage time of each target passing vehicle, valid passing vehicles are selected from the target passing vehicles. The valid passing vehicles are target passing vehicles whose passage time is less than a preset time threshold.

[0038] The origin and destination information of the valid passing vehicles are merged to obtain the fused data stream of the valid passing vehicles.

[0039] The number of valid vehicles in the fused data stream is determined as the traffic flow.

[0040] In this application, the transit time of each target vehicle is calculated based on its origin and destination transit times. By comparing the transit time with a preset time threshold, valid transit vehicles that conform to normal traffic patterns are selected. This effectively eliminates data interference from vehicles that linger too long or detour, ensuring that only valid transit vehicles are included in the traffic flow statistics. The origin and destination transit information corresponding to valid transit vehicles are merged to generate a complete fused data stream of valid vehicles. This ensures the integrity of vehicle traffic information while reducing the inclusion of invalid data. Finally, the number of valid vehicles in the fused data stream is used to determine the traffic flow, enabling the traffic flow determination result to accurately reflect the actual traffic situation at the target road checkpoint, further improving the accuracy of traffic flow determination.

[0041] Secondly, this application provides a device for determining traffic flow, comprising:

[0042] The acquisition module is used to acquire real-time vehicle passing data stream, which includes passing vehicles and cameras that capture images of the passing vehicles.

[0043] The processing module is used to filter abnormal data from the real-time vehicle passage data stream to obtain a valid real-time vehicle passage data stream.

[0044] The acquisition module is also used to acquire pre-configured traffic flow direction configuration information, which includes a traffic flow start adjacency table and a traffic flow end adjacency table for the target road checkpoint. The traffic flow start adjacency table is used to indicate cameras belonging to the traffic flow start point, and the traffic flow end adjacency table is used to indicate cameras belonging to the traffic flow end point. Each camera corresponds to a different traffic flow direction.

[0045] The processing module is also used to perform traffic flow splitting on the effective real-time vehicle passage data stream based on the vehicle flow start adjacency table, the vehicle flow end adjacency table, and the camera that captures the passing vehicles, to obtain the start vehicle passage data stream and the end vehicle passage data stream.

[0046] The determination module is used to determine the traffic flow based on the starting point vehicle data stream and the ending point vehicle data stream.

[0047] In this application, the traffic flow determination device distributes different functions to the acquisition module, processing module, and determination module. This modular design with clear division of labor enables each module to work efficiently in parallel or serially, thereby improving the processing efficiency of the entire traffic flow determination process.

[0048] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0049] The memory stores computer-executed instructions;

[0050] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.

[0051] In this application, an electronic device is provided to provide the hardware conditions for executing the traffic flow determination method of this application.

[0052] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.

[0053] In this application, a computer-readable storage medium is provided to provide storage medium conditions for executing the traffic flow determination method of this application.

[0054] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects.

[0055] In this application, a computer program product is provided to provide program product conditions for executing the traffic flow determination method of this application.

[0056] The method, apparatus, electronic device, storage medium, and product for determining traffic flow provided in this application acquire real-time vehicle data streams containing passing vehicles and corresponding cameras, and filter out invalid interference data to effectively eliminate invalid data, laying an accurate data foundation for subsequent traffic flow determination. Based on this, by introducing pre-configured traffic flow direction information, and according to the target road checkpoint's vehicle flow start-point adjacency table and vehicle flow end-point adjacency table in the configuration information, combined with the characteristics of each camera corresponding to different traffic flow directions, the effective real-time vehicle data stream is accurately split into start-point and end-point vehicle data streams. This clearly distinguishes the vehicle affiliation of different traffic flow directions, reduces statistical bias caused by mixing traffic flows from different directions, and finally determines the traffic flow based on the split start-point and end-point vehicle data streams, significantly improving the accuracy of traffic flow statistics. Attached Figure Description

[0057] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0058] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0059] Figure 2 A flowchart illustrating a method for determining traffic flow provided in an embodiment of this application;

[0060] Figure 3 A system architecture diagram for determining traffic flow is provided in the embodiments of this application;

[0061] Figure 4 This is a schematic diagram of a traffic flow direction configuration interface provided in an embodiment of this application;

[0062] Figure 5 A schematic diagram of lane and camera distribution provided in an embodiment of this application;

[0063] Figure 6 This application provides an embodiment of a traffic flow starting point adjacency representation.

[0064] Figure 7 This application provides an embodiment of a traffic flow endpoint adjacency representation.

[0065] Figure 8 A schematic diagram of an architecture for obtaining a starting point vehicle passage data stream and an ending point vehicle passage data stream, provided in an embodiment of this application;

[0066] Figure 9 A flowchart illustrating a method for determining traffic flow based on originating vehicle data streams and ending vehicle data streams, provided as an embodiment of this application;

[0067] Figure 10 A flowchart illustrating a method for determining target passing vehicles provided in an embodiment of this application;

[0068] Figure 11 A flowchart illustrating yet another method for determining traffic flow provided in this application embodiment;

[0069] Figure 12 A schematic diagram of a traffic flow determination device provided in an embodiment of this application;

[0070] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0071] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0073] With the continued acceleration of urbanization, the number of motor vehicles has increased dramatically, leading to increasingly prominent problems such as traffic congestion, frequent traffic accidents, and traffic-related environmental pollution, seriously affecting urban traffic efficiency and residents' travel experience. Against this backdrop, accurate and real-time traffic flow information has become a crucial foundation for intelligent traffic management and governance. It provides vital data support for traffic demand forecasting, resident route guidance, urban traffic deployment, intersection traffic signal timing optimization, traffic guidance system upgrades, and intelligent traffic command, making it irreplaceable in its importance.

[0074] Determining traffic flow is a crucial step in obtaining traffic flow information. Specifically, it involves collecting, processing, and analyzing vehicle data passing through intersections using various technical means to obtain traffic flow and related information. Traffic flow information can include traffic parameters such as vehicle speed, traffic density, and vehicle direction.

[0075] In related technologies, traffic flow can be determined using a combination of deep learning and fixed cameras. Specifically, this typically relies on pre-trained target detection algorithms, such as those trained using deep learning models, to analyze traffic videos or real-time footage captured by fixed cameras frame by frame. Through precise calculations, the algorithm accurately detects vehicle targets in the footage, ensuring accurate identification and tracking of the trajectory of the same vehicle during its movement. Based on this, virtual detection lines or specific detection areas are manually pre-defined in the video footage as counting benchmarks. When the target detection algorithm detects a vehicle crossing a pre-defined virtual detection line or entering a pre-defined detection area, the counting logic is automatically triggered, accumulating the number of vehicles to determine the traffic flow at the corresponding intersection or road segment.

[0076] However, the deep learning model used in the above method takes video image data collected by fixed cameras at intersections as input data. The recognition accuracy of the model is affected by the input video image data, and the final model itself has inaccuracy. Therefore, counting traffic flow based on the recognition results of this inaccurate model will also result in inaccurate traffic flow.

[0077] Therefore, to address the aforementioned problems in related technologies, this application proposes a method for determining traffic flow. By avoiding reliance on high-precision target detection models, it utilizes data processing and traffic flow diversion as the technical approach. Specifically, it acquires real-time vehicle data streams containing passing vehicles and their corresponding cameras, and removes invalid interference data through abnormal data filtering to lay an accurate data foundation for subsequent traffic flow determination. It introduces pre-configured traffic flow direction information, which includes adjacency lists of the starting and ending points of the traffic flow at the target road checkpoint. Combining the characteristics of each camera corresponding to different traffic flow directions, it accurately diverts the effective real-time vehicle data streams to obtain starting and ending point traffic data streams. Based on these two diverted data streams, it then determines the traffic flow, achieving accurate traffic flow determination.

[0078] To facilitate understanding of the method in this application, an exemplary application scenario is provided below. Please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application. The application scenario diagram includes a terminal 01 and a server 02. The terminal 01 and the server 02 can communicate through wired or wireless networks.

[0079] Terminal 01 stores real-time vehicle data streams containing information about passing vehicles and their corresponding cameras, and transmits this data stream to server 02 via wired or wireless network. Upon receiving the real-time vehicle data stream, server 02 filters for valid real-time vehicle data streams by identifying abnormal data and retrieves pre-configured traffic flow direction information, which includes an adjacency table of the starting and ending points of the traffic flow at the target road checkpoint. Server 02 then combines the camera information and traffic flow direction configuration information recorded in the valid real-time vehicle data streams to perform traffic flow splitting, obtaining starting point and ending point vehicle data streams, and subsequently determining the traffic volume based on this.

[0080] It is understood that the above examples are for illustrative purposes only and do not limit this application. The specific details can be determined based on the actual application situation.

[0081] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0082] Please see Figure 2 , Figure 2 This is a flowchart illustrating a method for determining traffic flow according to an embodiment of this application. The executing entity of this method can be a traffic flow determining device. This traffic flow determining device can be implemented through a computer program, or through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc, or through a physical device integrating or installing the relevant computer program, such as a chip or electronic device. The electronic device can be a server, server cluster, smart terminal, etc. Figure 2 As shown, the method may include the following steps:

[0083] S201. Obtain real-time vehicle passing data stream, which includes passing vehicles and cameras that capture images of passing vehicles.

[0084] In this embodiment, the execution entity is a server. The image acquisition devices configured at each road checkpoint, such as cameras, upload the collected real-time vehicle passing data stream to a preset data storage platform, such as the distributed event streaming platform Kafka.

[0085] The following will combine Figure 3 This embodiment describes the content. Figure 3 This is a system architecture diagram for determining traffic flow, provided as an embodiment of this application. Figure 3 As shown, the server can obtain real-time vehicle passage data streams from the Kafka message queue.

[0086] Optionally, the real-time vehicle data stream includes, but is not limited to: passing vehicles, cameras that capture passing vehicles, and passing information corresponding to each passing vehicle. The passing information may include vehicle speed, vehicle type, travel time, travel direction, and vehicle attribute information.

[0087] S202. Filter abnormal data from the real-time vehicle passage data stream to obtain a valid real-time vehicle passage data stream.

[0088] In response to user input on the filter configuration interface, the system retrieves the user-configured dirty data field filtering rules. Based on these rules, it performs abnormal data filtering on the real-time vehicle passage data stream, filtering and removing various types of dirty data, such as empty license plate numbers, empty vehicle types, and passage times that abnormally exceed preset ranges. This results in a filtered real-time vehicle passage data stream. Each data entry is then input into the custom state storage structure, and each data entry can carry information such as vehicle identifier, checkpoint identifier, and corresponding camera identifier.

[0089] Then, the real-time vehicle passage data stream after filtering abnormal data is deduplicated based on preset deduplication rules to obtain an effective real-time vehicle passage data stream.

[0090] Optionally, the deduplication rule can be to determine whether the vehicle identifier, checkpoint identifier, and camera identifier of the currently input vehicle data are completely consistent with the historical data identifiers cached in the storage structure. If all three match completely, it is determined to be duplicate data, and the current input data is directly removed.

[0091] Optionally, the deduplication rule can be to compare the vehicle identifier and checkpoint identifier of the currently input vehicle data with the historical data identifier already cached in the storage structure. If both the vehicle identifier and checkpoint identifier match, it is determined that the data is collected repeatedly by the same vehicle at the same checkpoint, and the current input data is then removed.

[0092] In this embodiment, the filtered or rejected data can also be stored in the dirty database.

[0093] S203. Obtain the pre-configured traffic flow direction configuration information, which includes the traffic flow start-point adjacency table and the traffic flow end-point adjacency table of the target road checkpoint.

[0094] In this embodiment, in response to user input on the traffic flow direction configuration interface, pre-configured traffic flow direction configuration information is obtained, which can be stored in a relational database management system. User operations such as modification, addition, or deletion on the traffic flow direction configuration interface are synchronized at millisecond levels via Change Data Capture (CDC) real-time log access technology.

[0095] Please see Figure 4 , Figure 4 This is a schematic diagram of a traffic flow direction configuration interface provided in an embodiment of this application. Users can configure traffic flow direction information on this interface based on registered road checkpoints and other information.

[0096] like Figure 4 As shown, users can first select the name of the intersection of the target road, and the interface will automatically render a map showing the lanes and camera distribution at that intersection. Figure 5 As shown, Figure 5 This application provides a schematic diagram of lane and camera distribution. In this diagram, the user can freely select the start and end points of the traffic flow. For example, as shown in the diagram, the left-turn flow segment can be selected as the starting point of one or more cameras, and the end point of the left-turn route can also be selected as a combination of one or more cameras. Each camera in the distribution diagram can be abstracted as a point, and multiple directed edges can be drawn between any two points. Each directed edge supports the calibration of traffic flow distance and traffic flow direction.

[0097] The traffic flow direction configuration interface supports dynamic setting of traffic flow direction rules, and the rules can be applied in real time through CDC technology. Based on the above configuration, the current interface supports traffic flow direction types including left turn, straight, right turn, and U-turn. The relevant configuration information may include intersection name, road checkpoint markings, and corresponding camera markings. Checkpoints can be divided into start checkpoints and end checkpoints. The supporting attribute information may also include specific start point location information, end point location information, traffic flow direction, traffic flow distance, traffic flow status, and speed limit value. The speed limit value can be dynamically configured according to the vehicle type or license plate type passing through the start and end points.

[0098] If a camera with the same identifier appears once or more in the checkpoint starting point section of the traffic flow direction configuration interface, it means that the same camera is configured as the starting point of one or more road segments with different flow directions. If a camera with the same identifier appears once or more in the checkpoint ending point section of the traffic flow direction configuration interface, it means that the same camera is configured as the ending point of one or more road segments with different flow directions.

[0099] After the traffic flow direction configuration information is registered, it will be stored using a start / endpoint adjacency list. Specifically, all traffic flow start points and end points are stored separately using arrays, which are then associated with corresponding lists. The list corresponding to the start point array stores all directed edges originating from that start point, and the list corresponding to the end point array stores all directed edges originating from that end point. Based on this storage method, it is clear which directed edges are associated with each camera as a start point and end point, thereby generating the traffic flow start point adjacency list and traffic flow end point adjacency list for the target road checkpoint.

[0100] In this embodiment, the traffic flow start point adjacency list is used to indicate cameras belonging to the traffic flow start point, and the traffic flow end point adjacency list is used to indicate cameras belonging to the traffic flow end point. Each camera can correspond to different traffic flow directions or the same traffic flow direction. This application does not impose any limitations.

[0101] For example, the contents of the adjacency list of the traffic flow starting point are as follows: Figure 6 As shown, Figure 6This application provides an embodiment of a traffic flow starting point adjacency representation, wherein A, B, C, and D represent cameras belonging to the starting point of the traffic flow, the directed edge of A may include from A to B and from A to C, the directed edge of B may include from B to E, the directed edge of C may include from C to F and from C to E, and the directed edge of D may include from D to G.

[0102] For example, the contents of the traffic flow endpoint adjacency table are as follows: Figure 7 As shown, Figure 7 This application provides an embodiment of a traffic flow endpoint adjacency representation, wherein A, B, C, and D represent cameras belonging to the traffic flow endpoint. The directed edges of A may include those from B to A and from C to A, etc. The directed edges of B may include those from E to B, etc. The directed edges of C may include those from F to C and from E to C, etc. The directed edges of D may include those from G to D, etc.

[0103] S204. Based on the adjacency list of the starting point of the traffic flow, the adjacency list of the ending point of the traffic flow, and the camera that captures the passing vehicles, the effective real-time passing vehicle data stream is split into starting point passing vehicle data stream and ending point passing vehicle data stream.

[0104] The following will combine Figure 8 Explain this step. Figure 8 This application provides a schematic diagram of an architecture for obtaining origin vehicle passage data streams and destination vehicle passage data streams, as shown in the embodiments of this application. Figure 8 As shown, cameras that capture images of passing vehicles are extracted from the valid real-time vehicle data stream based on the starting point diversion rule and the ending point diversion rule. The camera identifier is scanned and matched with the camera identifiers in the starting point adjacency table and the ending point adjacency table of the vehicle flow, respectively, to determine whether the camera appears in the starting point adjacency table or the ending point adjacency table. Vehicle data that matches the starting point adjacency table is included in the starting point vehicle data stream, and those that match the ending point adjacency table are included in the ending point vehicle data stream. If neither matches, the camera is output to the dirty database.

[0105] Specifically, the origin-based traffic splitting rule involves searching for the first origin camera that matches the origin camera in the traffic flow origin adjacency list, and then determining the passing information of the passing vehicles captured by the first origin camera as the origin vehicle passing data stream. Similarly, the destination-based traffic splitting rule involves searching for the first destination camera that matches the destination camera in the traffic flow destination adjacency list, and then determining the passing information of the passing vehicles captured by the first destination camera as the destination vehicle passing data stream.

[0106] S205. Determine the traffic flow based on the starting point vehicle data stream and the ending point vehicle data stream.

[0107] After obtaining the starting point vehicle passage data stream and the ending point vehicle passage data stream, the above data is stored and the traffic flow is determined.

[0108] In related technologies, vehicle electronic tag devices and intersection reader recognition devices work together to determine traffic flow. However, these methods require the introduction of various hardware components, including installing vehicle electronic tag devices on each vehicle and deploying a sufficient number of reader recognition devices at each target intersection. However, the hardware is susceptible to environmental interference, leading to recognition malfunctions and poor stability in traffic flow determination. This application, on the other hand, eliminates the need for additional dedicated hardware. It leverages existing road checkpoint cameras and rules configured in the interface to achieve accurate traffic flow determination, thereby improving stability.

[0109] Related technologies can only count the total traffic flow of a single mixed lane, and cannot distinguish vehicles in different traffic directions within the lane, leading to statistical bias. This application, however, obtains real-time vehicle passage data streams of associated vehicles and cameras, filters out abnormal data, and combines this with a pre-configured adjacency table containing the start / end points of traffic flow corresponding to each camera, to accurately split the effective data stream, thereby achieving the separation of traffic flow in each direction within the mixed lane and the accurate determination of traffic flow.

[0110] In related technologies, traffic flow is typically determined offline, resulting in poor real-time performance. However, this application employs a real-time data access and processing mode, performing real-time anomaly filtering and real-time traffic flow diversion on the vehicle data stream. The entire process eliminates the need for offline batch processing and can quickly output traffic flow results, thus improving the real-time performance of traffic flow determination.

[0111] like Figure 3 As shown, after determining the traffic flow, the following applications can be performed based on the traffic flow.

[0112] For example, data and images generated during traffic flow determination are stored in pre-defined storage objects, such as relational databases. Simultaneously, traffic flow data can be pushed to users' mobile clients or traffic control terminals in real time, providing real-time and accurate data support for various application scenarios.

[0113] For example, based on established real-time traffic flow data, a real-time holographic profile of the intersection can be constructed. For each configured traffic flow direction, real-time monitoring and display of data from different dimensions can be achieved, clearly presenting key information such as flow speed, flow time, traffic statistics, and illegal turns in each direction of the intersection, helping traffic managers to fully grasp the intersection's traffic status. It can also achieve dynamic signal configuration adaptation. By sensing tidal traffic flow during morning and evening rush hours or directional congestion in specific directions based on real-time traffic flow, it can effectively improve intersection efficiency and alleviate traffic congestion by dynamically optimizing traffic signals, adjusting the direction of guidance lanes, and increasing or decreasing signal cycle duration.

[0114] For example, real-time traffic flow data can not only be used to optimize existing intersections, but also provide reliable data evidence for medium- and long-term road network renovations and infrastructure additions, reducing the randomness of deployment. For instance, it provides data support for intersection lane optimization and adjustment, regional road network traffic balance, cross-intersection coordination, and green wave formation. Furthermore, it can be transformed into tangible services, providing travelers with dynamic navigation and travel guidance to improve convenience, and offering managers support for traffic violation management, safety control, emergency response, and special scenario deployment, making traffic management more efficient and thus maximizing the practical value of traffic flow data in multiple ways.

[0115] In the above embodiments of this application, by acquiring real-time vehicle data streams containing passing vehicles and corresponding cameras, and filtering out abnormal data, invalid interference data can be effectively eliminated, laying an accurate data foundation for subsequent traffic flow determination. Based on this, by introducing pre-configured traffic flow direction configuration information, and according to the target road checkpoint traffic flow start-point adjacency table and traffic flow end-point adjacency table in the configuration information, combined with the characteristics of each camera corresponding to different traffic flow directions, the effective real-time vehicle data stream is accurately split into start-point and end-point vehicle data streams. This clearly distinguishes the vehicle affiliation of different traffic flow directions, reduces statistical bias caused by mixed counting of traffic flows from different directions, and finally determines the traffic flow based on the split start-point and end-point vehicle data streams, significantly improving the accuracy of traffic flow statistics.

[0116] Furthermore, based on the above embodiments, the following embodiments illustrate the process of determining traffic flow based on the starting point vehicle flow data stream and the ending point vehicle flow data stream.

[0117] Please see Figure 9 , Figure 9 A flowchart illustrating a method for determining traffic flow based on originating vehicle data streams and ending vehicle data streams, provided in this application embodiment, includes the following steps:

[0118] S901. Obtain the destination passing vehicle data stream, including each target passing vehicle, the destination passing time of each target passing vehicle, and vehicle identification information.

[0119] After the upstream operator outputs the starting point vehicle passage data stream and the ending point vehicle passage data stream using the method described in the above embodiments, the downstream operator will receive the two data streams. If the starting point vehicle passage data stream is received first, it can be cached using a streaming memory state storage method. After the ending point vehicle passage data stream is received, the following matching process can be performed.

[0120] The system calls the destination vehicle data stream obtained after the splitting and performs real-time parsing on the data stream to extract the target vehicles, the destination vehicle time of each target vehicle, and the vehicle identification information used to uniquely identify each target vehicle.

[0121] S902. Based on the endpoint cameras that capture images of each target passing vehicle, search for each target passing vehicle with the same vehicle identification information from the starting point vehicle passing data stream, and obtain the starting point passing time of each target passing vehicle.

[0122] Please see Figure 10 , Figure 10 This application provides a flowchart illustrating a method for determining target passing vehicles, which may include the following steps:

[0123] S1001. Based on the destination camera of each target passing vehicle and the adjacency list of the traffic flow destination, determine the target directed edge of the destination camera.

[0124] The traffic flow endpoint adjacency list stores each endpoint camera and the directed edges associated with each endpoint camera. The directed edges are used to represent the correspondence between the endpoint camera and the starting camera.

[0125] Optionally, the identifier of the destination camera is used as the retrieval index to search the adjacency table of the traffic flow destination, and the directed edges associated with the destination camera are retrieved. The directed edges that meet the preset edge conditions, such as the search path length being 1, are determined as the target directed edges of the destination camera.

[0126] Based on the above Figure 7 Taking the content shown as an example, assuming the identifier of the end camera is B, if we search in the adjacency table of the traffic flow end point, the directed edge associated with the end camera will be from E to B.

[0127] S1002. Based on the directed edge of the target, determine the target starting camera that has a corresponding relationship with the ending camera.

[0128] Based on the directed edge from E to B, the starting camera of the target that corresponds to the ending camera B is determined to be E.

[0129] S1003. Obtain the set of starting camera images of each passing vehicle captured in the starting point vehicle data stream.

[0130] The starting point vehicle data stream is invoked and parsed to extract the camera identifiers corresponding to each passing vehicle. By integrating this camera information, a starting point camera set is generated.

[0131] S1004. If a target starting point camera is matched from the starting point camera set, then extract the starting point passing vehicles captured by the target starting point camera from the starting point passing vehicle data stream.

[0132] The target starting point camera determined in S1002 is matched with the set of starting point cameras. If the target starting point camera can be matched from the set, the passing vehicles captured by the target starting point camera are filtered out from the starting point vehicle data stream, thus obtaining the starting point passing vehicles.

[0133] If no target starting camera is matched from the starting camera set, the matching record is output to the dirty database.

[0134] S1005. Match the vehicles passing through the starting point with the vehicle identification information of the target passing vehicle, and identify the successfully matched vehicles as the target passing vehicles.

[0135] Then, the vehicle identification information of the target passing vehicle is matched one by one with the vehicle identification information of the starting point passing vehicle, and the vehicle that is successfully matched is identified as the target passing vehicle.

[0136] In this embodiment, the passing information includes the passing time of the vehicles. After determining each target passing vehicle in the starting point passing data stream, the fields related to the passing time are extracted from the passing information based on the passing information of each target passing vehicle, so that the starting passing time of each target passing vehicle can be obtained.

[0137] S903. Determine the traffic flow based on the destination and origin times of each target vehicle.

[0138] Optionally, the time difference is calculated based on the destination departure time T2 and the origin departure time T1 of each target passing vehicle. The time difference is determined as the transit time for each target vehicle. Based on the transit time of each target vehicle, valid vehicles are selected from the target vehicles. Valid vehicles are those whose transit time is less than a preset time threshold N. If the transit time is greater than or equal to the preset time threshold N, the target vehicle is directly output to the dirty database.

[0139] The origin and destination information of valid passing vehicles are merged to obtain a fused data stream of valid passing vehicles. The number of valid vehicles in the fused data stream is determined as the traffic flow.

[0140] Specifically, the origin and destination information of valid passing vehicles are retrieved, and key-value matching is performed on these two data streams. The vehicle identifier of the valid passing vehicle is used as the key to merge the two data streams into one stream. At the same time, the field information is broadened and all key fields of the origin and destination passing information are integrated to generate a fused data stream of valid passing vehicles.

[0141] During the matching process, if the key matches successfully, the merged data stream is output smoothly, and the number of valid vehicles contained in the merged data stream is summarized, which is the final determined traffic flow. If the key fails to match, it is not included in the merged data stream, but the result of the failed match is directly output to the dirty database.

[0142] Optionally, the starting and ending times of each target passing vehicle and the corresponding vehicle identification information can be retrieved to perform a preliminary verification of the starting and ending times of each target passing vehicle, and abnormal data where the ending time is earlier than the starting time can be eliminated to ensure that the passage time logic of each target passing vehicle is reasonable.

[0143] For vehicles that pass through the road after verification, the starting and ending times of each vehicle are matched with the standard traffic sequence of the corresponding road segment based on the preset traffic trajectory timing rules. The consistency between the vehicle's passage order and the trajectory timing is verified. Only vehicles whose starting and ending times match the standard traffic sequence of the road segment and can be matched with a unique traffic trajectory are retained and are determined as valid vehicles. Vehicles that do not meet the timing requirements or cannot be matched with a unique traffic trajectory are determined as invalid vehicles and are not included in the traffic flow statistics.

[0144] All valid passing vehicles are categorized and statistically analyzed according to the road segment nodes associated with their travel trajectories. Duplicate vehicle records on the same travel trajectory are removed to ensure that each valid travel trajectory corresponds to one valid record. The total number of valid passing vehicles after classification and deduplication is then obtained, and this total number represents the final determined traffic flow.

[0145] In the above embodiments of this application, by leveraging the characteristic that road information includes vehicle passage times, each target passing vehicle and its corresponding destination passage time, as well as vehicle identification information, are accurately obtained from the destination passing data stream, thus providing important basic data for vehicle matching and traffic flow calculation. Guided by the destination cameras that capture images of each target passing vehicle, and combined with vehicle identification information, target passing vehicles with the same identification are searched and matched from the starting point passing data stream, and their starting point passage times are obtained. This achieves accurate association between the starting point and destination passing data of the same vehicle, effectively reducing statistical bias caused by data confusion between different vehicles. Finally, traffic flow is determined based on the starting point and destination passage times of the same vehicle, ensuring that traffic flow determination can be verified based on the complete vehicle travel trajectory, further improving the accuracy of traffic flow determination.

[0146] To facilitate a better understanding of the traffic flow determination method of this application, a brief description is provided below using complete embodiments. Please refer to [link / reference]. Figure 11 , Figure 11 A flowchart illustrating another method for determining traffic flow provided in this application embodiment, the method may include the following steps:

[0147] S1101. Obtain real-time vehicle passing data stream, which includes passing vehicles and cameras that capture images of passing vehicles.

[0148] S1102. Filter abnormal data from the real-time vehicle passage data stream to obtain a valid real-time vehicle passage data stream.

[0149] S1103. Obtain the pre-configured traffic flow direction configuration information, which includes the traffic flow start-point adjacency table and the traffic flow end-point adjacency table of the target road checkpoint.

[0150] S1104. Based on the starting camera in the traffic flow starting point adjacency table, search for the first starting camera that matches the starting camera from the cameras that photograph passing vehicles.

[0151] S1105. The passing information of passing vehicles captured by the first starting point camera is determined as the starting point vehicle passing data stream.

[0152] S1106. Based on the destination cameras in the traffic flow destination adjacency table, search for the first destination camera that matches the destination camera from the cameras that photograph passing vehicles.

[0153] S1107. The passing information of passing vehicles captured by the first endpoint camera is determined as the endpoint vehicle passing data stream.

[0154] S1108. Obtain the destination passing vehicle data stream, including each target passing vehicle, the destination passing time of each target passing vehicle, and vehicle identification information.

[0155] S1109. Based on the destination cameras of each target passing vehicle and the adjacency list of the traffic flow destination, determine the target directed edge of the destination camera.

[0156] S1110. Based on the directed edge of the target, determine the target starting camera that has a corresponding relationship with the ending camera.

[0157] S1111: Obtain the set of starting camera images of each passing vehicle captured in the starting point vehicle data stream.

[0158] S1112. If a target starting point camera is matched from the starting point camera set, then extract the starting point passing vehicles captured by the target starting point camera from the starting point passing vehicle data stream.

[0159] S1113. Match the vehicles passing through the starting point with the vehicle identification information of the target passing vehicle, and determine the successfully matched vehicles as the target passing vehicles.

[0160] S1114. Obtain the starting point and passing time of each target passing vehicle.

[0161] S1115. Based on the destination and origin times of each target vehicle, determine the transit time of each target vehicle, and identify target vehicles with transit times less than a preset threshold as valid vehicles.

[0162] S1116. Merge the origin and destination passing information of the valid passing vehicles to obtain the fused data stream of the valid passing vehicles.

[0163] S1117. The number of valid vehicles in the merged data stream is determined as the traffic flow.

[0164] For details on the implementation process and technical effects of each step, please refer to the above embodiments. To avoid redundancy, the descriptions will not be repeated.

[0165] This application also provides a device for determining traffic flow; please refer to [link to relevant documentation]. Figure 12 , Figure 12 This application provides a schematic diagram of a traffic flow determination device, which includes:

[0166] The acquisition module 121 is used to acquire real-time vehicle passing data stream, which includes passing vehicles and cameras that capture images of passing vehicles.

[0167] The processing module 122 is used to filter abnormal data from the real-time vehicle passage data stream to obtain a valid real-time vehicle passage data stream.

[0168] The acquisition module 121 is also used to acquire pre-configured traffic flow direction configuration information, which includes a traffic flow start adjacency table and a traffic flow end adjacency table for the target road checkpoint. The traffic flow start adjacency table is used to indicate the camera belonging to the traffic flow start point, and the traffic flow end adjacency table is used to indicate the camera belonging to the traffic flow end point. Each camera corresponds to a different traffic flow direction.

[0169] The processing module 122 is also used to perform traffic flow splitting on the effective real-time vehicle passage data stream based on the vehicle flow start adjacency list, the vehicle flow end adjacency list, and the camera that captures passing vehicles, to obtain the start vehicle passage data stream and the end vehicle passage data stream.

[0170] The determination module 123 is used to determine the traffic flow based on the starting point vehicle data stream and the ending point vehicle data stream.

[0171] In one possible implementation, the processing module 122 is further specifically used for:

[0172] Based on the starting camera in the traffic flow starting point adjacency table, search for the first starting camera that matches the starting camera from the cameras that photograph passing vehicles.

[0173] The passing information of passing vehicles captured by the first starting point camera is determined as the starting point vehicle passing data stream.

[0174] Based on the destination cameras in the traffic flow endpoint adjacency table, search for the first destination camera that matches the destination camera from the cameras that photograph passing vehicles.

[0175] The passing information of passing vehicles captured by the first endpoint camera is determined as the endpoint vehicle passing data stream.

[0176] In one possible implementation, the road passage information includes the vehicle's passing time, and the determination module 123 is specifically used for:

[0177] Obtain the destination passing vehicle data stream, which includes each target passing vehicle, the destination passing time of each target passing vehicle, and vehicle identification information.

[0178] Based on the endpoint cameras that capture images of each target passing vehicle, search for each target passing vehicle with the same vehicle identification information from the starting point vehicle passing data stream, and obtain the starting point passing time of each target passing vehicle.

[0179] Traffic flow is determined based on the destination and origin times of each target vehicle.

[0180] In one possible implementation, module 123 is specifically used for:

[0181] Based on the destination cameras that capture images of each target passing vehicle and the adjacency list of the traffic flow destination, the target directed edges of the destination cameras are determined. The traffic flow destination adjacency list stores each destination camera and the directed edges associated with each destination camera. The directed edges are used to represent the correspondence between the destination camera and the starting camera.

[0182] Based on the directed edge of the target, determine the target starting camera that has a corresponding relationship with the ending camera.

[0183] Obtain the set of starting point cameras that capture images of each passing vehicle in the starting point vehicle data stream.

[0184] If a target starting point camera is matched from the starting point camera set, then the starting point passing vehicles captured by the target starting point camera are extracted from the starting point vehicle passing data stream.

[0185] Based on the vehicle identification information of the target passing vehicle, a match is made among the passing vehicles at the starting point, and the successfully matched vehicle is identified as the target passing vehicle.

[0186] In one possible implementation, module 123 is specifically used for:

[0187] Using the identifier of the destination camera as the search index, a search is performed in the traffic flow destination adjacency table to retrieve the directed edges associated with the destination camera.

[0188] The directed edges that meet the preset edge conditions are determined as the target directed edges of the endpoint camera.

[0189] In one possible implementation, module 123 is specifically used for:

[0190] The transit time for each target vehicle is determined based on its destination transit time and origin transit time.

[0191] Based on the transit time of each target vehicle, valid vehicles are selected from the target vehicles. Valid vehicles are those whose transit time is less than a preset time threshold.

[0192] The origin and destination information of valid passing vehicles are merged to obtain a fused data stream of valid passing vehicles.

[0193] The number of valid vehicles in the merged data stream is determined as the traffic flow.

[0194] For a description of the features in the embodiment corresponding to the traffic flow determination device, please refer to the relevant description in the embodiment corresponding to the traffic flow determination method, which will not be repeated here.

[0195] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 13 As shown, the electronic device provided in this embodiment includes at least one processor 131 and a memory 132. Optionally, the electronic device further includes a communication component 133. The processor 131, the memory 132, and the communication component 133 are connected via a bus 134.

[0196] In a specific implementation, at least one processor 131 executes computer execution instructions stored in memory 132, causing at least one processor 131 to execute the above-described method embodiment for determining traffic flow.

[0197] The specific implementation process of processor 131 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0198] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0199] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0200] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0201] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described methods for determining traffic flow.

[0202] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0203] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the traffic flow determination method.

[0204] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above-described traffic flow determination method embodiments.

[0205] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0206] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0207] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0208] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0209] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0210] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0211] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0212] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for determining traffic flow, characterized in that, include: Acquire real-time vehicle passage data stream, which includes passing vehicles and cameras that capture images of the passing vehicles; Abnormal data filtering is performed on the real-time vehicle passage data stream to obtain a valid real-time vehicle passage data stream; Obtain pre-configured traffic flow direction configuration information, which includes a traffic flow start adjacency table and a traffic flow end adjacency table for the target road checkpoint. The traffic flow start adjacency table is used to indicate cameras belonging to the traffic flow start point, and the traffic flow end adjacency table is used to indicate cameras belonging to the traffic flow end point. Each camera corresponds to a different traffic flow direction. Based on the adjacency list of the starting point of the traffic flow, the adjacency list of the ending point of the traffic flow, and the camera that captures the passing vehicles, the effective real-time passing vehicle data stream is split into starting point passing vehicle data stream and ending point passing vehicle data stream. The traffic flow is determined based on the vehicle data streams at the starting point and the vehicle data streams at the destination.

2. The method according to claim 1, characterized in that, The process of splitting the effective real-time vehicle passage data stream into a starting point vehicle passage data stream and an ending point vehicle passage data stream, based on the vehicle flow start-up adjacency table, the vehicle flow end-up adjacency table, and the camera capturing the passing vehicles, includes: Based on the starting camera in the traffic flow starting point adjacency table, search for the first starting camera that matches the starting camera from the cameras that capture the passing vehicles; The passing information of passing vehicles captured by the first starting point camera is determined as the starting point vehicle passing data stream; Based on the destination cameras in the traffic flow destination adjacency table, search for the first destination camera that matches the destination camera from the cameras that photograph the passing vehicles; The passing information of passing vehicles captured by the first destination camera is determined as the destination vehicle passing data stream.

3. The method according to claim 2, characterized in that, The passing information includes the vehicle passing time, and the step of determining the traffic flow based on the starting point passing data stream and the ending point passing data stream includes: Obtain the target passing vehicles, the destination passing time of each target passing vehicle, and vehicle identification information included in the destination passing vehicle data stream; Based on the endpoint cameras that capture images of the target passing vehicles, search for the target passing vehicles with the same vehicle identification information from the starting point vehicle passing data stream, and obtain the starting point passing time of each target passing vehicle. Traffic flow is determined based on the destination and origin times of each target passing vehicle.

4. The method according to claim 3, characterized in that, The step of searching for target vehicles with the same vehicle identification information from the starting point vehicle data stream based on the endpoint cameras that captured images of the target passing vehicles includes: Based on the endpoint cameras that capture the passing vehicles and the traffic flow endpoint adjacency table, the target directed edges of the endpoint cameras are determined. The traffic flow endpoint adjacency table stores each endpoint camera and the directed edges associated with each endpoint camera. The directed edges are used to characterize the correspondence between the endpoint cameras and the starting cameras. Based on the target directed edge, determine the target starting camera that has a corresponding relationship with the ending camera; Obtain the set of starting point cameras that captured each passing vehicle in the starting point vehicle data stream; If the target starting point camera is matched from the set of starting point cameras, then the starting point passing vehicles captured by the target starting point camera are extracted from the starting point passing vehicle data stream; The vehicles are matched against the vehicles passing through the starting point based on the vehicle identification information of the target passing vehicle, and the vehicles that are successfully matched are identified as the target passing vehicle.

5. The method according to claim 4, characterized in that, The step of determining the target directed edge of the endpoint camera based on the endpoint camera capturing the target passing vehicles and the adjacency list of the traffic flow endpoints includes: Using the identifier of the endpoint camera as the retrieval index, a search is performed in the adjacency table of the traffic flow endpoint to retrieve the directed edges associated with the endpoint camera; The directed edges that satisfy the preset edge conditions are determined as the target directed edges of the endpoint camera.

6. The method according to claim 3 or 4, characterized in that, The step of determining traffic flow based on the destination and origin times of each target passing vehicle includes: The transit time for each target vehicle is determined based on its destination transit time and origin transit time. Based on the passage time of each target passing vehicle, valid passing vehicles are selected from the target passing vehicles. The valid passing vehicles are target passing vehicles whose passage time is less than a preset time threshold. The origin and destination information of the valid passing vehicles are merged to obtain the fused data stream of the valid passing vehicles. The number of valid vehicles in the fused data stream is determined as the traffic flow.

7. A device for determining traffic flow, characterized in that, include: The acquisition module is used to acquire real-time vehicle passing data stream, which includes passing vehicles and cameras that capture images of the passing vehicles. The processing module is used to filter abnormal data from the real-time vehicle passage data stream to obtain a valid real-time vehicle passage data stream. The acquisition module is also used to acquire pre-configured traffic flow direction configuration information, which includes a traffic flow start adjacency table and a traffic flow end adjacency table for the target road checkpoint. The traffic flow start adjacency table is used to indicate cameras belonging to the traffic flow start point, and the traffic flow end adjacency table is used to indicate cameras belonging to the traffic flow end point. Each camera corresponds to a different traffic flow direction. The processing module is also used to perform traffic flow splitting on the effective real-time vehicle passage data stream based on the vehicle flow start adjacency table, the vehicle flow end adjacency table, and the camera that captures the passing vehicles, to obtain the start vehicle passage data stream and the end vehicle passage data stream. The determination module is used to determine the traffic flow based on the starting point vehicle data stream and the ending point vehicle data stream.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.