Passenger flow statistical method and device and camera

文档序号:1492826 发布日期:2020-02-04 浏览:2次 中文

阅读说明:本技术 客流统计方法及装置、摄像机 (Passenger flow statistical method and device and camera ) 是由 张文垂 于 2018-07-24 设计创作,主要内容包括:本申请提供一种客流统计方法及装置,方法包括:获取摄像机采集的客流数据;客流数据包括客流队列数据和离队人员数据;针对每一客流队列数据,依据该客流队列数据的生成时间点和预设时段参数确定对应的压缩时段,依据该客流队列数据的队列长度和对应的压缩时段对该客流队列数据进行压缩;针对每一离队人员数据,依据预设时段参数和该离队人员数据确定对应的压缩时段,依据确定的压缩时段对该离队人员数据进行压缩;在接收到客流统计条件时,依据压缩得到的客流压缩数据统计客流。通过对客流队列数据和离队人员数据的压缩可减少对空间的占用,利于摄像机本地存储和统计,从而降低了摄像机与平台服务器之间的通信负担。(The application provides a passenger flow statistical method and a device, wherein the method comprises the following steps: acquiring passenger flow data acquired by a camera; the passenger flow data comprises passenger flow queue data and dequeue personnel data; aiming at each passenger flow queue data, determining a corresponding compression time period according to the generation time point of the passenger flow queue data and a preset time period parameter, and compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period; for each off-queue personnel data, determining a corresponding compression time period according to a preset time period parameter and the off-queue personnel data, and compressing the off-queue personnel data according to the determined compression time period; and when the passenger flow statistical condition is received, counting the passenger flow according to the compressed passenger flow data obtained by compression. The occupation of space can be reduced by compressing the passenger flow queue data and the dequeue personnel data, the local storage and statistics of the camera are facilitated, and therefore the communication burden between the camera and the platform server is reduced.)

1. A method of statistics of passenger flow, the method comprising:

acquiring passenger flow data acquired by a camera; the passenger flow data comprises passenger flow queue data and dequeue personnel data; the passenger flow queue data comprises a queue length and a generation time point of the passenger flow queue data generated by the camera;

aiming at each passenger flow queue data, determining a corresponding compression time period according to the generation time point of the passenger flow queue data and a preset time period parameter, and compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period;

for each off-queue personnel data, determining a corresponding compression time period according to the preset time period parameter and the off-queue personnel data, and compressing the off-queue personnel data according to the determined compression time period;

and when the passenger flow statistical condition is received, counting the passenger flow according to the compressed passenger flow data obtained by compression.

2. The method of claim 1, wherein the passenger flow compression data comprises compression data of passenger flow queue data, and the compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression period comprises:

searching for first target compressed data containing the keyword in compressed data of the existing passenger flow queue data by taking a compression time period corresponding to the passenger flow queue data and the queue length of the passenger flow queue data as the keyword;

if the passenger flow queue data is not found, adding the queue length and the compression time period into the compressed data of the passenger flow queue data, and adding the duration with the set duration corresponding to the queue length and the compression time period into the compressed data of the passenger flow queue data;

and if the target compressed data is found, increasing the duration of the found first target compressed data by a set duration.

3. The method of claim 1, wherein the dequeue people data comprises: the enqueuing time point and the dequeuing time point, wherein the step of determining the corresponding compression time period according to the preset time period parameter and the dequeuing personnel data comprises the following steps:

and determining a compression time period corresponding to the dequeuing personnel data according to the preset time period parameter and the enqueuing time point or the dequeuing time point of the dequeuing personnel data or the middle time point between the enqueuing time point and the dequeuing time point.

4. The method of claim 1, wherein the dequeue people data further comprises queuing duration, the passenger flow compression data comprises compression data of dequeue people data, and the compressing of the dequeue people data according to the determined compression period comprises:

searching second target compressed data containing the keyword in the compressed data of the existing dequeuing personnel data by taking the compression time period corresponding to the dequeuing personnel data and the queuing time length of the dequeuing personnel data as the keyword;

if the second target compressed data is found, increasing the total number of the personnel in the found second target compressed data by a set value;

and if the compressed time interval and the queuing time interval are not found, adding the compressed time interval and the queuing time interval into the compressed data of the dequeuing personnel data, and adding the total number of personnel with the set value corresponding to the compressed time interval and the queuing time interval into the compressed data of the dequeuing personnel data.

5. The method of claim 1, wherein the compressed passenger flow data comprises compressed data of passenger flow queue data and compressed data of dequeue personnel data, the passenger flow statistical conditions comprise statistical time periods, queue length segmentation information and queuing time segmentation information, and when the passenger flow statistical conditions are received, the statistics of the passenger flow according to the compressed passenger flow data obtained by compression comprises the following steps:

acquiring compressed data of passenger flow queue data, compressed data of dequeue personnel data and non-dequeue personnel data belonging to the statistical time period;

counting passenger flows according to the queue length segmentation information and the queue length and duration in the compressed data of the passenger flow queue data;

and counting passenger flow according to the queuing time segmentation information, the obtained compressed data of the personnel data leaving the queue and the obtained personnel data not leaving the queue.

6. The method of claim 5, wherein counting passenger flows according to the queuing time length segmentation information, the obtained compressed data of the person data leaving the queue, and the obtained person data not leaving the queue, comprises:

determining queuing time in the acquired personnel data which are not left;

and counting passenger flow according to the queuing time subsection information, the queuing time and the total number of the personnel in the compressed data of the personnel data leaving the queue and the determined queuing time in the personnel data not leaving the queue.

7. The method of claim 6, wherein determining a queuing time in the obtained non-dequeued people data comprises:

determining queuing time length in the personnel data which are not dequeued according to the current time point and the enqueuing time point in the personnel data which are not dequeued; alternatively, the first and second electrodes may be,

determining queuing time length in the non-queue-leaving personnel data according to the queuing time length of the queue-leaving personnel in a preset time period before the current time point; alternatively, the first and second electrodes may be,

and determining the queuing time length in the non-queue-leaving personnel data according to the queuing time lengths of the preset number of queue-leaving personnel before the current time point.

8. A passenger flow statistics apparatus, characterized in that the apparatus comprises:

the acquisition module is used for acquiring passenger flow data acquired by the camera; the passenger flow data comprises passenger flow queue data and dequeue personnel data; the passenger flow queue data comprises a queue length and a generation time point of the passenger flow queue data generated by the camera;

the first compression module is used for determining a corresponding compression time period according to the generation time point of the passenger flow queue data and a preset time period parameter aiming at each passenger flow queue data, and compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period;

the second compression module is used for determining a corresponding compression time period according to the preset time period parameter and the dequeue personnel data and compressing the dequeue personnel data according to the determined compression time period aiming at each dequeue personnel data;

and the statistical module is used for counting passenger flow according to the compressed passenger flow data obtained by compression when the passenger flow statistical condition is received.

9. The apparatus of claim 8, wherein the passenger compressed data comprises compressed data of passenger queue data,

the first compression module is specifically used for searching for first target compressed data containing a keyword in compressed data of existing passenger flow queue data by using a compression time period corresponding to the passenger flow queue data and the queue length of the passenger flow queue data as the keyword in the process of compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period; if the passenger flow queue data is not found, adding the queue length and the compression time period into the compressed data of the passenger flow queue data, and adding the duration with the set duration corresponding to the queue length and the compression time period into the compressed data of the passenger flow queue data; and if the target compressed data is found, increasing the duration of the found first target compressed data by a set duration.

10. The apparatus of claim 8, wherein the dequeue people data comprises: the enqueue time point, the dequeue time point,

the second compression module is specifically configured to, in the process of determining a corresponding compression period according to the preset period parameter and the dequeue personnel data, determine a compression period corresponding to the dequeue personnel data according to the preset period parameter and an enqueuing time point or a dequeuing time point of the dequeue personnel data or an intermediate time point between the enqueuing time point and the dequeuing time point.

11. The apparatus of claim 8, wherein the dequeue people data further comprises a queuing time, the passenger flow compression data comprises compression data of dequeue people data,

the second compression module is further specifically configured to, in the process of compressing the dequeue personnel data according to the determined compression time period, search for second target compressed data containing the keyword in compressed data of existing dequeue personnel data by using the compression time period corresponding to the dequeue personnel data and the queuing time of the dequeue personnel data as the keyword; if the second target compressed data is found, increasing the total number of the personnel in the found second target compressed data by a set value; and if the compressed time interval and the queuing time interval are not found, adding the compressed time interval and the queuing time interval into the compressed data of the dequeuing personnel data, and adding the total number of personnel with the set value corresponding to the compressed time interval and the queuing time interval into the compressed data of the dequeuing personnel data.

12. The apparatus of claim 8, wherein the passenger flow compression data comprises compression data of passenger flow queue data and compression data of dequeue personnel data, the passenger flow statistical conditions comprise statistical time period, queue length segment information, queuing time period segment information,

the statistical module is specifically used for acquiring compressed data of passenger flow queue data, compressed data of dequeue personnel data and non-dequeue personnel data belonging to the statistical time period; counting passenger flows according to the queue length segmentation information and the queue length and duration in the compressed data of the passenger flow queue data; and counting passenger flow according to the queuing time segmentation information, the obtained compressed data of the personnel data leaving the queue and the obtained personnel data not leaving the queue.

13. The device according to claim 12, wherein the statistics module is specifically configured to determine a queuing time length in the obtained non-dequeued person data during the passenger flow statistics process according to the queuing time length segmentation information, the obtained compressed data of the dequeued person data, and the obtained non-dequeued person data; and counting passenger flow according to the queuing time subsection information, the queuing time and the total number of the personnel in the compressed data of the personnel data leaving the queue and the determined queuing time in the personnel data not leaving the queue.

14. The device according to claim 13, wherein the statistical module is specifically configured to, in the process of determining the queuing time length in the obtained non-dequeued person data, determine the queuing time length in the non-dequeued person data according to a current time point and an enqueuing time point in the non-dequeued person data; or determining the queuing time length in the non-queue-leaving personnel data according to the queuing time length of the queue-leaving personnel in a preset time period before the current time point; or determining the queuing time length in the non-dequeued personnel data according to the queuing time lengths of the dequeued personnel in preset number before the current time point.

15. A camera, characterized in that the device comprises a readable storage medium and a processor;

wherein the readable storage medium is configured to store machine executable instructions;

the processor configured to read the machine executable instructions on the readable storage medium and execute the instructions to implement the steps of the method of any one of claims 1-7.

Technical Field

The application relates to the technical field of data processing, in particular to a passenger flow statistical method and device and a camera.

Background

Currently, cameras used for passenger flow analysis in the field of security monitoring have computing capabilities for passenger flow data, such as calculating queue length at the current time point (referring to the total number of people waiting for service and being serviced in the monitored area) and the queue length of each person in the passenger flow queue (the time interval from entering the queue to leaving the queue).

Disclosure of Invention

In view of the above, the present application provides a method and an apparatus for passenger flow statistics, and a camera, so as to solve the problem that the communication load between the camera and a platform server is increased in the related art.

According to a first aspect of embodiments of the present application, there is provided a passenger flow statistics method, the method including:

acquiring passenger flow data acquired by a camera; the passenger flow data comprises passenger flow queue data and dequeue personnel data; the passenger flow queue data comprises a queue length and a generation time point of the passenger flow queue data generated by the camera;

aiming at each passenger flow queue data, determining a corresponding compression time period according to the generation time point of the passenger flow queue data and a preset time period parameter, and compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period;

for each off-queue personnel data, determining a corresponding compression time period according to the preset time period parameter and the off-queue personnel data, and compressing the off-queue personnel data according to the determined compression time period;

and when the passenger flow statistical condition is received, counting the passenger flow according to the compressed passenger flow data obtained by compression.

According to a second aspect of embodiments of the present application, there is provided a passenger flow statistics apparatus, the apparatus comprising:

the acquisition module is used for acquiring passenger flow data acquired by the camera; the passenger flow data comprises passenger flow queue data and dequeue personnel data; the passenger flow queue data comprises a queue length and a generation time point of the passenger flow queue data generated by the camera;

the first compression module is used for determining a corresponding compression time period according to the generation time point of the passenger flow queue data and a preset time period parameter aiming at each passenger flow queue data, and compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period;

the second compression module is used for determining a corresponding compression time period according to the preset time period parameter and the dequeue personnel data and compressing the dequeue personnel data according to the determined compression time period aiming at each dequeue personnel data;

and the statistical module is used for counting passenger flow according to the compressed passenger flow data obtained by compression when the passenger flow statistical condition is received.

According to a third aspect of embodiments herein, there is provided a camera, the apparatus comprising a readable storage medium and a processor;

wherein the readable storage medium is configured to store machine executable instructions;

the processor is configured to read the machine executable instructions on the readable storage medium and execute the instructions to implement the steps of the passenger flow statistics method.

By applying the embodiment of the application, after passenger flow data (including passenger flow queue data and dequeue personnel data) collected by a camera is obtained, for each piece of passenger flow queue data, a corresponding compression time period is determined according to a preset time period parameter and a production time point of the passenger flow queue data, the passenger flow queue data is compressed according to a queue length in the passenger flow queue data and the corresponding compression time period, for each piece of dequeue personnel data, a corresponding compression time period is determined according to the preset time period parameter and the dequeue personnel data, the dequeue personnel data is compressed according to the determined compression time period, and when passenger flow statistical conditions are received, the passenger flow can be counted according to the compressed passenger flow data obtained through compression. Based on the description, the passenger flow queue data and the dequeue personnel data included in the passenger flow data are compressed respectively through the preset time period parameters, so that the occupation of the storage space can be reduced to a great extent, the local storage of the camera is facilitated, the local statistics of the camera is facilitated, the platform server is not required to participate in the storage and the statistics, the communication burden between the camera and the platform server is reduced, and the number of the platform server accessed to the camera is increased.

Drawings

FIG. 1 is a flow chart illustrating an embodiment of a method for providing statistics on passenger flow according to an exemplary embodiment of the present application;

FIG. 2A is a flow diagram illustrating an embodiment of another method for providing statistics on passenger flow according to an exemplary embodiment of the present application;

FIG. 2B is a graph of a passenger flow statistic for queue length shown in the embodiment of FIG. 2A;

FIG. 2C is a graph of passenger flow statistics for a queuing time period according to the embodiment of FIG. 2A;

FIG. 3 is a diagram illustrating a hardware configuration of a camera according to an exemplary embodiment of the present application;

fig. 4 is a block diagram of an embodiment of a passenger flow statistics apparatus according to an exemplary embodiment of the present application.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.

At present, some cameras for passenger flow analysis can support the division of a visual monitoring area into three logical areas, and can respectively calculate passenger flow queue data in the three logical areas and queue data of each person in a passenger flow queue. Therefore, for each logic area, one passenger flow queue data is generated every second, 3600 passenger flow queue data are generated every hour, and 3153 ten thousand passenger flow queue data are generated every year. Meanwhile, the camera stores queue data recorded with a person ID, an enqueue time point, a dequeue time point and a queuing time length for each person who finishes queuing, and assuming that the queuing time length of each person is 1 minute on average, 60 queue data are generated in 1 hour of one queue, and about 52 ten thousand queue data are generated in one year. However, before the data is uncompressed, the camera cannot carry such a large amount of data storage and statistics.

