A method and device for determining traffic status

By acquiring and reconstructing the driving data of vehicles on the highway, merging and calculating traffic speeds, the problem of low traffic status accuracy caused by incomplete data is solved, and more accurate traffic status determination and control is achieved.

CN118430273BActive Publication Date: 2024-10-01HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410879843.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-10-01
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

In the existing technology, the traffic status data in the preset research area of ​​the highway is incomplete due to incomplete vehicle driving data, resulting in low accuracy in determining the traffic status.

Method used

By obtaining the vehicle driving data of the target road section in the target time period, data reconstruction is performed for vehicles with missing data, and the driving data of upstream and downstream vehicles are combined to calculate the traffic speed in the sub-time period, and determine the traffic status based on these data.

Benefits of technology

It improves the accuracy of traffic status determination, reduces the impact of incomplete vehicle driving data on traffic status, and enhances the accuracy of road traffic control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118430273B_ABST
    Figure CN118430273B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for determining a traffic state, which relates to the field of intelligent transportation technology. The method includes: obtaining target driving data of each vehicle in a target road section within a target time period; calculating the missing reconstructed driving data of the vehicle based on the complete driving data of a reference vehicle before the vehicle whose driving data is missing; when a first vehicle and a second vehicle are the same vehicle, determining the complete driving data of the vehicle in the target road section based on the upstream driving data, reconstructed driving data of the first vehicle, and the downstream driving data and reconstructed driving data of the second vehicle; calculating the target passing speed of the vehicles in the sub-road section in each sub-time period based on the complete driving data of each vehicle in the target road section in the target time period; determining the traffic state of the target road section in the target time period based on the target passing speed of the vehicles in each sub-road section in each sub-time period, and improving the accuracy of determining the traffic state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent transportation technology, and in particular to a method and device for determining a traffic state. Background Art

[0002] With the continuous development of road traffic, in order to ensure the safety of vehicles and pedestrians on the road and to maintain road traffic order, it is becoming increasingly important to effectively control road traffic. When controlling road traffic, it is necessary to determine the traffic status of each section, such as the speed and delay of each section. Then, according to the traffic status of each section, adjust the duration of the traffic lights of different sections.

[0003] In the related art, when determining the traffic status of a road section, traffic status data of observation points in a preset study area of ​​the highway is obtained. Then, a neural network model is trained based on the data features of the acquired traffic status data, and the traffic status of the highway is determined based on the trained neural network model.

[0004] However, the traffic status data of the observation points in the preset study area contain incomplete driving data of vehicles, resulting in low accuracy in determining the traffic status. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a method and device for determining traffic status to improve the accuracy of determining traffic status. The specific technical solution is as follows:

[0006] In a first aspect, in order to achieve the above-mentioned purpose, an embodiment of the present application provides a method for determining a traffic state, the method comprising:

[0007] Obtaining target driving data of each vehicle in a target road section within a target time period; wherein the target driving data includes: vehicle identification, identification of the lane where the vehicle is located, each detection point of the vehicle in the target road section, speed of the vehicle at each detection point in the target road section, and type of vehicle;

[0008] For a vehicle with missing driving data, the missing driving data of the vehicle is calculated based on the complete driving data of a reference vehicle before the vehicle to obtain the reconstructed driving data of the vehicle;

[0009] When the first vehicle and the second vehicle are the same vehicle, based on the upstream driving data and the reconstructed driving data of the first vehicle, and the downstream driving data and the reconstructed driving data of the second vehicle, the complete driving data of the vehicle on the target road section is determined; wherein the first vehicle is a vehicle with missing downstream driving data; and the second vehicle is a vehicle with missing upstream driving data;

[0010] Based on the complete driving data of each vehicle in the target road section within the target time period, the target travel speed of the vehicle in the sub-road section within each sub-time period is calculated; wherein the sub-time period and the sub-road section are obtained by dividing the target time period and the target road section;

[0011] Based on the target travel speed of vehicles in each sub-section in each sub-time period, the traffic status of the target section in the target time period is determined; wherein the traffic status includes the travel speed information of vehicles in the target section and the delay information of the target section.

[0012] In a second aspect, in order to achieve the above-mentioned purpose, an embodiment of the present application provides a traffic state determination device, the device comprising:

[0013] A driving data acquisition module is used to acquire target driving data of each vehicle in a target road section within a target time period; wherein the target driving data includes: vehicle identification, identification of the lane where the vehicle is located, each detection point of the vehicle in the target road section, speed of the vehicle at each detection point in the target road section, and type of vehicle;

[0014] A driving data reconstruction module is used to calculate the missing driving data of a vehicle with missing driving data based on the complete driving data of a reference vehicle before the vehicle, so as to obtain the reconstructed driving data of the vehicle;

[0015] A driving data merging module, for determining complete driving data of the vehicle on the target road section based on upstream driving data and reconstructed driving data of the first vehicle and downstream driving data and reconstructed driving data of the second vehicle when the first vehicle and the second vehicle are the same vehicle; wherein the first vehicle is a vehicle with missing downstream driving data; and the second vehicle is a vehicle with missing upstream driving data;

[0016] A traffic speed determination module, configured to calculate a target traffic speed of vehicles in a sub-section in each sub-time period based on complete driving data of each vehicle in the target section in the target time period; wherein the sub-time period and the sub-section are obtained by dividing the target time period and the target section;

[0017] A traffic status determination module is used to determine the traffic status of the target road section within the target time period based on the target travel speed of the vehicles in each sub-road section within each sub-time period; wherein the traffic status includes the travel speed information of the vehicles in the target road section and the delay information of the target road section.

[0018] An embodiment of the present application further provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing any of the above-mentioned traffic status determination methods when executing the program stored in the memory.

[0019] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned traffic status determination methods is implemented.

[0020] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned traffic status determination methods.

[0021] Beneficial effects of the embodiments of the present application:

[0022] A traffic state determination method provided by an embodiment of the present application obtains target driving data of each vehicle in a target road section within a target time period; the target driving data includes: vehicle identification, identification of the lane where the vehicle is located, each detection point of the vehicle in the target road section, the speed of the vehicle at each detection point in the target road section, and the type of vehicle; for a vehicle with missing driving data, based on the complete driving data of a reference vehicle before the vehicle, the missing driving data of the vehicle is calculated to obtain the reconstructed driving data of the vehicle; when a first vehicle and a second vehicle are the same vehicle, based on the upstream driving data of the first vehicle, the reconstructed driving data, and the downstream driving data of the second vehicle The method comprises the following steps: according to the complete driving data of each vehicle in the target section, determining the complete driving data of the vehicle in the target section based on the data and reconstructing the driving data; the first vehicle is a vehicle with missing downstream driving data; the second vehicle is a vehicle with missing upstream driving data; based on the complete driving data of each vehicle in the target section in the target time period, calculating the target travel speed of the vehicles in the sub-section in each sub-time period; the sub-time period and the sub-section are obtained by dividing the target time period and the target section; based on the target travel speed of the vehicles in each sub-section in each sub-time period, determining the traffic status of the target section in the target time period; the traffic status includes the travel speed information of the vehicles in the target section and the delay information of the target section.

[0023] Based on the above processing, for a vehicle with missing driving data, the reconstructed driving data of the vehicle can be determined, and based on the acquired upstream driving data, downstream driving data, and reconstructed driving data of the vehicle, the complete driving data of the vehicle can be determined. Furthermore, by determining the traffic state of the target road section based on the complete driving data of the vehicle, the influence of the incomplete driving data of the vehicle on the determination of the traffic state can be reduced, thereby improving the accuracy of determining the traffic state.

[0024] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0026] Figure 1a A schematic diagram of an image captured by a camera provided in an embodiment of the present application;

[0027] Figure 1b A schematic diagram of a target road section provided in an embodiment of the present application;

[0028] Figure 2 A flow chart of a first traffic status determination method provided in an embodiment of the present application;

[0029] Figure 3 A line graph showing changes in detection points of a vehicle in a target road section provided in an embodiment of the present application;

[0030] Figure 4a A driving route map of the first vehicle provided in an embodiment of the present application;

[0031] Figure 4b A driving route map of the second vehicle provided in the embodiment of the present application;

[0032] Figure 5 A flow chart of a second traffic state determination method provided in an embodiment of the present application;

[0033] Figure 6a A schematic diagram of a time distribution provided in an embodiment of the present application;

[0034] Figure 6b A schematic diagram of a vehicle data reconstruction method provided in an embodiment of the present application;

[0035] Figure 7a A comparison diagram of the driving routes of the first type of vehicle provided in the embodiment of the present application;

[0036] Figure 7b A comparison diagram of the driving route of the second vehicle provided in the embodiment of the present application;

[0037] Figure 8 A flowchart of a third traffic status determination method provided in an embodiment of the present application;

[0038] Figure 9a A schematic diagram of a first method of merging vehicle driving data provided in an embodiment of the present application;

[0039] Figure 9bA schematic diagram of a second method of merging vehicle driving data provided in an embodiment of the present application;

[0040] Fig.10 A schematic diagram for determining identical vehicles provided in an embodiment of the present application;

[0041] Fig.11 A flowchart of a fourth traffic state determination method provided in an embodiment of the present application;

[0042] Fig.12 A schematic diagram of space-time segmentation provided in an embodiment of the present application;

[0043] Fig.13 A flow chart of a speed prediction model training method provided in an embodiment of the present application;

[0044] Fig.14 A structural diagram of a speed prediction model provided in an embodiment of the present application;

[0045] Fig.15 A flowchart of a fifth traffic state determination method provided in an embodiment of the present application;

[0046] Fig.16 A schematic diagram of a loss function construction provided in an embodiment of the present application;

[0047] Fig.17 A flowchart of a sixth traffic state determination method provided in an embodiment of the present application;

[0048] Fig.18 A flowchart of data reconstruction provided in an embodiment of the present application;

[0049] Fig.19 A structural diagram of a traffic status determination device provided in an embodiment of the present application

[0050] Fig. 20 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0052] In the related art, the traffic status data of the observation points in the preset study area are incomplete driving data of vehicles, resulting in low accuracy in determining the traffic status.

[0053] In order to solve the above problems, an embodiment of the present application provides a method for determining traffic status, which is applied to an electronic device. The electronic device may be a server, a terminal, etc. The electronic device may communicate with a detection device, and the detection device is used to obtain driving data of vehicles on the road section. For example, the detection device may be a detection device on the road, and the detection device is configured with a radar video vehicle detector, that is, a radar and a camera. The radar is used to detect the speed of the vehicle, and the camera is used to collect images of the vehicle on the road. For example, see Figure 1a , Figure 1a A schematic diagram of an image captured by a camera provided in an embodiment of the present application. By performing object detection on the image, vehicles, pedestrians, and pedestrians driving non-motor vehicles in the scene can be obtained. Figure 1a The dashed boxes outside the vehicle, the dashed boxes outside the pedestrians, and the dashed boxes of pedestrians driving non-motor vehicles are detection boxes during target detection. Furthermore, based on the speed of the vehicle detected by the radar and the multiple images collected by the camera, the driving data of the vehicle in the target section can be obtained.

[0054] The driving data includes: vehicle identification (such as vehicle ID), each detection point of the vehicle in the target section (i.e., the position of the vehicle in the target section at different times), the speed of the vehicle at each detection point in the target section, the type of vehicle, the identification of the lane where the vehicle is located (such as the lane number), etc. Among them, each detection point of the vehicle in the target section can be represented by the distance between the vehicle at the detection point and the stop line of the target section. For example, see Figure 1b , Figure 1b A schematic diagram of a target road section provided in an embodiment of the present application. The stop line 101 of the target road section is used to instruct the driver to stop here and wait for the traffic signal. The target road section includes a right turn and straight lane 102, a straight lane 103 and a left turn lane 104. When the vehicle is at the detection point A in the target road section, the distance between the vehicle and the stop line of the target road section is L.

[0055] Then, the electronic device determines the traffic status of the target road section according to the acquired driving data. Subsequently, based on the traffic status of the target road section, traffic control is performed on the target road section and related road sections to maintain road traffic order and ensure the safety of vehicles and pedestrians on the road. For example, when the speed and delay indicators of vehicles on the target road section reflect that the target road section is severely congested, the duration of the red light on the target road section is reduced.

[0056] See also Figure 2 , Figure 2 A flow chart of a method for determining a traffic state provided in an embodiment of the present application. The method may include the following steps:

[0057] S201: Acquire target driving data of each vehicle in a target road section within a target time period.

[0058] The target driving data includes: vehicle identification, identification of the lane where the vehicle is located, various detection points of the vehicle in the target road section, speed of the vehicle at various detection points in the target road section, and type of vehicle.

[0059] S202: For a vehicle with missing driving data, based on the complete driving data of a reference vehicle before the vehicle, the missing driving data of the vehicle is calculated to obtain reconstructed driving data of the vehicle.

