CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to Chinese Patent Application NO.
CN202111334849.9, titled "METHOD, APPARATUS, STORAGE MEDIUM, AND VEHICLE FOR PREDICTING TRAFFIC FLOW",
filed Nov. the 11th, 2021, the entire contents of which are incorporated herein by
reference.
Technical Field
[0002] The disclosure relates to the field of intelligent driving, and specifically provides
a method, apparatus, storage medium, and a vehicle for predicting traffic flow.
Background Art
[0003] In intelligent driving applications, traffic flow is an important type of input information,
which can assist a vehicle in making a better decision, including: adjusting a maximum
driving speed limit in real time, such as where when there is congestion ahead, the
maximum speed limit may be lowered in advance, to avoid poor passenger experience
due to sudden deceleration; making a lane-level decision, such as to prevent a lane
change to a lane with a similar or lower traffic speed; and assisting target prediction,
such as where when the traffic flow of a lane next to a current lane is significantly
lower than that of the current lane, a target vehicle on the front side has a greater
probability of invading the current lane, in which case predicting a behavior of a
neighboring vehicle in advance can effectively avoid a collision risk.
[0004] As an important source of traffic flow information, a high-definition map can be
used to provide roadside-based traffic congestion information. However, the high-definition
map depends on statistical data, and has a lower real-time performance than a sensing
result from a sensor on the vehicle. In addition, the congestion information is provided
mostly based on roads, which results in a failure to describe the traffic flow in
each lane in a subdivided manner. How to obtain vehicle information through a vehicle
sensor to accurately predict lane-level traffic flow information has become an urgent
problem to be solved.
[0005] Accordingly, there is a need for a new solution to solve the foregoing problem in
the art.
Summary of the Disclosure
[0006] The disclosure aims to solve the foregoing technical problem, that is, to solve the
problem of how to obtain vehicle information of a target lane through a sensor on
the vehicle and accurately predict lane-level traffic flow.
[0007] In a first aspect, the disclosure provides a method for predicting traffic flow on
the vehicle. The method includes:
S1, selecting a target vehicle and a reference vehicle, wherein the reference vehicle
and the target vehicle are both located in a target lane, and the reference vehicle
is located in front of the target vehicle and is adjacent to the target vehicle;
S2, obtaining vehicle information of the target vehicle and the reference vehicle,
and the vehicle information at least includes a vehicle code, an acceleration, and
a speed;
S3, determining whether the target vehicle is in a following state based on the vehicle
information of the target vehicle and the reference vehicle and a non-free driving
state of the target vehicle relative to the reference vehicle, and
if not, step S4, or
if so, step S5;
S4, returning to step S2 when the target vehicle is not in the following state; and
S5, performing traffic flow prediction on the vehicle based on the vehicle information
of the target vehicle when the target vehicle is in the following state.
[0008] In an implementation of the foregoing the method for predicting traffic flow on the
vehicle, the step of "determining whether the target vehicle is in a following state
based on the vehicle information of the target vehicle and the reference vehicle and
a non-free driving state of the target vehicle relative to the reference vehicle"
specifically includes:
S31, obtaining the vehicle information of the target vehicle and the reference vehicle
in real time at a set time interval;
S32, comparing whether a real-time vehicle code of the reference vehicle that is obtained
in real time is the same as a historical vehicle code of the reference vehicle, and
if not, adjusting a following state determination counter to a preset minimum value,
wherein the following state determination counter comprises an acceleration following
state determination counter and a deceleration following state determination counter,
then updating the historical vehicle code of the reference vehicle, and returning
to step S31, or
if so, performing step S33;
S33, calculating a non-free driving state determination identifier;
S34, determining whether the non-free driving state determination identifier is greater
than a preset identifier value, and
if not, decreasing both the acceleration following state determination counter and
the deceleration following state determination counter by a first preset count value,
and returning to step S31, or
if so, determining that the target vehicle is in the non-free driving state, and performing
step S35;
S35, determining whether the acceleration of the target vehicle is positive or negative,
and
if the acceleration of the target vehicle is positive, increasing the acceleration
following state determination counter by a second preset count value, and performing
step S36, or
if the acceleration of the target vehicle is negative, increasing the deceleration
following state determination counter by a third preset count value, and performing
step S36; and
S36, determining whether the acceleration following state determination counter with
the second preset count value added is greater than a first following state determination
threshold, and determining whether the deceleration following state determination
counter with the third preset count value added is greater than a second following
state determination threshold, and
if so for both cases, determining that the target vehicle is in the following state
relative to the reference vehicle,
otherwise, returning to step S31.
[0009] In an implementation of the foregoing the method for predicting traffic flow on the
vehicle , the step of "performing traffic flow prediction on the vehicle based on
the vehicle information of the target vehicle when the target vehicle is in the following
state" specifically includes:
taking the speed of the target vehicle as an average speed of the vehicles in the
target lane.
[0010] In an implementation of the foregoing the method for predicting traffic flow on the
vehicle, the calculation method for the non-free driving state determination identifier
is:

