CN111243266B - Vehicle information determination method and device and electronic equipment - Google Patents

Vehicle information determination method and device and electronic equipment Download PDF

Info

Publication number
CN111243266B
CN111243266B CN201811446372.1A CN201811446372A CN111243266B CN 111243266 B CN111243266 B CN 111243266B CN 201811446372 A CN201811446372 A CN 201811446372A CN 111243266 B CN111243266 B CN 111243266B
Authority
CN
China
Prior art keywords
vehicle
time
target
statistical
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811446372.1A
Other languages
Chinese (zh)
Other versions
CN111243266A (en
Inventor
周磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201811446372.1A priority Critical patent/CN111243266B/en
Publication of CN111243266A publication Critical patent/CN111243266A/en
Application granted granted Critical
Publication of CN111243266B publication Critical patent/CN111243266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • G08G1/0175Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

The embodiment of the invention provides a method and a device for determining vehicle information and electronic equipment. The method comprises the following steps: acquiring a vehicle identifier of a target vehicle entering a target area after a specified time in real time; determining each statistical item between the upper limit value of a backtracking time range and a specified time of a time point, wherein the statistical items are obtained based on first-class statistical information, the first-class statistical information is updated according to a preset period, and the first-class statistical information comprises a vehicle identification of a vehicle entering a target area and the statistical item of the time point of the latest entering of the target area; judging whether a target statistic item which contains a vehicle identifier of a target vehicle and has a time point within a backtracking time range exists in each obtained statistic item; and if so, determining that the time point of the target vehicle entering the target area for the last time is within the backtracking time range. Compared with the prior art, the scheme provided by the embodiment of the invention can reduce the time consumption of the information searching process and improve the query efficiency.

Description

Vehicle information determination method and device and electronic equipment
Technical Field
The invention relates to the technical field of data analysis of intelligent traffic, in particular to a method and a device for determining vehicle information and electronic equipment.
Background
Currently, with the continuous development of urban road construction, vehicles between cities come and go more frequently. Many times, the relevant personnel wish to be able to perform a specific vehicle analysis: a vehicle entering the target area after a certain time, whether a time point of the last entry into the target area is within the backtracking time range.
In the related art, a vehicle analysis method as to whether a time point of the latest entering of the target area is within the backtracking time range includes: the method comprises the steps of acquiring a vehicle identification of a target vehicle entering a target area after a specified moment in real time, searching a statistical entry when the target vehicle enters the target area for the last time in a plurality of statistical entries containing vehicle information of each vehicle entering the target area based on the vehicle identification of the target vehicle, and determining whether the time point when the target vehicle enters the target area for the last time is within a backtracking time range based on the searched time point in the statistical entry. Obviously, the data size of the plurality of statistical items is huge, and it takes much time to search information in the plurality of statistical items, resulting in low query efficiency.
Therefore, how to quickly and effectively analyze whether the time point when the vehicle enters the target area last time is within the backtracking time range is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for determining vehicle information and electronic equipment, so that the time consumption of an information searching process is reduced, and the query efficiency is improved. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for determining vehicle information, where the method includes:
acquiring a vehicle identifier of a target vehicle entering a target area after a specified time in real time;
determining each statistical item of a time point in a target time range, which is acquired based on first-type statistical information, wherein the first-type statistical information is as follows: information updated according to a predetermined cycle, and including: statistical entries regarding vehicle identifications of vehicles entering the target area and a point in time of a most recent entry into the target area, the target time range being: the time period from the upper limit value of the backtracking time range to the specified time is obtained;
judging whether a target statistic entry which contains the vehicle identification of the target vehicle and has a time point within the backtracking time range exists in each obtained statistic entry;
and if so, determining that the time point of the target vehicle entering the target area for the last time is within the backtracking time range.
Optionally, in a specific implementation manner, the manner of obtaining each statistical entry of the time point in the target time range based on the first type of statistical information includes:
acquiring each first item of a time point in the target time range from the first type of statistical information;
acquiring a vehicle identifier and a time point of a first vehicle entering the target area between the latest updating time of the first type of statistical information and the specified time;
for each first entry containing the acquired vehicle identification of the first vehicle, updating the point in time in the first entry to: the time point of the first vehicle corresponding to the vehicle identifier in the first entry;
regarding a first vehicle of which the vehicle identification is not contained in any first entry, taking the vehicle identification and the time point of the first vehicle as statistical entries to be supplemented;
and determining the statistical items to be supplemented and the first items as the statistical items of which the time points are in the target time range.
Optionally, in a specific implementation manner, the first type of statistical information is constructed in a manner that:
in each preset period, acquiring a vehicle identifier and a time point of a second vehicle entering the target area in the current period from second type statistical information; wherein the second type of statistical information includes: statistical entries of vehicle information on respective vehicles entering the target area;
at the end time of each preset period, determining the vehicle identification of each second vehicle and the latest time point corresponding to the vehicle identification from the acquired second vehicle identifications and time points; wherein the latest time is: a time point closest to the end time of the cycle;
judging whether the first type of statistical information is stored at the end time of each preset period;
if not, respectively taking the acquired vehicle identification of each second vehicle and the latest time point corresponding to the vehicle identification as a statistical item to obtain the first type of statistical information;
if yes, for each statistical entry containing the acquired vehicle identifier of the second vehicle in the first-type statistical information, updating the time point in the statistical entry as: the latest time point corresponding to the vehicle identification in the statistical entry; and aiming at each second vehicle of which the vehicle identification does not contain the first-class statistical information, adding the vehicle identification of the second vehicle and the corresponding latest time point into the first-class statistical information as a statistical item to obtain the updated first-class statistical information.
Optionally, in a specific implementation manner, before the step of obtaining, in real time, a vehicle identifier of a target vehicle entering a target area after a specified time, the method further includes:
determining a target gate corresponding to a target area and a target lane entering the target area through the target gate;
the step of acquiring in real time the vehicle identification of the target vehicle entering the target area after the specified time includes:
acquiring a vehicle identifier of a target vehicle driving through the target gate from the target lane after a specified time in real time;
the step of determining each statistical item, which is acquired based on the first type of statistical information and has a time point within the target time range, includes:
determining each statistical item which is acquired based on the first type of statistical information, wherein the gate is the target gate, the lane is the target lane, and the time point is in the target time range; wherein the first type of statistical information is: information updated according to a predetermined cycle, and including: and (3) statistical items of the collected vehicle identification of the vehicle, the gate passed by the vehicle, the lane driven by the vehicle when passing the gate and the time point of the last driving from the lane to the gate.
Optionally, in a specific implementation manner, the step of obtaining, in real time, a vehicle identifier of a target vehicle that has driven through the target gate from the target lane after a specified time includes:
acquiring each second item of a time point after the specified time from the third type of statistical information; wherein the third type of statistical information is real-time updated information, and includes: a statistical item of vehicle information on a third vehicle that has traveled through the respective gates;
extracting the vehicle identification of a third vehicle driving through each gate, and the corresponding lane and gate from each second item;
and obtaining the vehicle identifier of the third vehicle with the corresponding gate as the target gate and the corresponding lane as the vehicle identifier of the vehicle driving through the target gate from the obtained vehicle identifier of the third vehicle and the corresponding lane and gate.
Optionally, in a specific implementation manner, the step of obtaining, from the third type of statistical information, each second entry after the specified time at the time point includes:
dividing the statistical items generated in the time length into an item group every other first preset time length according to the sequence of the generation time of each statistical item in the third type of statistical information from morning to evening;
according to the sequence of the division time of each item group from morning to evening, acquiring a plurality of item groups divided within the time length from the third type of statistical information every other second preset time length; the second preset time length is integral multiple of the first preset time length;
respective second entries of the time point after the specified time are acquired from the acquired plurality of entry groups.
Optionally, in a specific implementation manner, before the step of determining each statistical item that is acquired based on the first type of statistical information and has a time point within the target time range, the method further includes:
judging whether the target vehicle enters the target area for the first time in a preset period of the designated moment;
if yes, the step of determining each statistical item of which the time point is in the target time range and which is obtained based on the first type of statistical information is executed.
Optionally, in a specific implementation manner, the step of determining whether the target vehicle enters the target area for the first time within a predetermined period of the specified time includes:
judging whether a preset cache space stores the vehicle identification of the target vehicle or not; wherein the buffer space is emptied at the end of each predetermined period;
if not, whether the target vehicle enters the target area for the first time within a preset period of the specified time is judged.
In a second aspect, an embodiment of the present invention provides a vehicle information determination apparatus, including:
the vehicle identification acquisition module is used for acquiring the vehicle identification of a target vehicle entering a target area after a specified moment in real time;
a statistical item determining module, configured to determine statistical items, which are acquired based on first-type statistical information and have time points within a target time range, where the first-type statistical information is: information updated according to a predetermined cycle, and including: statistical entries regarding vehicle identifications of vehicles entering the target area and a point in time of a most recent entry into the target area, the target time range being: the time period from the upper limit value of the backtracking time range to the specified time is obtained;
the target entry judging module is used for judging whether a target statistical entry which contains the vehicle identifier of the target vehicle and has a time point within the backtracking time range exists in each acquired statistical entry; if so, triggering a target vehicle determination module;
the target vehicle determination module is configured to determine that a time point at which the target vehicle has entered the target area last time is within the backtracking time range.
Optionally, in a specific implementation manner, the apparatus further includes a statistical item obtaining module, configured to obtain, based on the first type of statistical information, each statistical item of the time point within a target time range; the statistic item acquisition module comprises:
the first item acquisition sub-module is used for acquiring each first item of a time point in the target time range from the first type of statistical information;
the vehicle information acquisition sub-module is used for acquiring the vehicle identification and the time point of a first vehicle entering the target area between the latest updating time of the first type of statistical information and the specified time;
a time point updating submodule, configured to, for each first entry containing the acquired vehicle identifier of the first vehicle, update a time point in the first entry to: the time point of the first vehicle corresponding to the vehicle identifier in the first entry;
the supplementary item determining submodule is used for regarding a first vehicle of which the vehicle identification is not contained in any first item, and taking the vehicle identification and the time point of the first vehicle as statistical items to be supplemented;
and the statistical item determining submodule is used for determining the statistical items to be supplemented and the first items as the statistical items of which the time points are in the target time range.
Optionally, in a specific implementation manner, the apparatus further includes a statistical information construction module, configured to construct the first type of statistical information; the statistical information construction module comprises:
the statistical information acquisition submodule is used for acquiring the vehicle identification and the time point of a second vehicle entering the target area in the current period from the second type of statistical information in each preset period; wherein the second type of statistical information includes: statistical entries of vehicle information on respective vehicles entering the target area;
the time point determining submodule is used for determining the vehicle identifier of each second vehicle and the latest time point corresponding to the vehicle identifier from the acquired second vehicle identifiers and the time points at the end time of each preset period; wherein the latest time is: a time point closest to the end time of the cycle;
the statistical information judgment submodule is used for judging whether the first type of statistical information is stored at the end time of each preset period; if not, triggering a first information determination sub-module, and if yes, triggering a second information determination sub-module;
the first information determining submodule is used for respectively taking the acquired vehicle identifier of each second vehicle and the latest time point corresponding to the vehicle identifier as a statistical item to obtain the first type of statistical information;
the second information determination submodule is configured to, for each statistical entry that includes the acquired vehicle identifier of the second vehicle in the first category of statistical information, update a time point in the statistical entry to: the latest time point corresponding to the vehicle identification in the statistical entry; and aiming at each second vehicle of which the vehicle identification does not contain the first-class statistical information, adding the vehicle identification of the second vehicle and the corresponding latest time point into the first-class statistical information as a statistical item to obtain the updated first-class statistical information.
Optionally, in a specific implementation manner, the apparatus further includes:
the route identification determining module is used for determining a target gate corresponding to a target area and a target lane entering the target area through the target gate before the vehicle identification of the target vehicle entering the target area after the specified time is obtained in real time;
the vehicle identification acquisition module is specifically used for acquiring the vehicle identification of a target vehicle which passes through the target gate from the target lane after a specified time in real time;
the statistical item determining module is specifically configured to determine each statistical item, which is acquired based on the first type of statistical information, where a gate is the target gate, a lane is the target lane, and a time point is within a target time range; wherein the first type of statistical information is: information updated according to a predetermined cycle, and including: and (3) statistical items of the collected vehicle identification of the vehicle, the gate passed by the vehicle, the lane driven by the vehicle when passing the gate and the time point of the last driving from the lane to the gate.
Optionally, in a specific implementation manner, the vehicle identifier obtaining module includes:
the second item acquisition submodule is used for acquiring each second item of the time point after the specified time from the third type of statistical information; wherein the third type of statistical information is real-time updated information, and includes: a statistical item of vehicle information on a third vehicle that has traveled through the respective gates;
the information extraction submodule is used for extracting the vehicle identification of the third vehicle driving through each gate, and the corresponding lane and gate from each acquired second item;
and the vehicle identifier obtaining sub-module is used for obtaining the vehicle identifier of the third vehicle, which is the target gate and is the corresponding lane, from the obtained vehicle identifier of the third vehicle and the corresponding lane and gate, and taking the vehicle identifier of the third vehicle, which is the target lane, as the vehicle identifier of the vehicle driving through the target gate from the target lane.
Optionally, in a specific implementation manner, the second entry obtaining sub-module includes:
the item group dividing unit is used for dividing the statistical items generated in the time length into an item group every other first preset time length according to the sequence of the generation time of each statistical item in the third type of statistical information from morning to evening;
the entry group acquisition unit is used for acquiring a plurality of entry groups divided within the time length from the third type of statistical information at intervals of a second preset time length according to the sequence of the division time of each entry group from morning to evening; the second preset time length is integral multiple of the first preset time length;
a second entry acquisition unit configured to acquire, from the acquired plurality of entry groups, respective second entries whose points in time are after the specified time.
Optionally, in a specific implementation manner, the apparatus further includes:
the target vehicle judgment module is used for judging whether the target vehicle enters the target area for the first time in a preset period of the specified moment when each statistical item of which the time point is in the target time range is obtained based on the first type of statistical information; if so, triggering the statistic item determination module.
Optionally, in a specific implementation manner, the target vehicle determination module includes:
the vehicle identification judgment submodule is used for judging whether a preset cache space stores the vehicle identification of the target vehicle or not; wherein the buffer space is emptied at the end of each predetermined period; if not, triggering a target vehicle determination submodule;
and the target vehicle determining submodule is used for determining whether the target vehicle enters the target area for the first time in a preset period of the specified time.
In a third aspect, an embodiment of the present invention provides an electronic device, which is characterized by including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
the processor is configured to, when executing the program stored in the memory, implement the method steps of any one of the methods for determining vehicle information provided in the first aspect of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program, when executed by a processor, implements the method steps in any one of the methods for determining vehicle information provided in the first aspect of the embodiment of the present invention.
As can be seen from the above, by applying the scheme provided in the embodiment of the present invention, the first type of statistical information is periodically updated according to a predetermined period, where the first type of statistical information includes: a statistical entry regarding a vehicle identification of a vehicle entering the target area and a point in time of a most recent entry into the target area. When determining whether the time point at which the target vehicle has entered the target area last time is within the backtracking time range, after the vehicle identifier of the target vehicle is acquired, determining each statistical entry of the time point within the target time range, which is acquired based on the first type of statistical information, that is, determining the vehicle identifier of the vehicle entering the target area and the time point at which the vehicle has entered the target area last time within a time period between the upper limit value of the backtracking time range and a specified time. In this way, the vehicle identification of the target vehicle can be directly matched with the determined information, and then whether the time point when the target vehicle enters the target area last time is located in the backtracking time range is determined. Therefore, when determining whether the time point when the target vehicle enters the target area for the last time is within the backtracking time range, only the determined few statistical items need to be searched, so that the time consumption in the information searching process is reduced, and the query efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for determining vehicle information according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a manner of obtaining each statistical entry of a time point within a target time range based on first-type statistical information according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a method for constructing the first type of statistical information according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another vehicle information determination method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating an embodiment of S401 in FIG. 4;
fig. 6 is a flowchart illustrating a specific implementation manner of S501 in fig. 5;
fig. 7 is a schematic structural diagram of a vehicle information determination apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the related art, when determining whether the time point when the target vehicle enters the target area last time is within the backtracking time range, after determining the vehicle identifier of the target vehicle, the statistical item when the target vehicle enters the target area last time is searched for from the statistical items including the vehicle information of each vehicle entering the target area, and then, based on the searched time point in the statistical items, whether the time point when the target vehicle enters the target area last time is within the backtracking time range is determined. Because the data volume of the plurality of statistical items is huge, the information search in the plurality of statistical items is very time-consuming, and the query efficiency is low. Therefore, to solve the problems in the related art, embodiments of the present invention provide a method for determining vehicle information.
It should be noted that the method for determining vehicle information provided by the embodiment of the present invention may be applied to an information processing device. The information processing device may be an electronic device, such as a notebook computer, a desktop computer, or the like; or a cluster of multiple electronic devices, such as a server cluster of multiple desktop computers, where each electronic device may handle one or more links in the vehicle information determination process. Here, the embodiment of the present invention does not limit the specific hardware architecture and the number of the information processing apparatuses, and is hereinafter referred to as an information processing apparatus.
Next, a method for determining vehicle information according to an embodiment of the present invention will be described.
For convenience of description, the process in which the information processing apparatus determines whether the time point at which the target vehicle has recently entered the target area is within the backtracking time range in the embodiment of the present invention is simply referred to as: the information processing apparatus executes a process of a stream calculation task.
It should be noted that the information processing apparatus starts to execute the method for determining vehicle information according to the embodiment of the present invention after receiving the stream calculation task start instruction. The stream calculation task start instruction may indicate a designated time, a target area, and a backtracking time range, where the time at which the information processing apparatus receives the stream calculation task start instruction may be determined as the designated time, and of course, the stream calculation task start instruction may carry the designated time given by the relevant person. That is, the information processing apparatus, upon receiving the stream calculation task start instruction, executes a determination method of vehicle information provided by an embodiment of the present invention to determine whether a target vehicle that enters the target area after a specified time is within the backtracking time range at a time point of the latest entering of the target area before the specified time.
Fig. 1 is a schematic flowchart of a method for determining vehicle information according to an embodiment of the present invention. As shown in fig. 1, the method may include the steps of:
s101: acquiring a vehicle identifier of a target vehicle entering a target area after a specified time in real time;
after receiving the stream computing task start instruction, the information processing apparatus can acquire, in real time, the vehicle identification of the target vehicle that enters the target area after the specified time.
It should be noted that, in the embodiment of the present invention, any vehicle that enters the target area after the specified time is the target vehicle. The vehicle identifier of the target vehicle may be any information that can determine the target vehicle and distinguish the target vehicle from other vehicles, and for example, the vehicle identifier may be a combination of a license plate number and a license plate color, which is reasonable.
Further, the information processing apparatus may perform the above step S101 in various ways, and the embodiment of the present invention is not particularly limited thereto. In particular applications, any implementation capable of obtaining a vehicle identification of a target vehicle entering a target area may be applied to embodiments of the present invention.
Optionally, in a specific implementation manner, an image capturing device may be disposed at the gate entering the target area, and the image capturing device is configured to capture image information of a vehicle entering the target area from the gate and a time point when the vehicle enters the target area. In this way, in the present implementation, after receiving the stream calculation task start instruction, the information processing apparatus may acquire, in real time, the image information of the target vehicle acquired by the image acquisition apparatus after the specified time from the image acquisition apparatus. Further, a vehicle identification of each target vehicle is extracted from the image information of the target vehicle. The information processing apparatus may extract the vehicle identification of each target vehicle from the image information of the target vehicle by any method capable of extracting the vehicle identification from the image information of the vehicle.
Optionally, in another specific implementation manner, the image capturing device arranged at the gate entering the target area may send the captured image information of the vehicle and the time point of the vehicle entering the target area to the preset image processing device in real time, so that the image processing device may extract various information of the vehicle except the time point from the obtained image information of the vehicle in real time, and store the various information of the vehicle except the time point and the time point of the vehicle entering the target area in real time based on the corresponding relationship between the various information of the vehicle except the time point and the time point of the vehicle entering the target area. Various information of the vehicle except for the time point and the time point of entering the target area are collectively referred to as vehicle information of the vehicle, that is, the vehicle information of the vehicle may include: time point, vehicle identification, vehicle color, vehicle type, number of people in the vehicle, etc. In this way, in the present implementation, the information processing apparatus can acquire, from the stored vehicle information, the vehicle identification of the target vehicle that enters the target area after the specified time in real time, upon receiving the stream calculation task start instruction.
In this embodiment, the image processing apparatus and the information processing apparatus may be the same apparatus, or may be another electronic apparatus connected to the information processing apparatus in a communication manner, and the correspondence relationship between the various pieces of information of the vehicle and the time point when the vehicle enters the target area may be stored in the image processing apparatus, or may be transmitted to the other electronic apparatus by the image processing apparatus and stored, and the other electronic apparatus storing the correspondence relationship may be connected to the information processing apparatus in a communication manner.
S102: determining each statistical item of which the time point is in a target time range and which is acquired based on the first type of statistical information;
wherein the first type of statistical information is: information updated according to a predetermined cycle, and including: the statistical entries regarding the vehicle identification of the vehicle entering the target area and the time point of the latest entering of the target area, the target time range is: and backtracking the time period between the upper limit value of the time range and the specified time.
For example, the backtracking time range is 15-30 days, and the specified time is 11/2018/22/12, the target time range is: 12 at 10/23/2018 to 12 at 11/22/2018.
The information processing apparatus can determine the specified time and the backtracking time range after receiving the stream calculation task start instruction. Furthermore, the electronic device may obtain each statistical item at the time point in a time period from the upper limit value of the backtracking time range to the specified time based on the first type of statistical information.
Wherein the first type of statistical information is: updated according to a predetermined period, and comprising: statistical entries regarding the vehicle identification of the vehicle entering the target area and the point in time of the last entry into the target area. That is, after each update of the first category statistical information, the time points of the vehicle included in the first category statistical information are: before the update time, the vehicle enters the target area at one or more times, the time closest to the update time. Obviously, from this first type of statistical information, the information processing apparatus may determine: and the vehicle identification of the vehicle entering the target area and the time point of the last entering of the target area are before the last updating moment of the first type of statistical information. For convenience of description, the above-identified vehicles are referred to as first-type vehicles entering the target area.
However, the timing at which the information processing apparatus receives the stream computation task start instruction and the latest update timing of the first type statistical information may exist at a time interval, that is, the specified timing may not be the last update time of the first type statistical information. It will be appreciated that vehicles of the first category determined above, which are included in the target area, may re-enter the target area within the time interval between the specified time and the time at which the statistical information of the first category was most recently updated. In this way, the time point at which the vehicle has recently entered the target area is refreshed before the specified time, however, at the specified time, the information processing apparatus cannot acquire the refreshed time area at which the vehicle has recently entered the target area from the first-type statistical information.
Based on this, in order to ensure the accuracy of the finally determined target vehicle, the information processing apparatus needs to acquire each statistical entry of the time point within the target time range based on the first-type statistical information.
It should be noted that, since the information processing apparatus determines whether or not the time point of the latest entry into the target area is within the backtracking time range as the target vehicle entering the target area after the specified time, the information processing apparatus may acquire each statistical entry of the time point within the target time range based on the first type of statistical information after receiving the stream calculation task start instruction. Further, the information processing apparatus can directly use each of the above-acquired statistical items in the processing of the entire stream calculation task. That is, the information processing apparatus can directly determine the above-described acquired respective statistical items after acquiring the vehicle identification of the target vehicle entering the target area after the specified time in real time each time, without acquiring the above-described respective statistical items based on the first type of statistical information again.
That is, in the implementation process of the method for determining vehicle information according to the embodiment of the present invention, the electronic device may only perform the step of acquiring the above statistical items based on the first type statistical information once. Therefore, the time for acquiring the statistical items based on the first-type statistical information can be saved, and the efficiency of the query efficiency is higher.
It should be noted that, in the embodiment of the present invention, the electronic device may obtain each statistical item of the time point in the target time range based on the first type of statistical information in a plurality of ways, which is not limited in the embodiment of the present invention. For the sake of clarity, the manner of obtaining each statistical item within the target time range based on the first-type statistical information will be described in detail later.
The predetermined period may be any period determined according to practical applications, for example, 12 hours, 24 hours, and the like.
S103: judging whether a target statistic item which contains a vehicle identifier of a target vehicle and has a time point within a backtracking time range exists in each obtained statistic item; if so, executing S104;
s104: and determining that the time point of the target vehicle entering the target area for the last time is within the backtracking time range.
After the vehicle identifier of the target vehicle is acquired and the above statistical items are determined, the information processing device may determine whether there is a target statistical item that includes the vehicle identifier of the target vehicle and has a time point within the backtracking time range among the acquired statistical items. And when the judgment result is that the target vehicle exists, determining that the time point of the target vehicle entering the target area for the last time is within the backtracking time range.
Specifically, for each target vehicle that enters the target area after the specified time, the information processing apparatus may match the vehicle identification of the target vehicle with the vehicle identification in the above-described respective statistical entries. When there is a statistical entry in which the included vehicle identification is the vehicle identification of the target vehicle, the information processing apparatus may further determine whether a time point of the latest entry into the target area included in the statistical entry is within the backtracking time range. When the information processing apparatus determines that the time point of the latest entry into the target area included in the statistical entry is within the backtracking time range, the information processing apparatus may determine the statistical entry as the target statistical entry. In this way, the information processing apparatus can determine that the point in time at which the target vehicle has entered the target area most recently is within the backtracking time range.
It should be noted that, since the information processing apparatus acquires the vehicle identifier of the target vehicle entering the target area after the specified time in real time, and the same target vehicle may enter the target area multiple times after the specified time, the information processing apparatus may acquire the vehicle identifier of the target vehicle multiple times. Thus, the information processing apparatus needs to execute the above-described steps S102 to S104 a plurality of times for a target vehicle that enters the target area a plurality of times after the designated time. However, since the information processing apparatus is to determine that: the information processing apparatus determines whether or not the time point at which the target vehicle has entered the target area last before the specified time is within the backtracking time range, and therefore, the information processing apparatus only needs to determine whether or not the time point at which the target vehicle has entered the target area last before the specified time is within the backtracking time range.
Based on this, in order to avoid the repeated determination and waste of resources of the information processing apparatus, optionally, in a specific implementation manner, before the step S102, the method may further include the following step a 1:
step A1: judging whether the target vehicle enters a target area for the first time in a preset period at a specified moment;
in this implementation, the information processing apparatus may determine whether the target vehicle enters the target area for the first time within a predetermined period in which the time is specified, after acquiring the vehicle identification of the target vehicle entering the target area after the time is specified in real time.
Since the first-type statistical information is updated according to the predetermined period, when the update time of the first-type statistical information after the specified time arrives, the first-type statistical information is updated, and each statistical item determined in the step S102 may be changed. Thus, when the target vehicle enters the target area again, the determination result of whether the time point at which the target vehicle has entered the target area for the last time is within the backtracking time range is changed. Therefore, in the above-described step a1, the information processing apparatus determines whether the target vehicle enters the target area for the first time within a predetermined period in which the time is specified.
Further, if the determination result is yes, the steps S102-S104 may be continuously performed to determine whether the time point when the target vehicle has recently entered the target area is within the backtracking time range;
and if the judgment result is negative, the target vehicle does not enter the target area for the first time in the preset period of the specified time. Then, the information processing apparatus has already obtained the determination result whether the time point at which the target vehicle has entered the target area for the last time is within the backtracking time range, and does not need to continue executing the above-described steps S102 to S104. Thus, repeated judgment can be avoided, and judgment resources and time of the information processing apparatus can be saved.
The information processing apparatus may perform step a1 in various ways, and the embodiment of the present invention is not limited in particular.
Optionally, in a specific implementation manner, the step a1 may include the following steps a11-a 12:
step A11: judging whether a preset cache space stores a vehicle identifier of a target vehicle or not; if not, go to step A12; wherein the buffer space is emptied at the end of each predetermined period;
step A12: and judging that the target vehicle enters the target area for the first time in a preset period at the specified moment.
In the information processing apparatus or other electronic apparatus communicatively connected to the information processing apparatus, a buffer space may be preset, in which a vehicle identification of a target vehicle entering a target area in each predetermined period may be stored, and the buffer space may be emptied at an end time of each predetermined period.
Therefore, when the target vehicle enters the target area for the first time in a predetermined period within the designated time, the vehicle identifier of the target vehicle can be stored in the cache space. Furthermore, after the information processing device obtains the vehicle identifier of the target vehicle, it can be determined whether the vehicle identifier of the target vehicle is stored in the preset cache space.
Specifically, when the cache space is located in the information processing apparatus, the information processing apparatus may directly perform step a 11; when the cache space is located in another electronic device communicatively connected to the information processing device, the information processing device may send an identifier determination request to the other electronic device, where the identifier determination request carries a vehicle identifier of the target vehicle. Thus, the other electronic device can respond to the identification judgment request and feed back the judgment result to the information processing device.
Obviously, when the vehicle identifier of the target vehicle is stored in the cache space, the information processing device may determine that the target vehicle has entered the target area within a predetermined period at the specified time before the vehicle identifier of the target vehicle is acquired this time, and the information processing device has determined whether the time point at which the target vehicle has entered the target area for the last time is within the backtracking time range, resulting in a determination result. Therefore, the information processing apparatus does not need to perform the above-described steps S102 to S104 again.
Correspondingly, when the vehicle of the target vehicle is not stored in the cache space, the information processing apparatus may determine that the target vehicle has not entered the target area within a predetermined period of the specified time before the vehicle identification of the target vehicle is acquired this time, the target vehicle entering the target area for the first time within the predetermined period of the specified time. Therefore, the information processing apparatus needs to continue to execute the above-described steps S102 to S104 to determine whether or not the time point at which the target vehicle has recently entered the target area is within the backtracking time range.
It should be noted that, when the information processing apparatus determines that the target vehicle enters the target area for the first time within a predetermined period of the specified time, the vehicle identifier of the target vehicle may be added to the cache space, so that when the vehicle identifier of the target vehicle is subsequently obtained again, it is determined whether the vehicle enters the target area for the first time within the predetermined period of the specified time.
When the cache space is located in the information processing device, the vehicle identification of the target vehicle can be added into the cache space by the information processing device; when the cache space is located in another electronic device communicatively connected to the information processing device, the vehicle identifier of the target vehicle may be added to the cache space by the other electronic device.
It is noted that the information processing apparatus may stop execution after a certain time of executing the above-described determination method of the vehicle information, that is, the information processing apparatus may stop the stream calculation task after a certain time after the stream calculation task is started. Wherein the information processing apparatus may stop executing the above-described determination method of the vehicle information when receiving the flow calculation task stop instruction; alternatively, the streaming task start instruction may indicate an execution time period of the streaming task, and the information processing apparatus may stop executing the method for determining the vehicle information when the information processing apparatus executes the method for determining the vehicle information for the execution time period. This is all reasonable.
As can be seen from the above, by applying the scheme provided in the embodiment of the present invention, the first type of statistical information is periodically updated according to a predetermined period, where the first type of statistical information includes: a statistical entry regarding a vehicle identification of a vehicle entering the target area and a point in time of a most recent entry into the target area. When determining whether the time point at which the target vehicle has entered the target area last time is within the backtracking time range, after the vehicle identifier of the target vehicle is acquired, determining each statistical entry of the time point within the target time range, which is acquired based on the first type of statistical information, that is, determining the vehicle identifier of the vehicle entering the target area and the time point at which the vehicle has entered the target area last time within a time period between the upper limit value of the backtracking time range and a specified time. In this way, the vehicle identification of the target vehicle can be directly matched with the determined information, and then whether the time point when the target vehicle enters the target area last time is located in the backtracking time range is determined. Therefore, when determining whether the time point when the target vehicle enters the target area for the last time is within the backtracking time range, only the determined few statistical items need to be searched, so that the time consumption in the information searching process is reduced, and the query efficiency is improved.
Next, a manner of obtaining each statistical item in the target time range based on the first-type statistical information is described as an example. As shown in fig. 2, optionally, in a specific implementation, the method may include the following steps:
s201: acquiring each first item of a time point in a target time range from the first type of statistical information;
since the first type of statistical information includes the vehicle identification of the vehicle entering the target area and the statistical items of the time point of the latest entering of the target area, the information processing apparatus may acquire the statistical items of the time point within the target time range from the first type of statistical information according to the time points of the statistical items included in the first type of statistical information, and the acquired statistical items are taken as the first items.
The electronic device may construct the first type of statistical information in a plurality of ways, and the embodiment of the present invention is not limited in this respect. For clarity, the first type of statistical information will be described in the following.
S202: acquiring a vehicle identifier and a time point of a first vehicle entering a target area between the latest updating time of the first type of statistical information and a specified time;
since the specified time may not be the last update time of the first type of statistical information, the vehicle identification of all vehicles entering the target area and the time point of the latest entering of the target area before the specified time may not be included in the first entry determined by the information processing apparatus. Therefore, the information processing apparatus needs to continue to acquire the vehicle identification and the point in time of the vehicle entering the target area between the latest update time of the first-type statistical information and the specified time. Among them, a vehicle that enters the target area between the latest update time of the first type statistical information and the specified time may be referred to as a first vehicle.
The information processing apparatus may perform step S201 in various ways, and the embodiment of the present invention is not particularly limited.
Optionally, in a specific implementation manner, the image capturing device disposed at the gate entering the target area may send the captured image information of the vehicle and the time point of the vehicle entering the target area to the preset image processing device in real time, so that the image processing device may extract various information of the vehicle from the obtained image information of the vehicle in real time, and store the corresponding relationship between the vehicle information of the vehicle and the time point of the vehicle entering the target area in real time. Wherein the vehicle information of the vehicle may include: vehicle identification, vehicle color, vehicle type, number of vehicle occupants, and the like. In this way, in the present implementation, the information processing apparatus can acquire the vehicle identifier and the time point of the first vehicle entering the target area between the latest update time of the first type statistical information and the specified time from the stored correspondence.
It should be noted that, the execution sequence of the step S201 and the step S202 may be to execute the step S201 first and then execute the step S202; step S202 may be executed first, and then step S201 may be executed; it is also possible to perform step S201 and step S202 simultaneously.
S203: for each first entry containing the acquired vehicle identification of the first vehicle, updating the point in time in the first entry to: the time point of the first vehicle corresponding to the vehicle identifier in the first entry;
after acquiring the above-mentioned respective first entries and the vehicle identifier and the time point of the first vehicle, the information processing apparatus may update, for each first entry including the acquired vehicle identifier of the first vehicle, the time point in the first entry as: the time point of the first vehicle corresponding to the vehicle identification in the first entry.
Specifically, for each first vehicle, the vehicle identifier of the first vehicle is matched with the vehicle identifier included in each first entry, and the information processing device may determine whether an entry including the vehicle identifier of the first vehicle exists in each first entry. When the information processing device determines that an entry containing the vehicle identifier of the first vehicle exists in the first entries, the acquired time point of the first vehicle is closer to the specified time point relative to the time point contained in the first entry containing the vehicle identifier of the first vehicle because the first vehicle enters the target area between the latest update time of the first type of statistical information and the specified time point. That is, the point in time at which the first vehicle most recently entered the target area is refreshed. The time point when the first vehicle enters the target area for the last time before the specified time is as follows: the acquired point in time of the first vehicle.
Therefore, in order to ensure that the time points in each statistical entry acquired in the above step S102 are: the information processing apparatus may update, for each entry that is determined to include the vehicle identifier of the first vehicle in the first entries, the time point in the determined first entry as: the acquired point in time of the first vehicle.
For example, a first entry a exists in each first entry, the included vehicle identifier is a, the time point is 15 hours and 30 minutes in 11 months and 1 day in 2018, the vehicle identifier of the first vehicle and the vehicle identifier of the first vehicle in the time point are a, and the time point corresponding to the vehicle identifier a is 10 hours and 24 minutes in 11 months and 20 days in 2018. Then, the information processing apparatus may update the time point in the first entry a from 11/2018, 1/15/30 to: 11, 20, 10, 24 minutes in 2018. Further, the updated first entry a is obtained.
S204: regarding a first vehicle of which the vehicle identification is not contained in any first entry, taking the vehicle identification and the time point of the first vehicle as statistical entries to be supplemented;
with respect to step S203, after obtaining the vehicle identifiers and time points of the first entries and the first vehicles, the information processing apparatus may regard, as the statistical entries to be supplemented, the vehicle identifiers and time points of the first vehicles, for the first vehicles whose vehicle identifiers are not included in any of the first entries.
Specifically, for the vehicle identifier of each first vehicle, the vehicle identifier of the first vehicle is matched with the vehicle identifiers included in the first entries, and the information processing apparatus may determine whether an entry including the vehicle identifier of the first vehicle exists in the first entries. When the information processing device determines that no entry containing the vehicle identifier of the first vehicle exists in the first entries, since the first vehicle enters the target area between the latest update time of the first type statistical information and the specified time, and no entry containing the vehicle identifier of the first vehicle exists in the first entries, the latest time point when the first vehicle enters the target area before the specified time is: the acquired point in time of the first vehicle. That is, the vehicle identification and the time point of the first vehicle are also the vehicle identification of the vehicle that entered the target area and the time point of the latest entry into the target area before the specified time.
Therefore, in order to ensure that the time points in each statistical entry acquired in the above step S102 are: the information processing apparatus may take, as the statistical entry to be supplemented, the vehicle identification and the time point of each first vehicle not included in any of the respective first entries, for each first vehicle that has entered the target area for the latest time before the specified time by the vehicle identification included in the statistical entry.
For example, the vehicle identifier B of the first vehicle exists in the vehicle identifier and the time point of the first vehicle, the time point corresponding to the vehicle identifier B is 11/20/11/02 minutes in 2018, and the vehicle identifier B is not included in any of the first entries, so that the information processing apparatus may use the vehicle identifier B and the time point 11/20/11/02 minutes in 2018 as the statistical entry B to be supplemented.
S205: and determining the statistical items to be supplemented and the first items as the statistical items with the time points within the target time range.
After updating the time points in each of the first entries including the acquired vehicle identification of the first vehicle and determining each of the statistical entries to be supplemented, the information processing apparatus may determine the statistical entries to be supplemented and the updated respective first entries as the respective statistical entries of the time points within the target time range.
Next, an example of the first type of statistical information is described. As shown in fig. 3, optionally, in a specific implementation, the method may include the following steps:
s301: in each preset period, acquiring the vehicle identification and the time point of a second vehicle entering the target area in the current period from the second type of statistical information;
since the first type statistical information is updated according to a predetermined period, the first type statistical information is constructed according to the predetermined period. In this way, the information processing apparatus can acquire, from the second type statistical information, the vehicle identification and the time point of the vehicle entering the target area in the current cycle, and take the acquired vehicle identification and the time point of the vehicle as the vehicle identification and the time point of the second vehicle, every predetermined cycle.
Wherein the second type of statistical information includes: statistical entries of vehicle information on respective vehicles entering the target area; that is, the second type of statistical information includes a plurality of statistical entries, each of which corresponds to vehicle information of one vehicle entering the target area. The vehicle information of the vehicle included in the second type of statistical information may include: vehicle identification, the time point when the vehicle enters the target area, vehicle color, vehicle type, number of people in the vehicle, and the like.
In order to better understand the embodiments of the present invention, the second type of statistical information is described below.
It will be appreciated that an image capturing device may be provided at the gate entering the target area, the image capturing device being adapted to capture image information of a vehicle entering the target area from the gate and a point in time at which the vehicle entered the target area.
Therefore, when each vehicle entering the target area passes through the bayonet, the image acquisition device can acquire the image information of the vehicle and the time point of the vehicle entering the target area in real time and send the acquired image information and the time point to the preset storage device for storing the vehicle information entering the target area in real time. In this way, the storage device can extract various types of information of the target vehicle other than the time point from the image information in real time, determine statistical items of vehicle information about each vehicle entering the target area according to the correspondence between the extracted various types of information other than the time point and the acquired time point, and store the statistical items.
Since the vehicle identification and the time point of each vehicle entering the target area are stored in the second type of statistical information, the information processing apparatus can acquire the vehicle identification and the time point of the vehicle whose time point is within the range of the start and stop time of each predetermined period, that is, the vehicle identification and the time point of the second vehicle, from the second type of statistical information, according to the start and stop time of each predetermined period.
The information processing device can acquire the vehicle identification and the time point of a second vehicle entering the target area in each predetermined period from the second type of statistical information in real time; or at the end time of each preset period, acquiring the vehicle identifier and the time point of a second vehicle entering the target area in the current period from the second type of statistical information; this is all reasonable.
Wherein the second type of statistical information may be stored in various forms. For example, the second type of statistical information may be stored in the form of a table, which may be referred to as a full field table. As shown in table 1.
TABLE 1
Figure BDA0001885806650000211
When the second type of statistical information is stored in the form of table 1, further, in each predetermined period, the vehicle identification and the time point of the second vehicle entering the target area in the current period are acquired from table 1 above, and statistical entries regarding the vehicle identification and the time point of the second vehicle are determined according to the correspondence between the acquired vehicle identification and the time point, and are stored, as shown in table 2. Table 2 may be referred to as a secondary table, and may include only the vehicle identification and the time point of each second vehicle.
TABLE 2
Figure BDA0001885806650000212
The storage device and the information processing device may be the same device, or may be another electronic device communicatively connected to the information processing device. When the storage device and the information processing device are the same device, the information processing device always executes the operation of storing the statistic entries in the second type of statistic information when the stream computing task instruction is not received. When the information processing apparatus receives the stream calculation task instruction, the operation of storing the statistical items in the second type of statistical information and the determination method of the vehicle information provided by the embodiment of the present invention may be performed in parallel.
Further, after the information processing apparatus performs the step S104 described above and determines that the time point at which the target vehicle has recently entered the target area is within the backtracking time range, the information processing apparatus may determine, from the target statistical entry determined to include the vehicle identification and the time point of the target vehicle, the vehicle information of the target vehicle at the time of the last entry of the target vehicle into the target area, among the second type of statistical information described above.
S302: at the end time of each preset period, determining the vehicle identification of each second vehicle and the latest time point corresponding to the vehicle identification from the acquired second vehicle identifications and time points;
wherein, the latest time is as follows: a time point closest to the end time of the cycle;
for each predetermined period, after acquiring the vehicle identifier and the time point of the second vehicle entering the target area in the current period, the information processing device may determine, at the end time of the predetermined period, the vehicle identifier of each second vehicle and a time point corresponding to the vehicle identifier and closest to the end time of the period from the acquired second vehicle identifier and time point.
It will be appreciated that the same vehicle may enter the target area multiple times during the same cycle. Therefore, for each predetermined cycle, of the vehicle identification of the second vehicle that enters the target area within the current cycle and the time point acquired by the information processing apparatus, there may be a plurality of time points for which the vehicle identification of the same second vehicle corresponds. Wherein each time point is a time point when the second vehicle enters the target area each time in the current cycle. In this way, at the end time of each predetermined period, the information processing apparatus can acquire the latest time when the second vehicle enters the target area before the end time of the predetermined period.
For example, for a certain predetermined period, the information processing apparatus acquires that the vehicle identification of a certain second vehicle is C, and the vehicle identification C corresponds to three points in time, which are: hour 2 in year 11, month 23, day 11 in year 2018, hour 11 in year 11, month 23, day 20 in year 2018, and the end time of the predetermined period is: 24 hours in 2018, 11 months, 23 days, and 20 hours in 2018, the information processing apparatus may determine the vehicle identification C of the second vehicle and the latest time point corresponding to the vehicle identification C.
S303: judging whether first-type statistical information is stored at the end time of each preset period; if not, executing S304; if so, go to S305;
since the first type statistical information is updated at predetermined periods, the information processing apparatus can first determine whether the first type statistical information is stored at the end time of each predetermined period.
Here, when it is determined that the first type statistical information is not stored, the information processing apparatus may perform the subsequent step S304, and when it is determined that the first type statistical information is stored, the information processing apparatus may perform the subsequent step S305.
S304: respectively taking the acquired vehicle identification of each second vehicle and the latest time point corresponding to the vehicle identification as a statistical item to obtain first-class statistical information;
it should be noted that, when it is determined that the first type of statistical information is not stored, the information processing apparatus may determine that the predetermined period is a first period in which the vehicle identifier entering the target area and the time point corresponding to the vehicle identifier are acquired, and is also a first period in which the first type of statistical information is constructed. Therefore, at the end time of the predetermined period, the vehicle identifier of each second vehicle acquired by the information processing device and the latest time point corresponding to the vehicle identifier are: before the end time of the predetermined period, the vehicle identification of the vehicle entering the target area and the time point of the last entry into the target area.
In this way, since the first type of statistical information includes the vehicle identifier of the vehicle entering the target area and the statistical entry of the latest time point of entering the target area, the information processing apparatus may use the acquired vehicle identifier of each second vehicle and the latest time point corresponding to the vehicle identifier as one statistical entry, and further obtain the first type of statistical information.
S305: for each statistical entry containing the acquired vehicle identifier of the second vehicle in the first type of statistical information, updating the time point in the statistical entry as: the latest time point corresponding to the vehicle identification in the statistical entry; and aiming at each second vehicle of which the vehicle identification does not contain the first-class statistical information, adding the vehicle identification of the second vehicle and the corresponding latest time point into the first-class statistical information as a statistical item to obtain the updated first-class statistical information.
When it is determined that the first type of statistical information is stored, the first type of statistical information stored at the end time of the predetermined period includes the vehicle identifier of the vehicle entering the target area and the time point of the latest entering of the vehicle into the target area before the end time of the previous predetermined period. Obviously, the vehicle corresponding to the vehicle identifier included in the first type of statistical information may enter the target area again within the predetermined period, thereby causing a need to update the first type of statistical information. For convenience of description, the first type of statistical information stored at the end time of the predetermined period may be simply referred to as: first-type statistical information to be updated.
Wherein, for each statistical entry containing the acquired vehicle identifier of the second vehicle in the first category of statistical information, the information processing device may update a time point in the statistical entry to: the latest time point corresponding to the vehicle identification in the statistical entry; for each second vehicle whose vehicle identification does not contain the first type statistical information, the information processing device adds the vehicle identification of the second vehicle and the corresponding latest time point as a statistical entry to the first type statistical information. Thus, the information processing apparatus can obtain the updated first type statistical information.
Specifically, for the vehicle identifier of each second vehicle, the vehicle identifier of the second vehicle is matched with the vehicle identifier included in each statistical entry included in the first type of statistical information to be updated, and the information processing device may determine whether an entry including the vehicle identifier of the second vehicle exists in the first type of statistical information to be updated.
When the information processing device determines that an entry containing the vehicle identifier of the second vehicle exists in the first type of statistical information to be updated, since the second vehicle enters the target area within the predetermined period, the latest time point of the second vehicle is closer to the end time of the predetermined period than the time point contained in the determined entry containing the vehicle identifier of the second vehicle. That is, the point in time when the second vehicle has entered the target area last time is refreshed. The time point when the second vehicle has entered the target area most recently before the end time of the predetermined period is: the obtained latest point in time of the second vehicle.
Therefore, in order to ensure that the time points in the respective statistical entries of the above-mentioned first-class statistical information are: and the vehicle corresponding to the vehicle identification contained in the statistical bar enters the target area at the latest time point before the end time of the preset period. For each entry containing the vehicle identification of the second vehicle determined in the above first type of statistical information to be updated, the information processing apparatus may update the point in time in the determined entry to: the obtained latest point in time of the second vehicle.
Furthermore, when the information processing device determines that there is no entry containing the vehicle identifier of the second vehicle in the first type of statistical information to be updated, since the second vehicle enters the target area in the predetermined period, and there is no entry containing the vehicle identifier of the second vehicle in each entry contained in the first type of statistical information to be updated, the time point when the second vehicle enters the target area for the last time before the end time of the predetermined period is: the obtained latest point in time of the second vehicle. That is, the vehicle identification of the second vehicle and the latest time point are also the vehicle identification of the vehicle entering the target area and the time point of the latest entering of the target area before the end time of the predetermined period.
Therefore, in order to ensure that the time points in the respective statistical entries of the above-mentioned first-class statistical information are: and the vehicle corresponding to the vehicle identification contained in the statistical bar enters the target area at the latest time point before the end time of the preset period. For each second vehicle that is not included in any of the entries in the first-type statistical information to be updated, the information processing apparatus may take the vehicle identification of the second vehicle and the corresponding latest time point as one statistical entry, and add the statistical entry to the first-type statistical information to be updated.
Therefore, after the first-type statistical information to be updated is subjected to time point updating and statistical item adding, the information processing equipment can obtain the updated first-type statistical information. The updated first-class statistical information includes: a statistical entry regarding the vehicle identification of the vehicle entering the target area and the time point of the latest entering of the target area before the end time of the above-mentioned predetermined period.
According to the above description of step S101, the information processing device may directly acquire the vehicle identifier of the target vehicle entering the target area after the specified time from the image capturing device provided at the gate of the target area in real time, or may acquire the vehicle identifier of the target vehicle entering the target area after the specified time from the vehicle information of each vehicle entering the target area stored in the image processing device.
It should be noted that, in many cases, there may be a large number of image capturing devices disposed at the gates of a plurality of different areas, and the image capturing devices are used to capture image information and time points of vehicles driving through the gates. That is, the information processing apparatus needs to determine whether or not the acquired target vehicle is a vehicle entering the target area when acquiring the vehicle identification of the target vehicle entering the target area after the specified time in real time.
For example, the vehicle information of the vehicle stored by the image processing apparatus is determined based on the image information of the vehicle obtained from the image pickup apparatus and the time point. When the vehicle passes through the bayonet, the image acquisition equipment can acquire the image information and the time point of the vehicle and send the acquired image information and the time point of the vehicle to the image processing equipment. In this case, then, the information processing apparatus needs to screen the area into which the vehicle enters to determine the target vehicle entering the target area when acquiring the vehicle identification of the target vehicle entering the target area after the specified time in real time.
Therefore, the information processing apparatus can determine the target vehicle based on the gate identification of the gate through which the vehicle has traveled. Furthermore, for a gate, the area into which the vehicle enters is different when the vehicle passes through the gate from different directions of travel. Therefore, the information processing apparatus may also consider the direction in which the vehicle travels past the gate when determining the target vehicle. The lane in which the vehicle travels is different when the vehicle travels through the gate from different directions, so the direction in which the vehicle travels through the gate can be characterized by the lane identification of the lane in which the vehicle travels.
That is, when the gate mark of the gate through which the vehicle has driven and the lane mark of the lane through which the vehicle has driven are obtained, the area into which the vehicle has entered can be determined.
For example, a junction between city 1 and city 2 is provided with a gate 1, where gate 1 corresponds to lane 1 and lane 2, where lane 1 is a lane for a vehicle to travel from south to north, lane 2 is a lane for a vehicle to travel from north to south, and city 1 is located in the south of city 2. Then, when the gate mark of the gate that the vehicle 1 drives through is gate 1, and the lane mark of the lane that the vehicle 1 drives through is lane 2, it can be determined that the vehicle 1 drives through the gate 1 from north to south, and enters the city 1 from the city 2.
Therefore, in this case, the image capturing device at each gate simultaneously captures the gate mark and the lane mark of the gate through which the vehicle has traveled, when capturing the vehicle information and the time point of the image. Furthermore, the vehicle information of each vehicle entering the target area, which is determined based on the image capturing device at each intersection, includes not only the second type statistical information shown in table 1, but also the intersection identifier and the lane identifier that the vehicle has traveled. As shown in table 3:
TABLE 3
Figure BDA0001885806650000261
Based on this, optionally, in a specific implementation manner, as shown in fig. 4, after receiving the stream calculation task start instruction, before acquiring the vehicle identification of the target vehicle entering the target area after the specified time in real time, the information processing apparatus includes the following step S400:
s400: determining a target gate corresponding to the target area and a target lane entering the target area through the target gate;
it should be noted that, the information processing apparatus may determine, in various ways, a target gate corresponding to the target area and a target lane entering the target area through the target gate, which is not specifically limited in the embodiment of the present invention.
For example, in one case, for each of a plurality of regions, a gate corresponding to the region and a lane entering the region may be preset, and based on a region identification, a gate identification, and a lane identification of each region, a gate corresponding to each region and a lane entering the region may be prestored in the information processing apparatus.
In this way, the stream calculation task start instruction may simultaneously instruct the target region, and the information processing apparatus may determine the target gate corresponding to the target region and the target lane entering the target region through the target gate among the correspondence among the pre-stored regions, gates, and lanes.
For another example, in another case, the flow calculation task start instruction may directly indicate a target gate corresponding to the target region and a target lane entering the target region through the target gate, for example, the flow calculation task start instruction may carry a gate identifier of the target gate and a lane identifier of the target lane. In this way, when the information processing apparatus receives the stream calculation task start instruction, it is possible to determine the target gate corresponding to the target region and the target lane entering the target region through the target gate.
Further, in this implementation, in step S101, the vehicle identifier of the target vehicle entering the target area after the specified time is obtained in real time, and the step S401 may be specifically as follows:
s401: acquiring a vehicle identifier of a target vehicle driving through a target gate from a target lane after a specified time in real time;
after the target gate corresponding to the target area and the target lane entering the target area through the target gate are determined, the information processing device can acquire the vehicle identification of the target vehicle driving through the target gate from the target lane after the specified time in real time.
Specifically, the information processing device may determine, from the vehicle information of each vehicle entering the target area determined based on the image capturing device at each intersection, a vehicle whose intersection mark is an intersection mark of the target intersection and whose lane mark is a lane mark of the target lane, the time point being after a specified time, the determined vehicle being a target vehicle that has traveled through the target intersection from the target lane after the specified time. Further, the information processing apparatus can obtain the vehicle identification of the determined vehicle.
It should be noted that, the information processing apparatus may acquire, in real time, the vehicle identifier of the target vehicle that has traveled from the target lane to the target gate after the specified time in a variety of ways, and the embodiment of the present invention is not limited thereto. For clarity of the travel, a manner in which the information processing apparatus acquires in real time the vehicle identification of the target vehicle that has traveled from the target lane through the target gate after the specified time will be described later by way of example.
In the above step S102, determining each statistical item with a time point within the target time range, which is obtained based on the first-type statistical information, may specifically be the following step S402:
s402: determining each statistical item which is acquired based on the first type of statistical information, is used as a target gate, is used as a target lane and is in a target time range at a time point;
further, the information processing apparatus may determine each statistical entry that is acquired based on the first type statistical information, for which the gate is the target gate, the lane is the target lane, and the time point is within the target time range.
Obviously, in this implementation, the information included in the statistical items included in the first type of statistical information needs to include a gate through which the vehicle passes and a lane through which the vehicle passes when passing through the gate. Thus, the first category of statistical information is: information updated according to a predetermined cycle, and including: and (3) statistical items of the collected vehicle identification of the vehicle, the gate passed by the vehicle, the lane driven by the vehicle when passing the gate and the time point of the last driving from the lane to the gate.
The manner of obtaining each statistical entry with the gate as the target gate, the lane as the target lane and the time point within the target time range based on the first type of statistical information, and the construction manner of the first type of statistical information are similar to the above steps S201 to S205, and steps S301 to S305, and are not described herein again. It should be noted that, in this implementation manner, when the above statistical items are obtained, the gate identifier and the lane identifier need to be matched at the same time, and when the first type of statistical information is constructed based on the second type of statistical information, the second type of statistical information needs to include the gate identifier and the lane identifier of the gate that the vehicle has driven through.
In addition, the specific contents of S403-S404 are the same as S103-S104, and are not described herein again.
Next, a description will be given of a manner in which the information processing apparatus acquires, in real time, the vehicle identification of the target vehicle that has traveled from the target lane through the target gate after the specified time.
As shown in fig. 5, optionally, in a specific implementation manner, the step S401 may include the following steps:
s501: acquiring each second item of a time point after the specified time from the third type of statistical information;
wherein, the third type statistical information is real-time updated information and comprises: a statistical item of vehicle information on a third vehicle that has traveled through the respective gates;
since the third type of statistical information includes statistical items of vehicle information on the third vehicle that has traveled through the respective gates, the information processing apparatus can acquire, from the third type of statistical information, the respective statistical items whose time points are after the specified time from among the statistical items included in the third type of statistical information, and take the acquired statistical items as the second items.
In order to better understand the embodiments of the present invention, the following description is made on the third category of statistical information.
Similar to the second statistical information, when each vehicle passes through a gate between two regions, the image acquisition device can acquire the image information of the vehicle, the time point when the vehicle enters the target region, the gate mark of the gate through which the vehicle passes and the lane mark of the lane through which the vehicle passes, and transmit the acquired various types of information to a preset storage device for storing the vehicle information entering the target region in real time. In this way, the storage device can determine statistical items of vehicle information on vehicles driving through the respective gates from the acquired various types of information in real time, and from these statistical items. The vehicle that has traveled through each of the gates may be the third vehicle. Obviously, the vehicle information of the third vehicle includes: the vehicle identification, the time point, and the gate identification and the lane identification of the corresponding gate of the third vehicle.
Further, since the time point of each third vehicle entering a certain area is stored in the third type of statistical information, the information processing apparatus can acquire, from the third type of statistical information, a statistical entry of the included time point after a specified time from the third type of statistical information, and take the statistical entry as the second entry, based on the time point of the statistical entry included in the third type of statistical information.
Wherein the third type of statistical information may be stored in various forms. For example, the third type of statistical information may be stored in a table form, as shown in table 3 above.
The table in which the third type of statistical information is stored may be referred to as a full field table. In this implementation, the second type of statistical information and the third type of statistical information may be the same statistical information.
The storage device may be the same device as the information processing device, or may be another electronic device communicatively connected to the information processing device. When the storage device and the information processing device are the same device, the information processing device always executes the operation of storing the statistic entries in the third type of statistic information when the stream computing task instruction is not received. When the information processing apparatus receives the stream calculation task instruction, the operation of storing the statistical items in the third type of statistical information and the determination method of the vehicle information provided by the embodiment of the present invention may be performed in parallel.
The information processing apparatus may obtain each second entry after the specified time from the third type of statistical information in a plurality of ways, and this is not limited in this embodiment of the present invention. For the sake of clarity, the following description will be given by way of example of the manner in which the information processing apparatus acquires, from the third type of statistical information, the respective second items whose time points are after the specified time.
S502: extracting the vehicle identification of a third vehicle driving through each gate, and the corresponding lane and gate from each second item;
after acquiring the second entries after the specified time point, since each of the second entries includes vehicle information of a third vehicle passing through a certain gate, the information processing apparatus may extract, from the second entries, a vehicle identification of the third vehicle passing through the gates and corresponding lanes and gates. Wherein the extracted lane and gate of the third vehicle are determined based on the gate identifier and the lane identifier of the corresponding gate of the third vehicle included in the second entry.
S503: and obtaining the vehicle identifier of the third vehicle with the corresponding gate as the target gate and the corresponding lane as the target lane from the obtained vehicle identifier of the third vehicle and the corresponding lane and gate, and taking the vehicle identifier of the third vehicle with the corresponding lane as the vehicle identifier of the vehicle driving from the target lane to the target gate.
After extracting the vehicle identifier of the third vehicle driving through each gate, and the corresponding lane and gate from each acquired second entry, the information processing device may obtain, from the vehicle identifier of the third vehicle, and the corresponding lane and gate, the vehicle identifier of the third vehicle whose corresponding gate is the target gate and whose corresponding lane is the target lane, as the vehicle identifier of the vehicle driving through the target gate from the target lane.
Specifically, for each acquired second entry, the information processing apparatus may determine whether the lane in the second entry is a target lane and determine whether the gate in the second entry is a target gate, and when both determination results of the two determinations are yes, the information processing apparatus may determine the vehicle identifier included in the second entry as the vehicle identifier of the target vehicle that has driven from the target lane through the target gate after the specified time, that is, the vehicle identifier of the target vehicle that has entered the target area after the specified time.
Next, a description will be given of a manner in which the information processing apparatus acquires each second item whose time point is after a specified time from the third type of statistical information.
Optionally, in a specific implementation manner, since the third type of statistical information is updated in real time, the information processing device may obtain, in real time, each second entry generated after the specified time of the third type of statistical information.
Optionally, in another specific implementation manner, in this implementation manner, the information processing apparatus may obtain, in non-real time, each second entry after the specified time from the third type of statistical information. Specifically, as shown in fig. 6, the step S501 may include the following steps:
s601: dividing the statistical items generated in the time length into an item group every other first preset time length according to the sequence of the generation time of each statistical item in the third type of statistical information from morning to evening;
each second entry in the third category of statistical information is generated in real time, i.e. each time a third vehicle enters a certain area through a certain gate, a second entry of vehicle information about the third vehicle is added to the third category of statistical information.
In this way, the information processing apparatus may divide the statistical items generated in the time length into an item group according to the generation time of each statistical item in the third type of statistical information and according to the order of the generation time from morning to evening for each first preset time length. For example, every 5 seconds, the statistical entries generated within the 5 seconds may be divided into an entry group. Of course, the first preset time period may be any time period determined according to practical applications, for example, 2 seconds, 10 seconds, 1 minute, and the like.
S602: according to the sequence of the division time of each item group from morning to evening, acquiring a plurality of item groups divided within the time length from the third type of statistical information every second preset time length;
since each entry group is generated every first preset time period in the order of the generation time of each statistical entry from the morning to the evening, the division of each entry group also has the time order from the morning to the evening. Thus, after obtaining the plurality of entry groups, the information processing device obtains the plurality of entry groups obtained by dividing each entry group in the time length from the first preset time length to the second preset time length according to the sequence of the dividing time of each entry group. In order to ensure that all the obtained multiple entry groups are complete entry groups, the second preset time length is an integral multiple of the first preset time length.
For example, if the first preset time is 5 seconds and the second preset time is 20 seconds, the information processing apparatus may acquire 4 entry groups divided in the 20 seconds every 20 seconds.
S603: respective second items of which time points are after the specified time are acquired from the acquired plurality of item groups.
Since each entry group includes a plurality of second entries, and each second entry includes vehicle information of a third vehicle entering a certain area through a certain gate. In this way, the information processing apparatus can acquire, from the acquired plurality of entry groups, the respective second entries whose time points are after the specified time, based on the time points included in the vehicle information of the third vehicle.
Corresponding to the method for determining the vehicle information provided by the embodiment of the invention, the embodiment of the invention also provides a device for determining the vehicle information.
Fig. 7 is a schematic structural diagram of a vehicle information determining apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus may include the following modules:
a vehicle identifier acquiring module 710, configured to acquire a vehicle identifier of a target vehicle entering a target area after a specified time in real time;
a statistical item determining module 720, configured to determine statistical items, which are acquired based on first-type statistical information and have time points within a target time range, where the first-type statistical information is: information updated according to a predetermined cycle, and including: the statistical entries regarding the vehicle identification of the vehicle entering the target area and the time point of the latest entering of the target area, the target time range is: the time period from the upper limit value of the backtracking time range to the specified time is obtained;
the target entry judging module 730 is configured to judge whether a target statistical entry exists in the acquired statistical entries, where the target statistical entry includes a vehicle identifier of a target vehicle and a time point is located within a backtracking time range; if so, triggering a target vehicle determination module;
and the target vehicle determination module 740 is configured to determine that the time point at which the target vehicle has entered the target area last time is within the backtracking time range.
As can be seen from the above, by applying the scheme provided in the embodiment of the present invention, the first type of statistical information is periodically updated according to a predetermined period, where the first type of statistical information includes: a statistical entry regarding a vehicle identification of a vehicle entering the target area and a point in time of a most recent entry into the target area. When determining whether the time point at which the target vehicle has entered the target area last time is within the backtracking time range, after the vehicle identifier of the target vehicle is acquired, determining each statistical entry of the time point within the target time range, which is acquired based on the first type of statistical information, that is, determining the vehicle identifier of the vehicle entering the target area and the time point at which the vehicle has entered the target area last time within a time period between the upper limit value of the backtracking time range and a specified time. In this way, the vehicle identification of the target vehicle can be directly matched with the determined information, and then whether the time point when the target vehicle enters the target area last time is located in the backtracking time range is determined. Therefore, when determining whether the time point when the target vehicle enters the target area for the last time is within the backtracking time range, only the determined few statistical items need to be searched, so that the time consumption in the information searching process is reduced, and the query efficiency is improved.
Optionally, in a specific implementation manner, the apparatus may further include: the statistical item acquisition module is used for acquiring each statistical item of a time point in a target time range based on the first type of statistical information;
the statistical item obtaining module may include:
the first item acquisition sub-module is used for acquiring each first item of which the time point is in the target time range from the first type of statistical information;
the vehicle information acquisition submodule is used for acquiring the vehicle identifier and the time point of a first vehicle entering the target area between the latest updating time of the first type of statistical information and the specified time;
a time point updating submodule, configured to, for each first entry containing the acquired vehicle identifier of the first vehicle, update a time point in the first entry to: the time point of the first vehicle corresponding to the vehicle identifier in the first entry;
the supplementary item determining submodule is used for regarding a first vehicle of which the vehicle identification is not contained in any first item, and taking the vehicle identification and the time point of the first vehicle as statistical items to be supplemented;
and the statistical item determining submodule is used for determining the statistical items to be supplemented and each first item as each statistical item of which the time point is in the target time range.
Optionally, in a specific implementation manner, the apparatus may further include: the statistical information construction module is used for constructing first-type statistical information;
the statistical information construction module may include:
the statistical information acquisition submodule is used for acquiring the vehicle identification and the time point of a second vehicle entering the target area in the current period from the second type of statistical information in each preset period; wherein the second type of statistical information includes: statistical entries of vehicle information on respective vehicles entering the target area;
the time point determining submodule is used for determining the vehicle identifier of each second vehicle and the latest time point corresponding to the vehicle identifier from the acquired second vehicle identifiers and the time points at the end time of each preset period; wherein, the latest time is as follows: a time point closest to the end time of the cycle;
the statistical information judgment submodule is used for judging whether the first type of statistical information is stored at the end time of each preset period; if not, triggering a first information determination sub-module, and if yes, triggering a second information determination sub-module;
the first information determining submodule is used for respectively taking the acquired vehicle identification of each second vehicle and the latest time point corresponding to the vehicle identification as a statistical item to obtain first-type statistical information;
and the second information determining submodule is used for updating the time point in each statistical entry containing the acquired vehicle identifier of the second vehicle in the first type of statistical information into: the latest time point corresponding to the vehicle identification in the statistical entry; and aiming at each second vehicle of which the vehicle identification does not contain the first-class statistical information, adding the vehicle identification of the second vehicle and the corresponding latest time point into the first-class statistical information as a statistical item to obtain the updated first-class statistical information.
Optionally, in a specific implementation manner, the apparatus may further include:
the route identification determining module is used for determining a target gate corresponding to the target area and a target lane entering the target area through the target gate before acquiring the vehicle identification of the target vehicle entering the target area after the specified time in real time;
in this implementation manner, the vehicle identifier obtaining module 710 may be specifically configured to obtain, in real time, a vehicle identifier of a target vehicle that has driven from a target lane through a target gate after a specified time;
in this implementation manner, the statistical item determining module 720 may be specifically configured to determine each statistical item that is obtained based on the first type of statistical information, where the gate is a target gate, the lane is a target lane, and the time point is within a target time range; wherein the first type of statistical information is: information updated according to a predetermined cycle, and including: and (3) statistical items of the collected vehicle identification of the vehicle, the gate passed by the vehicle, the lane driven by the vehicle when passing the gate and the time point of the last driving from the lane to the gate.
Optionally, in a specific implementation manner, the vehicle identifier obtaining module 710 may include:
the second item acquisition submodule is used for acquiring each second item of which the time point is after the specified time from the third type of statistical information; wherein, the third type statistical information is real-time updated information and comprises: a statistical item of vehicle information on a third vehicle that has traveled through the respective gates;
the information extraction submodule is used for extracting the vehicle identification of the third vehicle driving through each gate, and the corresponding lane and gate from each acquired second item;
and the vehicle identifier obtaining submodule is used for obtaining the vehicle identifier of the third vehicle with the corresponding gate as the target gate and the corresponding lane as the target gate from the obtained vehicle identifier of the third vehicle and the corresponding lane and gate, and the vehicle identifier is used as the vehicle identifier of the vehicle driving from the target lane to the target gate.
Optionally, in a specific implementation manner, the second entry obtaining sub-module may include:
the item group dividing unit is used for dividing the statistical items generated in the time length into an item group every other first preset time length according to the sequence of the generation time of each statistical item in the third type of statistical information from morning to evening;
the entry group acquisition unit is used for acquiring a plurality of entry groups divided within the time length from the third type of statistical information at intervals of a second preset time length according to the sequence of the division time of each entry group from morning to evening; the second preset time length is integral multiple of the first preset time length;
a second entry acquisition unit operable to acquire, from the acquired plurality of entry groups, respective second entries whose points in time are after a specified time.
Optionally, in a specific implementation manner, the apparatus may further include:
the target vehicle judgment module is used for judging whether the target vehicle enters a target area for the first time in a preset period at a specified moment when determining each statistical item which is acquired based on the first type of statistical information and has a time point within a target time range; if so, the statistical entry determination module is triggered.
Optionally, in a specific implementation manner, the target vehicle determination module may include:
the vehicle identification judgment submodule is used for judging whether the preset cache space stores the vehicle identification of the target vehicle or not; wherein the buffer space is emptied at the end of each predetermined period; if not, triggering a target vehicle determination submodule;
and the target vehicle determining submodule is used for determining whether the target vehicle enters the target area for the first time within a preset period of the specified time.
With respect to the method for determining vehicle information provided by the above embodiment of the present invention, an embodiment of the present invention further provides an electronic device, as shown in fig. 8, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete communication with each other through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement any step of the method for determining vehicle information according to the embodiment of the present invention when executing the program stored in the memory 803.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
The embodiment of the invention also provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program realizes any step of the vehicle information determination method provided by the embodiment of the invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. A method of determining vehicle information, the method comprising:
acquiring a vehicle identifier of a target vehicle entering a target area after a specified time in real time;
determining each statistical item of a time point in a target time range, which is acquired based on first-type statistical information, wherein the first-type statistical information is as follows: information updated according to a predetermined cycle, and including: statistical entries regarding vehicle identifications of vehicles entering the target area and a point in time of a most recent entry into the target area, the target time range being: the time period from the upper limit value of the backtracking time range to the specified time is obtained;
judging whether a target statistic entry which contains the vehicle identification of the target vehicle and has a time point within the backtracking time range exists in each obtained statistic entry;
if yes, determining that the time point of the target vehicle entering the target area for the last time is within the backtracking time range;
the mode of acquiring each statistical item of the time point in the target time range based on the first type of statistical information comprises the following steps:
acquiring each first item of a time point in the target time range from the first type of statistical information; acquiring a vehicle identifier and a time point of a first vehicle entering the target area between the latest updating time of the first type of statistical information and the specified time; for each first entry containing the acquired vehicle identification of the first vehicle, updating the point in time in the first entry to: the time point of the first vehicle corresponding to the vehicle identifier in the first entry; regarding a first vehicle of which the vehicle identification is not contained in any first entry, taking the vehicle identification and the time point of the first vehicle as statistical entries to be supplemented; and determining the statistical items to be supplemented and the first items as the statistical items of which the time points are in the target time range.
2. The method of claim 1, wherein the first type of statistical information is constructed by:
in each preset period, acquiring a vehicle identifier and a time point of a second vehicle entering the target area in the current period from second type statistical information; wherein the second type of statistical information includes: statistical entries of vehicle information on respective vehicles entering the target area;
at the end time of each preset period, determining the vehicle identification of each second vehicle and the latest time point corresponding to the vehicle identification from the acquired second vehicle identifications and time points; wherein the latest time is: a time point closest to the end time of the cycle;
judging whether the first type of statistical information is stored at the end time of each preset period;
if not, respectively taking the acquired vehicle identification of each second vehicle and the latest time point corresponding to the vehicle identification as a statistical item to obtain the first type of statistical information;
if yes, for each statistical entry containing the acquired vehicle identifier of the second vehicle in the first-type statistical information, updating the time point in the statistical entry as: the latest time point corresponding to the vehicle identification in the statistical entry; and aiming at each second vehicle of which the vehicle identification does not contain the first-class statistical information, adding the vehicle identification of the second vehicle and the corresponding latest time point into the first-class statistical information as a statistical item to obtain the updated first-class statistical information.
3. The method of claim 1, wherein prior to the step of obtaining in real time a vehicle identification of a target vehicle entering a target area after a specified time, the method further comprises:
determining a target gate corresponding to a target area and a target lane entering the target area through the target gate;
the step of acquiring in real time the vehicle identification of the target vehicle entering the target area after the specified time includes:
acquiring a vehicle identifier of a target vehicle driving through the target gate from the target lane after a specified time in real time;
the step of determining each statistical item, which is acquired based on the first type of statistical information and has a time point within the target time range, includes:
determining each statistical item which is acquired based on the first type of statistical information, wherein the gate is the target gate, the lane is the target lane, and the time point is in the target time range; wherein the first type of statistical information is: information updated according to a predetermined cycle, and including: and (3) statistical items of the collected vehicle identification of the vehicle, the gate passed by the vehicle, the lane driven by the vehicle when passing the gate and the time point of the last driving from the lane to the gate.
4. The method of claim 3, wherein the step of obtaining in real time a vehicle identification of a target vehicle driving through the target gate from the target lane after a specified time comprises:
acquiring each second item of a time point after the specified time from the third type of statistical information; wherein the third type of statistical information is real-time updated information, and includes: a statistical item of vehicle information on a third vehicle that has traveled through the respective gates;
extracting the vehicle identification of a third vehicle driving through each gate, and the corresponding lane and gate from each second item;
and obtaining the vehicle identifier of the third vehicle with the corresponding gate as the target gate and the corresponding lane as the vehicle identifier of the vehicle driving through the target gate from the obtained vehicle identifier of the third vehicle and the corresponding lane and gate.
5. The method according to claim 4, wherein the step of obtaining, from the third category of statistical information, each second entry having a time point after the specified time point comprises:
dividing the statistical items generated in the time length into an item group every other first preset time length according to the sequence of the generation time of each statistical item in the third type of statistical information from morning to evening;
according to the sequence of the division time of each item group from morning to evening, acquiring a plurality of item groups divided within the time length from the third type of statistical information every other second preset time length; the second preset time length is integral multiple of the first preset time length;
and acquiring each second item of which the time point is after the specified time from the acquired plurality of item groups.
6. The method according to claim 1, wherein before the step of determining each statistical item having a time point within the target time range, which is obtained based on the first type of statistical information, the method further comprises:
judging whether the target vehicle enters the target area for the first time in a preset period of the designated moment;
if yes, the step of determining each statistical item of which the time point is in the target time range and which is obtained based on the first type of statistical information is executed.
7. The method of claim 6, wherein the step of determining whether the target vehicle enters the target area for the first time within a predetermined period of the specified time comprises:
judging whether a preset cache space stores the vehicle identification of the target vehicle or not; wherein the buffer space is emptied at the end of each predetermined period;
if not, whether the target vehicle enters the target area for the first time within a preset period of the specified time is judged.
8. An apparatus for determining vehicle information, characterized by comprising:
the vehicle identification acquisition module is used for acquiring the vehicle identification of a target vehicle entering a target area after a specified moment in real time;
a statistical item determining module, configured to determine statistical items, which are acquired based on first-type statistical information and have time points within a target time range, where the first-type statistical information is: information updated according to a predetermined cycle, and including: statistical entries regarding vehicle identifications of vehicles entering the target area and a point in time of a most recent entry into the target area, the target time range being: the time period from the upper limit value of the backtracking time range to the specified time is obtained;
the target entry judging module is used for judging whether a target statistical entry which contains the vehicle identifier of the target vehicle and has a time point within the backtracking time range exists in each acquired statistical entry; if so, triggering a target vehicle determination module;
the target vehicle determination module is used for determining that the time point when the target vehicle enters the target area for the last time is within the backtracking time range;
the device further comprises a statistic item acquisition module, a first class statistic information acquisition module and a second class statistic information acquisition module, wherein the statistic item acquisition module is used for acquiring each statistic item of a time point in a target time range based on the first class statistic information; the statistic item acquisition module comprises:
the first item acquisition sub-module is used for acquiring each first item of a time point in the target time range from the first type of statistical information;
the vehicle information acquisition sub-module is used for acquiring the vehicle identification and the time point of a first vehicle entering the target area between the latest updating time of the first type of statistical information and the specified time;
a time point updating submodule, configured to, for each first entry containing the acquired vehicle identifier of the first vehicle, update a time point in the first entry to: the time point of the first vehicle corresponding to the vehicle identifier in the first entry;
the supplementary item determining submodule is used for regarding a first vehicle of which the vehicle identification is not contained in any first item, and taking the vehicle identification and the time point of the first vehicle as statistical items to be supplemented;
and the statistical item determining submodule is used for determining the statistical items to be supplemented and the first items as the statistical items of which the time points are in the target time range.
9. The apparatus according to claim 8, further comprising a statistical information construction module for constructing the first type of statistical information; the statistical information construction module comprises:
the statistical information acquisition submodule is used for acquiring the vehicle identification and the time point of a second vehicle entering the target area in the current period from the second type of statistical information in each preset period; wherein the second type of statistical information includes: statistical entries of vehicle information on respective vehicles entering the target area;
the time point determining submodule is used for determining the vehicle identifier of each second vehicle and the latest time point corresponding to the vehicle identifier from the acquired second vehicle identifiers and the time points at the end time of each preset period; wherein the latest time is: a time point closest to the end time of the cycle;
the statistical information judgment submodule is used for judging whether the first type of statistical information is stored at the end time of each preset period; if not, triggering a first information determination sub-module, and if yes, triggering a second information determination sub-module;
the first information determining submodule is used for respectively taking the acquired vehicle identifier of each second vehicle and the latest time point corresponding to the vehicle identifier as a statistical item to obtain the first type of statistical information;
the second information determination submodule is configured to, for each statistical entry that includes the acquired vehicle identifier of the second vehicle in the first category of statistical information, update a time point in the statistical entry to: the latest time point corresponding to the vehicle identification in the statistical entry; and aiming at each second vehicle of which the vehicle identification does not contain the first-class statistical information, adding the vehicle identification of the second vehicle and the corresponding latest time point into the first-class statistical information as a statistical item to obtain the updated first-class statistical information.
10. The apparatus of claim 8, further comprising:
the route identification determining module is used for determining a target gate corresponding to a target area and a target lane entering the target area through the target gate before the vehicle identification of the target vehicle entering the target area after the specified time is obtained in real time;
the vehicle identification acquisition module is specifically used for acquiring the vehicle identification of a target vehicle which passes through the target gate from the target lane after a specified time in real time;
the statistical item determining module is specifically configured to determine each statistical item, which is acquired based on the first type of statistical information, where a gate is the target gate, a lane is the target lane, and a time point is within a target time range; wherein the first type of statistical information is: information updated according to a predetermined cycle, and including: and (3) statistical items of the collected vehicle identification of the vehicle, the gate passed by the vehicle, the lane driven by the vehicle when passing the gate and the time point of the last driving from the lane to the gate.
11. The apparatus of claim 10, wherein the vehicle identification acquisition module comprises:
the second item acquisition submodule is used for acquiring each second item of the time point after the specified time from the third type of statistical information; wherein the third type of statistical information is real-time updated information, and includes: a statistical item of vehicle information on a third vehicle that has traveled through the respective gates;
the information extraction submodule is used for extracting the vehicle identification of the third vehicle driving through each gate, and the corresponding lane and gate from each acquired second item;
and the vehicle identifier obtaining sub-module is used for obtaining the vehicle identifier of the third vehicle, which is the target gate and is the corresponding lane, from the obtained vehicle identifier of the third vehicle and the corresponding lane and gate, and taking the vehicle identifier of the third vehicle, which is the target lane, as the vehicle identifier of the vehicle driving through the target gate from the target lane.
12. The apparatus of claim 11, wherein the second entry retrieval submodule comprises:
the item group dividing unit is used for dividing the statistical items generated in the time length into an item group every other first preset time length according to the sequence of the generation time of each statistical item in the third type of statistical information from morning to evening;
the entry group acquisition unit is used for acquiring a plurality of entry groups divided within the time length from the third type of statistical information at intervals of a second preset time length according to the sequence of the division time of each entry group from morning to evening; the second preset time length is integral multiple of the first preset time length;
a second entry acquisition unit configured to acquire, from the acquired plurality of entry groups, respective second entries whose points in time are after the specified time.
13. The apparatus of claim 8, further comprising:
the target vehicle judgment module is used for judging whether the target vehicle enters the target area for the first time in a preset period of the specified moment when each statistical item of which the time point is in the target time range is obtained based on the first type of statistical information; if so, triggering the statistic item determination module.
14. The apparatus of claim 13, wherein the target vehicle determination module comprises:
the vehicle identification judgment submodule is used for judging whether a preset cache space stores the vehicle identification of the target vehicle or not; wherein the buffer space is emptied at the end of each predetermined period; if not, triggering a target vehicle determination submodule;
and the target vehicle determining submodule is used for determining whether the target vehicle enters the target area for the first time in a preset period of the specified time.
15. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN201811446372.1A 2018-11-29 2018-11-29 Vehicle information determination method and device and electronic equipment Active CN111243266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811446372.1A CN111243266B (en) 2018-11-29 2018-11-29 Vehicle information determination method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811446372.1A CN111243266B (en) 2018-11-29 2018-11-29 Vehicle information determination method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111243266A CN111243266A (en) 2020-06-05
CN111243266B true CN111243266B (en) 2021-08-20

Family

ID=70863858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811446372.1A Active CN111243266B (en) 2018-11-29 2018-11-29 Vehicle information determination method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111243266B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112530176B (en) * 2020-11-10 2022-03-25 浙江大华***工程有限公司 Drunk driving early warning method, device, equipment and medium
CN112948407B (en) * 2021-03-02 2024-01-23 无锡车联天下信息技术有限公司 Data updating method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914461A (en) * 2012-12-31 2014-07-09 北京中交兴路信息科技有限公司 Traffic information query method and device
CN104835316A (en) * 2015-05-26 2015-08-12 大连理工大学 Traffic flow density-based solution to problem of VANET sparse connectivity
CN106156332A (en) * 2016-07-06 2016-11-23 福建富士通信息软件有限公司 The method screening vehicles passing in and out based on section seclected time and selection area
US9677903B2 (en) * 2014-03-26 2017-06-13 Trip Routing Technologies, Llc. Selected driver notification of transitory roadtrip events
CN108022428A (en) * 2016-11-02 2018-05-11 杭州海康威视***技术有限公司 A kind of vehicle identification method and device
CN108389394A (en) * 2018-04-23 2018-08-10 泰华智慧产业集团股份有限公司 Vehicle enters the method and system of city analysis for the first time

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914461A (en) * 2012-12-31 2014-07-09 北京中交兴路信息科技有限公司 Traffic information query method and device
US9677903B2 (en) * 2014-03-26 2017-06-13 Trip Routing Technologies, Llc. Selected driver notification of transitory roadtrip events
CN104835316A (en) * 2015-05-26 2015-08-12 大连理工大学 Traffic flow density-based solution to problem of VANET sparse connectivity
CN106156332A (en) * 2016-07-06 2016-11-23 福建富士通信息软件有限公司 The method screening vehicles passing in and out based on section seclected time and selection area
CN108022428A (en) * 2016-11-02 2018-05-11 杭州海康威视***技术有限公司 A kind of vehicle identification method and device
CN108389394A (en) * 2018-04-23 2018-08-10 泰华智慧产业集团股份有限公司 Vehicle enters the method and system of city analysis for the first time

Also Published As

Publication number Publication date
CN111243266A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
Biagioni et al. Easytracker: automatic transit tracking, mapping, and arrival time prediction using smartphones
US20160371305A1 (en) Method, device and apparatus for generating picture search library, and picture search method, device and apparatus
CN102193929B (en) Method and equipment for searching by using word information entropy
CN103150177A (en) Method, device and system for updating bus route data
CN107038620B (en) Information pushing and device based on taxi taking preference of user
CN111243266B (en) Vehicle information determination method and device and electronic equipment
CN111639092B (en) Personnel flow analysis method and device, electronic equipment and storage medium
WO2021169174A1 (en) Road congestion degree prediction method, apparatus, computer device, and readable storage medium
CN110362640B (en) Task allocation method and device based on electronic map data
CN113284343B (en) Traffic monitoring system and method based on intelligent traffic Internet of things
CN114003672B (en) Method, device, equipment and medium for processing road dynamic event
CN110427574B (en) Route similarity determination method, device, equipment and medium
CN113838303B (en) Parking lot recommendation method and device, electronic equipment and storage medium
CN110986992A (en) Navigation method and device for unmanned vending vehicle, electronic equipment and storage medium
CN108020235B (en) Method and system for dynamically acquiring path weight based on taxi experience data
CN114036411A (en) Route planning method, device, equipment and medium
CN113891234A (en) Track data completion method and device, computer equipment and storage medium
CN116521729A (en) Information classification searching method and device based on elastic search
CN110209853B (en) Image searching method, device and equipment for vehicle
CN110718087B (en) Data fusion processing method and device
Hargrave et al. Integration of dynamic road condition updates for real-time ridesharing systems
CN111091156B (en) Intersection passing time estimation method and device and electronic equipment
Behera et al. Real time identification of inputs for a BATP system using data analytics
CN106781470B (en) Method and device for processing running speed of urban road
CN111179603A (en) Vehicle identification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant