CN114694285A - People flow warning method and device, electronic equipment and storage medium - Google Patents

People flow warning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114694285A
CN114694285A CN202210324860.5A CN202210324860A CN114694285A CN 114694285 A CN114694285 A CN 114694285A CN 202210324860 A CN202210324860 A CN 202210324860A CN 114694285 A CN114694285 A CN 114694285A
Authority
CN
China
Prior art keywords
preset
time
moment
detection
period
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.)
Granted
Application number
CN202210324860.5A
Other languages
Chinese (zh)
Other versions
CN114694285B (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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202210324860.5A priority Critical patent/CN114694285B/en
Publication of CN114694285A publication Critical patent/CN114694285A/en
Application granted granted Critical
Publication of CN114694285B publication Critical patent/CN114694285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/02Alarms for ensuring the safety of persons
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A50/00TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE in human health protection, e.g. against extreme weather

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Emergency Alarm Devices (AREA)
  • Traffic Control Systems (AREA)
  • Alarm Systems (AREA)

Abstract

The embodiment of the invention provides a people flow warning method and device, electronic equipment and a storage medium, and relates to the field of video monitoring. Firstly, receiving people flow data sent by a camera in real time; then, according to the real-time transmitted people flow data, people flow detection and alarm are carried out on a preset alarm area according to a preset alarm period; determining a first starting time and a first ending time of the ith preset alarm period aiming at the ith preset alarm period; and finally, judging whether the pedestrian volume of the preset alarm area meets the preset alarm condition at each moment from the first starting moment to the first ending moment, and pushing an alarm prompt when the preset alarm condition is met. According to the method, the pedestrian flow of the camera monitoring area is periodically detected, and when the pedestrian flow at each moment in the preset alarm period meets the preset condition, the alarm prompt is pushed, so that the detection accuracy is improved.

Description

People flow warning method and device, electronic equipment and storage medium
Technical Field
The invention relates to the field of video monitoring, in particular to a people flow warning method, a people flow warning device, electronic equipment and a storage medium.
Background
In order to ensure public safety in production and life, for some specific places, people flow in the places is often limited, for example, people flow in places such as large squares or shopping malls is limited not to exceed an upper threshold.
In the prior art, the people flow in a place can be obtained by means of infrared scanning, mobile phone positioning data obtained by an operator, passenger flow density obtained based on connection information of a wireless network and the like, and whether to give an alarm to the people flow in the area is determined by judging whether the change rate of the people flow in a set period exceeds a preset threshold value.
However, the above method for acquiring the flow of people is not reliable, and the acquired flow of people is often smaller than the actual flow of people, thereby causing the problem of inaccurate warning of the flow of people.
Disclosure of Invention
The method and the device for alarming the pedestrian volume, the electronic equipment and the storage medium can detect the pedestrian volume in the monitoring area of the camera periodically, and push an alarm prompt when the pedestrian volume at each moment in a preset alarm period meets a preset condition, so that the detection accuracy is improved.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a people flow warning method, which is applied to an electronic device, where the electronic device communicates with a camera; the method comprises the following steps:
receiving people flow data sent by the camera in real time, wherein the people flow data represent the people flow of a monitoring area of the camera at the current moment;
carrying out people flow detection and alarm on a preset alarm area according to the people flow data sent in real time and a preset alarm period;
aiming at the ith preset alarm period, determining a first starting time and a first ending time of the ith preset alarm period; wherein, the difference value between the first termination time and the first starting time is the alarm duration of the preset alarm period;
judging whether the pedestrian flow of the preset alarm area meets a preset alarm condition from the first starting moment to the first ending moment, and pushing an alarm prompt when the pedestrian flow of the preset alarm area meets the preset alarm condition, wherein the preset alarm condition represents that the pedestrian flow at each moment in the ith preset alarm period meets the preset condition.
In a possible implementation manner, the electronic device stores in advance the pedestrian volume at each historical time, the pedestrian volume at each historical time is generated according to the pedestrian volume data sent by the camera in real time before a preset detection time, and the preset detection time is the time when a detection instruction of a user is received;
the step of determining a first start time and a first end time of the ith preset alarm period includes:
if i is equal to 1, acquiring the pedestrian volume at each historical moment in the preset alarm period before the preset detection moment to obtain a plurality of initial pedestrian volumes;
judging whether each initial pedestrian volume meets the preset condition or not;
if so, taking the preset detection moment as the first starting moment;
if not, acquiring each target pedestrian volume which does not meet the preset condition, determining a maximum time from historical times corresponding to each target pedestrian volume, and taking the maximum time as the first starting time;
if i is larger than 1, taking the first termination time of the (i-1) th preset alarm period as the first starting time;
and superposing the alarm duration of the preset alarm period on the basis of the first starting time to obtain the first termination time.
In a possible implementation manner, the step of determining whether the pedestrian volume in the preset warning area satisfies a preset warning condition from the first start time to the first end time, and pushing a warning prompt when the preset warning condition is satisfied includes:
detecting the pedestrian flow of the monitored area according to a preset detection period from the first starting time to the first ending time, wherein the detection time of the preset detection period is less than or equal to the alarm time;
determining the detection starting time and the detection ending time of the mth preset detection period; if i is equal to 1 and m is equal to 1, the detection starting moment is the preset detection moment; if i is greater than 1 and m is equal to 1, the detection starting time is the pushing time of the alarm prompt of the i-1 th preset alarm period; if i is greater than or equal to 1 and m is greater than 1, the detection starting time is the detection ending time of the m-1 th preset detection period;
when the detection ending time is reached, determining the pedestrian flow at each time in the preset detection period according to the pedestrian flow data sent by each camera in real time, wherein the pedestrian flow represents the pedestrian flow of the preset alarm area at the current time;
judging whether the flow of people at each moment in the mth preset detection period meets the preset condition or not;
if so, acquiring the detection ending moment of the mth preset detection period;
and determining the pushing time of the alarm prompt according to the detection ending time of the mth preset detection period and the first ending time, and pushing the alarm prompt at the pushing time.
In a possible implementation manner, after the step of determining whether the pedestrian volume at each time in the preset detection period satisfies the preset condition, the method further includes:
if the pedestrian volume at least one moment in the mth preset detection period does not meet the preset condition, determining the maximum moment from all moments corresponding to the pedestrian volume which does not meet the preset condition, taking the maximum moment as a second starting moment, and overlapping the alarm duration on the basis of the second starting moment to obtain a second termination moment;
and taking the second starting moment as the first starting moment after the ith preset alarm period is updated, taking the second ending moment as the first ending moment after the ith preset alarm period is updated, taking the detection ending moment as the detection starting moment after the mth preset detection period is updated, and returning to execute the step of judging whether the pedestrian flow at each moment in the mth preset detection period meets the preset condition or not until the pedestrian flow at each moment in the mth preset detection period meets the preset condition, so as to obtain the detection ending moment of the mth preset detection period.
In a possible implementation manner, the step of determining the push time of the alert prompt according to the detection end time and the first termination time includes:
comparing the detection ending time of the mth preset detection period with the first ending time;
if the detection end time of the mth preset detection period is greater than or equal to the first termination time, taking the detection end time as the pushing time of the alarm prompt;
and if the detection ending time of the mth preset detection period is less than the first ending time, assigning m +1 to m, returning to the step of determining the detection starting time of the mth preset detection period until the detection ending time of the mth preset detection period is greater than or equal to the first ending time, and taking the detection ending time as the pushing time of the alarm prompt.
In a possible embodiment, the number of the cameras is at least one, and the monitoring areas of each camera do not overlap; the step of determining the pedestrian volume at each moment in the preset detection period according to the pedestrian volume data sent by each camera in real time comprises the following steps:
judging whether each camera sends the people flow data at the current moment or not according to each moment in the preset detection period;
if so, summing each people flow data to obtain the people flow at the current moment;
if not, determining each target camera which does not send the people flow data, and regarding each target camera, taking the people flow data sent at the previous moment as the people flow data at the current moment; summing the pedestrian flow data of each camera at the current moment to obtain the pedestrian flow at the current moment;
and obtaining the pedestrian volume at each moment in the preset detection period.
In a possible embodiment, the preset alarm condition includes at least one of the following;
the pedestrian flow at each moment in the ith preset alarm period is a first preset value;
and the pedestrian volume at each moment in the ith preset alarm period is not equal to the second preset value;
and the pedestrian volume at each moment in the ith preset alarm period is smaller than a preset upper limit value;
and the pedestrian volume at each moment in the ith preset alarm period is greater than a preset lower limit value.
In a second aspect, an embodiment of the present invention further provides a people flow warning device, which is applied to an electronic device, where the electronic device communicates with a camera; the device comprises:
the receiving module is used for receiving people flow data sent by the camera in real time and generating people flow at the current moment in real time, wherein the people flow data represents the people flow in a monitoring area of the camera at the current moment, and the people flow represents the people flow in the preset warning area at the current moment;
a detection module to:
according to the pedestrian flow generated in real time, carrying out pedestrian flow detection and warning on the preset warning area according to a preset warning period;
aiming at the ith preset alarm period, determining a first starting time and a first ending time of the ith preset alarm period; wherein, the difference value between the first termination time and the first starting time is the alarm duration of the preset alarm period;
and the warning module is used for judging whether the pedestrian flow of the preset warning area meets preset warning conditions from the first starting moment to the first ending moment and pushing warning prompts when the preset warning conditions are met, wherein the preset warning conditions represent that the pedestrian flow at each moment in the ith preset warning period meets the preset conditions.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the people flow alerting method described above.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the people flow warning method described above.
Compared with the prior art, the embodiment of the invention provides a people flow warning method, a people flow warning device, electronic equipment and a storage medium. Firstly, receiving people flow data sent by a camera in real time; then, according to the real-time transmitted people flow data, people flow detection and alarm are carried out on a preset alarm area according to a preset alarm period; aiming at the ith preset alarm period, determining a first starting time and a first ending time of the ith preset alarm period; and finally, judging whether the pedestrian volume of the preset alarm area meets the preset alarm condition at each moment from the first starting moment to the first ending moment, and pushing an alarm prompt when the preset alarm condition is met. According to the method, the pedestrian flow of the camera monitoring area is periodically detected, and when the pedestrian flow at each moment in the preset alarm period meets the preset condition, the alarm prompt is pushed, so that the detection accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic view of an application scenario of a pedestrian volume warning method according to an embodiment of the present invention.
Fig. 2 is a block diagram of an electronic device according to an embodiment of the present invention.
Fig. 3 is a schematic flow chart of a pedestrian volume warning method according to an embodiment of the present invention.
Fig. 4 is a timing diagram of detection according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating step S140 in the pedestrian volume alerting method illustrated in fig. 3.
Fig. 6 is a schematic flowchart of step S1405 in the traffic warning method shown in fig. 5.
Fig. 7 is a schematic block diagram of a pedestrian volume warning device according to an embodiment of the present invention.
Icon: 100-an electronic device; 101-a memory; 102-a processor; 103-a bus; 200-a people flow warning device; 201-a receiving module; 202-a detection module; 203-alarm module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
In order to ensure public safety in production and living, the flow of people in a certain place is limited.
In the prior art, the position information may be obtained based on data of a mobile device of a user, so as to realize real-time statistics of the pedestrian volume, and determine whether to perform pedestrian volume warning by judging whether an increase speed of the pedestrian volume within a preset time period exceeds a preset threshold.
However, although the above method for acquiring the traffic based on the data of the mobile device of the user has high real-time performance, there are more or less statistical errors, and the errors are mainly caused by the absence of the mobile device, the disappearance of signals, the insufficient power of the mobile device, and the like. Moreover, the method is only suitable for alarming the upper limit and the lower limit of the people flow, and is not suitable for the situation that the accuracy is required to be higher for the number of people.
In view of the above problems, the present embodiment provides a people flow rate warning method, which generates a people flow rate at each time according to people flow rate data sent by a camera in real time, detects whether the people flow rate in each preset warning period of the people flow rate meets a warning condition, and pushes a warning prompt when the people flow rate at each time in the preset warning period meets the preset condition, so as to improve the accuracy of people flow rate warning.
Referring to fig. 1, fig. 1 is a schematic view illustrating an application scenario of the people flow warning method provided in this embodiment. At least one camera is deployed in the area A, each camera has a corresponding monitoring area, and each monitoring area is not overlapped.
The video camera is used for collecting people flow data of a monitored area and can comprise a statistical snapshot camera and an in-out mode snapshot camera. The statistical snapshot camera can directly analyze the pedestrian volume in the monitoring range at the current moment through a target detection algorithm deployed in the camera, and the in-out mode snapshot camera can calculate the pedestrian volume in the monitoring range at the current moment according to the pedestrian volume entering the monitoring range and the pedestrian volume leaving the monitoring range, which are acquired at each moment.
Because the monitoring range of each camera is different, the pedestrian volume obtained by each camera at the current moment can be summed, and the pedestrian volume of the area A at the current moment can be approximately obtained.
It should be noted that although a plurality of cameras are installed in the area a, the coverage area ratio of the monitoring area of each camera to the entire area a is small, and there is a certain error between the acquired pedestrian volume of the monitoring area and the actual pedestrian volume of the area a. In order to reduce errors, when cameras are deployed and controlled, some key monitoring areas need to be selectively monitored, for example, areas with certain requirements on the flow of people, such as a factory operation platform, a station waiting platform, a square, a scenic spot viewing platform and the like, and monitoring points do not need to be set for ordinary pedestrian roads and the like.
The plurality of cameras in fig. 1 all communicate with the electronic device 100, and the electronic device 100 receives people flow data sent by each camera in real time and gives an alarm according to the people flow data.
Referring to fig. 2, fig. 2 is a block diagram illustrating an electronic device 100 according to the present embodiment, where the electronic device 100 may be, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a server, or other electronic devices with processing capability. Electronic device 100 includes memory 101, processor 102, and bus 103. The memory 101 and the processor 102 are connected by a bus 103, such as a disk, ROM, or RAM, or any combination thereof. Illustratively, the computer platform may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present invention can be implemented according to these program instructions.
The memory 101 is used to store a program such as the human flow warning device 200. The people flow rate warning device 200 comprises at least one software functional module which can be stored in the memory 101 in the form of software or firmware (firmware), and the processor 102 executes the program to implement the people flow rate warning method in the embodiment after receiving the execution instruction.
The Memory 101 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 102 may be an integrated circuit chip having signal processing capabilities. In the implementation process, the steps of the people flow warning method in this embodiment may be implemented by an integrated logic circuit of hardware in the processor 102 or instructions in the form of software. The processor 102 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Micro Control Unit (MCU), a Complex Programmable Logic Device (CPLD), a Field Programmable Gate Array (FPGA), and an embedded ARM.
For ease of illustration, only one processor is depicted in electronic device 100. However, it should be noted that the electronic device 100 in the present invention may also comprise a plurality of processors, and thus the steps performed by one processor described in the present invention may also be performed by a plurality of processors in combination or individually. For example, if the processor of the electronic device 100 executes steps a and B, it should be understood that steps a and B may also be executed by two different processors together or separately in one processor. For example, a first processor performs step a and a second processor performs step B, or the first processor and the second processor perform steps a and B together.
On the basis of the above, the people flow volume warning method provided by the embodiment is described, and the method is applied to the electronic device 100, and the electronic device 100 communicates with the camera. Referring to fig. 3, fig. 3 is a schematic flow chart illustrating a pedestrian volume warning method according to the present embodiment, and the method includes the following steps S110 to S140.
And S110, receiving people flow data sent by the camera in real time, wherein the people flow data represent the people flow of the monitoring area of the camera at the current moment.
In this embodiment, there are a plurality of cameras, and the traffic data sent by each camera represents the traffic of the monitored area of the camera at the current time, for example, the monitored area of the camera 2 in fig. 1 is a sector area in the drawing, and the corresponding traffic data is 3.
And S120, detecting and alarming the pedestrian flow in a preset alarm area according to the pedestrian flow generated in real time and a preset alarm period.
In this embodiment, the preset alarm period refers to an interval between the pedestrian volume detection and the alarm of the preset alarm region, the preset alarm period has a corresponding alarm duration, and the alarm duration refers to a duration of the pedestrian volume detection of the preset alarm region, for example, from the current time, the pedestrian volume in the preset alarm region within 10 seconds is detected every 10 seconds, the nth 10 seconds is the nth preset alarm period, and the 10 seconds is the alarm duration.
The preset alarm area is an area where people's traffic needs to be alarmed, such as area a in fig. 1.
S130, aiming at the ith preset alarm period, determining a first starting time and a first ending time of the ith preset alarm period; and the difference value between the first termination time and the first starting time is the alarm duration of the preset alarm period.
In this embodiment, if i is equal to 1, determining a first starting time according to a preset detection time, where the preset detection time is a time when a detection instruction of a user is received; and if i is larger than 1, taking the first termination time of the (i-1) th preset alarm period as the first starting time of the (i) th preset alarm period.
When a detection instruction of a user is received, because there is a pedestrian volume at a historical time before a preset detection time, a first starting time of a first preset alarm period needs to be determined according to the pedestrian volume at the historical time.
S140, judging whether the pedestrian flow of the preset alarm area meets the preset alarm condition from the first starting time to the first ending time, and pushing an alarm prompt when the pedestrian flow meets the preset alarm condition, wherein the preset alarm condition represents that the pedestrian flow at each time in the ith preset alarm period meets the preset condition.
In this embodiment, if the pedestrian volume at least one moment in the ith preset alarm period does not satisfy the preset condition, the first start moment and the first end moment of the ith preset alarm period are determined again, and an alarm prompt is pushed until the pedestrian volume at each moment in the ith preset alarm period satisfies the preset condition.
For example, the alarm duration is 10 seconds, the number of people in the preset alarm area is required to be fixed to 2 people, the preset condition is that the flow of people at each moment in the ith preset alarm period is 2 people, and if the user can receive the alarm prompt every 10 seconds, the flow of people in the preset alarm area meets the requirement.
Compared with the prior art, the pedestrian volume warning method provided by the embodiment periodically detects the pedestrian volume in the monitoring area of the camera according to the pedestrian volume data sent by the camera in real time, and pushes the warning prompt when the pedestrian volume at each moment in the preset warning period meets the preset condition. The people flow data are collected in real time through the camera, so that the real-time performance is high and the error is small; and moreover, detection is carried out at each moment in a preset alarm period, and when the flow of people at each moment meets a preset condition, an alarm prompt is pushed, so that the detection accuracy is improved.
Optionally, the preset alarm condition may include at least one of the following;
the pedestrian flow at each moment in the ith preset alarm period is a first preset value;
and the pedestrian volume at each moment in the ith preset alarm period is not a second preset value;
and the pedestrian volume at each moment in the ith preset alarm period is smaller than a preset upper limit value;
and the pedestrian volume at each moment in the ith preset alarm period is greater than a preset lower limit value.
In this embodiment, the pedestrian volume at each moment in the ith preset warning period is the first preset value, and the warning is given for the fixed number of people, so that the warning method can be applied to certain factories, the number of people monitoring workshops or operation benches through the camera is not the number of people who always meet the requirements, if the number of people meets the requirements, the warning prompt is pushed, and the warning prompt can be adjusted according to the time interval of pushing the warning prompt, so that risks are avoided.
If the first preset value is 0, the alarm is unmanned, the alarm can be generated when a monitoring center is not in guard, and for some large-scale electricity utilization place areas, the alarm is pushed through unmanned detection, so that the power utilization can be controlled to be turned on or off, and energy conservation is realized.
And the people flow at each moment in the ith preset alarm period is not equal to the second preset value and is a plan non-compliance alarm, so that the method can be used in the bank vault scene, and the number of people is designated during the money transportation, and the alarm is given if the people flow is not equal to the second preset value.
The pedestrian volume at each moment in the ith preset alarm period is smaller than the preset upper limit value, so that alarm is carried out for the number of people exceeding the upper limit, and the alarm can be used in scenes such as squares and scenic spots, and the trample event caused by crowd gathering is avoided.
And the people flow at each moment in the ith preset alarm period is larger than the preset lower limit value and is lower than the lower limit number, and the alarm can be used in high-safety or high-risk areas such as vaults, prisons and the like.
The above-mentioned multiple alarm types can be used in combination, for example, a certain operation platform needs to ensure that two persons must be present at the same time, the first preset value can be set to 2, the second preset value is set to 2, the alarm duration is set to 10 seconds, if the push of the alarm of the fixed alarm number can be received every 10 seconds, but the push of the alarm which is not in accordance with the plan is not always available, the operation is performed normally.
Optionally, before receiving a detection instruction of the user, that is, before a preset detection time, the electronic device 100 is always in a state of receiving the people flow data sent by the camera in real time, and generating the people flow at each historical time according to the people flow data, so that the electronic device stores the people flow at each historical time in advance.
Therefore, the first start time and the first end time of the first preset detection period may be determined as follows.
The method comprises the steps of firstly, obtaining the pedestrian volume at each historical moment in a preset alarm period before a preset detection moment to obtain a plurality of initial pedestrian volumes.
And secondly, judging whether each initial flow meets a preset condition.
And step three, if so, taking the preset detection time as a first starting time.
And step four, if not, acquiring each target pedestrian volume which does not meet the preset conditions, determining the maximum time from the historical time corresponding to each target pedestrian volume, and taking the maximum time as the first starting time.
In this embodiment, for convenience of understanding, please refer to fig. 4, where fig. 4 shows a detection timing diagram of nodes at various times, where one node corresponds to one time, Dura is an alarm duration, and node 1 is a historical initial time, that is, a historical time corresponding to a traffic of a person obtained by the electronic device at the earliest time, and it is assumed that node 1 is smaller than node 2.
Assuming that the node 4 is a preset detection time, the previous preset alarm period is from the node 2 to the node 4, and acquiring the pedestrian volume of each historical time from the node 2 to the node 4 to obtain a plurality of initial pedestrian volumes. Judging whether each initial pedestrian volume meets a preset condition or not; if the preset alarm condition is met, the previous preset alarm period meets the preset alarm condition, an alarm prompt is pushed at the node 4, and the node 4 is used as the first starting moment of the first preset alarm period.
If at least one node does not meet the preset condition, the fact that the previous preset alarm period does not meet the preset alarm condition is indicated, the alarm prompt cannot be pushed at the node 4, the first starting moment of the first preset alarm period needs to be determined, and the moment for pushing the alarm prompt is determined according to the people flow data generated in real time behind the node 4 at each moment. For example, if it is detected that the traffic of the node 3 does not satisfy the preset condition, the node 3 is set as the first start time of the first preset alarm period.
Because each alarm period after the first preset alarm period is judged according to the real-time generated pedestrian volume at the current moment, if i is greater than 1, the first termination moment of the (i-1) th preset alarm period is taken as the first starting moment.
It should be noted that the first start time and the first end time of each preset alarm period are not predetermined at one time, but are determined after the completion detection of the previous preset alarm period and the pushing of the alarm prompt.
And finally, superposing the alarm duration of the preset alarm period on the basis of the first starting moment to obtain a first termination moment.
Optionally, for the ith preset alarm period, after the first start time and the first end time are determined, under an ideal condition, the pedestrian volume at the current time is detected in real time, and when the detected pedestrian volume at each time meets the preset condition at the first end time, the method for pushing the alarm has the highest real-time performance and accuracy. However, this algorithm requires a high performance of the electronic device, and since the camera does not transmit traffic data every second, it is not necessary to detect every second.
Therefore, the pedestrian flow at each moment in the preset alarm period can be periodically detected, the detection efficiency is high, and the detection accuracy is high.
Therefore, referring to fig. 5 on the basis of fig. 3, step S140 may include the following sub-steps S1401 to S1406.
S1401, detecting the pedestrian volume of the monitored area according to a preset detection period from a first starting time to a first ending time, wherein the detection time of the preset detection period is less than or equal to the alarm time.
In this embodiment, in order to reduce the delay of pushing the alarm prompt, the detection duration of the preset detection period may be obtained according to the following formula.
Freq=min(median(fCam1,fCam2,…,fCam),Dura)
Wherein Freq is the detection duration, fCam1,fCam2…, fCamn is the period of sending the people flow data of n cameras, mean is the operation of taking the median, and Dura is the alarm duration of the preset alarm period.
From the above equation, it can be seen that the detection duration is less than or equal to the alarm duration, because if the detection duration is greater than the alarm duration, the pedestrian flow in the preset alarm period may meet the preset alarm condition, but the pedestrian flow at each moment in the preset alarm period is not yet detected, and the time delay for pushing the alarm prompt may become longer.
And S1402, determining the detection starting time and the detection ending time of the mth preset detection period.
In this embodiment, if i is equal to 1 and m is equal to 1, the detection start time is a preset detection time; if i is greater than 1 and m is equal to 1, detecting the starting moment as the pushing moment of the alarm prompt of the (i-1) th preset alarm period; if i is greater than or equal to 1 and m is greater than 1, the detection starting time is the detection ending time of the m-1 th preset detection period; and the detection ending time is obtained by superposing the detection duration on the basis of the detection starting time.
Referring to fig. 4, the first preset alarm period in fig. 4 is from the node 4 to the node 10, and since the people flow data between the nodes 4 is the people flow data at the existing historical time, it is not necessary to obtain the people flow data in real time, and the people flow data behind the node 4 is the people flow at the current time generated in real time, so that the detection of the people flow in the previous preset detection period is performed when the node 7 with the detection duration is reached by using the node 4 as the detection start time. If the preset conditions are met, taking the node 7 as the detection starting moment of the 2 nd preset detection period, and continuing to detect the pedestrian flow in the next preset detection period.
If i is larger than 1, aiming at the ith preset alarm period, as the detection of at least one preset detection period is finished in the (i-1) th preset alarm period, taking the ending moment of the last preset detection period in the (i-1) th preset alarm period as the detection starting moment of the ith preset alarm period.
And S1403, when the detection ending moment is reached, determining the pedestrian flow at each moment in a preset detection period according to the pedestrian flow data sent by each camera in real time, wherein the pedestrian flow represents the pedestrian flow of a preset alarm area.
In this embodiment, the electronic device 100 determines the pedestrian volume at each time in a preset detection period according to the pedestrian volume data sent by each camera in real time.
For example, with reference to fig. 1, if it is received that the traffic data sent by the camera 1 is 1, the traffic data sent by the camera 2 is 3, the traffic data sent by the camera 3 is 4, the traffic data sent by the camera 4 is 2, and the traffic data sent by the camera 5 is 1 at a certain time within the preset detection period, the generated traffic is 11, and the traffic of the area a at the time is represented as 11.
It should be noted that the traffic flow generated by the electronic device 100 at a certain time and the actual traffic flow of the area a at that time have a certain error, but the area where the camera is deployed is a key area of the area a, and the remaining areas that are not monitored may be areas with low requirements for traffic flow, such as entrances and exits, pedestrian roads, and the like, and therefore the error is within an acceptable range.
And S1404, judging whether the pedestrian volume at each moment in the mth preset detection period meets a preset condition.
In this embodiment, the pedestrian volume at each moment in the mth preset detection period is generated in real time and stored in the electronic device, and when the end moment of the mth preset detection period is reached, the pedestrian volume at each moment in the mth preset detection period is detected.
S1405, if the pedestrian volume at each moment in the mth preset detection period satisfies the preset condition, acquiring a detection end moment of the mth preset detection period.
S1406, determining the pushing time of the alarm prompt according to the detection ending time and the first ending time of the mth preset detection period, and pushing the alarm prompt at the pushing time.
With continued reference to FIG. 5, after substep S1404, substeps S1407-S1408 are included in parallel with S1405-S1406.
And S1407, if the pedestrian volume at least one moment does not meet the preset condition in the mth preset detection period, determining the maximum moment from the moments corresponding to all the pedestrian volumes not meeting the preset condition, taking the maximum moment as a second starting moment, and overlapping the alarm duration on the basis of the second starting moment to obtain a second termination moment.
S1408, taking the second starting time as the first starting time after the updating of the ith preset alarm period, taking the second ending time as the first ending time after the updating of the ith preset alarm period, and taking the detection ending time as the detection starting time after the updating of the mth preset detection period, and returning to execute the substep S1404, until the pedestrian volume at each time in the mth preset detection period meets the preset condition, and obtaining the detection ending time of the mth preset detection period.
In this embodiment, if it is detected that the pedestrian volume at least one moment does not satisfy the preset condition in the mth preset detection period, it indicates that the pedestrian volume in the ith preset alarm period cannot satisfy the preset alarm condition, and it is necessary to re-determine the first start time and the first end time of the ith preset alarm period, and then perform a new round of detection.
For example, please continue to refer to fig. 4, if it is detected that the pedestrian volume of the node 5 does not satisfy the preset condition in the 1 st preset detection period, the node 5 is used as the second starting time, and the second ending time is obtained by superimposing the alarm duration on the second starting time. And taking the second starting moment as the first starting moment of the ith preset alarm period, taking the second ending moment as the first ending moment of the ith preset alarm period, taking the detection ending moment node 7 as the detection starting moment after the 1 st preset detection period is updated, and returning to execute the substep S1404 to perform a new round of detection.
After the people flow rate detection in the mth preset detection period is completed, it is necessary to determine whether the people flow rate detection at each time in the preset alarm period has been completed.
Therefore, on the basis of fig. 5, please refer to fig. 6, the sub-step S1406 may include the following detailed steps S14061 to S14063.
S14061, comparing the detection end time of the mth preset detection period with the first end time.
S14062, if the detection end time of the mth preset detection period is greater than or equal to the first end time, using the detection end time as the push time of the alert prompt.
S14063, if the detection end time of the mth preset detection period is less than the first end time, assigning m +1 to m, and returning to execute the substep S1402 until the detection end time of the mth preset detection period is greater than or equal to the first end time, and using the detection end time as the push time of the alarm prompt.
In this embodiment, when the people flow detection in the mth preset detection period is completed and the people flow at each moment in the preset detection period meets the preset condition, it is determined whether the detection end moment of the preset detection period is greater than or equal to the first termination moment, if so, it indicates that the people flow at each moment in the ith preset alarm period has been detected and reaches the preset alarm condition, and the detection end moment is used as the push moment of the alarm prompt; if not, the detection of the pedestrian volume at each moment in the ith preset alarm period is not finished, and the detection of the next detection period is required.
Optionally, because there are a plurality of cameras, each camera sends people flow data to the electronic device 100 in real time, ideally, the sending frequency of each camera is optimal for sending people flow data once per second, so that not only is the real-time performance high, but also the people flow data synchronization rate of each camera is high, and the accuracy of the people flow generated by the electronic device 100 at the current time is high.
However, because hardware of different cameras and algorithms deployed by the cameras are different, transmission frequency of each camera may be different, for example, the camera 1 transmits people flow data at the current time every 10 seconds, and the camera 2 transmits people flow data at the current time every 15 seconds, so that the people flow data received by the electronic device 100 may be asynchronous, and it is necessary to process the received people flow data transmitted by each camera at different times to obtain people flow at each time.
Thus, step S1403 may include the following detailed steps.
The method comprises the steps of firstly, judging whether each camera sends the people flow data at the current moment or not according to each moment in a preset detection period.
In this embodiment, the cameras may include a statistical snapshot camera and an in-out mode snapshot camera, and for the statistical snapshot camera, the number of people in the monitoring area may be analyzed in real time through a deployed target detection algorithm to obtain the people flow data at the current time.
For the in-out mode snapshot camera, people flow data at the current moment can be obtained according to the number of people entering the monitoring area and people leaving the monitoring area at each moment in a certain period.
cama={[a,(Pin1,Pin2,…,Pinn),(Pout1,Pout2,…,Poutn),(t1,t2,…,tn)]}
camaFor capturing a data sequence, Pin, acquired by Camera a in and out mode1,Pin2,…,PinnAre each t1,t2,…,tnNumber of persons who enter the monitored area at any moment, Pout1,Pout2,…,PoutnAre each t1,t2,…,tnThe number of persons who have moved out of the monitoring area at any time, then tnThe people flow data at the moment is
Figure BDA0003571402320000181
And secondly, if each camera sends people flow data at the current moment, summing the people flow data to obtain the people flow at the current moment.
Thirdly, if at least one camera does not send the people flow data at the current moment, determining each target camera which does not send the people flow data, and regarding each target camera, taking the people flow data sent at the previous moment as the people flow data at the current moment; and summing the people flow data of each camera at the current moment to obtain the people flow at the current moment.
And fourthly, obtaining the pedestrian volume at each moment in the preset detection period.
In the present embodiment, the above-described process is described below as a specific example for the sake of understanding.
If the area a has 2 cameras in total, the camera 1 sends the traffic data every 5 seconds, and the camera 2 sends the traffic data every 10 seconds. The preset detection period is 0 second to 10 seconds, the flow rate of people at each historical moment before the preset detection moment is stored in the electronic equipment in advance, and the flow rate of people at the second before the preset detection moment is 5, wherein the flow rate data of people at the second before the preset detection moment of the camera 1 is 2, and the flow rate data of people at the second before the preset detection moment of the camera 2 is 3.
At 0 second, both the two cameras have no issued data, then the pedestrian volume 5 of the second before the preset detection time is taken as the pedestrian volume of the 0 second, similarly, the obtained pedestrian volumes of the 1 second to the 4 second are 5, the 5 second, the pedestrian volume data sent by the camera 1 is 2, the camera 2 does not send the pedestrian volume data, then the pedestrian volume data of the camera 2 at the previous time is taken as the pedestrian volume data of the camera 2 at the 5 second, that is, the pedestrian volume data of the camera 2 at the 5 second is 3, then, at the 5 second, the pedestrian volume of the area a is 6, similarly, the pedestrian volumes of the 6 second to the 9 second are 6.
At the 10 th second, when the traffic data transmitted by the camera 1 is 3 and the traffic data transmitted by the camera 2 is 5, the traffic of the area a at the 10 th second is 8.
It should be noted that, in some special cases, the camera may not send the human traffic data until the time of sending the human traffic data, for example, the camera 1 in the above example does not send the human traffic data in any of the 0 th to 10 th seconds, at this time, if the human traffic data after the 5 th second is determined as the human traffic data of the previous second, the error may be large, the receiving time threshold E _ range may be set, if the human traffic data of a certain camera is not received within the time duration of E _ range, it is considered that the camera device is abnormal, the camera may be recovered first, and if the camera is still abnormal, the camera may be replaced.
The receive time threshold E _ range may be determined as follows:
if there are n cameras, the sending time interval of the xth camera is Deltatx(x ∈ (1, n)), then E _ range ═ max (Δ t)x)+1(x∈(1,n))。
Compared with the prior art, the embodiment has the following beneficial effects:
first, according to the people flow rate data sent by the camera in real time, the people flow rate in the monitoring area of the camera is periodically detected, and when the people flow rate at each moment in a preset alarm period meets a preset condition, an alarm prompt is pushed. The people flow data are collected in real time through the camera, so that the real-time performance is high and the error is small; and moreover, detection is carried out at each moment in a preset alarm period, and when the flow of people at each moment meets a preset condition, an alarm prompt is pushed, so that the detection accuracy is improved.
Secondly, for the ith preset alarm period, a preset detection period is set, and the push time delay of the alarm prompt is reduced by periodically detecting the pedestrian flow at each moment in the preset detection period.
Then, aiming at the condition that the sending frequency of the pedestrian volume is inconsistent, a method of advancing by one second is adopted to obtain the pedestrian volume at each moment, the error of the acquired pedestrian volume at each moment is reduced, and meanwhile, the instantaneity can be ensured.
Finally, the people flow warning method provided by the embodiment can set corresponding preset warning conditions according to different application conditions, and the application scenarios are wider.
Referring to fig. 7, fig. 7 is a block diagram illustrating a pedestrian volume warning device 200 according to the present embodiment. The human flow warning device 200 is applied to the electronic equipment 100, and the electronic equipment 100 is communicated with the camera. The device includes: a receiving module 201, a detecting module 202 and an alarming module 203.
The receiving module 201 is configured to receive people flow data sent by the camera in real time, where the people flow data represents people flow in a monitoring area of the camera at the current time.
A detection module 202 configured to:
according to the pedestrian flow generated in real time, carrying out pedestrian flow detection and warning on a preset warning area according to a preset warning period;
aiming at the ith preset alarm period, determining a first starting time and a first ending time of the ith preset alarm period; and the difference value between the first termination time and the first starting time is the alarm duration of the preset alarm period.
The warning module 203 is configured to determine whether the pedestrian volume in the preset warning area meets a preset warning condition from the first start time to the first end time, and push a warning prompt when the preset warning condition is met, where the preset warning condition indicates that the pedestrian volume at each time in the ith preset warning period meets the preset condition.
Optionally, the electronic device 100 stores the pedestrian volume at each historical time in advance, the pedestrian volume at each historical time is generated according to the pedestrian volume data sent by the camera in real time before the preset detection time, and the preset detection time is the time when the detection instruction of the user is received.
The detection module 202 is further configured to:
if i is equal to 1, acquiring the pedestrian volume at each historical moment in a preset alarm period before a preset detection moment to obtain a plurality of initial pedestrian volumes;
judging whether each initial pedestrian volume meets a preset condition or not;
if so, taking the preset detection time as a first starting time;
if not, acquiring each target pedestrian volume which does not meet the preset condition, determining the maximum time from the historical time corresponding to each target pedestrian volume, and taking the maximum time as a first starting time;
if i is larger than 1, taking the first termination time of the (i-1) th preset alarm period as a first starting time;
and superposing the alarm duration of a preset alarm period on the basis of the first starting moment to obtain a first termination moment.
Optionally, the alarm module 203 is further configured to:
detecting the pedestrian flow of the monitored area according to a preset detection period from the first starting time to the first ending time, wherein the detection time of the preset detection period is less than or equal to the alarm time;
determining the detection starting time and the detection ending time of the mth preset detection period; if i is equal to 1 and m is equal to 1, the detection starting moment is a preset detection moment; if i is greater than 1 and m is equal to 1, detecting the starting moment as the pushing moment of the alarm prompt of the (i-1) th preset alarm period; if i is greater than or equal to 1 and m is greater than 1, the detection starting time is the detection ending time of the (m-1) th preset detection period;
when the detection ending time is reached, determining the pedestrian flow at each time in a preset detection period according to the pedestrian flow data sent by each camera in real time, wherein the pedestrian flow represents the pedestrian flow in a preset alarm area;
judging whether the pedestrian volume at each moment in the mth preset detection period meets a preset condition or not;
if so, acquiring the detection ending moment of the mth preset detection period;
and determining the pushing time of the alarm prompt according to the detection ending time and the first ending time of the mth preset detection period, and pushing the alarm prompt at the pushing time.
Optionally, the alarm module 203 is further configured to:
if the pedestrian volume at least one moment in the mth preset detection period does not meet the preset condition, determining the maximum moment from all moments corresponding to the pedestrian volume which does not meet the preset condition, taking the maximum moment as a second starting moment, and overlapping the alarm duration on the basis of the second starting moment to obtain a second termination moment;
and taking the second starting moment as the first starting moment after the updating of the ith preset alarm period, taking the second ending moment as the first ending moment after the updating of the ith preset alarm period, taking the detection ending moment as the detection starting moment after the updating of the mth preset detection period, and returning to the step of judging whether the pedestrian flow at each moment in the mth preset detection period meets the preset condition or not until the pedestrian flow at each moment in the mth preset detection period meets the preset condition, and obtaining the detection ending moment of the mth preset detection period.
Optionally, the alarm module 203 is further configured to:
comparing the detection ending time of the mth preset detection period with the first ending time;
if the detection ending time of the mth preset detection period is greater than or equal to the first termination time, taking the detection ending time as the pushing time of the alarm prompt;
and if the detection ending time of the mth preset detection period is less than the first ending time, assigning m +1 to m, returning to the step of determining the detection starting time of the mth preset detection period until the detection ending time of the mth preset detection period is greater than or equal to the first ending time, and taking the detection ending time as the pushing time of the alarm prompt.
Optionally, there is at least one camera, and the monitoring areas of each camera do not overlap.
The alarm module 203 is further configured to:
judging whether each camera sends people flow data at the current moment or not according to each moment in a preset detection period;
if so, summing the data of each pedestrian flow to obtain the pedestrian flow at the current moment;
if not, determining each target camera which does not send the people flow data, and regarding each target camera, taking the people flow data sent at the previous moment as the people flow data at the current moment; summing the pedestrian flow data of each camera at the current moment to obtain the pedestrian flow at the current moment;
and obtaining the pedestrian volume at each moment in the preset detection period.
As will be apparent to those skilled in the art, the above-described specific operation of the human flow warning device 200 is provided for the convenience and brevity of description. Reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment also provides a computer readable storage medium, on which a computer program is stored, and the computer program is executed by the processor 102 to implement the people flow warning method disclosed in the above embodiment.
To sum up, the method, the device, the electronic device and the storage medium for warning the pedestrian flow provided by the embodiment of the invention firstly receive the pedestrian flow data sent by the camera in real time; then, according to the real-time transmitted people flow data, people flow detection and alarm are carried out on a preset alarm area according to a preset alarm period; determining a first starting time and a first ending time of the ith preset alarm period aiming at the ith preset alarm period; and finally, judging whether the pedestrian volume of the preset alarm area meets the preset alarm condition at each moment from the first starting moment to the first ending moment, and pushing an alarm prompt when the preset alarm condition is met. According to the method, the pedestrian flow of the camera monitoring area is periodically detected, and when the pedestrian flow at each moment in the preset alarm period meets the preset condition, the alarm prompt is pushed, so that the detection accuracy is improved.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A people flow warning method is characterized by being applied to electronic equipment, wherein the electronic equipment is communicated with a camera; the method comprises the following steps:
receiving people flow data sent by the camera in real time, wherein the people flow data represent the people flow of a monitoring area of the camera at the current moment;
according to the pedestrian flow data sent in real time, carrying out pedestrian flow detection and alarm on a preset alarm area according to a preset alarm period;
aiming at the ith preset alarm period, determining a first starting time and a first ending time of the ith preset alarm period; wherein, the difference value between the first termination time and the first starting time is the alarm duration of the preset alarm period;
judging whether the pedestrian flow of the preset alarm area meets a preset alarm condition from the first starting moment to the first ending moment, and pushing an alarm prompt when the pedestrian flow of the preset alarm area meets the preset alarm condition, wherein the preset alarm condition represents that the pedestrian flow at each moment in the ith preset alarm period meets the preset condition.
2. The method according to claim 1, wherein the electronic device stores in advance the pedestrian volume at each historical time, the pedestrian volume at each historical time is generated according to pedestrian volume data sent by the camera in real time before a preset detection time, and the preset detection time is a time when a detection instruction of a user is received;
the step of determining a first start time and a first end time of the ith preset alarm period includes:
if i is equal to 1, acquiring the pedestrian volume at each historical moment in the preset alarm period before the preset detection moment to obtain a plurality of initial pedestrian volumes;
judging whether each initial pedestrian volume meets the preset condition or not;
if so, taking the preset detection time as the first starting time;
if not, acquiring each target pedestrian volume which does not meet the preset condition, determining a maximum time from historical times corresponding to each target pedestrian volume, and taking the maximum time as the first starting time;
if i is larger than 1, taking the first termination time of the (i-1) th preset alarm period as the first starting time;
and superposing the alarm duration of the preset alarm period on the basis of the first starting time to obtain the first termination time.
3. The method according to claim 1, wherein the step of determining whether the flow of people in the preset alarm area satisfies a preset alarm condition from the first start time to the first end time, and pushing an alarm prompt when the preset alarm condition is satisfied comprises:
detecting the pedestrian flow of the monitored area according to a preset detection period from the first starting time to the first ending time, wherein the detection time of the preset detection period is less than or equal to the alarm time;
determining the detection starting time and the detection ending time of the mth preset detection period; if i is equal to 1 and m is equal to 1, the detection starting moment is a preset detection moment; if i is greater than 1 and m is equal to 1, the detection starting time is the pushing time of the alarm prompt of the i-1 th preset alarm period; if i is greater than or equal to 1 and m is greater than 1, the detection starting time is the detection ending time of the m-1 th preset detection period; the detection ending time is obtained by superposing the detection duration on the basis of the detection starting time;
when the detection ending time is reached, determining the pedestrian flow at each time in the preset detection period according to the pedestrian flow data sent by each camera in real time, wherein the pedestrian flow represents the pedestrian flow in the preset alarm area;
judging whether the flow of people at each moment in the mth preset detection period meets the preset condition or not;
if so, acquiring the detection ending moment of the mth preset detection period;
and determining the pushing time of the alarm prompt according to the detection ending time of the mth preset detection period and the first ending time, and pushing the alarm prompt at the pushing time.
4. The method according to claim 3, after the step of judging whether the flow rate of people at each moment in the preset detection period meets the preset condition, the method further comprises:
if the pedestrian volume at least one moment in the mth preset detection period does not meet the preset condition, determining the maximum moment from all moments corresponding to the pedestrian volume which does not meet the preset condition, taking the maximum moment as a second starting moment, and overlapping the alarm duration on the basis of the second starting moment to obtain a second termination moment;
and taking the second starting moment as the first starting moment after the ith preset alarm period is updated, taking the second ending moment as the first ending moment after the ith preset alarm period is updated, taking the detection ending moment as the detection starting moment after the mth preset detection period is updated, and returning to execute the step of judging whether the pedestrian flow at each moment in the mth preset detection period meets the preset condition or not until the pedestrian flow at each moment in the mth preset detection period meets the preset condition, so as to obtain the detection ending moment of the mth preset detection period.
5. The method according to claim 3, wherein the step of determining the push time of the alert prompt according to the detection end time and the first termination time comprises:
comparing the detection ending time of the mth preset detection period with the first ending time;
if the detection end time of the mth preset detection period is greater than or equal to the first termination time, taking the detection end time as the pushing time of the alarm prompt;
and if the detection ending time of the mth preset detection period is less than the first ending time, assigning m +1 to m, returning to the step of determining the detection starting time and the detection ending time of the mth preset detection period until the detection ending time of the mth preset detection period is greater than or equal to the first ending time, and taking the detection ending time as the pushing time of the alarm prompt.
6. The method of claim 3, wherein there is at least one of the cameras, and the monitored areas of each of the cameras do not overlap; the step of determining the pedestrian volume at each moment in the preset detection period according to the pedestrian volume data sent by each camera in real time comprises the following steps:
judging whether each camera sends the people flow data at the current moment or not according to each moment in the preset detection period;
if so, summing the people flow data to obtain the people flow at the current moment;
if not, determining each target camera which does not send the people flow data, and regarding each target camera, taking the people flow data sent at the previous moment as the people flow data at the current moment; summing the pedestrian flow data of each camera at the current moment to obtain the pedestrian flow at the current moment;
and obtaining the pedestrian volume at each moment in the preset detection period.
7. The method according to any of claims 1-4, wherein the preset alarm condition comprises at least one of;
the pedestrian flow at each moment in the ith preset alarm period is a first preset value; and the number of the first and second groups,
the pedestrian flow at each moment in the ith preset alarm period is not a second preset value; and (c) a second step of,
the pedestrian volume at each moment in the ith preset alarm period is smaller than a preset upper limit value; and the number of the first and second groups,
and the pedestrian volume at each moment in the ith preset alarm period is greater than a preset lower limit value.
8. The people flow warning device is characterized by being applied to electronic equipment, wherein the electronic equipment is communicated with a camera; the device comprises:
the receiving module is used for receiving people flow data sent by the camera in real time, wherein the people flow data represent the people flow of the monitoring area of the camera at the current moment;
a detection module to:
according to the pedestrian flow generated in real time, carrying out pedestrian flow detection and warning on a preset warning area according to a preset warning period;
aiming at the ith preset alarm period, determining a first starting time and a first ending time of the ith preset alarm period; wherein, the difference value between the first termination time and the first starting time is the alarm duration of the preset alarm period;
and the warning module is used for judging whether the pedestrian flow of the preset warning area meets preset warning conditions from the first starting moment to the first ending moment and pushing warning prompts when the preset warning conditions are met, wherein the preset warning conditions represent that the pedestrian flow at each moment in the ith preset warning period meets the preset conditions.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the people flow alert method of any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the people flow alerting method of any one of claims 1-7.
CN202210324860.5A 2022-03-29 2022-03-29 People flow alarming method and device, electronic equipment and storage medium Active CN114694285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210324860.5A CN114694285B (en) 2022-03-29 2022-03-29 People flow alarming method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210324860.5A CN114694285B (en) 2022-03-29 2022-03-29 People flow alarming method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114694285A true CN114694285A (en) 2022-07-01
CN114694285B CN114694285B (en) 2023-09-01

Family

ID=82141125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210324860.5A Active CN114694285B (en) 2022-03-29 2022-03-29 People flow alarming method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114694285B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1563872A1 (en) * 2004-02-10 2005-08-17 Industrieelektronik Pölz Device for registering and monitoring wearers of protective respiratory equipment
EP2204783A1 (en) * 2008-12-31 2010-07-07 Thales Security system comprising sensors in a corridor for uncovering hazardous items
CN105763853A (en) * 2016-04-14 2016-07-13 北京中电万联科技股份有限公司 Emergency early warning method for stampede accident in public area
WO2018032938A1 (en) * 2016-08-19 2018-02-22 深圳奇迹智慧网络有限公司 Probe-based people flow warning and analyzing method and system
CN108665096A (en) * 2018-04-28 2018-10-16 新华三大数据技术有限公司 Flow of the people alarm method and device
CN110171362A (en) * 2019-06-25 2019-08-27 重庆紫光华山智安科技有限公司 A kind of anti-collision early warning method and device of human bioequivalence and vehicle identification
US20200004232A1 (en) * 2017-02-22 2020-01-02 Carrier Corporation People flow estimation system and the failure processing method thereof
CN111914793A (en) * 2020-08-14 2020-11-10 中国工商银行股份有限公司 Early warning method, device and equipment based on regional population
CN111985726A (en) * 2020-08-31 2020-11-24 重庆紫光华山智安科技有限公司 Resource quantity prediction method and device, electronic equipment and storage medium
WO2020253381A1 (en) * 2019-06-17 2020-12-24 深圳壹账通智能科技有限公司 Data monitoring method and apparatus, computer device and storage medium
CN112333431A (en) * 2020-10-30 2021-02-05 深圳市商汤科技有限公司 Scene monitoring method and device, electronic equipment and storage medium
CN113448805A (en) * 2021-06-29 2021-09-28 中国工商银行股份有限公司 Monitoring method, device and equipment based on CPU dynamic threshold and storage medium
CN113705852A (en) * 2021-05-13 2021-11-26 北京金山云网络技术有限公司 Crowd density early warning method and device, electronic equipment and storage medium
CN113900755A (en) * 2021-10-11 2022-01-07 重庆紫光华山智安科技有限公司 Alarm page processing method and device, computer equipment and readable storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1563872A1 (en) * 2004-02-10 2005-08-17 Industrieelektronik Pölz Device for registering and monitoring wearers of protective respiratory equipment
EP2204783A1 (en) * 2008-12-31 2010-07-07 Thales Security system comprising sensors in a corridor for uncovering hazardous items
CN105763853A (en) * 2016-04-14 2016-07-13 北京中电万联科技股份有限公司 Emergency early warning method for stampede accident in public area
WO2018032938A1 (en) * 2016-08-19 2018-02-22 深圳奇迹智慧网络有限公司 Probe-based people flow warning and analyzing method and system
US20200004232A1 (en) * 2017-02-22 2020-01-02 Carrier Corporation People flow estimation system and the failure processing method thereof
CN108665096A (en) * 2018-04-28 2018-10-16 新华三大数据技术有限公司 Flow of the people alarm method and device
WO2020253381A1 (en) * 2019-06-17 2020-12-24 深圳壹账通智能科技有限公司 Data monitoring method and apparatus, computer device and storage medium
CN110171362A (en) * 2019-06-25 2019-08-27 重庆紫光华山智安科技有限公司 A kind of anti-collision early warning method and device of human bioequivalence and vehicle identification
CN111914793A (en) * 2020-08-14 2020-11-10 中国工商银行股份有限公司 Early warning method, device and equipment based on regional population
CN111985726A (en) * 2020-08-31 2020-11-24 重庆紫光华山智安科技有限公司 Resource quantity prediction method and device, electronic equipment and storage medium
CN112333431A (en) * 2020-10-30 2021-02-05 深圳市商汤科技有限公司 Scene monitoring method and device, electronic equipment and storage medium
CN113705852A (en) * 2021-05-13 2021-11-26 北京金山云网络技术有限公司 Crowd density early warning method and device, electronic equipment and storage medium
CN113448805A (en) * 2021-06-29 2021-09-28 中国工商银行股份有限公司 Monitoring method, device and equipment based on CPU dynamic threshold and storage medium
CN113900755A (en) * 2021-10-11 2022-01-07 重庆紫光华山智安科技有限公司 Alarm page processing method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN114694285B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN109686109B (en) Parking lot safety monitoring management system and method based on artificial intelligence
CN108073577A (en) A kind of alarm method and system based on recognition of face
JP4617269B2 (en) Monitoring system
CN109684989A (en) Safety custody method, apparatus, terminal and computer readable storage medium
CN104021362B (en) Gate inhibition's early warning system based on image dynamic object recognition and pre-warning and control method
US20180091741A1 (en) Video surveillance system and video surveillance method
CN110796819B (en) Detection method and system for platform yellow line invasion border crossing personnel
US11748896B2 (en) Object tracking method and apparatus, storage medium, and electronic device
CN109872482A (en) Wisdom security protection monitoring and managing method, system and storage medium
US20180167585A1 (en) Networked Camera
CN110275220A (en) Detection method, the method for detecting position of target object, alarm method
KR20160074208A (en) System and method for providing safety service using beacon signals
WO2023098287A1 (en) Message pushing method and apparatus, storage medium and electronic apparatus
CN112383756B (en) Video monitoring alarm processing method and device
US10650651B1 (en) Automated geospatial security event grouping
CN111666821A (en) Personnel gathering detection method, device and equipment
US20210304586A1 (en) Security System And Method Thereof
CN114694285B (en) People flow alarming method and device, electronic equipment and storage medium
CN107886678B (en) Indoor monitoring method, medium and electronic equipment
CN113361364A (en) Target behavior detection method, device, equipment and storage medium
CN114758147A (en) Human body abnormal posture recognition method and device and computer readable storage medium
CN111798648B (en) Intelligent alarm method and device, alarm platform and terminal
CN113645439B (en) Event detection method and system, storage medium and electronic device
CN116740874A (en) Intrusion detection method and related device
KR20220000424A (en) A camera system for providing a intelligent security surveillance service based on edge computing

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