wherein α is the non-free driving state determination identifier,
ẋn(
t -
T) is a speed value of the target vehicle at a moment
t -
T, ẋn+1(
t -
T) is a speed value of the reference vehicle at a moment
t -
T, ẍn+1(
t) is an acceleration value at a moment
t, and
T is a reaction time constant of a driver.
[0011] In an implementation of the foregoing the method for predicting traffic flow on the
vehicle, step S34 further includes:
after performing the step of "decreasing both the acceleration following state determination
counter and the deceleration following state determination counter by a first preset
count value" and before returning to step S31,
determining whether the acceleration following state determination counter with the
first preset count value subtracted is less than the preset minimum value, and if
so, assigning the acceleration following state determination counter to the preset
minimum value, and then returning to perform step S31; and
determining whether the deceleration following state determination counter with the
first preset count value subtracted is less than the preset minimum value, and if
so, assigning the deceleration following state determination counter to the preset
minimum value, and then returning to perform step S31; and
before performing step S36, the following steps are further comprised:
determining whether the acceleration following state determination counter with the
second preset count value added exceeds a first preset threshold, and if so, assigning
the acceleration following state determination counter to the first preset threshold,
and then performing step S36; and
determining whether the deceleration following state determination counter with the
third preset count value added exceeds a second preset threshold, and if so, assigning
the deceleration following state determination counter to the second preset threshold,
and then performing step S36.
[0012] In a second aspect, the disclosure provides apparatus for predicting traffic flow
on the vehicle. The apparatus includes:
a vehicle information obtaining module configured to obtain vehicle information of
a target vehicle and a reference vehicle, and the vehicle information at least includes
a vehicle code, an acceleration, and a speed;
a following state determination module configured to perform the following operations:
selecting the target vehicle and the reference vehicle, wherein the reference vehicle
and the target vehicle are both located in a target lane, and the reference vehicle
is located in front of the target vehicle and is adjacent to the target vehicle; and
determining whether the target vehicle is in a following state based on the vehicle
information of the target vehicle and the reference vehicle and a non-free driving
state of the target vehicle relative to the reference vehicle; and
a traffic flow prediction module configured to perform traffic flow prediction on
the vehicle based on the vehicle information of the target vehicle when the target
vehicle is in the following state.
[0013] In an implementation of the foregoing the apparatus for predicting traffic flow on
the vehicle, the following state determination module is further configured to perform
the following operations:
obtaining the vehicle information of the target vehicle and the reference vehicle
in real time at a set time interval;
comparing whether a real-time vehicle code of the reference vehicle that is obtained
in real time is the same as a historical vehicle code of the reference vehicle, and
if not, adjusting a following state determination counter to a preset minimum value,
wherein the following state determination counter comprises an acceleration following
state determination counter and a deceleration following state determination counter,
then updating the historical vehicle code of the reference vehicle, and returning
to step of "obtaining the vehicle information of the target vehicle and the reference
vehicle in real time at a set time interval", or
if so, calculating a non-free driving state determination identifier;
determining whether the non-free driving state determination identifier is greater
than a preset identifier value, and
if not, decreasing both the acceleration following state determination counter and
the deceleration following state determination counter by a first preset count value,
and returning to the step of "obtaining the vehicle information of the target vehicle
and the reference vehicle in real time at a set time interval", or
if so, determining that the target vehicle is in the non-free driving state; and
determining whether the acceleration of the target vehicle is positive or negative,
and
if the acceleration of the target vehicle is positive, increasing the acceleration
following state determination counter by a second preset count value, and performing
"following state determination", or
if the acceleration of the target vehicle is negative, increasing the deceleration
following state determination counter by a third preset count value, and performing
"following state determination",
wherein the following state determination involves determining whether the acceleration
following state determination counter with the second preset count value added is
greater than a first following state determination threshold, and determining whether
the deceleration following state determination counter with the third preset count
value added is greater than a second following state determination threshold, and
if so for both cases, determining that the target vehicle is in the following state
relative to the reference vehicle,
otherwise, returning to the step of "obtaining the vehicle information of the target
vehicle and the reference vehicle in real time at a set time interval".
[0014] In an implementation of the foregoing the apparatus for predicting traffic flow on
the vehicle, the traffic flow prediction module is further configured to perform the
following operation:
taking the speed of the target vehicle as an average speed of the vehicles in the
target lane.
[0015] In a third aspect, the disclosure provides a storage medium adapted to store a plurality
of program codes, where the program codes are adapted to be loaded and run by a processor
to perform a method for predicting traffic flow on the vehicle according to any one
of the foregoing solutions.
[0016] In a fourth aspect, the disclosure provides a vehicle including a vehicle body, a
processor, and a memory, where the memory is adapted to store a plurality of program
codes, and the program codes are adapted to be loaded and run by the processor to
perform a method for predicting traffic flow on the vehicle according to any one of
the foregoing solutions.
[0017] With the foregoing technical solutions, the disclosure makes it possible to obtain
vehicle data of a vehicle in the target lane through a sensor on the vehicle, and
determine whether a moving speed of the target vehicle may represent average vehicle
traffic of the lane by analyzing a motion state between the target vehicle and an
adjacent vehicle, that is, a vehicle that has a following relationship with the target
vehicle, thereby obtaining more accurate average lane-level traffic flow and providing
more accurate data support for intelligent driving.
Brief Description of the Drawings
[0018] Preferred implementations of the disclosure are described below with reference to
drawings. Among the drawings:
FIG. 1 is a schematic diagram of positions of vehicles on a road according to an embodiment
of the disclosure;
FIG. 2 is a flowchart of main steps of a method for predicting traffic flow on the
vehicle according to an embodiment of the disclosure;
FIG. 3 is a flowchart of specific implementation of step S3 in FIG. 2;
FIG. 4 is a first schematic diagram of a compositional structure of a apparatus for
predicting traffic flow on the vehicle
according to an embodiment of the disclosure; and
FIG. 5 is a second schematic diagram of a compositional structure of a apparatus for
predicting traffic flow on the vehicle according to an embodiment of the disclosure.
Detailed Description of Embodiments
[0019] First referring to FIG. 1, FIG. 1 is a schematic diagram of positions of vehicles
on a road according to an embodiment of the disclosure. In many existing vehicle-side
traffic flow calculation strategies, simply a driving speed of a vehicle closest to
an ego vehicle or an average speed of vehicles in a detected lane is used to represent
a traffic flow rate. However, each vehicle on a road is diverse in terms of motion,
and the above processing method is often one-sided, which may sometimes result in
a misleading to an accurate determination of the traffic flow, and then causes a driving
assistance system to make some inappropriate decisions, thereby affecting the user
experience.
[0020] In FIG. 1, there is a large difference in driving speed between a vehicle Veh1 in
a left lane that is adjacent to a vehicle Ego1 and a plurality of vehicles far away
from the adjacent vehicle. In this case, if traffic flow of the lane is determined
simply based on the speed of the adjacent vehicle, there may be inaccurate predictions,
which will prevent the driving assistance system from making a correct decision. For
example, in a scenario of the Ego1, the Ego1 may mistakenly consider that the traffic
flow speed in the left lane is high due to a high speed of the Veh1. When congestion
occurs in the lane in which Ego1 is located, the driving assistance system may give
inappropriate prompt information indicating a lane change to the left side, in order
to achieve a higher driving speed.
[0021] Aiming at such an impact on the determination of the overall traffic flow of the
lane due to simply use of the moving state of a single target, the method for predicting
traffic flow on the vehicle based on an analysis of a non-free moving state of a vehicle
of the disclosure is desired to determine whether the motion of one of vehicles in
the target lane that have a leading-and-following relationship is representative by
determining whether there is a restrictive relationship between the motions of the
vehicles, thereby obtaining predicted traffic flow information of the target lane.
[0022] Still referring to FIG. 2, FIG. 2 is a flowchart of main steps of a method for predicting
traffic flow on the vehicle according to an embodiment of the disclosure. As shown
in FIG. 2, the method for predicting traffic flow on the vehicle of the disclosure
includes:
Step S1: selecting a target vehicle and a reference vehicle;
Step S2: obtaining vehicle information of the target vehicle and the reference vehicle;
Step S3: determining whether the target vehicle is in a following state based on the
vehicle information of the target vehicle and the reference vehicle and a non-free
driving state of the target vehicle relative to the reference vehicle; and
Step S4: performing traffic flow prediction on the vehicle based on the vehicle information
of the target vehicle when the target vehicle is in the following state.
[0023] In step S1, both the target vehicle and the reference vehicle should be located in
a same lane, and the reference vehicle is located in front of the target vehicle and
is adjacent to the target vehicle. Preferably, an adjacent vehicle on the front side
of an ego vehicle that may have a great influence on the driving of the ego vehicle
is selected as the target vehicle. As an example, as shown in FIG. 1, the ego vehicle
is Ego1, and a vehicle Veh1 in an adjacent lane on the left side of the ego vehicle
is selected as the target vehicle. An adjacent vehicle Veh2 in the same lane as and
in front of the vehicle Veh1 is selected as the reference vehicle, and there should
be no other vehicles between the vehicle Veh1 and the vehicle Veh2.
[0024] In step S2, the vehicle information of the target vehicle and the reference vehicle
is obtained, where the vehicle information includes a vehicle code, an acceleration,
and a speed. A method for obtaining the vehicle information is not limited in the
disclosure. As an example, a vehicle sensor (such as one or more of an acceleration
sensor, a speed sensor, a vehicle image sensor, an onboard laser radar, an onboard
ultrasonic radar, etc.) may be used to obtain data, such as license plate numbers,
exterior characteristics, and colors, of a plurality of vehicles in a detection area,
and the data is fused with the speed, acceleration and other data of the ego vehicle,
to obtain the characteristics of each vehicle. Each vehicle is assigned a unique vehicle
code, that is, unique ID data, and speed, acceleration and other information of the
vehicle are obtained.
[0025] It should be noted that the vehicle characteristics obtained by processing data from
the vehicle sensor need to be compared with vehicle characteristics recorded at a
previous moment. If they are the same, a same vehicle code is assigned, and if they
are different, a new vehicle code is assigned.
[0026] Still referring to FIG. 3, FIG. 3 is a specific implementation method of step S3.
[0027] In step S31, the vehicle information of the target vehicle and the reference vehicle
are obtained in real time at a set time interval, the vehicle information including:
a current ID (vehicle code) of the target vehicle, an acceleration of the target vehicle,
a speed of the target vehicle, a current ID (vehicle code) of the reference vehicle,
an acceleration of the reference vehicle, a speed of the reference vehicle, etc. The
time interval at which the vehicle information is obtained may be set depending on
factors such as the type of a vehicle sensor, a processing speed of sensor data, and
a current speed of the ego vehicle. For example, the time interval may be set to 50
milliseconds.
[0028] It should be noted that, if the vehicle code of the target vehicle is not obtained
in step S31, it indicates that the target vehicle may have moved away from the target
lane or not be within a detection range of the vehicle sensor. In this case, there
is a need to return to step S1 for reselection of the target vehicle and the reference
vehicle.
[0029] In steps S32 and S33, a comparison is made as to whether a real-time vehicle code
of the reference vehicle that is obtained in real time is the same as a historical
vehicle code of the reference vehicle, that is, a comparison is made as to whether
the current ID of the reference vehicle is the same as a historical ID of the reference
vehicle, and whether the reference vehicle in front of the target vehicle at the current
moment and the reference vehicle at a previous moment are the same vehicle is checked.
[0030] If the current ID of the reference vehicle is not the same as the historical ID of
the reference vehicle, it indicates that the current reference vehicle may be changed
due to the reference vehicle having moved away from the target lane or other vehicles
entering the target lane, and an original motion restrictive relationship between
the target vehicle and the reference vehicle no longer exists. Therefore, in step
S34, both the acceleration following state determination counter and the deceleration
following state determination counter are adjusted to a preset minimum value (in this
embodiment, the preset minimum value is set to 0).
[0031] In addition, before returning to step S31 for loop detection, the historical vehicle
code of the reference vehicle is updated, and an association relationship between
the target vehicle and the reference vehicle is re-established.
[0032] If the current ID of the reference vehicle is the same as the historical ID of the
reference vehicle, it indicates that the reference vehicle has not changed and the
motion restrictive relationship between the target vehicle and the reference vehicle
is still valid. In this case, step S35 is performed, in which a non-free driving state
determination identifier is calculated.
[0033] A vehicle in a non-free driving state has the following three main characteristics:
restriction, latency, and transfer. It is the three characteristics that are exactly
used in the disclosure to determine a motion relationship between leading and following
vehicles. In the embodiments of the disclosure, the most robust first-order kinematic
model is used to determine the motion state of the leading and following vehicles,
that is