Therefore, the camera can only send the generated passenger flow queue data and the dequeue personnel data to the platform server through the network, and the platform server stores and counts the passenger flow queue data and the dequeue personnel data. In addition, the resources of the platform server are occupied, and the number of cameras accessed by the platform server is limited.

Based on this, after acquiring the passenger flow data (including the passenger flow queue data and the dequeue personnel data) collected by the camera, for each piece of passenger flow queue data, a corresponding compression time period is determined according to a preset time period parameter and a production time point of the passenger flow queue data, the passenger flow queue data is compressed according to a queue length in the passenger flow queue data and the corresponding compression time period, for each piece of dequeue personnel data, a corresponding compression time period is determined according to the preset time period parameter and the dequeue personnel data, the dequeue personnel data is compressed according to the determined compression time period, and when the passenger flow statistical conditions are received, the passenger flow can be counted according to the compressed passenger flow data obtained through compression.

Based on the description, the passenger flow queue data and the dequeue personnel data included in the passenger flow data are compressed respectively through the preset time period parameters, so that the occupation of the storage space can be reduced to a great extent, the local storage of the camera is facilitated, the local statistics of the camera is facilitated, the platform server is not required to participate in the storage and the statistics, the communication burden between the camera and the platform server is reduced, and the number of the platform server accessed to the camera is increased.

Fig. 1 is a flowchart illustrating an embodiment of a passenger flow statistics method according to an exemplary embodiment of the present application, where as shown in fig. 1, the passenger flow statistics method includes the following steps:

step 101: and acquiring passenger flow data acquired by the camera, wherein the passenger flow data comprises passenger flow queue data and dequeue personnel data.

In one embodiment, the passenger queue data may include a queue length and a point in time at which the camera generated the passenger queue data. The dequeue personnel data may include an enqueue time point, a dequeue time point, and a queuing time length.

Step 102: and aiming at each passenger flow queue data, determining a corresponding compression time period according to the generation time point of the passenger flow queue data and a preset time period parameter, and compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period.

In an embodiment, for a camera supporting division of a logical area, an area identifier may also be recorded in the passenger flow queue data, as shown in table 1, which is an exemplary passenger flow queue data table, and the camera generates passenger flow queue data every 1 second. The preset time period parameter refers to the minimum time period of the merging compression, and can be set according to actual requirements.

Region(s) Generating time points Queue length (/ number of people)
1 2018-5-20 18:33:10 15
1 2018-5-20 18:33:11 15
1 2018-5-20 18:33:12 15
1 2018-5-20 18:33:13 16
1 2018-5-20 18:33:14 16
1 2018-5-20 18:33:15 16
1 2018-5-20 18:33:16 16
1 2018-5-20 18:33:17 15
1 2018-5-20 18:33:18 15
1 2018-5-20 18:33:19 15
1 2018-5-20 18:33:20 15

TABLE 1

In an exemplary scenario, it is assumed that the preset time period parameter is 1 hour, the time period is 00:00: 00-23: 59:59 for 24 hours a day, wherein 00:00: 00: 00-00: 59:59 corresponds to a 00:00:00 compression time period, 01:00: 00-01: 59:59 corresponds to a 01:00:00 compression time period, 02:00: 00-02: 59:59 corresponds to a 02:00:00 compression time period, and so on, the generation time points in the passenger flow queue data shown in the above table 1 are passenger flow queue data of 20 months in 2018, and all belong to 18:00:00 compression time periods corresponding to 18:00: 00:59:59, so that the compression time periods corresponding to the passenger flow queue data in table 1 are all 18:00:00 in 20 months in 2018.

In an embodiment, in a process of compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression period, the compression period corresponding to the passenger flow queue data and the queue length of the passenger flow queue data may be used as a keyword, a first target compressed data containing the keyword is searched in the compressed data of the existing passenger flow queue data, if the first target compressed data is not searched, the queue length and the compression period are added to the compressed data of the passenger flow queue data, and a duration with a set duration corresponding to the queue length and the compression period is added to the compressed data of the passenger flow queue data; and if the target compressed data is found, increasing the duration of the found first target compressed data by a set duration.

The set time duration may be a time interval, such as 1 second, during which the camera generates a piece of passenger flow queue data. After a certain piece of passenger flow queue data is compressed into the compressed data of the passenger flow queue data, the piece of passenger flow queue data can be deleted.

In another exemplary scenario, as shown in table 1, the time interval for generating a piece of passenger flow queue data is 1 second, assuming that the set time length is 1 second, the queue length of the first piece of passenger flow queue data is 15 people, the corresponding compression period is 2018, month 5, day 20, 18:00:00, assuming that there are no records with queue length of 15 people and compression period of 2018, month 5, day 20, 18:00:00, the queue length of 15 people and the compression period of 2018, month 5, day 20, day 18:00:00 are added to the compressed data of the passenger flow queue data, and 1 second is used as the duration to be added to the compressed data of the passenger flow queue data, and if one queue length of 15 people is found later, and the compression period of 2018, month 20, day 18:00:00 is found, the corresponding duration is added by 1 second, and the queue length of 15 people and the corresponding compression period of the passenger flow queue data with the compression period of 2018, month 5, month 20 day 18:00: 7 are found in table 1, there are 4 passenger flow queue data with queue length of 16 people and corresponding compression period of 2018, 5 month, 20 day, 18:00:00, so that a compressed data table of the passenger flow queue data as shown in table 2 can be obtained.

