A method, device, equipment and medium for obtaining vehicle queue length
By using the initial GPS data information list to obtain vehicle residence information and combined with the geographical and time difference calculation, the problem of inaccurate vehicle queuing length caused by video image clarity is not accurate, and a higher accurate vehicle queue length acquisition has been achieved.
Patent Information
- Application Number
- CN202411401660.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The prior art acquires the vehicle queue length based on video image information. However, the clarity of the video image is affected by factors such as light, weather, and occlusion, which makes it impossible to accurately identify the vehicle, thereby making it impossible to accurately obtain the vehicle queue length.
By using the initial GPS data information list to obtain the key vehicle stay information and associated vehicle stay information of the target road section, combined with geographical location and time difference calculation, the queuing vehicle information is filtered out to obtain the vehicle queue length.
This method is based on GPS data, which avoids the effects of light, weather, and blocking, and improves the accuracy of obtaining the length of the vehicle queue.
Smart Images

Figure CN118898906B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and medium for obtaining the length of a vehicle queue. Background Art
[0002] The length of vehicle queues is an important indicator for measuring the efficiency of traffic flow and the traffic capacity of roads. The patent (application number: CN201410852721.5) provides a method and device for obtaining the length of vehicle queues. The method detects whether the target virtual coil currently includes queued vehicle information through traffic video image information. If the queued vehicle information is included, it is determined whether the queued vehicle information is valid target vehicle information; if it is the target vehicle information, the vehicle queue length information is obtained according to the target vehicle information.
[0003] However, the above method also has the following technical problems:
[0004] The above method obtains the vehicle queue length information based on video image information, but the clarity of the video image will be affected by various factors, such as lighting, weather, and obstructions. When the clarity of the video image is affected, all vehicles may not be correctly or completely identified, and thus the vehicle queue length information cannot be accurately obtained. Summary of the invention
[0005] In view of the above technical problems, the technical solution adopted by the present invention is:
[0006] According to a first aspect of the present invention, a method for obtaining the length of a vehicle queue is provided. The method is used to obtain the length of a vehicle queue at a target intersection. The method comprises the following steps:
[0007] According to the initial GPS data information list, the key vehicle stop information corresponding to the target section and the associated vehicle stop information list corresponding to the key vehicle stop information are obtained, the key vehicle stop information includes: the key vehicle ID, the start stop time corresponding to the key vehicle ID, the end stop time corresponding to the key vehicle ID, and the stop longitude and latitude coordinates corresponding to the key vehicle ID. The associated vehicle stop information list includes several pieces of associated vehicle stop information, and the associated vehicle stop information includes: the associated vehicle ID, the start stop time corresponding to the associated vehicle ID, the end stop time corresponding to the associated vehicle ID, and the stop longitude and latitude coordinates corresponding to the associated vehicle ID.
[0008] The associated vehicle stop information list is traversed, and when the intermediate distance difference corresponding to the associated vehicle stop information is less than the product of the intermediate time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, the associated vehicle stop information is used as the first candidate vehicle stop information corresponding to the key vehicle stop information to obtain a first candidate vehicle stop information list, wherein the intermediate distance difference corresponding to the associated vehicle stop information is the difference between the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the associated vehicle ID in the associated vehicle stop information and the geographical location corresponding to the center point of the target intersection minus the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, and the intermediate time difference corresponding to the associated vehicle stop information is the difference between the start stop time corresponding to the associated vehicle ID in the associated vehicle stop information and the start stop time corresponding to the key vehicle ID.
[0009] A second candidate vehicle stop information list is acquired according to the first candidate vehicle stop information list and the key vehicle stop information, wherein the second candidate vehicle stop information list includes a plurality of second candidate vehicle stop information.
[0010] The key vehicle stop information and all the second candidate vehicle stop information in the second candidate vehicle stop information list are used as queuing vehicle information to obtain a queuing vehicle information list.
[0011] Get the length of the vehicle queue based on the queue vehicle information list.
[0012] According to a second aspect of the present invention, a device for obtaining the length of a vehicle queue is provided, the device is used to obtain the length of a vehicle queue at a target intersection, and the device comprises:
[0013] The key vehicle stop information and associated vehicle stop information acquisition module is used to obtain the key vehicle stop information corresponding to the target section and the associated vehicle stop information list corresponding to the key vehicle stop information according to the initial GPS data information list. The key vehicle stop information includes: the key vehicle ID, the start stop time corresponding to the key vehicle ID, the end stop time corresponding to the key vehicle ID, and the stop longitude and latitude coordinates corresponding to the key vehicle ID. The associated vehicle stop information list includes several pieces of associated vehicle stop information. The associated vehicle stop information includes: the associated vehicle ID, the start stop time corresponding to the associated vehicle ID, the end stop time corresponding to the associated vehicle ID, and the stop longitude and latitude coordinates corresponding to the associated vehicle ID.
[0014] The first candidate vehicle stop information acquisition module is used to traverse the associated vehicle stop information list. When the intermediate distance difference corresponding to the associated vehicle stop information is less than the product of the intermediate time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, the associated vehicle stop information is used as the first candidate vehicle stop information corresponding to the key vehicle stop information to obtain the first candidate vehicle stop information list, wherein the intermediate distance difference corresponding to the associated vehicle stop information is the difference between the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the associated vehicle ID in the associated vehicle stop information and the geographical location corresponding to the center point of the target intersection minus the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, and the intermediate time difference corresponding to the associated vehicle stop information is the difference between the start stop time corresponding to the associated vehicle ID in the associated vehicle stop information minus the start stop time corresponding to the key vehicle ID.
[0015] The second candidate vehicle stop information acquisition module is used to acquire a second candidate vehicle stop information list according to the first candidate vehicle stop information list and the key vehicle stop information, wherein the second candidate vehicle stop information list includes a plurality of second candidate vehicle stop information.
[0016] The queuing vehicle information acquisition module is used to use the key vehicle stop information and all the second candidate vehicle stop information in the second candidate vehicle stop information list as queuing vehicle information to obtain a queuing vehicle information list.
[0017] The vehicle queue length acquisition module is used to obtain the vehicle queue length according to the queue vehicle information list.
[0018] According to a third aspect of the present invention, there is provided a non-transitory computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the aforementioned method.
[0019] According to a fourth aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the aforementioned method when executing the computer program.
[0020] The present invention has at least the following beneficial effects:
[0021] The present invention provides a method, device, equipment and medium for obtaining the length of a vehicle queue. The method can obtain key vehicle stop information corresponding to a target road section and a list of associated vehicle stop information corresponding to the key vehicle stop information according to an initial GPS data information list, obtain first candidate vehicle stop information according to the associated vehicle stop information, obtain second candidate vehicle stop information according to the first candidate vehicle stop information, use the key vehicle stop information and all second candidate vehicle stop information in the second candidate vehicle stop information list as queue vehicle information to obtain a queue vehicle information list, and obtain the length of the vehicle queue according to the queue vehicle information list; it can be seen that the present invention obtains the length of the vehicle queue based on the initial GPS data information, and the GPS data is not affected by factors such as light, weather, and obstructions. Therefore, obtaining the length of the vehicle queue by the above method is conducive to improving the accuracy of obtaining the length of the vehicle queue. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flowchart of a method for obtaining the length of a vehicle queue provided in Embodiment 1 of the present invention;
[0024] Figure 2 A flowchart of step S1 provided in Embodiment 1 of the present invention;
[0025] Figure 3 A flowchart of step S5 provided in the first embodiment of the present invention;
[0026] Figure 4 A schematic diagram of the structure of a device for obtaining the length of a vehicle queue provided in Embodiment 2 of the present invention;
[0027] Figure 5 A schematic diagram of the structure of a module 1 for acquiring key vehicle stop information and associated vehicle stop information provided in the second embodiment of the present invention;
[0028] Figure 6 This is a schematic diagram of the structure of the vehicle queue length acquisition module 5 provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar tasks, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0031] Embodiment 1
[0032] Embodiment 1 of the present invention discloses a method for obtaining the length of a vehicle queue, the method being used to obtain the length of a vehicle queue at a target intersection, the method comprising the following steps: Figure 1 As shown:
[0033] S1. According to the initial GPS data information list, key vehicle stop information corresponding to the target road section and a list of associated vehicle stop information corresponding to the key vehicle stop information are obtained, wherein the key vehicle stop information includes: a key vehicle ID, a start stop time corresponding to the key vehicle ID, an end stop time corresponding to the key vehicle ID, and the stop longitude and latitude coordinates corresponding to the key vehicle ID. The list of associated vehicle stop information includes a number of associated vehicle stop information, wherein the associated vehicle stop information includes: an associated vehicle ID, a start stop time corresponding to the associated vehicle ID, an end stop time corresponding to the associated vehicle ID, and the stop longitude and latitude coordinates corresponding to the associated vehicle ID.
[0034] Specifically, the initial GPS data information list includes several initial GPS data information, and the initial GPS data information is the vehicle GPS data information received by the target server on that day. The vehicle GPS data information is the data information reported by the GPS in the vehicle to the target server, including: vehicle ID, longitude and latitude coordinates and the generation time point corresponding to the longitude and latitude coordinates; the generation time point can be understood as the time point when the longitude and latitude coordinates are generated.
[0035] Specifically, the target road section is a road section between the target intersection and the designated intersection, and the designated intersection is an intersection adjacent to the target intersection.
[0036] Further, the vehicle in the target section drives from the designated intersection to the target intersection.
[0037] Specifically, the key vehicle ID is the identity of the key vehicle, and the key vehicle is the first vehicle that stops in the target road section and waits to pass through the target intersection.
[0038] Specifically, the associated vehicle ID is an identification of the associated vehicle, and the associated vehicle is a vehicle that is parked in the target road section and whose parking start time is greater than the key vehicle's parking start time.
[0039] Specifically, step S1 also includes the following steps S11-S15: Figure 2 As shown:
[0040] S11. Obtain an initial vehicle stop information list according to the initial GPS data information list, where the initial vehicle stop information list includes a number of initial vehicle stop information, and the initial vehicle stop information includes: an initial vehicle ID, a start stop time corresponding to the initial vehicle ID, an end stop time corresponding to the initial vehicle ID, and a stop longitude and latitude coordinate corresponding to the initial vehicle ID. Those skilled in the art know that any method for obtaining an initial vehicle stop information list according to the initial GPS data information list in the prior art belongs to the protection scope of the present invention and will not be described in detail herein.
[0041] Specifically, the initial vehicle ID is the identity of the initial vehicle, and the initial vehicle is a vehicle that has stopped in the target road section.
[0042] Specifically, the starting stop time corresponding to the initial vehicle ID is the time when the initial vehicle corresponding to the initial vehicle ID starts to stop in the target road section.
[0043] Specifically, the end stop time corresponding to the initial vehicle ID is the time when the initial vehicle corresponding to the initial vehicle ID ends parking in the target road section.
[0044] Specifically, the stopping longitude and latitude coordinates corresponding to the initial vehicle ID are the longitude and latitude coordinates of the parking position of the initial vehicle corresponding to the initial vehicle ID when the initial vehicle parks in the target road section.
[0045] S12. Obtain an initial stopping distance corresponding to the initial vehicle stop information, where the initial stopping distance is the distance between a geographical location corresponding to the stop latitude and longitude coordinates in the initial vehicle stop information and a geographical location corresponding to a center point of the target intersection. Those skilled in the art know that any method for obtaining the distance between two geographical locations in the prior art falls within the protection scope of the present invention and will not be described in detail herein.
[0046] S13, traversing the initial vehicle stop information list, when the initial parking distance corresponding to the initial vehicle stop information is less than the preset parking distance, using the initial vehicle stop information as the intermediate vehicle stop information to obtain the intermediate vehicle stop information list, the intermediate vehicle stop information includes: the intermediate vehicle ID, the start stop time corresponding to the intermediate vehicle ID, the end stop time corresponding to the intermediate vehicle ID, and the stop longitude and latitude coordinates corresponding to the intermediate vehicle ID.
[0047] Specifically, the value range of the preset stopping distance is [5,7], and the measurement unit of the preset stopping distance is meter.
[0048] S14. The intermediate vehicle information corresponding to the smallest starting stay time among the starting stay times corresponding to all the intermediate vehicle IDs is used as the key vehicle stay information.
[0049] S15, traversing the initial vehicle stop information list, when the start stop time corresponding to the initial vehicle ID in the initial vehicle stop information is greater than the start stop time corresponding to the key vehicle ID, using the initial vehicle stop information as the associated vehicle stop information corresponding to the key vehicle stop information.
[0050] Through the above steps, the initial vehicle stop information is obtained according to the initial GPS data information list. When the initial parking distance corresponding to the initial vehicle stop information is less than the preset parking distance, the initial vehicle stop information is used as the intermediate vehicle stop information, and the intermediate vehicle information corresponding to the smallest starting stop time among the starting stop times corresponding to all intermediate vehicle IDs is used as the key vehicle stop information. When the starting stop time corresponding to the initial vehicle ID in the initial vehicle stop information is greater than the starting stop time corresponding to the key vehicle ID, the initial vehicle stop information is used as the associated vehicle stop information corresponding to the key vehicle stop information. The intermediate vehicle stop information is obtained according to the initial parking distance corresponding to the initial vehicle stop information. The key vehicle stop information and the associated vehicle stop information are obtained according to the intermediate vehicle stop information, which is conducive to improving the accuracy of obtaining the key vehicle stop information and the associated vehicle stop information.
[0051] S2. Traverse the list of associated vehicle stop information. When the intermediate distance difference corresponding to the associated vehicle stop information is less than the product of the intermediate time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, use the associated vehicle stop information as the first candidate vehicle stop information corresponding to the key vehicle stop information to obtain a first candidate vehicle stop information list, the first candidate vehicle stop information including: a first candidate vehicle ID, a start stop time corresponding to the first candidate vehicle ID, an end stop time corresponding to the first candidate vehicle ID, and the stop longitude and latitude coordinates corresponding to the first candidate vehicle ID, wherein the intermediate distance difference corresponding to the associated vehicle stop information is the difference between the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the associated vehicle ID in the associated vehicle stop information and the geographical location corresponding to the center point of the target intersection minus the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, and the intermediate time difference corresponding to the associated vehicle stop information is the difference between the start stop time corresponding to the associated vehicle ID in the associated vehicle stop information minus the start stop time corresponding to the key vehicle ID.
[0052] Specifically, the value range of the preset vehicle cache speed is [4, 6], and the measurement unit of the preset vehicle cache speed is meters per second.
[0053] Through the above steps, when the middle distance difference corresponding to the associated vehicle stop information is not less than the product of the middle time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, it means that the vehicle corresponding to the associated vehicle stop information is parked in the target section but is not going to pass the target intersection. When the middle distance difference corresponding to the associated vehicle stop information is less than the product of the middle time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, it means that the vehicle corresponding to the associated vehicle stop information is a vehicle parked in the target section and waiting to pass the target intersection. Therefore, when the middle distance difference corresponding to the associated vehicle stop information is less than the product of the middle time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, the associated vehicle stop information is used as the first candidate vehicle stop information corresponding to the key vehicle stop information, which can filter out the vehicle information that is parked in the target section but is not going to pass the target intersection. The vehicle queue length is further obtained according to the first candidate vehicle stop information, which is conducive to improving the accuracy of obtaining the vehicle queue length.
[0054] S3. Obtain a second candidate vehicle stop information list according to the first candidate vehicle stop information list and the key vehicle stop information, wherein the second candidate vehicle stop information list includes a plurality of second candidate vehicle stop information, wherein when the start stop time corresponding to the first candidate vehicle ID in the first candidate vehicle stop information is greater than the start stop time corresponding to the key vehicle ID and less than the end stop time corresponding to the key vehicle ID, the difference obtained by subtracting the start stop time corresponding to the first candidate vehicle ID from the end stop time corresponding to the first candidate vehicle ID is less than the difference obtained by subtracting the start stop time corresponding to the key vehicle ID from the end stop time corresponding to the key vehicle ID, and the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the first candidate vehicle ID and the geographical location corresponding to the center point of the target intersection is greater than the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, the first candidate vehicle stop information is used as the second candidate vehicle stop information, and the second candidate vehicle stop information includes: the second candidate vehicle ID, the start stop time corresponding to the second candidate vehicle ID, the end stop time corresponding to the second candidate vehicle ID, and the stop longitude and latitude coordinates corresponding to the second candidate vehicle ID.
[0055] Through the above steps, when the starting stay time corresponding to the first candidate vehicle ID in the first candidate vehicle stop information is greater than the starting stay time corresponding to the key vehicle ID and less than the ending stay time corresponding to the key vehicle ID, the difference between the ending stay time corresponding to the first candidate vehicle ID and the starting stay time corresponding to the first candidate vehicle ID is less than the difference between the starting stay time corresponding to the key vehicle ID and the ending stay time corresponding to the key vehicle ID, and the distance between the geographical location corresponding to the longitude and latitude coordinates of the stop corresponding to the first candidate vehicle ID and the geographical location corresponding to the center point of the target intersection is greater than the distance between the geographical location corresponding to the longitude and latitude coordinates of the stop corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, it means that the vehicle corresponding to the first candidate vehicle stop information and the vehicle corresponding to the key vehicle stop information are vehicles in the same batch queuing waiting to pass through the target intersection. Therefore, further obtaining the vehicle queue length according to the second candidate vehicle stop information is conducive to improving the accuracy of obtaining the vehicle queue length.
[0056] S4. The key vehicle stop information and all second candidate vehicle stop information in the second candidate vehicle stop information list are taken as queue vehicle information to obtain a queue vehicle information list, wherein the queue vehicle information includes: a queue vehicle ID, a start stop time corresponding to the queue vehicle ID, an end stop time corresponding to the queue vehicle ID, and a stop latitude and longitude coordinates corresponding to the queue vehicle ID.
[0057] S5. Obtain the length of the vehicle queue according to the queue vehicle information list.
[0058] Specifically, step S5 includes the following steps S51-S56: Figure 3 As shown:
[0059] S51. Obtain a first time distance coordinate and a second time distance coordinate corresponding to the queuing vehicle information, wherein the abscissa of the first time distance coordinate corresponding to the queuing vehicle information is the start stay time corresponding to the queuing vehicle ID in the queuing vehicle information, the abscissa of the second time distance coordinate corresponding to the queuing vehicle information is the end stay time corresponding to the queuing vehicle ID in the queuing vehicle information, and the ordinates of the first time distance coordinate and the second time distance coordinate corresponding to the queuing vehicle information are both the distance between the geographical location corresponding to the stay longitude and latitude corresponding to the queuing vehicle ID in the queuing vehicle information and the geographical location corresponding to the center point of the target intersection.
[0060] S52. Obtain the red light state start time point and the red light state end time point of the target traffic light in the target signal cycle corresponding to the target traffic light, wherein the target traffic light is a traffic light in the target intersection that controls whether vehicles in the target section can pass through the target intersection, and the target cycle corresponding to the target traffic light is a signal cycle in which the start dwell time corresponding to the key vehicle ID is located among several signal cycles of the target traffic light.
[0061] Specifically, the signal cycle of the target traffic light is the length of time from when the target traffic light starts at a certain fixed state to when it returns to the state again in a complete signal cycle.
[0062] S53. When the start time point of the red light state and the end time point of the red light state are both not NULL, obtain the third time distance coordinate corresponding to the start time point of the red light state and the fourth time distance coordinate corresponding to the end time point of the red light state, wherein the abscissa of the third time distance coordinate is the start time point of the red light state, and the ordinate of the third time distance coordinate is 0, and the abscissa of the fourth time distance coordinate is the end time point of the red light state, and the ordinate of the fourth time distance coordinate is 0.
[0063] S54: Fit the third time distance coordinate and the first time distance coordinate corresponding to the information of all queuing vehicles according to the least square method to obtain a first fitting straight line.
[0064] S55. Fit the fourth time distance coordinate and the second time distance coordinate corresponding to all queuing vehicle information according to the least square method to obtain a second fitting straight line.
[0065] S56. Taking the ordinate of the intersection of the first fitting straight line and the second fitting straight line as the length of the vehicle queue.
[0066] Through the above steps, the first time distance coordinate and the second time distance coordinate are obtained. When the red light state start time point and the red light state end time point are not NULL, the third time distance coordinate and the fourth time distance coordinate are obtained. The third time distance coordinate and the first time distance coordinate corresponding to all the queued vehicle information are fitted according to the least squares method to obtain a first fitting straight line. The fourth time distance coordinate and the second time distance coordinate corresponding to all the queued vehicle information are fitted according to the least squares method to obtain a second fitting straight line. The ordinate of the intersection of the first fitting straight line and the second fitting straight line is used as the vehicle queue length, which is conducive to improving the accuracy of obtaining the vehicle queue length.
[0067] Specifically, in a specific embodiment, in step S5, the following steps S10-S20 are also included to obtain the length of the vehicle queue:
[0068] S10. When the red light state start time point is NULL or the red light state end time point is NULL, obtain a third fitting straight line and a fourth fitting straight line, wherein the third fitting straight line is obtained by fitting the first time distance coordinates corresponding to the information of all queuing vehicles according to the least squares method, and the fourth fitting straight line is obtained by fitting the second time distance coordinates corresponding to the information of all queuing vehicles according to the least squares method.
[0069] S20. Taking the ordinate of the intersection of the third fitting straight line and the fourth fitting straight line as the length of the vehicle queue.
[0070] Through the above steps, when the start time point of the red light state is NULL or the end time point of the red light state is NULL, the third fitting straight line and the fourth fitting straight line are obtained, and the ordinate of the intersection of the third fitting straight line and the fourth fitting straight line is used as the length of the vehicle queue. Even if the start time point of the red light state or the end time point of the red light state cannot be obtained, the length of the vehicle queue can still be obtained. Compared with the existing technology, it is beneficial to improve the accuracy of obtaining the length of the vehicle queue.
[0071] Embodiment 2
[0072] Embodiment 2 of the present invention discloses a device for obtaining the length of a vehicle queue, the device being used to obtain the length of a vehicle queue at a target intersection, such as Figure 4 As shown, the device comprises:
[0073] The key vehicle stop information and associated vehicle stop information acquisition module 1 is used to obtain the key vehicle stop information corresponding to the target section and the associated vehicle stop information list corresponding to the key vehicle stop information according to the initial GPS data information list. The key vehicle stop information includes: the key vehicle ID, the start stop time corresponding to the key vehicle ID, the end stop time corresponding to the key vehicle ID, and the stop longitude and latitude coordinates corresponding to the key vehicle ID. The associated vehicle stop information list includes a number of associated vehicle stop information. The associated vehicle stop information includes: the associated vehicle ID, the start stop time corresponding to the associated vehicle ID, the end stop time corresponding to the associated vehicle ID, and the stop longitude and latitude coordinates corresponding to the associated vehicle ID.
[0074] Specifically, the initial GPS data information list includes several initial GPS data information, and the initial GPS data information is the vehicle GPS data information received by the target server on that day. The vehicle GPS data information is the data information reported by the GPS in the vehicle to the target server, including: vehicle ID, longitude and latitude coordinates and the generation time point corresponding to the longitude and latitude coordinates, and the generation time point is the time point when the longitude and latitude coordinates are generated.
[0075] Specifically, the target road section is a road section between the target intersection and the designated intersection, and the designated intersection is an intersection adjacent to the target intersection.
[0076] Further, the vehicle in the target section drives from the designated intersection to the target intersection.
[0077] Specifically, the key vehicle ID is the identity of the key vehicle, and the key vehicle is the first vehicle that stops in the target road section and waits to pass through the target intersection.
[0078] Specifically, the associated vehicle ID is an identification of the associated vehicle, and the associated vehicle is a vehicle that is parked in the target road section and whose parking start time is greater than the key vehicle's parking start time.
[0079] Specifically, Figure 5 As shown, the key vehicle stop information and associated vehicle stop information acquisition module 1 includes:
[0080] The initial vehicle stop information acquisition unit 11 is used to obtain an initial vehicle stop information list according to an initial GPS data information list. The initial vehicle stop information list includes a plurality of initial vehicle stop information. The initial vehicle stop information includes: an initial vehicle ID, a start stop time corresponding to the initial vehicle ID, an end stop time corresponding to the initial vehicle ID, and a stop longitude and latitude coordinate corresponding to the initial vehicle ID. Those skilled in the art know that any method for obtaining an initial vehicle stop information list according to an initial GPS data information list in the prior art belongs to the protection scope of the present invention and will not be repeated here.
[0081] Specifically, the initial vehicle ID is the identity of the initial vehicle, and the initial vehicle is a vehicle that has stopped in the target road section.
[0082] Specifically, the starting stop time corresponding to the initial vehicle ID is the time when the initial vehicle corresponding to the initial vehicle ID starts to stop in the target road section.
[0083] Specifically, the end stop time corresponding to the initial vehicle ID is the time when the initial vehicle corresponding to the initial vehicle ID ends parking in the target road section.
[0084] Specifically, the stopping longitude and latitude coordinates corresponding to the initial vehicle ID are the longitude and latitude coordinates of the parking position of the initial vehicle corresponding to the initial vehicle ID when the initial vehicle parks in the target road section.
[0085] The initial stopping distance acquisition unit 12 is used to obtain the initial stopping distance corresponding to the initial vehicle stopping information, wherein the initial stopping distance is the distance between the geographical location corresponding to the stopping longitude and latitude coordinates in the initial vehicle stopping information and the geographical location corresponding to the center point of the target intersection. Those skilled in the art know that any method of obtaining the distance between two geographical locations in the prior art belongs to the protection scope of the present invention and will not be described in detail herein.
[0086] The intermediate vehicle stop information acquisition unit 13 is used to traverse the initial vehicle stop information list. When the initial parking distance corresponding to the initial vehicle stop information is less than the preset parking distance, the initial vehicle stop information is used as the intermediate vehicle stop information to obtain the intermediate vehicle stop information list. The intermediate vehicle stop information includes: the intermediate vehicle ID, the start stop time corresponding to the intermediate vehicle ID, the end stop time corresponding to the intermediate vehicle ID, and the stop longitude and latitude coordinates corresponding to the intermediate vehicle ID.
[0087] Specifically, the value range of the preset stopping distance is [5,7], and the measurement unit of the preset stopping distance is meter.
[0088] The key vehicle stop information acquiring unit 14 is used to take the intermediate vehicle information corresponding to the smallest start stop time among the start stop times corresponding to all the intermediate vehicle IDs as the key vehicle stop information.
[0089] The associated vehicle stop information acquisition unit 15 is used to traverse the initial vehicle stop information list, and when the starting stop time corresponding to the initial vehicle ID in the initial vehicle stop information is greater than the starting stop time corresponding to the key vehicle ID, the initial vehicle stop information is used as the associated vehicle stop information corresponding to the key vehicle stop information.
[0090] The first candidate vehicle stop information acquisition module 2 is used to traverse the list of associated vehicle stop information. When the intermediate distance difference corresponding to the associated vehicle stop information is less than the product of the intermediate time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, the associated vehicle stop information is used as the first candidate vehicle stop information corresponding to the key vehicle stop information to obtain the first candidate vehicle stop information list, the first candidate vehicle stop information includes: a first candidate vehicle ID, a start stop time corresponding to the first candidate vehicle ID, an end stop time corresponding to the first candidate vehicle ID, and the stop longitude and latitude coordinates corresponding to the first candidate vehicle ID, wherein the intermediate distance difference corresponding to the associated vehicle stop information is the difference between the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the associated vehicle ID in the associated vehicle stop information and the geographical location corresponding to the center point of the target intersection minus the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, and the intermediate time difference corresponding to the associated vehicle stop information is the difference between the start stop time corresponding to the associated vehicle ID in the associated vehicle stop information minus the start stop time corresponding to the key vehicle ID.
[0091] Specifically, the value range of the preset vehicle cache speed is [4, 6], and the measurement unit of the preset vehicle cache speed is meters per second.
[0092] The second candidate vehicle stop information acquisition module 3 is used to acquire a second candidate vehicle stop information list according to the first candidate vehicle stop information list and the key vehicle stop information, wherein the second candidate vehicle stop information list includes a plurality of second candidate vehicle stop information, wherein when the start stop time corresponding to the first candidate vehicle ID in the first candidate vehicle stop information is greater than the start stop time corresponding to the key vehicle ID and less than the end stop time corresponding to the key vehicle ID, the difference obtained by subtracting the start stop time corresponding to the first candidate vehicle ID from the end stop time corresponding to the first candidate vehicle ID is less than the difference obtained by subtracting the start stop time corresponding to the key vehicle ID from the end stop time corresponding to the key vehicle ID, and the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the first candidate vehicle ID and the geographical location corresponding to the center point of the target intersection is greater than the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, the first candidate vehicle stop information is used as the second candidate vehicle stop information, and the second candidate vehicle stop information includes: the second candidate vehicle ID, the start stop time corresponding to the second candidate vehicle ID, the end stop time corresponding to the second candidate vehicle ID, and the stop longitude and latitude coordinates corresponding to the second candidate vehicle ID.
[0093] The queuing vehicle information acquisition module 4 is used to use the key vehicle stop information and all the second candidate vehicle stop information in the second candidate vehicle stop information list as the queuing vehicle information to obtain a queuing vehicle information list, wherein the queuing vehicle information includes: the queuing vehicle ID, the starting stop time corresponding to the queuing vehicle ID, the ending stop time corresponding to the queuing vehicle ID, and the stop latitude and longitude coordinates corresponding to the queuing vehicle ID.
[0094] The vehicle queue length acquisition module 5 is used to acquire the vehicle queue length according to the queue vehicle information list.
[0095] Specifically, Figure 6 As shown, the vehicle queue length acquisition module 5 includes:
[0096] The first time distance coordinate and the second time distance coordinate acquisition unit 51 is used to acquire the first time distance coordinate and the second time distance coordinate corresponding to the queuing vehicle information, wherein the horizontal coordinate of the first time distance coordinate corresponding to the queuing vehicle information is the starting stay time corresponding to the queuing vehicle ID in the queuing vehicle information, the horizontal coordinate of the second time distance coordinate corresponding to the queuing vehicle information is the ending stay time corresponding to the queuing vehicle ID in the queuing vehicle information, and the vertical coordinates of the first time distance coordinate and the second time distance coordinate corresponding to the queuing vehicle information are both the distance between the geographical location corresponding to the longitude and latitude of the stay corresponding to the queuing vehicle ID in the queuing vehicle information and the geographical location corresponding to the center point of the target intersection.
[0097] The time point acquisition unit 52 is used to obtain the red light state start time point and the red light state end time point of the target traffic light in the target signal cycle corresponding to the target traffic light, wherein the target traffic light is a traffic light in the target intersection that controls whether vehicles in the target section can pass through the target intersection, and the target cycle corresponding to the target traffic light is a signal cycle in which the start stay time corresponding to the key vehicle ID is located in several signal cycles of the target traffic light.
[0098] Specifically, the signal cycle of the target traffic light is the length of time from when the target traffic light starts at a certain fixed state to when it returns to the state again in a complete signal cycle.
[0099] The third time distance coordinate and the fourth time distance coordinate acquisition unit 53 are used to acquire the third time distance coordinate corresponding to the start time point of the red light state and the fourth time distance coordinate corresponding to the end time point of the red light state when both the start time point of the red light state and the end time point of the red light state are not NULL, wherein the horizontal coordinate of the third time distance coordinate is the start time point of the red light state, and the vertical coordinate of the third time distance coordinate is 0, and the horizontal coordinate of the fourth time distance coordinate is the end time point of the red light state, and the vertical coordinate of the fourth time distance coordinate is 0.
[0100] The first fitting straight line obtaining unit 54 is used to obtain a first fitting straight line by fitting the third time distance coordinate and the first time distance coordinate corresponding to the information of all queuing vehicles according to the least square method.
[0101] The second fitting straight line obtaining unit 55 is used to obtain a second fitting straight line by fitting the fourth time distance coordinate and the second time distance coordinate corresponding to all queuing vehicle information according to the least square method.
[0102] The first vehicle queue obtaining unit 56 is used to use the ordinate of the intersection of the first fitting straight line and the second fitting straight line as the length of the vehicle queue.
[0103] Specifically, in a specific embodiment, the vehicle queue length acquisition module 5 further includes:
[0104] The third fitting straight line and the fourth fitting straight line obtaining unit are used to obtain the third fitting straight line and the fourth fitting straight line when the red light state start time point is NULL or the red light state end time point is NULL, wherein the third fitting straight line is obtained by fitting the first time distance coordinates corresponding to the information of all queuing vehicles according to the least squares method, and the fourth fitting straight line is obtained by fitting the second time distance coordinates corresponding to the information of all queuing vehicles according to the least squares method.
[0105] The second vehicle queue acquisition unit is used to use the ordinate of the intersection of the third fitting straight line and the fourth fitting straight line as the length of the vehicle queue.
[0106] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store a computer program related to a method in a method embodiment, and the computer program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0107] An embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the above embodiment when executing the computer program.
[0108] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0109] The present invention provides a method, device, equipment and medium for obtaining the length of a vehicle queue. The method can obtain key vehicle stop information corresponding to a target road section and a list of associated vehicle stop information corresponding to the key vehicle stop information according to an initial GPS data information list, obtain first candidate vehicle stop information according to the associated vehicle stop information, obtain second candidate vehicle stop information according to the first candidate vehicle stop information, use the key vehicle stop information and all second candidate vehicle stop information in the second candidate vehicle stop information list as queue vehicle information to obtain a queue vehicle information list, and obtain the length of the vehicle queue according to the queue vehicle information list; it can be seen that the present invention obtains the length of the vehicle queue based on the initial GPS data information, and the GPS data is not affected by factors such as light, weather, and obstructions. Therefore, obtaining the length of the vehicle queue by the above method is conducive to improving the accuracy of obtaining the length of the vehicle queue.
[0110] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.
Claims
1. A method for obtaining the length of a vehicle queue, the method being used to obtain the length of a vehicle queue at a target intersection, characterized in that: The method comprises the following steps: According to the initial GPS data information list, key vehicle stop information corresponding to the target road section and a list of associated vehicle stop information corresponding to the key vehicle stop information are obtained, wherein the key vehicle stop information includes: a key vehicle ID, a start stop time corresponding to the key vehicle ID, an end stop time corresponding to the key vehicle ID, and a stop longitude and latitude coordinate corresponding to the key vehicle ID. The list of associated vehicle stop information includes a plurality of associated vehicle stop information, wherein the associated vehicle stop information includes: an associated vehicle ID, a start stop time corresponding to the associated vehicle ID, an end stop time corresponding to the associated vehicle ID, and a stop longitude and latitude coordinate corresponding to the associated vehicle ID. Traversing the list of associated vehicle stop information, when the intermediate distance difference corresponding to the associated vehicle stop information is less than the product of the intermediate time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, the associated vehicle stop information is used as the first candidate vehicle stop information corresponding to the key vehicle stop information to obtain a first candidate vehicle stop information list, wherein the intermediate distance difference corresponding to the associated vehicle stop information is the difference between the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the associated vehicle ID in the associated vehicle stop information and the geographical location corresponding to the center point of the target intersection minus the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, and the intermediate time difference corresponding to the associated vehicle stop information is the difference between the start stop time corresponding to the associated vehicle ID in the associated vehicle stop information and the start stop time corresponding to the key vehicle ID; Acquire a second candidate vehicle stop information list according to the first candidate vehicle stop information list and the key vehicle stop information, wherein the second candidate vehicle stop information list includes a plurality of second candidate vehicle stop information; taking the key vehicle stop information and all the second candidate vehicle stop information in the second candidate vehicle stop information list as queue vehicle information to obtain a queue vehicle information list; Get the length of the vehicle queue based on the queue vehicle information list.
2. The method for obtaining the length of a vehicle queue according to claim 1, characterized in that: The initial GPS data information list includes several initial GPS data information. The initial GPS data information is the vehicle GPS data information received by the target server on the day. The vehicle GPS data information is the data information reported by the GPS in the vehicle to the target server, including: vehicle ID, longitude and latitude coordinates and the generation time point corresponding to the longitude and latitude coordinates.
3. The method for obtaining the length of a vehicle queue according to claim 1, characterized in that: The target section is a section between the target intersection and the designated intersection, the designated intersection is an intersection adjacent to the target intersection, and the vehicle in the target section drives from the designated intersection to the target intersection.
4. The method for obtaining the length of a vehicle queue according to claim 1, characterized in that: The key vehicle ID is the identity of the key vehicle, and the key vehicle is the first vehicle that stops in the target section and waits to pass through the target intersection.
5. The method for obtaining the length of a vehicle queue according to claim 4, characterized in that: The associated vehicle ID is an identification of the associated vehicle, and the associated vehicle is a vehicle that stops in the target road section and whose parking start time is greater than the key vehicle's parking start time.
6. The method for obtaining the length of a vehicle queue according to claim 1, characterized in that: The first candidate vehicle stop information includes: the first candidate vehicle ID, the start stop time corresponding to the first candidate vehicle ID, the end stop time corresponding to the first candidate vehicle ID, and the stop longitude and latitude coordinates corresponding to the first candidate vehicle ID.
7. The method for obtaining the length of a vehicle queue according to claim 6, characterized in that: In the step of obtaining the second candidate vehicle stop information list according to the first candidate vehicle stop information list and the key vehicle stop information, when the starting stop time corresponding to the first candidate vehicle ID in the first candidate vehicle stop information is greater than the starting stop time corresponding to the key vehicle ID and less than the ending stop time corresponding to the key vehicle ID, the difference obtained by subtracting the starting stop time corresponding to the first candidate vehicle ID from the ending stop time corresponding to the first candidate vehicle ID is less than the difference obtained by subtracting the starting stop time corresponding to the key vehicle ID from the ending stop time corresponding to the key vehicle ID, and the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the first candidate vehicle ID and the geographical location corresponding to the center point of the target intersection is greater than the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, the first candidate vehicle stop information is used as the second candidate vehicle stop information.
8. A device for obtaining the length of a vehicle queue, the device being used to obtain the length of a vehicle queue at a target intersection, characterized in that: The device comprises: A key vehicle stop information and associated vehicle stop information acquisition module is used to acquire the key vehicle stop information corresponding to the target road section and the associated vehicle stop information list corresponding to the key vehicle stop information according to the initial GPS data information list, wherein the key vehicle stop information includes: a key vehicle ID, a start stop time corresponding to the key vehicle ID, an end stop time corresponding to the key vehicle ID, and the stop longitude and latitude coordinates corresponding to the key vehicle ID. The associated vehicle stop information list includes a plurality of associated vehicle stop information, and the associated vehicle stop information includes: an associated vehicle ID, a start stop time corresponding to the associated vehicle ID, an end stop time corresponding to the associated vehicle ID, and the stop longitude and latitude coordinates corresponding to the associated vehicle ID. A first candidate vehicle stop information acquisition module is used to traverse the list of associated vehicle stop information, and when the intermediate distance difference corresponding to the associated vehicle stop information is less than the product of the intermediate time difference corresponding to the associated vehicle stop information and the preset vehicle cache speed, the associated vehicle stop information is used as the first candidate vehicle stop information corresponding to the key vehicle stop information to obtain the first candidate vehicle stop information list, wherein the intermediate distance difference corresponding to the associated vehicle stop information is the difference between the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the associated vehicle ID in the associated vehicle stop information and the geographical location corresponding to the center point of the target intersection minus the distance between the geographical location corresponding to the stop longitude and latitude coordinates corresponding to the key vehicle ID and the geographical location corresponding to the center point of the target intersection, and the intermediate time difference corresponding to the associated vehicle stop information is the difference between the start stop time corresponding to the associated vehicle ID in the associated vehicle stop information and the start stop time corresponding to the key vehicle ID; A second candidate vehicle stop information acquisition module, used to acquire a second candidate vehicle stop information list according to the first candidate vehicle stop information list and the key vehicle stop information, wherein the second candidate vehicle stop information list includes a plurality of second candidate vehicle stop information; A queue vehicle information acquisition module, used for taking the key vehicle stop information and all the second candidate vehicle stop information in the second candidate vehicle stop information list as queue vehicle information to acquire the queue vehicle information list; The vehicle queue length acquisition module is used to obtain the vehicle queue length according to the queue vehicle information list.
9. A non-transitory computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the method for obtaining the length of a vehicle queue as described in any one of claims 1 to 7.
10. An electronic device, comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for obtaining the length of a vehicle queue as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and apparatus for obtaining vehicle queue length
CN105809956B
Real-time estimation method for queue length based on recognition of number plate and GPS data
CN110322704A
Signal intersection motor vehicle queuing vehicle trajectory reconstruction method
CN114360250A