[0060] S203: When the first vehicle and the second vehicle are the same vehicle, determine the complete driving data of the vehicle on the target road section based on the upstream driving data and the reconstructed driving data of the first vehicle and the downstream driving data and the reconstructed driving data of the second vehicle.

[0061] Among them, the first vehicle is a vehicle with missing downstream driving data; the second vehicle is a vehicle with missing upstream driving data.

[0062] S204: Calculate the target travel speed of the vehicles in the sub-segment in each sub-time period based on the complete travel data of each vehicle in the target road section in the target time period.

[0063] The sub-time periods and sub-road sections are obtained by dividing the target time periods and target road sections.

[0064] S205: Determine the traffic state of the target road section within the target time period based on the target travel speed of the vehicles in each sub-road section within each sub-time period.

[0065] The traffic status includes the speed information of vehicles in the target road section and the delay information of the target road section.

[0066] Based on the traffic status determination method provided by the embodiment of the present application, for a vehicle with missing driving data, the reconstructed driving data of the vehicle can be determined, and the complete driving data of the vehicle can be determined based on the acquired upstream driving data, downstream driving data, and reconstructed driving data of the vehicle. Furthermore, by determining the traffic status of the target road section based on the complete driving data of the vehicle, the influence of the incomplete driving data of the vehicle on the determination of the traffic status can be reduced, thereby improving the accuracy of determining the traffic status.

[0067] For step S201, the target road section refers to the road between two intersections, for example, Figure 1b The target time period can be any time period in which the vehicle driving data in the target road section is obtained. The duration of the target time period is set according to the requirements, for example, the duration of the target time period is 300 seconds.

[0068] In one implementation, the electronic device directly obtains the driving data of the vehicle in the target road section within the target time period from the detection device to obtain the target driving data.

[0069] In another implementation, step S201 may include the following steps: obtaining the original driving data of each vehicle in the target road section within the target time period from the detection device; determining other driving data except the abnormal driving data in the original driving data, and obtaining the target driving data of each vehicle in the target road section within the target time period. The abnormal driving data includes: driving data of non-motor vehicles, driving data of vehicles driving in the opposite direction, driving data of vehicles with a number of detection points less than a preset number, and driving data of vehicles with abnormal changes in detection points.

[0070] The electronic device obtains the original driving data of each vehicle in the target road section within the target time period from the detection device. The original driving data refers to the data obtained by the detection device based on radar and camera. Due to the detection error of the detection device and the influence of environmental factors, there will be abnormal driving data in the original driving data. In order to avoid the influence of abnormal driving data and improve the accuracy of determining the traffic status, the electronic device determines other driving data in the original driving data except the abnormal driving data, and obtains the driving data of each vehicle in the target road section within the target time period.

[0071] That is, the driving data of non-motor vehicles, the driving data of vehicles driving in the opposite direction, the driving data of short distances (i.e. the driving data in which the number of detection points of the vehicle in the target section is less than the preset number), and the driving data in which the position information is greatly jittered due to radar detection errors (i.e. the driving data in which the detection points of the vehicle in the target section change abnormally) are deleted from the original driving data to obtain the target driving data.

[0072] For example, see Figure 3 , Figure 3 A line graph of the change of detection points of a vehicle in a target section provided in an embodiment of the present application. The horizontal axis in the line graph is a time index, indicating the time when the detection point of the vehicle is detected. For example, the detection point of the vehicle is output every 0.5 seconds, and the time index in the horizontal axis indicates the number of 0.5 seconds. The vertical axis is the distance between the vehicle and the stop line, in meters (m). The vertical axis indicates the distance between the vehicle and the stop line of the target section when it is at the detection point.

[0073] When the vehicle is driving normally on the target road section, the distance between the vehicle and the stop line of the target road section tends to decrease gradually. Figure 3 The distance between the vehicle and the stop line of the target road section shown has a large fluctuation. It may be that the detection error of the radar video vehicle detector causes the vehicle's position information to fluctuate greatly. In this case, it can be determined that this type of driving data is abnormal driving data.

[0074] For step S202, if the vehicle's driving data is complete, then the various detection points of the vehicle can form the vehicle's driving route, while if the vehicle's driving data is incomplete, then the various detection points of the vehicle may form multiple line segments. For example, Figure 4a The vehicle includes a complete driving route and an incomplete driving route. 401 is the complete driving route of the vehicle, and 402 is the incomplete driving route of the vehicle. The vehicles with missing driving data include: the first vehicle with missing downstream driving data, and the second vehicle with missing upstream driving data. For example, Figure 4a 403 is a downstream driving route composed of downstream driving data of the second vehicle, and 402 is an upstream driving route composed of upstream driving data of the first vehicle.

[0075] In order to improve the accuracy of determining the traffic status, it is necessary to reconstruct the data of the vehicle with missing driving data based on the reference vehicle (i.e., the preceding vehicle) before the vehicle with missing driving data, so as to determine the complete driving data of the vehicle, and thus obtain the complete driving route of the vehicle. For example, Figure 4b The complete driving routes of each vehicle are shown in the figure.

[0076] Before reconstructing the data of a vehicle with missing driving data, it is necessary to first determine the preceding vehicle of the vehicle with missing driving data. However, due to mutual occlusion between vehicles, the same vehicle may be detected as two vehicles, and the identification (i.e., id) of the vehicle during driving will change. Therefore, it is necessary to determine the identical vehicles among the vehicles, that is, to re-id each vehicle. Re-id is mainly to solve the problem of id change of the same vehicle caused by mutual occlusion between vehicles, and to restore the ids of different driving data belonging to the same vehicle to be consistent, so as to avoid mistaking the driving data of the same vehicle for the driving data of the preceding vehicle. For the specific method of re-iding each vehicle, please refer to the relevant introduction of the subsequent embodiments.

[0077] In some embodiments, Figure 2 Based on Figure 5 , step S202 may include the following steps:

[0078] S2021: For the first moment when the downstream driving data of the first vehicle is missing, based on the speed of the first vehicle at the previous moment before the first moment, the position of the first vehicle in the target road section, the speed of the reference vehicle, and the position of the reference vehicle in the target road section, calculate the speed of the first vehicle at the first moment and the position of the first vehicle in the target road section until the first stop condition is met to obtain the reconstructed driving data of the first vehicle.

[0079] The first stop condition is that the distance between the first vehicle and the stop line of the target road section is not greater than 0.

[0080] S2022: For the second moment when the upstream driving data of the second vehicle is missing, construct an objective function based on the speed of the second vehicle at the next moment after the second moment, the position of the second vehicle in the target section, the speed of the reference vehicle, and the position of the reference vehicle in the target section.

[0081] Among them, the objective function is: the functional relationship between the speed of the second vehicle at different times, the position of the second vehicle in the target road section and the target difference; the target difference represents: the difference between the first position of the reconstructed reference vehicle and the second position of the reference vehicle in the target driving data at the same time.

[0082] S2023: For the second moment when the upstream driving data of the second vehicle is missing, calculate the speed of the second vehicle at the second moment when the objective function takes the minimum value, and the position of the second vehicle in the target road section, until the second stop condition is reached, to obtain the reconstructed driving data of the second vehicle.

[0083] Among them, the second stop condition is: the distance between the second vehicle and the stop line of the target section is greater than the target distance, the target distance is the maximum value of the farthest detection distance of the detection equipment and the maximum distance between the reference vehicle and the stop line of the target section; or, the second stop condition is: the upstream driving data of the reference vehicle is terminated.

[0084] Electronic devices can use the driving data of the vehicle before the vehicle (i.e., the reference vehicle) to reconstruct the data through the vehicle following model. The preceding vehicle (i.e., the reference vehicle) with a complete route is denoted as c. The following vehicles (i.e., the first vehicle and the second vehicle) that need to be reconstructed are denoted as r. Since the missing driving data is mainly caused by the occlusion of the preceding vehicle, it is divided into two situations: the missing downstream driving data of the vehicle and the missing upstream driving data.

[0085] For a first vehicle whose downstream driving data is missing, a forward estimation vehicle following is performed for the first vehicle. The moment when the downstream driving data of the first vehicle is missing is referred to as a first moment. The moment before the first moment is the upstream driving data of the first vehicle. Since the upstream driving data of the first vehicle has been acquired, it can be determined that the upstream driving data of the first vehicle at the moment before the first moment is known.