Region(s) Compression period Queue length Duration (seconds)
1 2018-5-20 18:00:00 15 7
1 2018-5-20 18:00:00 16 4

TABLE 2

Based on the above-described scenario, table 1 records 11 pieces of data for the passenger flow queue data before compression, and table 2 records only 2 pieces of data for the compressed data of the passenger flow queue data corresponding to table 1. Assuming that the queue length is completely consistent in a certain hour, 3600 pieces of passenger flow queue data in the hour can be compressed into 1 piece of compressed data of the passenger flow queue data. Therefore, the number of passenger flow queue data can be greatly reduced by combining and compressing the preset time period parameters, and local storage of the camera is facilitated.

It should be noted that, in the compression process of the passenger flow queue data, compression may be performed locally and in real time in the camera, that is, a piece of passenger flow queue data is generated to be compressed once, and after compression, the passenger flow queue data is deleted, so that the occupation of the storage space can be reduced to the maximum extent.

It should be further noted that, the passenger flow queue data may also be compressed at preset time intervals, that is, the passenger flow queue data generated in the time intervals is compressed once at regular time intervals, and after the compression, the passenger flow queue data in the time intervals is deleted.

Step 103: and aiming at each off-queue personnel data, determining a corresponding compression time period according to a preset time period parameter and the off-queue personnel data, and compressing the off-queue personnel data according to the determined compression time period.

In an embodiment, the dequeue person data includes an enqueue time point and a dequeue time point, and for the process of determining the corresponding compression period according to the preset period parameter and the dequeue person data, the compression period corresponding to the dequeue person data may be determined according to the preset period parameter and the enqueue time point or the dequeue time point of the dequeue person data or an intermediate time point between the enqueue time point and the dequeue time point.

For the cameras supporting division of the logical areas, the departure personnel data may also record area identifiers, as shown in table 3, which is an exemplary departure personnel data table. Determining the compression period corresponding to the dequeue people data according to the enqueue time point or the dequeue time point of the dequeue people data or the intermediate time point between the enqueue time point and the dequeue time point may include the following three ways:

the first mode is as follows:

determining an enqueuing time point and an intermediate time point of the dequeuing personnel data, determining a time period corresponding to the intermediate time point according to preset time period parameters, and determining the time period corresponding to the intermediate time point as a compression time period corresponding to the dequeuing personnel data.

For example, if the enqueuing time point of the dequeue person data is 2018-5-2018: 42:19, the dequeue time point is 2018-5-2019: 01:19, the preset time period parameter is 1 hour, the middle time point of the enqueuing time point and the dequeue time point is 2018-5-2018: 52:19, and the time period corresponding to the middle time point is 2018-5-2018: 00:00, the compression time period corresponding to the dequeue person data is 2018-5-2018: 00: 00.

The second mode is as follows:

and determining a time period corresponding to the enqueuing time point of the dequeuing personnel data according to the preset time period parameters, and determining the time period corresponding to the enqueuing time point as a compression time period corresponding to the dequeuing personnel data.

The third mode is as follows:

and determining the time period corresponding to the dequeuing time point of the dequeuing personnel data according to the preset time period parameters, and determining the time period corresponding to the dequeuing time point as the compression time period corresponding to the dequeuing personnel data.

Region(s) Person ID Point of time of enqueue Departure time point Duration of queuing
1 1 2018-5-20 18:33:19 2018-5-20 18:36:20 181
1 2 2018-5-20 18:34:19 2018-5-20 18:37:19 180
1 3 2018-5-20 18:35:19 2018-5-20 18:38:19 180
1 4 2018-5-20 18:36:19 2018-5-20 18:39:19 180
1 5 2018-5-20 18:37:19 2018-5-20 18:40:20 181
1 6 2018-5-20 18:38:19 2018-5-20 18:41:19 180
1 7 2018-5-20 18:39:19 2018-5-20 18:42:19 180
1 8 2018-5-20 18:40:19 2018-5-20 18:43:19 180
1 9 2018-5-20 18:41:19 2018-5-20 18:44:20 181
1 10 2018-5-20 18:42:19 2018-5-20 18:45:19 180
1 11 2018-5-20 18:43:19 2018-5-20 18:46:19 180
1 12 2018-5-20 18:44:19 2018-5-20 18:47:19 180
1 13 2018-5-20 18:45:19 2018-5-20 18:48:20 181
1 14 2018-5-20 18:46:19 2018-5-20 18:49:19 180

TABLE 3

In an exemplary scenario, assuming that the preset period parameter is 1 hour, the 24-hour day period division as shown in the above step 102 determines the compression period according to the enqueue time point, the dequeue time point, or the intermediate time point between the enqueue time point and the dequeue time point, and the enqueue time point and the dequeue time point of the dequeue person data shown in the above table 3 correspond to the 18:00:00 compression period of 20 days 5 and 5 months 2018.