in formula (1),
F is a constant,
ẋn(
t - T) is a speed value of the target vehicle at a moment
t -
T, ẋn+1(
t - T) is a speed value of the reference vehicle at a moment
t -
T, ẍn+1(
t) is an acceleration value at a moment
t, and
T is a reaction time constant of a driver.
T is a parameter related to the driver's responsiveness. As an example, it is usually
set to 1 second, which is suitable for most scenarios.
[0034] Formula (1) reflects that a difference in speeds between the leading and following
vehicles may affect the acceleration of subsequent vehicles (restriction), with a
delay of T time (latency), and the value of the constant F reflects the association
between the leading and following vehicles.
[0035] In actual applications, considering errors and fluctuations in data from the vehicle
sensor, the value of the constant F will also fluctuate greatly even if there is an
obvious constraint relationship between two motor vehicles. Therefore, in the disclosure,
to improve the determination robustness, the condition, in formula (2), for determining
whether the leading and following vehicles are in a non-free motion state is relaxed
to: There is a certain value F greater than 0, so that formula (1) is established,
and F is no longer required to remain relatively unchanged between a plurality of
frames. Therefore, the calculation method for the non-free driving state determination
identifier f may be defined as:

[0036] In step S36, it is determined whether the non-free driving state determination identifier
f is greater than 0.
[0037] If f is less than 0, step S37 is performed, in which both the acceleration following
state determination counter and the deceleration following state determination counter
are decreased by a first preset count value (in this embodiment, the first preset
count value is 1). In addition, before returning to step S31, whether the acceleration
following state determination counter and the deceleration following state determination
counter are respectively less than the preset minimum value is checked. If less than
the preset minimum value, the acceleration following state determination counter and/or
the deceleration following state determination counter are/is adjusted to the preset
minimum value.
[0038] If f is greater than 0, which indicates that the target vehicle is in a non-free
driving state relative to the reference vehicle, step S38 is perform, in which it
is determined whether the acceleration of the target vehicle is positive or negative.
[0039] If the acceleration of the target vehicle is greater than 0, which indicates that
the acceleration of the target vehicle is positive, the acceleration following state
determination counter is increased by a second preset count value (in this embodiment,
the second preset count value is 1) in step S39; in addition, whether the acceleration
following state determination counter with the second preset count value added exceeds
a first preset threshold is checked, and if so, the acceleration following state determination
counter is assigned the first preset threshold, and step S3B is performed.
[0040] If the acceleration of the target vehicle is less than 0, which indicates that the
acceleration of the target vehicle is negative, the deceleration following state determination
counter is increased by a third preset count value (in this embodiment, the third
preset count value is 1) in step S3A; in addition, whether the deceleration following
state determination counter with the third preset count value added exceeds a second
preset threshold is checked, and if so, the deceleration following state determination
counter is assigned the second preset threshold, and step S3B is performed.
[0041] In step S3B, it is determined whether the acceleration following state determination
counter with the second preset count value added is greater than a first following
state determination threshold, and it is also determined whether the deceleration
following state determination counter with the third preset count value added is greater
than a second following state determination threshold.
[0042] If so for both cases, that is, the acceleration following state determination counter
is greater than the first following state determination threshold and the deceleration
following state determination counter is greater than the second following state determination
threshold, step S3C is performed, in which it is determined that the target vehicle
is in the following state relative to the reference vehicle.
[0043] Otherwise, when the following cases 1, 2 or 3 are met, step S31 is returned for loop
detection.
[0044] Case 1: the acceleration following state determination counter is less than the first
following state determination threshold, and the deceleration following state determination
counter is greater than the second following state determination threshold.
[0045] Case 2: the deceleration following state determination counter is greater than the
second following state determination threshold, and the acceleration following state
determination counter is greater than the first following state determination threshold.
[0046] Case 3: the acceleration following state determination counter is less than the first
following state determination threshold, and the deceleration following state determination
counter is less than the second following state determination threshold.
[0047] It should be noted that the preset minimum value, the first preset threshold, and
the second preset threshold are set to delimit a valid value range of the acceleration
following state determination counter and the deceleration following state determination
counter, thereby ensuring the real-time performance of following state determination
while ensuring the accuracy of following state determination, and thus providing more
adaptability to practical applications.
[0048] The preset minimum value, the first preset threshold, the second preset threshold,
the first following state determination threshold, the second following state determination
threshold, etc. may be set in combination with the set time interval in step S31,
road conditions, etc., and therefore, they are set by practical experience. As an
example, when the set time at which the vehicle information is obtained is 50 milliseconds,
the first following state determination threshold and the second following state determination
threshold may be both set to 10, the preset minimum value may be set to 0, and the
first preset threshold and the third threshold may be set to 20. In addition, the
first preset count value, the second preset count value, and the third preset count
value are all set to 1. Inventors in the art may also set the above preset values
according to actual conditions, but such settings of different values should not be
considered as going beyond the scope of the disclosure.
[0049] Upon determining that the target vehicle is in the following state relative to the
reference vehicle, traffic flow prediction on the vehicle may be performed based on
the information of the target vehicle, that is, by taking the speed of the target
vehicle as an average speed of the vehicles in the target lane.
[0050] Further, the disclosure also provides a apparatus for predicting traffic flow on
the vehicle. As shown in FIG. 4, the apparatus for predicting traffic flow on the
vehicle 4 in an embodiment of the disclosure mainly includes: a vehicle information
obtaining module 41, a following state determination module 42, and a traffic flow
prediction module 43.
[0051] The vehicle information obtaining module 41 is configured to obtain, by a vehicle
sensor, vehicle information of a target vehicle and a reference vehicle on a vehicle
driving road and of other vehicles within a detection range of the vehicle sensor.
As shown in FIG. 5, in an embodiment, the vehicle information obtaining module 41
may further include a sensor sub-module 41a and a sensor data processing sub-module
41b.
[0052] The sensor sub-module 41a may be one or more of an acceleration sensor, a speed sensor,
a vehicle image sensor, an onboard laser radar, an onboard ultrasonic radar, etc.
The sensor sub-module 41a obtains data, such as license plate numbers, exterior features,
colors, speeds, and accelerations, of the ego vehicle within the detection range of
the vehicle sensor and the plurality of surrounding vehicles. Then, the sensor data
processing sub-module 41b performs data fusion to obtain the characteristics of each
vehicle, assigns a unique vehicle code to each vehicle, that is, unique ID data, and
obtains speed, acceleration and other information of the vehicle.
[0053] The following state determination module 42 is configured to select a target vehicle
and a reference vehicle, and determine whether the target vehicle is in a following
state by detecting a non-free driving state of the target vehicle relative to the
reference vehicle based on vehicle information, such as a vehicle code, an acceleration,
and a speed, of the target vehicle and the reference vehicle. As shown in FIG. 5,
in an embodiment, the following state determination module 42 may further include
a target selection sub-module 42a, a data calculation sub-module 42b, and a determination
sub-module 42c.
[0054] The target selection sub-module 42a is configured to select a target vehicle and
a reference vehicle from the vehicle information obtained by the vehicle information
obtaining module 41. Preferably, an adjacent vehicle on the front side of an ego vehicle
that may have a great influence on the driving of the ego vehicle is generally selected
as the target vehicle. A vehicle that is located in a same lane as the target vehicle
and is in front of the target vehicle is selected as the reference vehicle, and the
target vehicle is adjacent to the reference vehicle, that is, there are no other vehicles
between the target vehicle and the reference vehicle.
[0055] The data calculation sub-module 42b is configured to calculate a non-free driving
state determination identifier by using formula (2) based on the speed, acceleration,
and other information of the target vehicle and the reference vehicle.
[0056] The determination sub-module 42c is configured to determine whether the target vehicle
is in a following state based on ID data of the reference vehicle, the non-free driving
state determination identifier, and the acceleration information of the target vehicle.
Specific determination conditions include: the ID of the reference vehicle needs to
remain unchanged, the target vehicle needs to be in a non-free driving state relative
to the reference vehicle, and both the count values of acceleration and deceleration
of the target vehicle need to exceed the set determination thresholds. For specific
technical details, reference may be made to the content of steps S32 to S3C in the
method part of the embodiment of the disclosure.
[0057] The traffic flow prediction module 43 is configured to perform traffic flow prediction
on the vehicle according to the information of the target vehicle upon determining
that the target vehicle is in the following state relative to the reference vehicle,
that is, by taking the speed of the target vehicle as an average speed of the vehicles
in the target lane.
[0058] Further, the disclosure further provides a storage medium. The storage medium may
be configured to store a program for performing the method for predicting traffic
flow on the vehicle in the foregoing method embodiments, where the program may be
loaded and run by a processor to implement the foregoing the method for predicting
traffic flow on the vehicle. For ease of description, only parts related to the embodiments
of the disclosure are shown. For specific technical details that are not disclosed,
reference may be made to the method part of the embodiments of the disclosure. The
storage medium may be a storage device formed by various electronic devices. Optionally,
the storage medium in the embodiments of the disclosure is a non-transitory computer-readable
storage medium.
[0059] Further, the disclosure further provides a vehicle including a vehicle body, a processor,
and a memory. Optionally, the vehicle body may be an electric vehicle; the processor
and the memory are mounted on the vehicle body and are powered by the vehicle body;
and the memory may be configured to store a program for performing the method for
predicting traffic flow on the vehiclein the foregoing method embodiments, where the
program may be loaded and run by the processor to implement the foregoing the method
for predicting traffic flow on the vehicle. For ease of description, only parts related
to the embodiments of the disclosure are shown. For specific technical details that
are not disclosed, reference may be made to the method part of the embodiments of
the disclosure. The memory may be a storage device formed by various electronic devices.
Optionally, the memory in the embodiments of the disclosure is a non-transitory readable
storage medium.
[0060] Those skilled in the art should be able to realize that the method steps of the various
examples described in conjunction with the embodiments disclosed herein can be implemented
in electronic hardware, computer software or a combination of both. To clearly illustrate
the interchangeability of electronic hardware and software, the compositions and steps
of the various examples have been generally described in terms of functionality in
the above description. Whether these functions are performed in electronic hardware
or software depends on the specific application and design constraints of the technical
solution. Those skilled in the art can implement the described functions by using
different methods for each particular application, but such implementation should
not be considered as going beyond the scope of the disclosure.
[0061] It should be noted that the terms "first", "second", "third", and other ordinal numbers
in the description, claims, and drawings of the disclosure are only intended to distinguish
between similar objects, not to describe or indicate a particular order or sequence.
It should be understood that the data termed in such a way are interchangeable in
proper circumstances so that the embodiments of the disclosure described herein can
be implemented in other orders than the order illustrated or described herein.
[0062] Heretofore, the technical solutions of the disclosure have been described with reference
to the preferred embodiments shown in the accompanying drawings. However, those skilled
in the art can readily understand that the scope of protection of the disclosure is
apparently not limited to these specific embodiments. Those skilled in the art can
make equivalent changes or substitutions to the related technical features without
departing from the principle of the disclosure, and all the technical solutions with
such changes or substitutions shall fall within the scope of protection
1. A method for predicting traffic flow on the vehicle, comprising:
S1, selecting a target vehicle and a reference vehicle, wherein the reference vehicle
and the target vehicle are both located in a target lane, and the reference vehicle
is located in front of the target vehicle and is adjacent to the target vehicle;
S2, obtaining vehicle information of the target vehicle and the reference vehicle,
wherein the vehicle information at least includes a vehicle code, an acceleration,
and a speed;
S3, determining whether the target vehicle is in a following state based on the vehicle
information of the target vehicle and the reference vehicle and a non-free driving
state of the target vehicle relative to the reference vehicle, and
if not, step S4 or
if so, step S5;
S4, returning to step S2 when the target vehicle is not in the following state; and
S5, performing traffic flow prediction on the vehicle based on the vehicle information
of the target vehicle when the target vehicle is in the following state.
2. The method for predicting traffic flow on the vehicle according to claim 1, wherein
the step of "determining whether the target vehicle is in a following state based
on the vehicle information of the target vehicle and the reference vehicle and a non-free
driving state of the target vehicle relative to the reference vehicle" specifically
comprises:
S31, obtaining the vehicle information of the target vehicle and the reference vehicle
in real time at a set time interval;
S32, comparing whether a real-time vehicle code of the reference vehicle that is obtained
in real time is the same as a historical vehicle code of the reference vehicle, and
if not, adjusting a following state determination counter to a preset minimum value,
which comprises an acceleration following state determination counter and a deceleration
following state determination counter, then updating the historical vehicle code of
the reference vehicle, and returning to step S31, or
if so, step S33;
S33, calculating a non-free driving state determination identifier;
S34, determining whether the non-free driving state determination identifier is greater
than a preset identifier value, and
if no, decreasing both the acceleration following state determination counter and
the deceleration following state determination counter by a first preset count value,
and returning to step S31, or
if so, determining that the target vehicle is in the non-free driving state, and performing
step S35;
S35, determining whether the acceleration of the target vehicle is positive or negative,
and
if the acceleration of the target vehicle is positive, increasing the acceleration
following state determination counter by a second preset count value, and performing
step S36, or
if the acceleration of the target vehicle is negative, increasing the deceleration
following state determination counter by a third preset count value, and performing
step S36; and
S36, determining whether the acceleration following state determination counter with
the second preset count value added is greater than a first following state determination
threshold, and determining whether the deceleration following state determination
counter with the third preset count value added is greater than a second following
state determination threshold, and
if so for both cases, determining that the target vehicle is in the following state
relative to the reference vehicle,
otherwise, returning to step S31.
3. The method for predicting traffic flow on the vehicle according to claim 1 or 2, wherein
the step of "performing traffic flow prediction on the vehicle based on the vehicle
information of the target vehicle when the target vehicle is in the following state"
specifically comprises:
taking the speed of the target vehicle as an average speed of the vehicles in the
target lane.
4. The method for predicting traffic flow on the vehicle according to claim 1, 2, or
3, wherein the calculation method for the non-free driving state determination identifier
is:

wherein f is the non-free driving state determination identifier,
ẋn(
t -
T) is a speed value of the target vehicle at the moment
t -
T, ẋn+1(
t -
T) is a speed value of the reference vehicle at the moment
t -
T, ẍn+1(
t) is an acceleration value at the moment
t, and
T is a reaction time constant of a driver.
5. The method for predicting traffic flow on the vehicle according to any one of claims
2 to 4, wherein
step S34 further comprises:
after performing the step of "decreasing both the acceleration following state determination
counter and the deceleration following state determination counter by a first preset
count value" and before returning to step S31,
determining whether the acceleration following state determination counter with the
first preset count value subtracted is less than the preset minimum value, and if
so, assigning the acceleration following state determination counter to the preset
minimum value, and then returning to perform step S31; and
determining whether the deceleration following state determination counter with the
first preset count value subtracted is less than the preset minimum value, and if
so, assigning the deceleration following state determination counter to the preset
minimum value, and then returning to perform step S31; and
before performing step S36, the following steps are further comprised:
determining whether the acceleration following state determination counter with the
second preset count value added exceeds a first preset threshold, and if so, assigning
the acceleration following state determination counter to the first preset threshold,
and then performing step S36; and
determining whether the deceleration following state determination counter with the
third preset count value added exceeds a second preset threshold, and if so, assigning
the deceleration following state determination counter to the second preset threshold,
and then performing step S36.
6. A non-transitory computer-readable medium having instructions for execution by a processor,
the instructions when executed by the processor causing the processor toperform a
method for predicting traffic flow on the vehicle, the method preferably being the
method according to any one of claims 1 to 5, the method comprising:
S1, selecting a target vehicle and a reference vehicle, wherein the reference vehicle
and the target vehicle are both located in a target lane, and the reference vehicle
is located in front of the target vehicle and is adjacent to the target vehicle;
S2, obtaining vehicle information of the target vehicle and the reference vehicle,
and the vehicle information at least includes a vehicle code, an acceleration, and
a speed;
S3, determining whether the target vehicle is in a following state based on the vehicle
information of the target vehicle and the reference vehicle and a non-free driving
state of the target vehicle relative to the reference vehicle, and
if not, step S4 or
if so, step S5;
S4, returning to step S2 when the target vehicle is not in the following state; and
S5, performing traffic flow prediction on the vehicle based on the vehicle information
of the target vehicle when the target vehicle is in the following state.
7. The non-transitory computer-readable medium according to claim 6, wherein the step
of "determining whether the target vehicle is in a following state based on the vehicle
information of the target vehicle and the reference vehicle and a non-free driving
state of the target vehicle relative to the reference vehicle" specifically comprises:
S31, obtaining the vehicle information of the target vehicle and the reference vehicle
in real time at a set time interval;
S32, comparing whether a real-time vehicle code of the reference vehicle that is obtained
in real time is the same as a historical vehicle code of the reference vehicle, and
if not, adjusting a following state determination counter to a preset minimum value,
which comprises an acceleration following state determination counter and a deceleration
following state determination counter, then updating the historical vehicle code of
the reference vehicle, and returning to step S31, or
if so, step S33;
S33, calculating a non-free driving state determination identifier;
S34, determining whether the non-free driving state determination identifier is greater
than a preset identifier value, and
if no, decreasing both the acceleration following state determination counter and
the deceleration following state determination counter by a first preset count value,
and returning to step S31, or
if so, determining that the target vehicle is in the non-free driving state, and performing
step S35;
S35, determining whether the acceleration of the target vehicle is positive or negative,
and
if the acceleration of the target vehicle is positive, increasing the acceleration
following state determination counter by a second preset count value, and performing
step S36, or
if the acceleration of the target vehicle is negative, increasing the deceleration
following state determination counter by a third preset count value, and performing
step S36; and
S36, determining whether the acceleration following state determination counter with
the second preset count value added is greater than a first following state determination
threshold, and determining whether the deceleration following state determination
counter with the third preset count value added is greater than a second following
state determination threshold, and
if so for both cases, determining that the target vehicle is in the following state
relative to the reference vehicle,
otherwise, returning to step S31.
8. The non-transitory computer-readable medium according to according to claim 6 or 7,
wherein the step of "performing traffic flow prediction on the vehicle based on the
vehicle information of the target vehicle when the target vehicle is in the following
state" specifically comprises:
taking the speed of the target vehicle as an average speed of the vehicles in the
target lane.
9. The non-transitory computer-readable medium according to claim 6, 7, or 8, wherein
the calculation method for the non-free driving state determination identifier is:

wherein f is the non-free driving state determination identifier,
ẋn(
t -
T) is a speed value of the target vehicle at the moment
t -
T, ẋn+1(
t - T) is a speed value of the reference vehicle at the moment
t -
T, ẍn+1(
t) is an acceleration value at the moment
t, and
T is a reaction time constant of a driver.
10. The non-transitory computer-readable medium according to claim 7, 8, or 9, wherein
step S34 further comprises:
after performing the step of "decreasing both the acceleration following state determination
counter and the deceleration following state determination counter by a first preset
count value" and before returning to step S31,
determining whether the acceleration following state determination counter with the
first preset count value subtracted is less than the preset minimum value, and if
so, assigning the acceleration following state determination counter to the preset
minimum value, and then returning to perform step S31; and
determining whether the deceleration following state determination counter with the
first preset count value subtracted is less than the preset minimum value, and if
so, assigning the deceleration following state determination counter to the preset
minimum value, and then returning to perform step S31; and
before performing step S36, the following steps are further comprised:
determining whether the acceleration following state determination counter with the
second preset count value added exceeds a first preset threshold, and if so, assigning
the acceleration following state determination counter to the first preset threshold,
and then performing step S36; and
determining whether the deceleration following state determination counter with the
third preset count value added exceeds a second preset threshold, and if so, assigning
the deceleration following state determination counter to the second preset threshold,
and then performing step S36.
11. A vehicle, comprising a vehicle body, a processor, and a memory, wherein the memory
stores a plurality of program codes, and the program codes are loaded and run by the
processor to perform a method for predicting traffic flow on the vehicle according
to any one of claims 1 to 5.