[0086] See also Figure 6a, the driving data of the first vehicle from time t+1 onwards in the target time period is missing, and the driving data of the first vehicle from time t-2 to time t is known. Since the speed of the first vehicle at time t and the position of the first vehicle in the target section are known, the speed of the first vehicle at time t (i.e., the previous moment (t) of time t+1 and the position of the first vehicle in the target section are known, then based on the speed of the first vehicle at the previous moment (i.e., time t) of time t+1 and the position of the first vehicle in the target section, the speed of the first vehicle at time t+1 and the position of the first vehicle in the target section are determined. Furthermore, based on the speed of the first vehicle at the previous moment (i.e., time t+1) of time t+2 and the position of the first vehicle in the target section, the speed of the first vehicle at time t+2 and the position of the first vehicle in the target section are determined, and so on, the reconstructed data of the first vehicle can be obtained.

[0087] For example, the first moment is recorded as t+1, and the previous moment of the first moment is t, that is, the driving data of the first vehicle r at time t is known, and the driving data of the next moment after time t (i.e., time t+1) is calculated. The acceleration of the first vehicle at time t is recorded as , which can be expressed as the following formula:

[0088] a r t =a×[1- v r t v 0 4 - ( s ' ( v r t , v c t ) x c t - x r t ) 2 ] (1);

[0089] represents the acceleration of the first vehicle at time t; t represents the previous moment of the first moment; t+1 represents the first moment; a represents the maximum acceleration, which is a constant; the maximum acceleration represents the parameter of the maximum speed change that the vehicle can achieve in unit time; represents the speed of the first vehicle at time t; is the expected speed of the first vehicle, that is, the free flow speed of the first vehicle when it is not affected by other vehicles (in the subsequent embodiments ), is a constant; represents the speed of the reference vehicle at time t; represents the distance between the reference vehicle and the stop line of the target section at time t (the position of the reference vehicle in the target section at time t); Represents the distance between the first vehicle and the stop line of the target section at time t (the position of the first vehicle in the target section at time t). The speed of the first vehicle at time t is When the speed of the reference vehicle is When the first vehicle expects the minimum distance from the front vehicle (reference vehicle), is a constant.

[0090] The expected distance between the first vehicle at time t can be expressed as follows:

[0091] = (2);

[0092] Indicates the minimum safe distance between the first vehicle and the vehicle in front. is a constant; max represents the maximum value function; Indicates the driver's reaction time, is a constant; represents the comfortable deceleration, and b is a constant. The comfortable deceleration refers to the maximum deceleration adopted by the vehicle while ensuring comfort and safety during driving.

[0093] The speed of the first vehicle at time t , the position of the first vehicle in the target section , the speed of the reference vehicle at time t, the speed of the first vehicle at the next moment after time t (i.e., t+1) , and the position of the first vehicle in the target section , satisfying the following dynamic relationship:

[0094] (3);

[0095] (4);

[0096] express Moment and The time difference between moments.

[0097] In the above formula (1), It is used to measure the difference between the speed of the first vehicle at time t and the expected speed, and promote the acceleration of the first vehicle. Parameter 4 is the acceleration index. The larger the value of the acceleration index is, the more radical the acceleration and deceleration process of the vehicle is. It is used to measure the difference between the distance between the first vehicle and the reference vehicle at time t and the expected vehicle distance to facilitate vehicle braking. is a balancing term, It is the power item, and the intelligent braking strategy is realized through these two items.

[0098] Accordingly, based on the above formula, the speed of the first vehicle at the first moment and the position of the first vehicle in the target section can be calculated. , the position of the first vehicle in the target section is used as , the speed of the reference vehicle at the first moment is used as , and the position of the reference vehicle in the target section as , the speed of the first vehicle at the next moment after the first moment and the position of the first vehicle in the target section can be calculated, and so on, until the first stop condition is reached, the reconstructed driving data of the first vehicle can be obtained, and the reconstructed driving data is also the reconstructed downstream driving data of the first vehicle.

[0099] In some embodiments, only the missing driving data of the first vehicle in the target section needs to be reconstructed. When the distance between the first vehicle and the stop line of the target section is less than 0, it indicates that the first vehicle has left the target section, and data reconstruction of the first vehicle can be stopped. In other words, the first stopping condition for data reconstruction of the first vehicle is that the distance between the first vehicle and the stop line of the target section is not greater than 0.

[0100] For the second vehicle whose upstream driving data is missing, the moment when the upstream driving data of the second vehicle is missing is called the second moment. The moment after the second moment is the downstream driving data of the second vehicle. Since the downstream driving data of the second vehicle has been acquired, it can be determined that the downstream driving data of the second vehicle at the moment after the second moment is known.

[0101] See also Figure 6a , the driving data of the second vehicle from time t-1 onwards in the target time period is missing, then the driving data of the second vehicle from time t to time t+2 is known. Since the speed of the second vehicle at time t and the position of the second vehicle in the target section are known, the speed of the second vehicle at the next moment (time t) of time t-1 and the position of the second vehicle in the target section are known. Based on the speed of the second vehicle at the next moment (i.e., time t) of time t-1 and the position of the second vehicle in the target section, the speed of the second vehicle at time t-1 and the position of the second vehicle in the target section are determined. Furthermore, based on the speed of the second vehicle at the next moment (i.e., time t-1) of time t-2 and the position of the second vehicle in the target section, the speed of the second vehicle at time t-2 and the position of the second vehicle in the target section are determined, and so on, the reconstructed data of the second vehicle can be obtained.

[0102] Accordingly, the second vehicle is estimated to follow the car. It is known that the driving routes of two consecutive vehicles have a following logic. When the upstream driving data of the rear vehicle (the second vehicle) is missing, if the time-space sequence is reversed, the vehicle will drive from the stop line to the upstream of the target section, then the time is: from Time has come , , , , n represents the number of detection points of the reconstructed second vehicle. Accordingly, the rear vehicle (the second vehicle) is converted to the front vehicle, and the front vehicle (the reference vehicle) becomes the following vehicle.

[0103] The second moment is recorded as t-1, and the next moment after the second moment is recorded as t. Accordingly, based on the speed of the second vehicle at different moments, the position of the second vehicle in the target section, the speed of the reference vehicle, and the position of the reference vehicle in the target section, an objective function can be constructed. The objective function is: the functional relationship between the speed of the second vehicle at different moments, the position of the second vehicle in the target section, and the target difference; the target difference represents: the difference between the first position of the reconstructed reference vehicle and the second position of the reference vehicle at the same moment in the target driving data. In other words, the objective function represents the minimum difference between the position (first position) of the reference vehicle with a complete route derived based on the following logic and the actual position (second position) of the reference vehicle at the same moment.

[0104] The objective function can be expressed as the following formula (5), and the objective function needs to satisfy the constraints of formulas (6) to (10).

[0105] (5);

[0106] (6);

[0107] (7);

[0108] (8);

[0109] a c ' t-1 =a×[1- v c t-1 v 0 4 - ( s ' ( v c t-1 , v r ' t-1 ) x c t-1 - x r ' t-1 ) 2 ] (9);

[0110] (10);

[0111] represents the minimum function; (position error) represents the target difference; represents the first position of the reconstructed reference vehicle at time t-2 (i.e., the position of the reconstructed reference vehicle); represents the second position of the reference vehicle at time t-2 in the target driving data (i.e., the actual position of the reference vehicle); t-1 represents the second moment; t represents the next moment after the second moment (i.e., time t-1); Indicates the moment before the second moment. represents the speed of the second vehicle at time t-1; represents the speed of the second vehicle at time t; express Moment and The time difference between the moments; a represents the maximum acceleration; represents the expected speed of the second vehicle, that is, the free flow speed of the second vehicle when it is not affected by other vehicles (in the subsequent embodiments ), is a constant. represents the position of the second vehicle at time t-1; represents the position of the second vehicle at time t; represents the acceleration of the reference vehicle at time t-1, which is derived based on the speed and position information of the second vehicle and the reference vehicle at time t-1. The speed of the second vehicle at time t-1 is When the speed of the reference vehicle is When the reference vehicle expects the minimum distance from the second vehicle, is a constant. represents the speed of the reference vehicle at time t-1; represents the position of the reference vehicle at time t-1. In the above constraints, formula (6) and formula (7) represent the speed of the second vehicle at time t-1 The interval range.

[0112] For example, see Figure 6b , the rear vehicle r is the second vehicle. The front vehicle c is the reference vehicle. The position of the rear vehicle r at time t-1 ( ) is located between point A and point B. Point C is the position of the reconstructed reference vehicle ( ); Point D is the actual position of the reference vehicle ( ). Correspondingly, the objective function represents the position error between point C and point D.

[0113] Ideally, and is the same position, that is, the function value of the objective function is 0. Accordingly, the optimal solution of the objective function at the second moment is calculated, that is, the speed of the second vehicle at the second moment when the objective function takes the minimum value and the position of the second vehicle in the target section are calculated. Furthermore, based on the speed of the second vehicle at the second moment and the position of the second vehicle in the target section, the speed of the second vehicle at the previous moment of the second moment and the position of the second vehicle in the target section are calculated, and so on, the reconstructed driving data of the second vehicle can be obtained, and the reconstructed driving data is the reconstructed upstream driving data of the second vehicle.

[0114] In some embodiments, only the driving data missing from the second vehicle in the target section needs to be reconstructed. When the second vehicle does not enter the detection range of the detection device, the detection device cannot detect the driving data of the second vehicle, and data reconstruction is not required. The detection range of the detection device can be represented by the farthest detection distance of the detection device, or the detection range of the detection device can also be represented by the maximum distance of the reference vehicle from the stop line. In addition, when the upstream driving data of the reference vehicle ends, data reconstruction of the second vehicle cannot be performed. Therefore, when the above conditions are met, data reconstruction of the second vehicle can be stopped. That is, the second stop condition for data reconstruction of the second vehicle is: the distance between the second vehicle and the stop line of the target section is greater than the target distance, and the target distance is the maximum value of the farthest detection distance of the detection device and the maximum distance of the reference vehicle from the stop line. Alternatively, the stop condition for data reconstruction of the second vehicle is: the upstream driving data of the reference vehicle terminates.

[0115] Based on the above processing, for vehicles that are missing different driving data, different methods are used to reconstruct data according to the characteristics of the vehicle, thereby improving the accuracy of the reconstructed driving data, and further improving the accuracy of the subsequent determination of the complete driving data of the vehicle.

[0116] In some embodiments, in the radar vision scene, the missing of driving data is mainly caused by the occlusion of the preceding vehicle, but there is also missing of driving data not caused by the occlusion of the preceding vehicle. For example, in some scenes, the vehicle enters the target road section from the surrounding fork road of the target road section, or leaves the target road section without passing the stop line of the target road section, etc. For the missing of driving data of the vehicle in such scenes, data reconstruction is not required.

[0117] Correspondingly, before step S202, the method may further include the following steps: determining, from among the vehicles on the target road section, candidate vehicles with missing downstream driving data and candidate vehicles with missing upstream driving data; for each candidate vehicle with missing driving data, if the distance between the last detection point in the upstream driving data of the candidate vehicle and the previous vehicle is not greater than a first distance threshold, determining that the candidate vehicle is the first vehicle with missing downstream driving data; if the distance between the first detection point in the downstream driving data of the candidate vehicle and the previous vehicle is not greater than a second distance threshold, determining that the candidate vehicle is the second vehicle with missing upstream driving data.

[0118] For each candidate vehicle, if the downstream driving data of the candidate vehicle is missing, that is, the second half of the driving route is missing, determine the time when the downstream driving data is missing (that is, the time of the last detection point in the upstream driving data of the candidate vehicle) and the distance between the candidate vehicle and the previous vehicle. For example, see Figure 7a , Figure 7a The rear vehicle route represents the route of the candidate vehicle, and the front vehicle route represents the route of the vehicle preceding the candidate vehicle. The location where the downstream driving data of the candidate vehicle is missing is point A. At this time, the distance between the candidate vehicle and the preceding vehicle (i.e., the distance from the disappearing location to the preceding vehicle) is the distance between point A and point B.

[0119] If the distance between the candidate vehicle and the previous vehicle is greater than a first distance threshold (carFollowThreshold) when the downstream driving data is missing, or there is no previous vehicle of the candidate vehicle, it is considered that the vehicle has not passed the stop line of the target section and has left the target section in advance, that is, the downstream driving data of the candidate vehicle is not detected due to the candidate vehicle leaving the target section, and the downstream driving data of the candidate vehicle is not not detected due to occlusion by the preceding vehicle, and there is no need to reconstruct the data of the candidate vehicle.

[0120] If at the moment when the downstream driving data of the candidate vehicle is missing (i.e., the moment of the last detection point in the upstream driving data of the candidate vehicle), the distance between the candidate vehicle and the previous vehicle is not greater than the first distance threshold, it means that the downstream driving data of the candidate vehicle was not detected due to obstruction by the preceding vehicle, and the candidate vehicle is determined to be the first vehicle whose downstream driving data is missing.

[0121] For each candidate vehicle, if the upstream driving data of the candidate vehicle is missing, that is, the first half of the driving route is missing, determine the first detection time of the downstream driving data (that is, the time of the first detection point in the downstream driving data of the candidate vehicle) and the distance between the candidate vehicle and the previous vehicle. For example, see Figure 7b , Figure 7bThe rear vehicle route represents the route of the candidate vehicle, and the front vehicle route represents the route of the vehicle preceding the candidate vehicle. The first detection position of the downstream driving data of the candidate vehicle is point C. At this time, the distance between the candidate vehicle and the preceding vehicle (i.e., the distance from the first detection position to the preceding vehicle) is the distance between point C and point D.

[0122] If the distance between the candidate vehicle and the previous vehicle at the time of the first detection of the downstream driving data is greater than the second distance threshold, or there is no previous vehicle of the candidate vehicle, it is considered that the vehicle enters the target section from the surrounding fork road of the target section, that is, the upstream driving data of the candidate vehicle is not detected because the candidate vehicle has not entered the target section, and the upstream driving data of the candidate vehicle is not detected due to obstruction by the preceding vehicle. In this case, there is no need to reconstruct the data of the candidate vehicle.

[0123] If the distance between the candidate vehicle and the previous vehicle at the time of the first detection of the downstream driving data is not greater than the second distance threshold, it means that the upstream driving data of the candidate vehicle was not detected due to obstruction by the preceding vehicle, and the candidate vehicle is determined to be the second vehicle whose upstream driving data is missing.

[0124] Based on the above processing, the reason why the vehicle's driving route is missing can be identified. For example, if it is caused by the vehicle leaving the target section, the vehicle not entering the target section, or the vehicle in front blocking the route, then the data of the vehicle whose driving data is missing due to the vehicle leaving the target section or the vehicle not entering the target section can be not reconstructed, which can improve the efficiency of determining the traffic status and avoid reconstructing erroneous driving data, thereby improving the accuracy of determining the traffic status.

[0125] For step S203, due to mutual occlusion between vehicles, the same vehicle may be detected as two vehicles, and the identification (i.e., ID) of the vehicle during driving will change, and the first vehicle and the second vehicle may be the same vehicle. When the first vehicle and the second vehicle are the same vehicle, the driving data of the vehicle includes: the upstream driving data and reconstructed driving data of the first vehicle, and the downstream driving data and reconstructed driving data of the second vehicle. The reconstructed driving data of the first vehicle is the downstream driving data of the vehicle, and the reconstructed driving data of the second vehicle is the upstream driving data of the vehicle, and the driving data of the vehicle contains repeated driving data. Therefore, it is necessary to merge the upstream driving data and reconstructed driving data of the first vehicle, and the downstream driving data and reconstructed driving data of the second vehicle to determine the complete driving data of the vehicle.

[0126] In some embodiments, Figure 2 Based on Figure 8 , step S203 may include the following steps:

[0127] S2031: Determine a combined time period for driving data from the target time period.

[0128] The merged time period is the time period to which the reconstructed driving data belongs.

[0129] S2032: For each moment in the merged time period, calculate the weighted sum of the speed of the first vehicle and the speed of the second vehicle at that moment, and calculate the weighted sum of the position of the first vehicle in the target section and the position of the second vehicle in the target section at that moment to obtain the merged driving data of the vehicle.

[0130] S2033: Determine the upstream driving data of the first vehicle, the downstream driving data of the second vehicle, and merge the driving data to obtain complete driving data of the vehicle in the target road section.

[0131] If the accuracy of the driving data of the vehicle directly detected by the detection device is high, the original detected driving data is retained, and the time period in the target time period in which the detection device directly detects the driving data is determined as the retained time period, and the retained time period includes the time period to which the upstream driving data of the first vehicle belongs, and the time period to which the downstream driving data of the second vehicle belongs. And the merged time period of the driving data of the time period to which the reconstructed driving data belongs in the target time period is determined. If there is no driving data detected by the detection device in the merged time period, it is necessary to determine the merged driving data based on the reconstructed driving data.

[0132] For each moment in the merged time period, the weighted sum of the speed of the first vehicle and the speed of the second vehicle at that moment is calculated, and the weighted sum of the position of the first vehicle in the target section and the position of the second vehicle in the target section at that moment is calculated to obtain the merged driving data of the vehicle at that moment. Then, the driving data of the reserved time period and the driving data of the merged time period are determined, that is, the upstream driving data of the first vehicle, the downstream driving data of the second vehicle, and the merged driving data are determined to obtain the complete driving data of the vehicle.

[0133] In some embodiments, for each moment in the merged time period, the weight of the first vehicle and the weight of the second vehicle at that moment can also be determined. Accordingly, before step S2032, the method may also include the following steps: for each moment in the merged time period, based on the moment of the last detection point in the upstream driving data of the first vehicle, and the moment of the first detection point in the downstream driving data of the second vehicle and a preset formula, calculate the weight of the first vehicle and the weight of the second vehicle at that moment.

[0134] (11);

[0135] (12);

[0136] represents the weight of the first vehicle at the i-th moment; represents the weight of the second vehicle at the i-th moment; represents the i-th moment in the merged time period; represents the time of the last detection point in the upstream travel data of the first vehicle; Indicates the time of the first detection point in the downstream travel data of the second vehicle.

[0137] For example, see Figure 9a , the reserved segment is the reserved time period, and the merged segment is the merged time period. The preceding vehicle route is the driving route of the reference vehicle before the vehicle. The following vehicle route is the driving route of the vehicle. In the driving route of the vehicle, the solid line represents the driving route detected by the detection device, and the dotted line represents the reconstructed driving route. Figure 9a As can be seen from , the reconstructed downstream driving route of the vehicle is from point A to the rear, and the reconstructed upstream driving route of the vehicle is from point B to the front. The last detection point in the upstream driving route of the vehicle is point A (tail position A), and the distance between the vehicle at point A and the stop line of the target section (the distance of the tail position A) is recorded as , the time when the vehicle is at point A (the time when the tail position is A) is recorded as , the speed of the vehicle at point A (the speed of the tail position A) is recorded as The first detection point in the downstream driving route of the vehicle is point B (first position B), and the distance between the vehicle at point B and the stop line of the target section (the distance of the first position B) is recorded as , the time when the vehicle is at point B (the time of the first position B) is recorded as , the speed of the vehicle at point B (the speed at the first position B) is recorded as .

[0138] Accordingly, for each moment in the merged time period (such as (Time i)), the weight of the first vehicle at this time is expressed as the above formula (11), and the weight of the second vehicle at this time is expressed as the above formula (12).

[0139] See also Figure 9b , the position of the first vehicle at that time (time i) (position A at time i) is recorded as , the speed of the first vehicle at that moment (speed A at moment i) is recorded as The position of the second vehicle at this time (position B at time i) is recorded as , the speed of the second vehicle at this moment (speed B at moment i) is recorded as . Accordingly, the position of the vehicle at this moment is expressed as the following formula (13), and the speed of the vehicle at this moment is expressed as the following formula (14).

[0140] (13);

[0141] (14);

[0142] represents the position of the vehicle at time i (i.e., the distance between the vehicle and the stop line of the target road section at time i (the distance at time i)); represents the speed of the vehicle at time i (speed at time i).

[0143] Furthermore, based on the above formulas (13) and (14), the position and speed of the vehicle at each moment in the combined time period can be calculated, and the combined driving data of the vehicle can be obtained.

[0144] Based on the above processing, the upstream driving data and the downstream driving data of the vehicle detected by the detection equipment are retained, and the merged driving data of the vehicle is determined based on the reconstructed driving data to determine the complete driving data of the vehicle, thereby improving the accuracy of the determined complete driving data of the vehicle and further improving the accuracy of determining the traffic status.

[0145] In some embodiments, Re-id is required before data reconstruction. Accordingly, before step S203, the method may include the following steps: determining the first vehicle that has not been matched according to the time sequence of each vehicle entering the target section. When the driving data of the first vehicle and the second vehicle to be compared meet the first preset condition, determine that the first vehicle and the second vehicle are the same vehicle, and return to the step of determining the first vehicle that has not been matched according to the time sequence of each vehicle entering the target section until the matching of each vehicle in the target section is completed. Among them, the second vehicle to be compared includes: the vehicle located after the first vehicle according to the time sequence of each vehicle entering the target section; the first preset condition includes:

[0146] (15);

[0147] (16);

[0148] (17);

[0149] (18);

[0150] (19);

[0151] Indicates that the first vehicle is The distance between the time and the stop line of the target road section; Indicates that the second vehicle is The distance between the time and the stop line of the target road section; represents the time of the last detection point in the upstream travel data of the first vehicle; represents the time of the first detection point in the downstream travel data of the second vehicle; Indicates the type of the first vehicle; Indicates the type of the second vehicle; Indicates that the first vehicle is The speed of the moment; Indicates that the second vehicle is The speed of the moment; Indicates the first speed threshold.

[0152] For each vehicle, the time when the vehicle enters the target road section is the time of the first detection point in the complete driving data of the vehicle. Accordingly, the vehicles are sorted according to the time sequence of each vehicle entering the target road section, and the first vehicle that has not been matched is determined from the sorted vehicles. The first vehicle that has not been matched is a vehicle that has not been determined to be the same as the other vehicle, and the second vehicle to be compared is determined after the first vehicle.

[0153] Then, it is determined whether there is a vehicle identical to the first vehicle. Accordingly, after determining that the first vehicle is not matched, the method may further include the following steps: when the first vehicle satisfies a second preset condition, it is determined that there is no vehicle identical to the first vehicle.

[0154] The second preset condition includes any one of the following: the first vehicle drives out of the target road section;

[0155] The last detection point in the upstream travel data of the first vehicle is located between the first detection point and the last detection point in the downstream travel data of the second vehicle;

[0156] The reference speed of the first vehicle is less than the second speed threshold, and there is no vehicle downstream of the first vehicle; the reference speed of the first vehicle is: ; Indicates that the first vehicle is The distance between the time and the stop line of the target road section; Indicates that the second vehicle is The distance between the time and the stop line of the target road section; represents the time of the last detection point in the upstream travel data of the first vehicle; represents the time of the first detection point in the downstream travel data of the second vehicle;

[0157] The reference speed of the first vehicle is less than a third speed threshold and less than a fourth speed threshold; the third speed threshold is determined based on the speed of the last detection point of the first vehicle; the fourth speed threshold is determined based on the speed of the first detection point of the second vehicle.

[0158] If the first vehicle has exited the target road section, indicating that there is no vehicle identical to the first vehicle among the vehicles following the first vehicle, it is determined that there is no vehicle identical to the first vehicle.

[0159] If the last detection point in the upstream driving data of the first vehicle is located between the first detection point and the last detection point in the downstream driving data of the second vehicle, it indicates that the driving data of the first vehicle and the second vehicle at the same time are different. If the first vehicle and the second vehicle are the same vehicle, the driving data of the first vehicle and the second vehicle at the same time should be the same. In this case, the first vehicle and the second vehicle are not the same vehicle, and it is determined that there is no vehicle identical to the first vehicle.

[0160] The reference speed of the first vehicle is less than the second speed threshold, and there is no vehicle downstream of the first vehicle, indicating that the first vehicle is not blocked by other vehicles, and there will be no problem of ID change, and it is determined that there is no vehicle identical to the first vehicle.

[0161] The third speed threshold is the difference between the speed of the last detection point of the first vehicle and a preset value. The fourth speed threshold is the difference between the speed of the first detection point of the second vehicle and a preset value. The reference speed of the first vehicle is less than the third speed threshold and less than the fourth speed threshold, indicating that the speed change of the first vehicle is abnormal according to the situation that the first vehicle and the second vehicle are the same vehicle, and the first vehicle and the second vehicle are not the same vehicle, and it is determined that there is no vehicle identical to the first vehicle.

[0162] When the first vehicle does not meet the second preset condition, it indicates that the first vehicle and the second vehicle have potential matching, and then the first vehicle and the second vehicle are further detected from the aspects of position matching, time matching, type matching, and speed matching to determine whether they are the same vehicle. Whether different route segments belong to the same vehicle.

[0163] For example, see Fig.10 , the distance between the last detection point (i.e., the last recorded point position A) in the upstream driving data of the first vehicle and the stop line of the target section (the distance of the tail position A) is recorded as , the time of the last detection point in the upstream driving data of the first vehicle (the time of the tail position A) is recorded as , the speed of the last detection point in the upstream driving data of the first vehicle (the speed of the tail position A) is recorded as , the type of the first vehicle is recorded as .

[0164] The distance between the first detection point (i.e., the first detection point position B) in the downstream driving data of the second vehicle and the stop line of the target section (the distance of the first position B) is recorded as , the time of the first detection point in the downstream travel data of the second vehicle (the time of the first position B) is recorded as , the speed of the first detection point in the downstream driving data of the second vehicle (the speed of the first position B) is recorded as , the type of the second vehicle is recorded as .

[0165] The position matching degree of the first vehicle and the second vehicle is detected by the above formula (15), the time matching degree of the first vehicle and the second vehicle is detected by the above formula (16), the type matching degree of the first vehicle and the second vehicle is detected by the above formula (17), and the speed matching degree of the first vehicle and the second vehicle is detected by the above formula (18) and formula (19).

[0166] When the above formulas (15) to (19) are satisfied (i.e., when the first preset condition is satisfied), it is determined that the position matching degree, time matching degree, type matching degree, and speed matching degree of the first vehicle and the second vehicle are all high, and it is determined that the first vehicle and the second vehicle are the same vehicle.

[0167] Based on the above processing, it is possible to determine the situation where the same vehicle is detected as two vehicles due to mutual occlusion between vehicles, and restore the IDs of different driving data belonging to the same vehicle to be consistent, thereby reducing the impact of changes in vehicle IDs on subsequent determination of traffic status and improving the accuracy of determining traffic status.

[0168] In some embodiments, after each vehicle is re-ided, a reference vehicle before the vehicle whose driving data is missing may be determined in the following manner. For each vehicle, if the driving data of the vehicle overlaps with that of another vehicle in time, that is, the driving data of the two vehicles include driving data in the same time period, then the order of the two vehicles is determined based on the driving data that overlaps in time. Specifically, the average value of the distance between the vehicle and the stop line of the target road section in the overlapping time period is calculated. If the average value of one vehicle is greater than the average value of another vehicle, then the vehicle with the larger average value is determined to be the following vehicle, and the vehicle with the smaller average value is determined to be the leading vehicle (i.e., the reference vehicle).

[0169] If the driving data of the vehicle overlaps with another vehicle in space, that is, there are detection points with the same distance as the stop line of the target road section in the driving data of the two vehicles, the order of the two vehicles is determined based on the spatially overlapping driving data. Specifically, the average value of the time of the detection points with the same distance as the stop line of the target road section is calculated. If the average value of one vehicle is greater than the average value of the other vehicle, the vehicle with the larger average value is determined to be the rear vehicle, and the vehicle with the smaller average value is determined to be the front vehicle (i.e., the reference vehicle).

[0170] If the driving data of the vehicle and another vehicle do not overlap in time and space, a third-party vehicle that overlaps with the two vehicles in space is determined from each vehicle, and the two vehicles are compared with the third-party vehicle to determine the order of the two vehicles with the third-party vehicle. Then, the vehicle that is earlier than the third-party vehicle is determined as the leading vehicle, and the vehicle that is later than the third-party vehicle is determined as the trailing vehicle. If there is no third-party vehicle that meets the conditions, the time of the first detection point of the vehicle is directly compared with the time of the last detection point of the other vehicle. If the time of the first detection point of the vehicle is later than the time of the last detection point with the other vehicle, the vehicle is determined to be the trailing vehicle and the other vehicle is the leading vehicle.

[0171] In some embodiments, Figure 2 Based on Fig.11 , step S204 may include the following steps:

[0172] S2041: Performing spatiotemporal segmentation on the target time period and target road section to obtain a plurality of spatiotemporal units.

[0173] Among them, a space-time unit represents a sub-section in a sub-time period.

[0174] S2042: Divide the complete driving data of each vehicle in the target road section within the target time period according to the number of time-space units to obtain the driving data of the vehicle in each time-space unit.

[0175] S2043: For each first space-time unit, calculate the average of the speeds of the vehicles in the first space-time unit at different times, and obtain the target travel speed of the vehicles in the sub-section within the sub-time period corresponding to the first space-time unit.

[0176] Among them, the first space-time unit is a space-time unit in which the vehicle exists.

[0177] S2044: Calculate the vehicle flow of each space-time unit based on the driving data of the vehicles in each space-time unit.

[0178] The vehicle flow of a space-time unit includes: the number of vehicles leaving the sub-section in the sub-time period corresponding to the space-time unit.

[0179] S2045: Determine a target travel speed of vehicles in the sub-segment within the sub-time period corresponding to the second space-time unit based on the vehicle flow of each space-time unit.

[0180] The second space-time unit is a space-time unit in which no vehicle exists.

[0181] The electronic device performs time-space segmentation on the target time period and target road section to obtain multiple time-space units. For example, if the target road section is 140m and the target time period is 300s, then the target road section is 140m long and the target time period is 300s long. 5s is divided into a time-space unit to obtain multiple time-space units, and a time-space unit represents a sub-segment in a sub-time period. Then, according to the number of time-space units obtained by the division, the driving data of the vehicles in each time-space unit in the complete driving data of each vehicle in the target section in the target time period is determined. For example, see Fig.12 , Fig.12 The horizontal axis represents time, and the vertical axis represents the distance from the stop line of the target section. The target time period and the target section are divided to obtain multiple space-time units. The space-time unit 1201 is recorded as ( The space-time unit is identified by the start time of the corresponding sub-time period ( ) and downstream distance information of the sub-section ( ) In space, the space-time unit 1201 represents the sub-segment from position n+1 to position n, and in time, the space-time unit 1201 represents the sub-time period from time m to time m+1.

[0182] There are detection points of vehicles in the spatiotemporal unit 1201. From the enlarged view of the spatiotemporal unit 1201, it can be seen that the spatiotemporal unit 1201 includes 9 detection points. There are no detection points of vehicles in the spatiotemporal unit 1202, that is, there is no driving data of the vehicle belonging to the spatiotemporal unit.

[0183] For each first spatiotemporal unit (such as spatiotemporal unit 1201) where a vehicle is detected, the average of the speeds of the vehicles at different times in the first spatiotemporal unit is calculated to obtain the target travel speed of the vehicles in the sub-segment within the sub-time period corresponding to the first spatiotemporal unit. Exemplarily, the target travel speed of the vehicles in the sub-segment within the sub-time period corresponding to the first spatiotemporal unit can be expressed as the following formula (20):

[0184] (20);

[0185] Represents space-time unit Target speed of travel; Represents space-time unit The number of vehicle detection points in the space-time unit 1201; for example, . Represents space-time unit The speed of the vehicle at the i-th detection point in .

[0186] For each space-time unit, the number of vehicles leaving the sub-section in the corresponding sub-time period is counted to obtain the vehicle flow of the space-time unit. For the second space-time unit without a detection point, the target speed of the second space-time unit is affected by the number of vehicles entering the space-time unit, that is, the number of vehicles leaving the space-time unit before the space-time unit. The vehicle flow is the number of vehicles leaving the sub-section in the sub-time period corresponding to a space-time unit. Therefore, based on the vehicle flow of each space-time unit, the target speed of vehicles in the sub-section in the sub-time period corresponding to the second space-time unit can be determined.

[0187] In some embodiments, step S2045 may include the following steps: for each second space-time unit, input the identifier of the second space-time unit into a pre-trained speed prediction model to obtain the target speed of vehicles in the sub-segment within the sub-time period corresponding to the second space-time unit. The second space-time unit is a space-time unit in which there is no vehicle; the speed prediction model is obtained by training based on the identifier of the sub-segment within the sub-time period corresponding to each first space-time unit, the target speed, and the vehicle flow of each space-time unit.

[0188] For each second spatiotemporal unit of a detection point where there is no vehicle, the identifier of the second spatiotemporal unit is input into a pre-trained speed prediction model to obtain the target speed of vehicles in the sub-segment within the sub-time period corresponding to the second spatiotemporal unit output by the speed prediction model. The speed prediction model is trained based on the identifier of the sub-segment within the sub-time period corresponding to each first spatiotemporal unit, the target speed, and the vehicle flow rate of each time unit. The training method of the speed prediction model refers to the relevant introduction of the subsequent embodiments.

[0189] For step S205, the traffic information of the target road section includes: the traffic speed of the target road section. The delay information of the target road section includes: the delay index of the target road section. The traffic speed and the delay index can be used to reflect the congestion level of the target road section. In addition, the traffic status of the target road section can also include a congestion time-space diagram of the target road section, which includes the target traffic speed of vehicles in each sub-section in each sub-time period, and the congestion time-space diagram can reflect the traffic situation of the target road section.

[0190] In some embodiments, step S205 may include the following steps: based on the target speed of vehicles in each sub-segment in each sub-time period and a preset formula, the traffic state of the target section in the target time period is calculated. The preset formula is:

[0191] (twenty one);

[0192] delay=max[0, L S L - L v f ] (twenty two);

[0193] Indicates the travel speed of the target road section; Indicates the number of sub-segments; Indicates the number of sub-time periods; represents the target speed of the kth sub-section in the i-th sub-time period; represents the delay index of the target section; max represents the maximum value function; L represents the length of the target section; Indicates the free flow speed when the vehicle is not disturbed by other vehicles.

[0194] The traffic status of the target road section may also include: the passing speed of the sub-road section in the target road section, the vehicle flow of the sub-road section in the target road section, etc. The vehicle flow of the sub-road section in a sub-time period is the number of vehicles leaving the sub-road section. If no vehicle leaves, the vehicle flow in the sub-road section in the sub-time period is determined to be 0.

[0195] In some embodiments, see Fig.13 ,The training method of the speed prediction model includes the following steps:

[0196] S1301: For each first space-time unit, calculate the average of the speeds of vehicles in the first space-time unit at different times to obtain a target travel speed of vehicles in a sub-section within a sub-time period corresponding to the first space-time unit.

[0197] S1302: Input the identifier of each space-time unit into the speed prediction model of the initial structure to obtain the predicted travel speed of each space-time unit.

[0198] S1303: Calculate the function value of the first loss function based on the predicted travel speed and the target travel speed of the first space-time unit.

[0199] S1304: Calculate the function value of the second loss function based on the vehicle flow of each spatiotemporal unit.

[0200] S1305: Based on the function value of the first loss function and the function value of the second loss function, the model parameters of the speed prediction model of the initial structure are adjusted until a preset convergence condition is reached to obtain a trained speed prediction model.

[0201] After dividing the target road section and target time period into multiple time-space units, the first time-space unit where the detection point of the vehicle exists and the second time-space unit where the vehicle does not exist can be determined. For each first time-space unit, the average speed of the vehicle at different times in the first time-space unit is calculated to obtain the target speed of the vehicle in the sub-road section within the sub-time period corresponding to the first time-space unit. In other words, Fig.15 The detection missing congestion space-time map input in step ① of the "Deep Learning" section is a space-time unit. The color of the space-time unit represents the target speed of the space-time unit. The darker the color, the higher the target speed. The white color is the second space-time unit for which the target speed has not been calculated. In addition, for each space-time unit, determine the vehicle flow of the space-time unit, and obtain Fig.15 The multi-section flow rate entered in step ① of the "Knowledge" section.

[0202] Then, the identifier of the first spatiotemporal unit is input into the velocity prediction model of the initial structure. The velocity prediction model of the initial structure is Fig.15 The neural network in step ② in . Fig.14 , Fig.14 The structure diagram of a speed prediction model provided in an embodiment of the present application. The input of the speed prediction model is a space-time unit (ie (x, t)), and the output is the predicted passing speed of the input space-time unit ( ). Fig.14 The dimension of the input layer of the speed prediction model shown is 2, the dimension of each intermediate network layer is 20, and the dimension of the output layer is 1. The dimension of a network layer is the dimension of the data output by the network layer.

[0203] Before inputting the space-time unit identifiers into the velocity prediction model, the space-time unit identifiers can be normalized. For example, the maximum distance in the space-time unit is recorded as , the maximum moment in the space-time unit is recorded as , the minimum distance in the space-time unit is recorded as , the minimum time in the space-time unit is recorded as Correspondingly, the normalized space-time unit identification is expressed as follows:

[0204] (twenty three);

[0205] (twenty four);

[0206] ( , ) represents the label of the spatiotemporal unit before normalization; ( ) represents the normalized identity of the spatiotemporal unit.

[0207] Correspondingly, after the identification of the spatiotemporal unit is input into the speed prediction model, the network layer in the speed prediction model processes the input data and outputs the processing result. The processing method for other network layers except the last network layer (i.e., the output layer) is as follows:

[0208] (25);

[0209] The last network layer (i.e. the output layer) is processed as follows:

[0210] (26);

[0211] in, represents the output of the network layer, Indicates The weight of the input data, Indicates the network layer Input data, Indicates The bias of the input data.

[0212] Correspondingly, the speed prediction model of the initial structure outputs the predicted speed of the first space-time unit. Fig.15 The estimated result in step ③ is the predicted congestion time-space map, in which each time-space unit has a predicted travel speed.

[0213] Then, based on the predicted speed and target speed of the first spatiotemporal unit, the function value of the first loss function is calculated. Fig.15 Step ④ in Calculate the estimated error of the detected speed (i.e., the function value of the first loss function). The first loss function represents the difference between the target speed and the predicted speed of the first spatiotemporal unit, only for the first spatiotemporal unit. The first loss function is:

[0214] (27);

[0215] in, Represents the function value of the first loss function; represents the number of the first space-time unit; represents the target travel speed of the jth first space-time unit; represents the predicted travel speed of the jth first space-time unit; Indicates the starting position of the sub-segment corresponding to the j-th first space-time unit; Indicates the starting time of the sub-time period corresponding to the j-th first space-time unit.

[0216] In addition, based on the vehicle flow of each spatiotemporal unit, the function value of the second loss function is calculated. Fig.15 In step ⑤, the transmission and termination of traffic waves are expressed based on multi-section flow, and the estimated error of the degree of non-satisfaction of traffic flow constancy (i.e., the function value of the second loss function) is calculated. The second loss function represents the error caused by non-compliance with the traffic flow model, for all space-time units.

[0217] For example, see Fig.16 , the number of vehicles in the i-th sub-segment at the k-th time is recorded as , the number of vehicles in the i+1th sub-segment at the kth time is recorded as , the number of vehicles in the i-1th sub-segment at the kth time is recorded as , and the number of vehicles in the i-th sub-segment at the k+1th time is recorded as , the number of vehicles in the i-th sub-segment at the k-1th time is recorded as The number of vehicles entering the i-th sub-segment from the i+1-th sub-segment in the k-th sub-time period is recorded as ,but The number of vehicles entering the i-1th sub-segment from the i-th sub-segment in the k-th sub-time period is recorded as ,but . Indicates Within the sub-period from Sub-section to The flow rate of vehicles entering the sub-segment, i.e. Sub-periods per unit time Sub-section to The number of vehicles entering the sub-segment. represents the flow rate of vehicles entering from the i-th sub-segment to the i-1-th sub-segment in the k-th sub-time period, i.e. Within a sub-period of time Sub-section to -1 The number of vehicles entering a sub-segment.

[0218] According to the law of conservation of traffic flow, the following expression can be obtained:

[0219] (28);

[0220] The above formula (28) indicates that the increase in the number of vehicles in the i-th sub-segment from the k-th sub-time period to the k+1-th sub-time period is equal to the difference between the vehicle flow entering the upstream sub-segment (i+1-th sub-segment) and the vehicle flow leaving the i-th sub-segment.

[0221] If each space-time unit satisfies the law of conservation of traffic flow, then the degree of non-satisfaction of all space-time units with the law of conservation of traffic flow is accumulated, and the second loss function can be expressed as:

[0222] J 2 = 1 N 1∙ N 2 ∑ i=1 N 1 ∑ k=1 N 2 | n ̂ i k+1 - n ̂ i k -[ y ̂ i+1,i k - y ̂ i,i-1 k ] | 2

[0223] = 1 N 1∙ N 2 ∑ i=1 N 1 ∑ k=1 N 2 | ρ ̂ i k+1 - ρ ̂ i k ∆x-[ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t | 2 (29);

[0224] According to the Green shield relationship shown in the following formula (30), the second loss function can be expressed as the following formula (31):

[0225] (30);

[0226] represents the blocking density of vehicles; It represents the blocking density of the ith sub-segment in the kth sub-time period.

[0227] J 2 = 1 N 1∙ N 2 ∑ i=1 N 1 ∑ k=1 N 2 | ρ m v ̂ i k - v ̂ i k+1 v f ∆x-[ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t | 2 (31);

[0228] Represents the function value of the second loss function; Indicates the number of sub-segments; Indicates the number of sub-time periods; Indicates the blocking density of vehicles in the target road segment; represents the target speed of the ith sub-section in the kth sub-time period; represents the target speed of the ith sub-section in the k+1th sub-time period; It indicates the free flow speed when the vehicle is not interfered by other vehicles; Indicates the distance of a sub-segment; Indicates the duration of a sub-time period; represents the flow rate of vehicles entering from the i+1th sub-segment to the ith sub-segment in the kth sub-time period; represents the number of vehicles entering the i-th sub-segment from the i+1-th sub-segment in the k-th sub-time period; represents the flow rate of vehicles entering from the ith sub-segment to the i-1th sub-segment in the kth sub-time period; It represents the number of vehicles entering the i-1th sub-segment from the i-th sub-segment in the k-th sub-time period.

[0229] The weighted sum of the function value of the first loss function and the function value of the second loss function is calculated according to the following formula (32) to obtain the target loss function value. For example, Fig.15 Step ⑥ in Calculate the total error, which is the target loss function value.

[0230] (32);

[0231] J represents the target loss function value; Indicates the preset weight.

[0232] Then, based on the target loss function value, the model parameters of the velocity prediction model of the initial structure are adjusted until the preset convergence conditions are reached to obtain a trained velocity prediction model. Fig.15 In step ⑦, it is determined whether the total error is greater than the threshold. If the total error is greater than the threshold, it indicates that the speed prediction model has not converged. Then, step ⑧ is executed to determine whether to perform more iterations, that is, whether to continue training the speed prediction model. If so, return to step ② to continue training the speed prediction model.

[0233] If the total error is not greater than the threshold, indicating that the speed prediction model has converged, then execute step ⑨. If the speed prediction model is not to be trained further, execute step ⑨ as well, that is, use the trained speed prediction model to determine the target speed of the second space-time unit, and obtain the final result of the congestion space-time map (that is, the target speed of all space-time units). Then execute step ⑩ to determine the traffic status of the target section according to the final result of the congestion space-time map. The traffic status includes the traffic speed and delay index. Traffic speed = avg (congestion space-time map), that is, the average of the target speeds of all space-time units. Delay index = [L / speed, L / vf], where speed is the value in the aforementioned embodiment. (i.e. the traffic speed of the target road section).

[0234] Based on the above processing, the training method of the speed prediction model provided in the embodiment of the present application, compared with the algorithm based on pure machine learning data-driven congestion spatiotemporal graph, directly uses the spatiotemporal unit of the target road section with known traffic speed for training, which can avoid the calibration of a large amount of true value speed data, and does not need to pre-train the model in advance, thereby improving the efficiency of determining the traffic state. Moreover, compared with the algorithm based on the mechanism model to obtain the congestion spatiotemporal graph, this method does not require the boundary (i.e., the boundary of the target road section) and the initial condition (i.e., the driving data of the vehicle at the time of starting detection) to determine the traffic state of the target road section. In addition, the scheme is compatible with the detection error of the radar detector device, because the detected speed true value (i.e., the target traffic speed of the first spatiotemporal unit) inevitably contains dirty data (detection error data), and the traditional traffic mechanism model solution method strongly relies on the indicator detection true value, resulting in low accuracy. The training method of the speed prediction model provided in the embodiment of the present application can combine the distribution of the overall detection data (i.e., the function value of the first loss function) and the constraints of the traffic mechanism model on the data results (i.e., the function value of the second loss function) when encountering partial dirty data, so as to avoid partial dirty data from affecting the final calculation results and improve the accuracy of the speed prediction model.

[0235] See also Fig.17 , Fig.17 A flow chart of a method for determining a traffic state provided in an embodiment of the present application. The method comprises the following steps:

[0236] Step ①: Input: driving data for lane detection.

[0237] In this step, the driving data of the lane detection is the target driving number of each vehicle in the aforementioned embodiment.

[0238] Step ②: Data reconstruction.

[0239] In this step, data reconstruction is to deal with the problem of missing driving data and lost vehicle ID due to vehicle occlusion. Based on the vehicle following model, the vehicle data is reconstructed to determine the complete driving data of the vehicle within the lane detection range.

[0240] See also Fig.18 , Fig.18 A flowchart of data reconstruction provided in an embodiment of the present application. The method comprises the following steps:

[0241] S1801: Data preprocessing.

[0242] Data preprocessing refers to deleting abnormal driving data in the original driving data to obtain the target driving data of each vehicle in the target road section within the target time period.

[0243] S1802: Re-id.

[0244] Re-id is mainly to solve the problem of ID change of the same vehicle caused by mutual occlusion between vehicles, and restore the ID of different driving data belonging to the same vehicle to be consistent. In other words, it determines whether the first vehicle and the second vehicle are the same vehicle.

[0245] S1803: Vehicle following model (forward estimation of vehicle following, backward estimation of vehicle following).

[0246] Forward estimation of vehicle following means reconstructing downstream driving data (reconstructing driving data) of the first vehicle for which downstream driving data is missing. Backward estimation of vehicle following means reconstructing upstream driving data (reconstructing driving data) of the second vehicle for which upstream driving data is missing.

[0247] S1804: Merging segmented data.

[0248] The segmented data merging is to merge the driving data and reconstructed driving data upstream of the first vehicle, and the driving data and reconstructed driving data downstream of the second vehicle, to determine the complete driving data of the vehicle on the target road section.

[0249] Step ③: Time and space division.

[0250] In this step, time-space segmentation refers to dividing the target time period and target road section to obtain multiple time-space units. For example, if the target time period is 5 minutes and the target road section is 140 meters, it can be divided into multiple time-space units according to 10m×1s. Then, according to the speed of the vehicle in the first time-space unit, the target speed of the first time-space unit is calculated.

[0251] Step ④: Deep learning based on physical information.

[0252] In this step, the speed prediction model constructed is trained using the identifier (time and space position) of the first space-time unit as input data and the speed of the first space-time unit as output data. When the loss function of the speed prediction model converges, a trained speed prediction model is obtained. Then, the trained speed prediction model is used to determine the target speed of the second space-time unit.

[0253] Step ⑤: Output: congestion time-space diagram (speed, delay indicators).

[0254] In this step, after determining the target speed of each time-space unit, a complete congestion time-space map is obtained. Then, the average of the target speeds of each time-space unit is calculated to obtain the speed of the target section, and based on the length and free flow speed of the target section, the delay index of the target section is calculated.

[0255] Based on the traffic status determination method provided by the embodiment of the present application, for a vehicle with missing driving data, the reconstructed driving data of the vehicle can be determined, and the complete driving data of the vehicle can be determined based on the acquired upstream driving data, downstream driving data, and reconstructed driving data of the vehicle. Furthermore, by determining the traffic status of the target road section based on the complete driving data of the vehicle, the influence of the incomplete driving data of the vehicle on the determination of the traffic status can be reduced, thereby improving the accuracy of determining the traffic status.

[0256] In some embodiments, the traffic status of the target road segment also includes the traffic status of each sub-road segment of the target road segment.

[0257] For the i-th sub-section from the k-th sub-time period to the k+1-th sub-time period, the following formula (33) is satisfied:

[0258] ρ m v ̂ i k - v ̂ i k+1 v f ∆x-[ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t=0 (33);

[0259] The above formula (33) is expressed as the following formula (34) using speed:

[0260] v ̂ i k+1 = v ̂ i k - [ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t * v f ∆x* ρ m (34);

[0261] It can be seen from the above formula (34) that the speed of the i-th sub-section in the k+1-th sub-time period is affected by the speed of the i-th sub-section in the k-th sub-time period, as well as the vehicles entering the i-th sub-section and the vehicles leaving the i-th sub-section.

[0262] Specifically, it can be divided into the following three situations:

[0263] The first case: the number of vehicles in the i-th sub-segment increases. ,but [ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t * v f ∆x* ρ m >0 , then the speed of the i-th sub-section in the k+1-th sub-time period is It decreases, indicating that the traffic status of the i-th sub-section in the k+1-th sub-time period becomes worse.

[0264] The second case: the number of vehicles on the i-th sub-segment decreases. ,but [ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t * v f ∆x* ρ m <0 , then the speed of the i-th sub-section in the k+1-th sub-time period is Increases, when the number of vehicles entering the i-th sub-segment Compared with the number of vehicles leaving the i-th sub-segment If it is small enough, then the speed of the i-th sub-section in the k+1-th sub-time period The maximum value can be , that is, the i-th sub-section is in a free flow state in the k+1-th sub-time period, that is, the traffic state of the i-th sub-section in the k+1-th sub-time period is smooth.

[0265] The third case: the number of vehicles in the i-th sub-segment remains unchanged. ,but [ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t * v f ∆x* ρ m =0 , the speed of the ith sub-section in the k+1th sub-time period Remains unchanged, indicating that the traffic status of the i-th sub-section remains unchanged in the k+1-th sub-time period.

[0266] As can be seen from the above, the traffic state determination method provided in the embodiment of the present application can identify whether the location where the traffic speed is missing in the congestion space-time diagram (i.e., the second space-time unit) is a real free flow state without vehicles, or a non-free flow state but the detection device fails to detect it. By combining the traffic flow conservation model and the multi-section flow obtained by data reconstruction, the traffic speed at the location where the traffic speed is missing (i.e., the second space-time unit) can be inferred from the traffic speed at the known location (i.e., the first space-time unit), and then the traffic state of the unknown area can be determined, and the sub-section of the free flow state without vehicles can be determined. That is, even if the detection device does not detect the traffic state information of the target section, it can determine which sub-section in which sub-time period is in a free flow state.

[0267] In the technical solution of the present application, operations such as acquisition, storage, use, processing, transmission, provision and disclosure of vehicle data are all carried out with the user's authorization.

[0268] See also Fig.19 , Fig.19 A structural diagram of a traffic status determination device provided in an embodiment of the present application, the device comprising:

[0269] The driving data acquisition module 1901 is used to acquire target driving data of each vehicle in a target road section within a target time period; wherein the target driving data includes: vehicle identification, identification of the lane where the vehicle is located, each detection point of the vehicle in the target road section, speed of the vehicle at each detection point in the target road section, and type of vehicle;

[0270] A driving data reconstruction module 1902 is used to calculate the missing driving data of a vehicle with missing driving data based on the complete driving data of a reference vehicle before the vehicle, so as to obtain the reconstructed driving data of the vehicle;

[0271] The driving data merging module 1903 is used to determine the complete driving data of the vehicle on the target road section based on the upstream driving data and the reconstructed driving data of the first vehicle and the downstream driving data and the reconstructed driving data of the second vehicle when the first vehicle and the second vehicle are the same vehicle; wherein the first vehicle is a vehicle with missing downstream driving data; and the second vehicle is a vehicle with missing upstream driving data;

[0272] The speed determination module 1904 is used to calculate the target speed of vehicles in the sub-segment in each sub-time period based on the complete driving data of each vehicle in the target section in the target time period; wherein the sub-time period and the sub-segment are obtained by dividing the target time period and the target section;

[0273] The traffic status determination module 1905 is used to determine the traffic status of the target road section within the target time period based on the target travel speed of the vehicles in each sub-road section within each sub-time period; wherein the traffic status includes the travel speed information of the vehicles in the target road section and the delay information of the target road section.

[0274] Optionally, the driving data reconstruction module 1902 is specifically used to calculate, for a first moment when the downstream driving data of the first vehicle is missing, the speed of the first vehicle at the first moment, the position of the first vehicle in the target section, the speed of the reference vehicle, and the position of the reference vehicle in the target section, until a first stop condition is met, to obtain the reconstructed driving data of the first vehicle; wherein the first stop condition is: the distance between the first vehicle and the stop line of the target section is not greater than 0;

[0275] For the second moment when the upstream driving data of the second vehicle is missing, an objective function is constructed based on the speed of the second vehicle at the next moment after the second moment, the position of the second vehicle in the target road section, the speed of the reference vehicle, and the position of the reference vehicle in the target road section; wherein the objective function is: a functional relationship between the speed of the second vehicle at different moments, the position of the second vehicle in the target road section, and a target difference; the target difference represents: a difference between the reconstructed first position of the reference vehicle and the second position of the reference vehicle in the target driving data at the same moment;

[0276] For the second moment when the upstream driving data of the second vehicle is missing, the speed of the second vehicle at the second moment when the objective function takes a minimum value and the position of the second vehicle in the target section are calculated until a second stop condition is reached to obtain the reconstructed driving data of the second vehicle; wherein the second stop condition is: the distance between the second vehicle and the stop line of the target section is greater than a target distance, and the target distance is the maximum value of the farthest detection distance of the detection equipment and the maximum distance of the reference vehicle from the stop line of the target section; or, the second stop condition is: the upstream driving data of the reference vehicle is terminated.

[0277] Optionally, the device further comprises:

[0278] A vehicle determination module is used to determine, from among the vehicles on the target road section, candidate vehicles with missing driving data downstream and candidate vehicles with missing driving data upstream before the driving data reconstruction module 1902 executes the calculation of the missing driving data of the vehicle based on the complete driving data of the reference vehicle before the vehicle to obtain the reconstructed driving data of the vehicle for the vehicle with missing driving data; for each candidate vehicle with missing driving data, if the distance between the last detection point in the upstream driving data of the candidate vehicle and the previous vehicle is not greater than a first distance threshold, determine that the candidate vehicle is the first vehicle with missing driving data downstream; if the distance between the first detection point in the downstream driving data of the candidate vehicle and the previous vehicle is not greater than a second distance threshold, determine that the candidate vehicle is the second vehicle with missing driving data upstream.

[0279] Optionally, the device further comprises:

[0280] The first vehicle matching module is used for determining, before the complete driving data of the target road section, the first vehicle and the second vehicle are the same vehicle, based on the upstream driving data and reconstructed driving data of the first vehicle and the downstream driving data and reconstructed driving data of the second vehicle, when the driving data merging module 1903 is executed, the first vehicle that has not been matched is determined according to the time sequence of each vehicle entering the target road section; when the driving data of the first vehicle and the second vehicle to be compared meet the first preset condition, determining that the first vehicle and the second vehicle are the same vehicle, and returning to the step of determining the first vehicle that has not been matched according to the time sequence of each vehicle entering the target road section, until the matching of each vehicle in the target road section is completed; wherein the second vehicle to be compared includes: a vehicle located after the first vehicle according to the time sequence of each vehicle entering the target road section; the first preset condition includes:

[0281] ;

[0282] ;

[0283] ;

[0284] ;

[0285] ;

[0286] Indicates that the first vehicle is The distance between the time and the stop line of the target road section; Indicates that the second vehicle is The distance between the time and the stop line of the target road section; represents the time of the last detection point in the upstream travel data of the first vehicle; represents the time of the first detection point in the downstream travel data of the second vehicle; indicating the type of the first vehicle; indicating the type of the second vehicle; Indicates that the first vehicle is The speed of the moment; Indicates that the second vehicle is The speed of the moment; Indicates the first speed threshold.

[0287] Optionally, the device further comprises:

[0288] The second vehicle matching module is configured to determine that there is no vehicle identical to the first vehicle when the first vehicle satisfies a second preset condition after the first vehicle matching module determines that an unmatched first vehicle is present according to the time sequence of each vehicle entering the target road section; wherein the second preset condition includes any one of the following:

[0289] The first vehicle drives out of the target road section;

[0290] The last detection point in the upstream travel data of the first vehicle is located between the first detection point and the last detection point in the downstream travel data of the second vehicle;

[0291] The reference speed of the first vehicle is less than the second speed threshold, and there is no vehicle downstream of the first vehicle; the reference speed of the first vehicle is: ; Indicates that the first vehicle is The distance between the time and the stop line of the target road section; Indicates that the second vehicle is The distance between the time and the stop line of the target road section; represents the time of the last detection point in the upstream travel data of the first vehicle; represents the time of the first detection point in the downstream travel data of the second vehicle;

[0292] The reference speed of the first vehicle is less than a third speed threshold and less than a fourth speed threshold; the third speed threshold is determined based on the speed of the last detection point of the first vehicle; and the fourth speed threshold is determined based on the speed of the first detection point of the second vehicle.

[0293] Optionally, the driving data merging module 1903 is specifically used to determine a merged time period for driving data from the target time period; wherein the merged time period is the time period to which the reconstructed driving data belongs; for each moment in the merged time period, a weighted sum of the speed of the first vehicle and the speed of the second vehicle at that moment is calculated, and a weighted sum of the position of the first vehicle in the target section and the position of the second vehicle in the target section at that moment is calculated to obtain merged driving data of the vehicle; the upstream driving data of the first vehicle, the downstream driving data of the second vehicle, and the merged driving data are determined to obtain complete driving data of the vehicle in the target section.

[0294] Optionally, the device further comprises:

[0295] a weight determination module, configured to calculate, for each moment in the merged time period, in the driving data merging module 1903, a weighted sum of the speed of the first vehicle and the speed of the second vehicle at that moment, and a weighted sum of the position of the first vehicle in the target road section and the position of the second vehicle in the target road section at that moment, and to calculate, for each moment in the merged time period, a weight of the first vehicle and a weight of the second vehicle at that moment based on the moment of the last detection point in the upstream driving data of the first vehicle, the moment of the first detection point in the downstream driving data of the second vehicle and a preset formula before obtaining the merged driving data of the vehicle;

[0296] ;

[0297] ;

[0298] represents the weight of the first vehicle at the i-th moment; represents the weight of the second vehicle at the i-th moment; represents the i-th moment in the merged time period; represents the time of the last detection point in the upstream travel data of the first vehicle; Indicates the time of the first detection point in the downstream travel data of the second vehicle.

[0299] Optionally, the speed determination module 1904 is specifically used to perform spatiotemporal segmentation on the target time period and the target road section to obtain multiple spatiotemporal units; wherein one spatiotemporal unit represents a sub-road section within a sub-time period; according to the number of spatiotemporal units, the complete driving data of each vehicle in the target road section within the target time period is divided to obtain the driving data of the vehicles in each spatiotemporal unit; for each first spatiotemporal unit, the average speed of the vehicles in the first spatiotemporal unit at different times is calculated to obtain the target speed of the vehicles in the sub-road section within the sub-time period corresponding to the first spatiotemporal unit; wherein the first spatiotemporal unit is a spatiotemporal unit in which vehicles exist; based on the driving data of the vehicles in each spatiotemporal unit, the vehicle flow of each spatiotemporal unit is calculated; wherein the vehicle flow of one spatiotemporal unit includes: the number of vehicles leaving the sub-road section within the sub-time period corresponding to the spatiotemporal unit; based on the vehicle flow of each spatiotemporal unit, the target speed of the vehicles in the sub-road section within the sub-time period corresponding to the second spatiotemporal unit is determined; wherein the second spatiotemporal unit is a spatiotemporal unit in which no vehicles exist.

[0300] Optionally, the speed determination module 1904 is specifically used to input the identifier of each second space-time unit into a pre-trained speed prediction model to obtain a target speed of vehicles in the sub-section within the sub-time period corresponding to the second space-time unit; wherein the second space-time unit is a space-time unit in which no vehicles exist; and the speed prediction model is trained based on the identifier of the sub-section within the sub-time period corresponding to each first space-time unit and the target speed.

[0301] Optionally, the device further comprises:

[0302] The speed prediction model training module is used to calculate the average speed of vehicles in each first space-time unit at different times, and obtain the target speed of vehicles in the sub-section within the sub-time period corresponding to the first space-time unit; input the identifier of each space-time unit into the speed prediction model of the initial structure to obtain the predicted speed of each space-time unit; calculate the function value of the first loss function based on the predicted speed and the target speed of the first space-time unit; calculate the function value of the second loss function based on the vehicle flow of each space-time unit; adjust the model parameters of the speed prediction model of the initial structure based on the function value of the first loss function and the function value of the second loss function until the preset convergence condition is reached to obtain a trained speed prediction model.

[0303] Optionally, the first loss function is:

[0304] ;

[0305] in, represents the function value of the first loss function; represents the number of the first space-time unit; represents the target travel speed of the jth first space-time unit; represents the predicted travel speed of the jth first space-time unit; Indicates the starting position of the sub-segment corresponding to the j-th first space-time unit; represents the starting time of the sub-time period corresponding to the j-th first space-time unit;

[0306] The second loss function is:

[0307] J 2 = 1 N 1∙ N 2 ∑ i=1 N 1 ∑ k=1 N 2 | ρ m v ̂ i k - v ̂ i k+1 v f ∆x-[ q ̂ i+1,i k - q ̂ i,i-1 k ]∆t | 2 ;

[0308] Represents the function value of the second loss function; Indicates the number of sub-segments; Indicates the number of sub-time periods; Indicates the blocking density of vehicles in the target road segment; represents the target speed of the ith sub-section in the kth sub-time period; represents the target speed of the ith sub-section in the k+1th sub-time period; It indicates the free flow speed when the vehicle is not interfered by other vehicles; Indicates the distance of a sub-segment; Indicates the duration of a sub-time period; represents the flow rate of vehicles entering from the i+1th sub-segment to the ith sub-segment in the kth sub-time period; represents the number of vehicles entering the i-th sub-segment from the i+1-th sub-segment in the k-th sub-time period; represents the flow rate of vehicles entering from the ith sub-segment to the i-1th sub-segment in the kth sub-time period; It represents the number of vehicles entering the i-1th sub-segment from the i-th sub-segment in the k-th sub-time period.

[0309] Optionally, the traffic state determination module 1905 is specifically configured to calculate the traffic state of the target road section in the target time period based on the target traffic speed of the vehicles in each sub-road section in each sub-time period and a preset formula; wherein the preset formula is:

[0310] ;

[0311] delay=max[0, L S L - L v f ] ;

[0312] Indicates the travel speed of the target road section; Indicates the number of sub-segments; Indicates the number of sub-time periods; represents the target speed of the kth sub-section in the i-th sub-time period; represents the delay index of the target road section; max represents the maximum value function; L represents the length of the target road section; Indicates the free flow speed when the vehicle is not disturbed by other vehicles.

[0313] Optionally, the driving data acquisition module 1901 is specifically used to obtain the original driving data of each vehicle in the target section within the target time period from the detection equipment; determine the other driving data in the original driving data except the abnormal driving data, and obtain the target driving data of each vehicle in the target section within the target time period; wherein the abnormal driving data includes: driving data of non-motor vehicles, driving data of vehicles driving in the opposite direction, driving data of vehicles with a number of detection points less than a preset number, and driving data of vehicles with abnormal changes in detection points.

[0314] Based on the traffic status determination device provided by the embodiment of the present application, for a vehicle with missing driving data, the reconstructed driving data of the vehicle can be determined, and the complete driving data of the vehicle can be determined based on the acquired upstream driving data, downstream driving data, and reconstructed driving data of the vehicle. Furthermore, by determining the traffic status of the target road section based on the complete driving data of the vehicle, the influence of the incomplete driving data of the vehicle on the determination of the traffic status can be reduced, thereby improving the accuracy of determining the traffic status.

[0315] The present application also provides an electronic device, such as Fig. 20 As shown, it includes: a memory 2001 for storing computer programs; a processor 2002 for executing the program stored in the memory 2001 to implement the following steps:

[0316] Obtain target driving data of each vehicle in a target road section within a target time period; wherein the target driving data includes: vehicle identification, identification of the lane where the vehicle is located, each detection point of the vehicle in the target road section, speed of the vehicle at each detection point in the target road section, and type of vehicle; for a vehicle with missing driving data, calculate the missing driving data of the vehicle based on the complete driving data of a reference vehicle before the vehicle to obtain the reconstructed driving data of the vehicle; when a first vehicle and a second vehicle are the same vehicle, determine the vehicle on the target road section based on the upstream driving data and reconstructed driving data of the first vehicle, and the downstream driving data and reconstructed driving data of the second vehicle The target time period comprises a target speed of the vehicle in the sub-segment within the target time period; the target time period comprises a target road section comprising a target road section and a target vehicle; the target time period comprises a target road section comprising a target road section and a target vehicle; the target time period comprises a target road section comprising a target road section and a target vehicle; the target time period comprises a target road section comprising a target road section and a target vehicle; the target road section comprises a target road section comprising a target road section and a target vehicle; the target road section comprises a target road section comprising a target road section and a target road section; the target road section comprises a target road section comprising a target road section and a target road section; the target road section comprises a target road section comprising a target road section and a target road section; the target road section comprises a target road section comprising a target road section and a target road section; the target road section comprises a target road section comprising a target road section and a target road section; the target road section comprises a target road section comprising a target road section and a target road section; the target road section comprises a target road section comprising a target road section comprising a target road section; the target road section comprises ...

[0317] In addition, the electronic device may further include a communication bus and / or a communication interface, and the processor 2002, the communication interface, and the memory 2001 communicate with each other through the communication bus. The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the electronic device and other devices. The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0318] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned traffic status determination methods are implemented.

[0319] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the traffic status determination methods in the above embodiments.

[0320] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0321] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0322] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0323] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A method for determining a traffic state, characterized in that: The method comprises: Obtaining target driving data of each vehicle in a target road section within a target time period; wherein the target driving data includes: vehicle identification, identification of the lane where the vehicle is located, each detection point of the vehicle in the target road section, speed of the vehicle at each detection point in the target road section, and type of vehicle; For a vehicle with missing driving data, the missing driving data of the vehicle is calculated based on the complete driving data of a reference vehicle before the vehicle to obtain the reconstructed driving data of the vehicle; When the first vehicle and the second vehicle are the same vehicle, based on the upstream driving data and the reconstructed driving data of the first vehicle, and the downstream driving data and the reconstructed driving data of the second vehicle, the complete driving data of the vehicle on the target road section is determined; wherein the first vehicle is a vehicle with missing downstream driving data; and the second vehicle is a vehicle with missing upstream driving data; Based on the complete driving data of each vehicle in the target road section within the target time period, the target travel speed of the vehicle in the sub-road section within each sub-time period is calculated; wherein the sub-time period and the sub-road section are obtained by dividing the target time period and the target road section; Based on the target travel speed of vehicles in each sub-road section in each sub-time period, determine the traffic state of the target road section in the target time period; wherein the traffic state includes the travel speed information of vehicles in the target road section and the delay information of the target road section; When the first vehicle and the second vehicle are the same vehicle, before determining the complete driving data of the vehicle on the target road section based on the upstream driving data and the reconstructed driving data of the first vehicle and the downstream driving data and the reconstructed driving data of the second vehicle, the method further includes: Determine the first vehicle that has not been matched according to the time sequence of each vehicle entering the target road section; When the driving data of the first vehicle and the second vehicle to be compared meet the first preset condition, it is determined that the first vehicle and the second vehicle are the same vehicle, and the step of determining the first vehicle that has not been matched is returned to the execution according to the time sequence of each vehicle entering the target section until the matching of each vehicle in the target section is completed; wherein the second vehicle to be compared includes: a vehicle located after the first vehicle according to the time sequence of each vehicle entering the target section; the first preset condition includes: ; ; ; ; ; Indicates that the first vehicle is The distance between the time and the stop line of the target road section; Indicates that the second vehicle is The distance between the time and the stop line of the target road section; represents the time of the last detection point in the upstream travel data of the first vehicle; represents the time of the first detection point in the downstream travel data of the second vehicle; indicating the type of the first vehicle; indicating the type of the second vehicle; Indicates that the first vehicle is The speed of the moment; Indicates that the second vehicle is The speed of the moment; Indicates the first speed threshold.

2. The method according to claim 1, characterized in that The method of calculating the missing driving data of a vehicle with missing driving data based on the complete driving data of a reference vehicle before the vehicle to obtain the reconstructed driving data of the vehicle includes: For a first moment when downstream driving data of a first vehicle is missing, based on the speed of the first vehicle at a moment before the first moment, the position of the first vehicle in the target road section, the speed of the reference vehicle, and the position of the reference vehicle in the target road section, the speed of the first vehicle at the first moment and the position of the first vehicle in the target road section are calculated until a first stop condition is met, thereby obtaining reconstructed driving data of the first vehicle; wherein the first stop condition is that a distance between the first vehicle and a stop line of the target road section is not greater than 0; For a second moment when upstream travel data of the second vehicle is missing, constructing an objective function based on the speed of the second vehicle at a moment next to the second moment, the position of the second vehicle in the target section, the speed of the reference vehicle, and the position of the reference vehicle in the target section; The objective function is a function of the speed of the second vehicle at different times, the position of the second vehicle in the target road section, and a target difference; the target difference represents a difference between the reconstructed first position of the reference vehicle and the second position of the reference vehicle in the target driving data at the same time; For the second moment when the upstream driving data of the second vehicle is missing, the speed of the second vehicle at the second moment when the objective function takes a minimum value and the position of the second vehicle in the target section are calculated until a second stop condition is reached to obtain the reconstructed driving data of the second vehicle; wherein the second stop condition is: the distance between the second vehicle and the stop line of the target section is greater than a target distance, and the target distance is the maximum value of the farthest detection distance of the detection equipment and the maximum distance of the reference vehicle from the stop line of the target section; or, the second stop condition is: the upstream driving data of the reference vehicle is terminated.

3. The method according to claim 2, characterized in that Before calculating the missing driving data of the vehicle for which the driving data is missing based on the complete driving data of a reference vehicle before the vehicle to obtain the reconstructed driving data of the vehicle, the method further includes: Determine, from among the vehicles on the target road section, candidate vehicles with missing downstream driving data and candidate vehicles with missing upstream driving data; For each candidate vehicle with missing driving data, if the distance between the last detection point in the upstream driving data of the candidate vehicle and the previous vehicle is not greater than a first distance threshold, determine that the candidate vehicle is the first vehicle with missing downstream driving data; If the distance between the first detection point in the downstream driving data of the candidate vehicle and the previous vehicle is not greater than the second distance threshold, the candidate vehicle is determined to be the second vehicle whose upstream driving data is missing.

4. The method according to claim 1, characterized in that: After determining the first vehicle that has not been matched according to the time sequence of each vehicle entering the target road section, the method further includes: When the first vehicle satisfies a second preset condition, it is determined that there is no vehicle identical to the first vehicle; wherein the second preset condition includes any one of the following: The first vehicle drives out of the target road section; The last detection point in the upstream travel data of the first vehicle is located between the first detection point and the last detection point in the downstream travel data of the second vehicle; The reference speed of the first vehicle is less than the second speed threshold, and there is no vehicle downstream of the first vehicle; the reference speed of the first vehicle is: ; Indicates that the first vehicle is The distance between the time and the stop line of the target road section; Indicates that the second vehicle is The distance between the time and the stop line of the target road section; represents the time of the last detection point in the upstream travel data of the first vehicle; represents the time of the first detection point in the downstream travel data of the second vehicle; The reference speed of the first vehicle is less than a third speed threshold and less than a fourth speed threshold; the third speed threshold is determined based on the speed of the last detection point of the first vehicle; and the fourth speed threshold is determined based on the speed of the first detection point of the second vehicle.

5. The method according to claim 1, characterized in that When the first vehicle and the second vehicle are the same vehicle, determining the complete driving data of the vehicle on the target road section based on the driving data and the reconstructed driving data upstream of the first vehicle and the driving data and the reconstructed driving data downstream of the second vehicle includes: Determine a merged time period of the driving data from the target time period; wherein the merged time period is the time period to which the reconstructed driving data belongs; For each moment in the merging time period, a weighted sum of the speed of the first vehicle and the speed of the second vehicle at the moment is calculated, and a weighted sum of the position of the first vehicle in the target road section and the position of the second vehicle in the target road section at the moment is calculated to obtain the merged driving data of the vehicle; The upstream driving data of the first vehicle, the downstream driving data of the second vehicle, and the combined driving data are determined to obtain complete driving data of the vehicle in the target road section.

6. The method according to claim 5, characterized in that Before calculating, for each moment in the merging time period, a weighted sum of the speed of the first vehicle and the speed of the second vehicle at that moment, and calculating a weighted sum of the position of the first vehicle in the target road section and the position of the second vehicle in the target road section at that moment, and obtaining the merging driving data of the vehicle, the method further includes: For each moment in the combined time period, based on the moment of the last detection point in the upstream driving data of the first vehicle, the moment of the first detection point in the downstream driving data of the second vehicle and a preset formula, calculate the weight of the first vehicle and the weight of the second vehicle at that moment; ; ; represents the weight of the first vehicle at the i-th moment; represents the weight of the second vehicle at the i-th moment; represents the i-th moment in the merged time period; represents the time of the last detection point in the upstream travel data of the first vehicle; Indicates the time of the first detection point in the downstream travel data of the second vehicle.

7. The method according to claim 1, characterized in that The calculating the target travel speed of the vehicles in the sub-segment in each sub-time period based on the complete driving data of each vehicle in the target road section in the target time period includes: Performing time-space segmentation on the target time period and the target road section to obtain a plurality of time-space units; wherein one time-space unit represents a sub-road section within a sub-time period; Dividing the complete driving data of each vehicle in the target road section within the target time period according to the number of time-space units to obtain the driving data of the vehicle in each time-space unit; For each first space-time unit, the average of the speeds of the vehicles in the first space-time unit at different times is calculated to obtain the target speed of the vehicles in the sub-segment within the sub-time period corresponding to the first space-time unit; wherein the first space-time unit is a space-time unit in which the vehicles exist; Based on the driving data of the vehicles in each spatiotemporal unit, the vehicle flow of each spatiotemporal unit is calculated; wherein the vehicle flow of a spatiotemporal unit includes: the number of vehicles leaving the sub-segment in the sub-time period corresponding to the spatiotemporal unit; Based on the vehicle flow of each space-time unit, a target travel speed of vehicles in a sub-segment within a sub-time period corresponding to a second space-time unit is determined; wherein the second space-time unit is a space-time unit in which no vehicles exist.

8. The method according to claim 7, characterized in that The step of determining the target speed of vehicles in the sub-section within the sub-time period corresponding to the second space-time unit based on the vehicle flow of each space-time unit includes: For each second space-time unit, the identifier of the second space-time unit is input into a pre-trained speed prediction model to obtain a target travel speed of vehicles in the sub-segment within the sub-time period corresponding to the second space-time unit; wherein the second space-time unit is a space-time unit in which no vehicle exists; the speed prediction model is obtained based on the identifier of the sub-segment within the sub-time period corresponding to each first space-time unit, the target travel speed, and the vehicle flow training of each space-time unit.

9. The method according to claim 8, characterized in that The training method of the speed prediction model includes: For each first space-time unit, calculate the average of the speeds of the vehicles in the first space-time unit at different times to obtain the target passing speed of the vehicles in the sub-segment within the sub-time period corresponding to the first space-time unit; Input the identifier of each space-time unit into the speed prediction model of the initial structure to obtain the predicted passing speed of each space-time unit; Calculating a function value of a first loss function based on the predicted travel speed and the target travel speed of the first space-time unit; Calculate the function value of the second loss function based on the vehicle flow of each spatiotemporal unit; Based on the function value of the first loss function and the function value of the second loss function, the model parameters of the speed prediction model of the initial structure are adjusted until a preset convergence condition is reached to obtain a trained speed prediction model.

10. The method according to claim 9, characterized in that The first loss function is: ; in, represents the function value of the first loss function; represents the number of the first space-time unit; represents the target travel speed of the jth first space-time unit; represents the predicted travel speed of the jth first space-time unit; Indicates the starting position of the sub-segment corresponding to the j-th first space-time unit; represents the starting time of the sub-time period corresponding to the j-th first space-time unit; The second loss function is: ; Represents the function value of the second loss function; Indicates the number of sub-segments; Indicates the number of sub-time periods; Indicates the blocking density of vehicles in the target road segment; represents the target speed of the ith sub-section in the kth sub-time period; represents the target speed of the ith sub-section in the k+1th sub-time period; It indicates the free flow speed when the vehicle is not interfered by other vehicles; Indicates the distance of a sub-segment; Indicates the duration of a sub-time period; represents the flow rate of vehicles entering from the i+1th sub-segment to the ith sub-segment in the kth sub-time period; represents the number of vehicles entering the i-th sub-segment from the i+1-th sub-segment in the k-th sub-time period; represents the flow rate of vehicles entering from the ith sub-segment to the i-1th sub-segment in the kth sub-time period; It represents the number of vehicles entering the i-1th sub-segment from the i-th sub-segment in the k-th sub-time period.

11. The method according to claim 1, characterized in that: The determining the traffic state of the target road section in the target time period based on the target traffic speed of the vehicles in each sub-road section in each sub-time period includes: Based on the target speed of vehicles in each sub-section in each sub-time period and a preset formula, the traffic state of the target section in the target time period is calculated; wherein the preset formula is: ; ; Indicates the travel speed of the target road section; Indicates the number of sub-segments; Indicates the number of sub-time periods; represents the target speed of the kth sub-section in the i-th sub-time period; represents the delay index of the target road section; max represents the maximum value function; L represents the length of the target road section; Indicates the free flow speed when the vehicle is not disturbed by other vehicles.

12. The method according to claim 1, characterized in that The step of obtaining target driving data of a vehicle in a target road section within a target time period includes: Obtaining original driving data of each vehicle in a target road section within a target time period from a detection device; Determine the other driving data in the original driving data except the abnormal driving data, and obtain the target driving data of each vehicle in the target road section within the target time period; wherein the abnormal driving data includes: driving data of non-motor vehicles, driving data of vehicles driving in the opposite direction, driving data of vehicles with a number of detection points less than a preset number, and driving data of vehicles with abnormal changes in detection points.

13. A traffic status determination device, characterized in that: The device comprises: A driving data acquisition module is used to acquire target driving data of each vehicle in a target road section within a target time period; wherein the target driving data includes: vehicle identification, identification of the lane where the vehicle is located, each detection point of the vehicle in the target road section, speed of the vehicle at each detection point in the target road section, and type of vehicle; A driving data reconstruction module is used to calculate the missing driving data of a vehicle with missing driving data based on the complete driving data of a reference vehicle before the vehicle, so as to obtain the reconstructed driving data of the vehicle; A driving data merging module, for determining complete driving data of the vehicle on the target road section based on upstream driving data and reconstructed driving data of the first vehicle and downstream driving data and reconstructed driving data of the second vehicle when the first vehicle and the second vehicle are the same vehicle; wherein the first vehicle is a vehicle with missing downstream driving data; and the second vehicle is a vehicle with missing upstream driving data; A traffic speed determination module, configured to calculate a target traffic speed of vehicles in a sub-section in each sub-time period based on complete driving data of each vehicle in the target section in the target time period; wherein the sub-time period and the sub-section are obtained by dividing the target time period and the target section; A traffic state determination module, configured to determine the traffic state of the target road section within the target time period based on the target speed of vehicles in each sub-road section within each sub-time period; wherein the traffic state includes the speed information of vehicles in the target road section and the delay information of the target road section; The device also includes: A first vehicle matching module is used for determining, before the complete driving data of the target road section, the first vehicle and the second vehicle are the same vehicle, based on the upstream driving data and reconstructed driving data of the first vehicle and the downstream driving data and reconstructed driving data of the second vehicle, to determine the first vehicle that has not been matched according to the time sequence of each vehicle entering the target road section when the driving data merging module executes the first vehicle matching module; when the driving data of the first vehicle and the second vehicle to be compared meet the first preset condition, determining that the first vehicle and the second vehicle are the same vehicle, and returning to the step of determining the first vehicle that has not been matched according to the time sequence of each vehicle entering the target road section, until the matching of each vehicle in the target road section is completed; wherein the second vehicle to be compared includes: a vehicle located after the first vehicle according to the time sequence of each vehicle entering the target road section; the first preset condition includes: ; ; ; ; ; Indicates that the first vehicle is The distance between the time and the stop line of the target road section; Indicates that the second vehicle is The distance between the time and the stop line of the target road section; represents the time of the last detection point in the upstream travel data of the first vehicle; represents the time of the first detection point in the downstream travel data of the second vehicle; indicating the type of the first vehicle; indicating the type of the second vehicle; Indicates that the first vehicle is The speed of the moment; Indicates that the second vehicle is The speed of the moment; Indicates the first speed threshold.