In an embodiment, the dequeue person data may further include a queuing time, and in a process of compressing the dequeue person data according to the determined compression time period, the compression time period corresponding to the dequeue person data and the queuing time period of the dequeue person data may be used as a keyword, a second target compressed data including the keyword is searched in the compressed data of the existing dequeue person data, if the second target compressed data is found, a set value is added to the total number of persons in the searched second target compressed data, if the second target compressed data is not found, the compression time period and the queuing time period are added to the compressed data of the dequeue person data, and the total number of persons with the set value is added to the compressed data of the dequeue person data corresponding to the compression time period and the queuing time period.

Wherein, the set value may be set to 1, and after a certain piece of dequeue person data is compressed into the compressed data of the dequeue person data, the piece of dequeue person data may be deleted.

In an exemplary scenario, assuming that the set value is 1, as shown in table 3, the queuing time of the first dequeue person data in table 3 is 181, the corresponding compression period is 20 months and 20 days in 2018 at 18:00:00, assuming that there is no record of the queuing time 181 and the compression period is 20 days and 18:00:00 in 2018 at 5 months and 20 days in 2018 at 18:00:00, the queuing time 181, the compression period 2018 at 5 months and 20 days at 18:00:00, and the total number of persons is 1 are added to the compressed data of the dequeue person data, and as long as the queuing time 181 once and the compression period 2018 at 5 months and 20 days at 18:00:00 are found, the corresponding total number of persons is added by 1. In the queuing time 181 in table 3, there are 4 pieces of dequeue person data corresponding to the compression time period 2018, 5, 20, 18:00:00, and the queuing time 180, and 10 pieces of dequeue person data corresponding to the compression time period 2018, 5, 20, 18:00:00, so that the compressed data table of dequeue person data shown in table 4 can be obtained.

Region(s) Compression period Duration of queuing Total number of persons
1 2018-5-20 18:00:00 180 10
1 2018-5-20 18:00:00 181 4

TABLE 4

Based on the above scenario, table 3 records 14 pieces of data for the data of the person leaving the queue before compression, and table 4 records only 2 pieces of data for the compressed data of the person leaving the queue corresponding to table 3, and if the queuing time of all the persons in the queue in a certain hour is 1 minute, 60 pieces of person leaving the queue in the hour may be compressed into the compressed data of 1 piece of person leaving the queue. Therefore, the quantity of the off-team personnel data can be greatly reduced through the combination and compression of the preset time period parameters, and the local storage of the camera is also facilitated.

It should be noted that, in the compression process of the dequeue personnel data, the compression can be performed locally in real time by the camera, that is, one dequeue personnel data is generated to be compressed once, and after the compression, the dequeue personnel data is deleted, so that the occupation of the storage space can be reduced to the greatest extent.

It should be further noted that, the dequeue person data may also be compressed at preset time intervals, that is, the dequeue person data generated in the time intervals are compressed once at regular time intervals, and after compression, the dequeue person data in the time intervals are deleted.

It should be further described that, in the embodiment of the present application, the execution order of the step 102 and the step 103 is not limited, and the step 102 may be executed first, the step 103 may be executed first, or the step 102 and the step 103 may be executed simultaneously.

Step 104: and when the passenger flow statistical condition is received, counting the passenger flow according to the compressed passenger flow data obtained by compression.

In one embodiment, the user may enter actual desired passenger flow statistics via an interface provided by the passenger flow analysis application. The passenger flow statistical conditions can include area identification, a statistical time period (such as multiplied by year, multiplied by month, multiplied by day, multiplied by hour) and a report type (if the statistical time period is less than or equal to 1 day, the report type is daily report, if the statistical time period is greater than 1 day and less than or equal to 1 week, the report type is weekly report, if the statistical time period is greater than 1 week and less than or equal to one year, the report type is monthly report), queuing time segment information (such as less than X seconds, Y seconds and more than Y seconds) and queue length segment information (such as less than X persons, X to Y persons and more than Y persons).

In one embodiment, the results of the passenger flow for the output statistics may be displayed in a list or graph manner.

For the process of how to count the passenger flow according to the compressed passenger flow data obtained by compression, reference may be made to the following description of the embodiment shown in fig. 2A, and details will not be provided here.

In the embodiment of the application, after passenger flow data (including passenger flow queue data and dequeue person data) collected by a camera is obtained, for each piece of passenger flow queue data, a corresponding compression time period is determined according to a preset time period parameter and a generation time point of the passenger flow queue data, the passenger flow queue data is compressed according to the queue length of the passenger flow queue data and the corresponding compression time period, for each piece of dequeue person data, a corresponding compression time period is determined according to the preset time period parameter and the dequeue person data, the dequeue person data is compressed according to the determined compression time period, and when a passenger flow statistical condition is received, the passenger flow can be counted according to the compressed passenger flow data obtained through compression. Based on the description, the passenger flow queue data and the dequeue personnel data included in the passenger flow data are compressed respectively through the preset time period parameters, so that the occupation of the storage space can be reduced to a great extent, the local storage of the camera is facilitated, the local statistics of the camera is facilitated, the platform server is not required to participate in the storage and the statistics, the communication burden between the camera and the platform server is reduced, and the number of the platform server accessed to the camera is increased.

Fig. 2A is a flowchart of another embodiment of a passenger flow statistics method according to an exemplary embodiment of the present application, and based on the embodiment shown in fig. 1, how to count passenger flow according to compressed passenger flow data obtained by compression is exemplarily described. As shown in fig. 2A, the passenger flow statistics method may include the following steps:

step 201: and acquiring compressed data of passenger flow queue data, compressed data of dequeue personnel data and non-dequeue personnel data belonging to the statistical time period in the statistical condition.

In an embodiment, since the compressed data of the passenger flow queue data and the compressed data of the dequeue person data both record a compressed time period, the compressed data of the passenger flow queue data and the compressed data of the dequeue person data corresponding to the compressed time period belonging to the statistical time period in the query condition can be obtained. In order to provide statistical accuracy, non-dequeued personnel data corresponding to enqueue time points belonging to a statistical time period can also be acquired for statistics.

Step 202: and counting the passenger flow according to the queue length segmentation information in the statistical condition and the queue length and duration in the obtained compressed data of the passenger flow queue data.

In an exemplary scenario, assuming that the queue length segment information is 10 people and 15 people, such as the compressed data table of the passenger flow queue data shown in table 2 above, the statistical passenger flow result is that the duration of the queue length corresponding to the 18:00:00 time period (i.e. 18 points) is less than 10 people and is 0 second, the duration of the queue length between 10 and 15 people is 7 seconds, and the duration of the queue length greater than 15 people is 4 seconds.

In yet another exemplary scenario, as shown in fig. 2B, the passenger flow statistics result graph is a passenger flow statistics result graph of the queue length of the logic area 1 divided in the camera, the queue length is segmented into 5 people and 10 people, that is, the queue length is divided into three segments, one segment is less than 5 people, the second segment is between 5 people and 10 people, the third segment is greater than 10 people, the report type is a daily report, the horizontal axis represents the time of 24 hours a day, and the vertical axis represents the percentage of the duration corresponding to the three segments of the queue length to a certain period.

Step 203: and carrying out passenger flow statistics according to queuing time segmentation information, the obtained compressed data of the personnel data leaving the queue and the obtained personnel data not leaving the queue in the statistical conditions.

In an embodiment, the queuing time in the obtained non-dequeued person data may be determined, and then the passenger flow may be counted according to the queuing time segmentation information, the queuing time and the total number of persons in the compressed data of the dequeued person data, and the determined queuing time in the non-dequeued person data.

The process of determining the queuing time in the acquired personnel data not leaving the queue can be determined by adopting the following three ways:

in the first mode, the queuing time length in the personnel data which are not dequeued is determined according to the current time point and the enqueue time point in the personnel data which are not dequeued,

for example, the current time point is taken as the dequeuing time point of the persons who are not dequeued, and the time period between the dequeuing time point and the enqueuing time point of the persons who are not dequeued is determined as the queuing time length in the data of the persons who are not dequeued.

In the second mode, the queuing time length in the personnel data which are not left is determined according to the queuing time length of the people who are left in the preset time period before the current time point,

for example, the queuing time length in the dequeue personnel data within a preset time length before the current time point may be acquired, and the average queuing time length of the acquired queuing time lengths may be determined as the queuing time length in the non-dequeue personnel data.

For another example, the queuing time length in the dequeue person data in the same period as the corresponding period of the enqueuing time point of the non-dequeue person data in the preset number of days before the current time point may be obtained, and the average queuing time length of the obtained queuing time lengths may be determined as the queuing time length in the non-dequeue person data.

And in the third mode, the queuing time of the personnel data which are not left is determined according to the queuing time of the people which are left in the preset number before the current time point.

For example, the average queuing time length of the queuing time lengths of the preset number of people who leave the queue before the people who do not leave the queue is determined as the queuing time length in the people data who do not leave the queue.

In an exemplary scenario, assuming that the queuing time period segmentation information is 100 seconds and 180 seconds, as shown in the compressed data table of the dequeue people data in table 4 above, the statistical passenger flow result is that the total number of people in the queuing time period corresponding to the 18:00:00 time period (i.e. 18 points) is 0, the total number of people in the queuing time period between 100 seconds and 180 seconds is 10, and the total number of people in the queuing time period greater than 180 seconds is 4.

In yet another exemplary scenario, as shown in fig. 2C, the passenger flow statistics graph of the queuing time of the logic area 1 divided in the camera is shown, the queuing time is segmented into 5 seconds and 10 seconds, i.e. three segments are provided, one segment is less than 5 seconds, two segments are between 5 seconds and 10 seconds, three segments are more than 10 seconds, the report type is daily report, the horizontal axis represents 24 hours a day, and the vertical axis represents the number of people.

The execution sequence of step 202 and step 203 is not limited in this application, and step 202 may be executed first, step 203 may be executed first, or step 202 and step 203 may be executed simultaneously.

So far, the flow shown in fig. 2A is completed, and statistics of the passenger flow compression data is finally realized through the flow shown in fig. 2A.

Fig. 3 is a hardware block diagram of a camera according to an exemplary embodiment of the present application, the camera including: a communication interface 301, a processor 302, a machine-readable storage medium 303, and a bus 304; wherein the communication interface 301, the processor 302, and the machine-readable storage medium 303 communicate with each other via a bus 304. The processor 302 may execute the above-described passenger flow statistics method by reading and executing machine executable instructions corresponding to the control logic of the passenger flow statistics method in the machine readable storage medium 302, and the details of the method are described in the above embodiments, which will not be described herein again.

The machine-readable storage medium 303 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.

Fig. 4 is a block diagram of an embodiment of a passenger flow statistics apparatus according to an exemplary embodiment of the present application, and as shown in fig. 4, the passenger flow statistics apparatus includes:

an obtaining module 410, configured to obtain passenger flow data collected by a camera; the passenger flow data comprises passenger flow queue data and dequeue personnel data; the passenger flow queue data comprises a queue length and a generation time point of the passenger flow queue data generated by the camera;

a first compression module 420, configured to determine, for each piece of passenger flow queue data, a corresponding compression time period according to a generation time point of the passenger flow queue data and a preset time period parameter, and compress the passenger flow queue data according to a queue length of the passenger flow queue data and the corresponding compression time period;

the second compression module 430 is configured to determine, for each dequeue person data, a corresponding compression time period according to the preset time period parameter and the dequeue person data, and compress the dequeue person data according to the determined compression time period;

the statistic module 440 is configured to, when the passenger flow statistic condition is received, count the passenger flow according to the compressed passenger flow data obtained by compression.

In an optional implementation manner, the passenger flow compression data comprises compression data of passenger flow queue data,

the first compression module 420 is specifically configured to, in a process of compressing the passenger flow queue data according to the queue length of the passenger flow queue data and the corresponding compression time period, search for first target compressed data including a keyword in compressed data of existing passenger flow queue data by using the compression time period corresponding to the passenger flow queue data and the queue length of the passenger flow queue data as the keyword; if the passenger flow queue data is not found, adding the queue length and the compression time period into the compressed data of the passenger flow queue data, and adding the duration with the set duration corresponding to the queue length and the compression time period into the compressed data of the passenger flow queue data; and if the target compressed data is found, increasing the duration of the found first target compressed data by a set duration.

In an optional implementation manner, the dequeue person data includes: the enqueue time point, the dequeue time point,

the second compression module 430 is specifically configured to, in the process of determining a corresponding compression period according to the preset period parameter and the dequeue personnel data, determine a compression period corresponding to the dequeue personnel data according to the preset period parameter and an enqueuing time point or a dequeuing time point of the dequeue personnel data or an intermediate time point between the enqueuing time point and the dequeuing time point.

In an optional implementation manner, the dequeue personnel data further includes queuing time, the passenger flow compressed data includes compressed data of dequeue personnel data,

the second compression module 430 is further specifically configured to, in the process of compressing the dequeue personnel data according to the determined compression time period, search for second target compressed data containing the keyword in the compressed data of the existing dequeue personnel data by using the compression time period corresponding to the dequeue personnel data and the queuing time of the dequeue personnel data as the keyword; if the second target compressed data is found, increasing the total number of the personnel in the found second target compressed data by a set value; and if the compressed time interval and the queuing time interval are not found, adding the compressed time interval and the queuing time interval into the compressed data of the dequeuing personnel data, and adding the total number of personnel with the set value corresponding to the compressed time interval and the queuing time interval into the compressed data of the dequeuing personnel data.

In an optional implementation manner, the passenger flow compressed data includes compressed data of passenger flow queue data and compressed data of dequeue personnel data, the passenger flow statistical condition includes a statistical time period, queue length segment information, queuing time segment information,

the statistics module 440 is specifically configured to obtain compressed data of passenger flow queue data, compressed data of dequeue person data, and non-dequeue person data belonging to the statistics time period; counting passenger flows according to the queue length segmentation information and the queue length and duration in the compressed data of the passenger flow queue data; and counting passenger flow according to the queuing time segmentation information, the obtained compressed data of the personnel data leaving the queue and the obtained personnel data not leaving the queue.

In an optional implementation manner, the statistics module 440 is specifically configured to determine a queuing time length in the obtained non-dequeued person data in a passenger flow statistics process according to the queuing time length segmentation information, the obtained compressed data of the dequeued person data, and the obtained non-dequeued person data; and counting passenger flow according to the queuing time subsection information, the queuing time and the total number of the personnel in the compressed data of the personnel data leaving the queue and the determined queuing time in the personnel data not leaving the queue.

In an optional implementation manner, the statistics module 440 is specifically configured to, in the process of determining the queuing time length in the obtained non-dequeued person data, determine the queuing time length in the non-dequeued person data according to the current time point and the queuing time point in the non-dequeued person data; or determining the queuing time length in the non-queue-leaving personnel data according to the queuing time length of the queue-leaving personnel in a preset time period before the current time point; or determining the queuing time length in the non-dequeued personnel data according to the queuing time lengths of the dequeued personnel in preset number before the current time point.

The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.

For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.

Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.

It should also be noted that 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 like elements in a process, method, article, or apparatus that comprises the element.

The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:智能专责监护机器人

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类