CN108121992B - Method, device and system for determining number of indoor people - Google Patents

Method, device and system for determining number of indoor people Download PDF

Info

Publication number
CN108121992B
CN108121992B CN201611071595.5A CN201611071595A CN108121992B CN 108121992 B CN108121992 B CN 108121992B CN 201611071595 A CN201611071595 A CN 201611071595A CN 108121992 B CN108121992 B CN 108121992B
Authority
CN
China
Prior art keywords
clustering
sample
indoor
determining
people
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611071595.5A
Other languages
Chinese (zh)
Other versions
CN108121992A (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.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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 China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201611071595.5A priority Critical patent/CN108121992B/en
Publication of CN108121992A publication Critical patent/CN108121992A/en
Application granted granted Critical
Publication of CN108121992B publication Critical patent/CN108121992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Alarm Systems (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention provides a method, a device and a system for determining the number of indoor people, and relates to the technical field of Internet of things. The determination method comprises the following steps: acquiring first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor positions in a plurality of sample acquisition time periods before the current time; constructing a training sample by taking the first trigger information as the attribute information of the sample; clustering the training samples based on a clustering algorithm to obtain a target clustering centroid; and determining the indoor number of people at the current time according to the target clustering mass center. The scheme of the invention solves the problems that the existing method destroys the personal privacy, has complex analysis process, is easy to be interfered by indoor light, has poor accuracy and is difficult to be widely popularized in practical application.

Description

Method, device and system for determining number of indoor people
Technical Field
The invention relates to the technical field of Internet of things, in particular to a method, a device and a system for determining the number of indoor people.
Background
Along with the development of scientific technology, more and more indoor application systems become more intelligent, like indoor ventilation system and lighting system, can adjust and control fan and light according to the number of people in the room, realize automatic shutdown even when nobody is indoor, avoided the people to walk and do not turn off the light and do not close the phenomenon of electric fan, reach the saving of better indoor environment and energy.
Therefore, to realize accurate and effective regulation, people information in the room needs to be known accurately. Certainly, the indoor information of the number of people is accurately known, and technical support can be provided for later-stage user behavior identification and behavior abnormity early warning. In the existing mode, a camera is installed indoors to collect image or video data, and then machine learning algorithms such as a neural network are used for analyzing the collected data to determine the number of people indoors.
However, this approach destroys the privacy of the individual and threatens the security of private information.
Disclosure of Invention
The invention aims to provide a method, a device and a system for determining the number of indoor people, and aims to solve the problem that the existing method destroys the privacy of individuals.
In order to achieve the above object, an embodiment of the present invention provides a method for determining an indoor number of people, including:
acquiring first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor positions in a plurality of sample acquisition time periods before the current time;
constructing a training sample by taking the first trigger information as the attribute information of the sample;
clustering the training samples based on a clustering algorithm to obtain a target clustering centroid;
and determining the indoor number of people at the current time according to the target clustering mass center.
Wherein the first trigger information includes: triggering times of the PIR sensors and accumulated values of distances among the PIR sensors which are triggered in sequence;
the step of obtaining first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor positions in a plurality of sample collection time periods before the current time comprises:
monitoring first signals triggered by a plurality of PIR sensors arranged at different positions in a room;
counting the triggering times of the PIR sensors and the accumulated values of the distances between the sequentially triggered PIR sensors in a plurality of sample acquisition time periods before the current time according to the first signal; wherein the content of the first and second substances,
the plurality of sample collection time periods belong to a first preset time period in a day.
The step of clustering the training samples based on the clustering algorithm to obtain a target clustering centroid comprises the following steps:
and processing the training sample according to the number of indoor residents and a K-means clustering algorithm to obtain clusters and target clustering centroids corresponding to the number of indoor residents.
The method comprises the following steps of training samples, wherein the training samples are processed according to the number of indoor residents and a K-means clustering algorithm to obtain clusters corresponding to the number of indoor residents and a target clustering centroid, and the method comprises the following steps:
setting k clustering centroids according to the number k of the indoor resident persons;
calculating the sample center distance between the training sample and each cluster centroid;
attributing the training samples to a clustering center of mass with the minimum sample center distance to obtain k clusters;
iteratively calculating the clustering center of mass of each cluster, and returning to the step of calculating the sample center distance between the training sample and each clustering center of mass until the distance between the obtained clustering center of mass and the previous clustering center of mass is less than or equal to a preset distance; wherein the clustering centroid is an average position point of all training samples in the same cluster; wherein the clustering centroid is an average position point of all training samples in the same cluster;
and determining the current clustering center of mass as the target clustering center of mass.
Wherein, the step of determining the number of indoor people at the current time according to the target clustering center of mass comprises the following steps:
acquiring second trigger information of the PIR sensor in a second preset time period including the current time; the second preset time period and the plurality of sample collecting time periods belong to the same first preset time period in a day;
and determining a target clustering mass center with the minimum distance to the point to be determined in the target clustering mass centers by taking the second trigger information as the attribute information of the point to be determined, so as to obtain the indoor number of people at the current time.
The sample collection time period is a time interval of triggering a second signal twice by a door magnetic sensor arranged at a gate position communicated with the outdoor, and at least one PIR sensor is monitored to trigger a first signal in the time interval.
In order to achieve the above object, an embodiment of the present invention further provides an apparatus for determining an indoor number of people, including:
the acquisition module is used for acquiring first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor positions in a plurality of sample acquisition time periods before the current time;
the building module is used for building a training sample by taking the first trigger information as the attribute information of the sample;
the processing module is used for clustering the training samples based on a clustering algorithm to obtain a target clustering center of mass;
and the determining module is used for determining the indoor number of people at the current time according to the target clustering mass center.
Wherein the first trigger information includes: triggering times of the PIR sensors and accumulated values of distances among the PIR sensors which are triggered in sequence;
the acquisition module includes:
the monitoring sub-module is used for monitoring first signals triggered by a plurality of PIR sensors arranged at different indoor positions;
the counting submodule is used for counting the triggering times of the PIR sensors and the accumulated values of the distances between the sequentially triggered PIR sensors in a plurality of sample acquisition time periods before the current time according to the first signal; wherein the content of the first and second substances,
the plurality of sample collection time periods belong to a first preset time period in a day.
The processing module is further used for processing the training sample according to the number of indoor residents and a K-means clustering algorithm to obtain clusters and a target cluster centroid corresponding to the number of indoor residents.
Wherein the processing module comprises:
the first processing submodule is used for setting k clustering centroids according to the number k of the indoor resident persons;
the second processing submodule is used for calculating the sample center distance between the training sample and each cluster centroid;
the third processing submodule is used for attributing the training samples to the clustering mass center with the minimum sample center distance to the training samples to obtain k clusters;
the fourth processing submodule is used for iteratively calculating the clustering centroid of each cluster and returning to the step of calculating the sample center distance between the training sample and each clustering centroid until the distance between the obtained new clustering centroid and the previous clustering centroid is smaller than or equal to the preset distance; wherein the clustering centroid is an average position point of all training samples in the same cluster;
and the first determining submodule is used for determining the current clustering centroid as the target clustering centroid.
Wherein the determining module comprises:
the acquisition sub-module is used for acquiring second trigger information of the PIR sensor in a second preset time period including the current time; the second preset time period and the plurality of sample collecting time periods belong to the same first preset time period in a day;
and the second determining submodule is used for determining a target clustering centroid with the minimum distance to the point to be determined in the target clustering centroids by taking the second trigger information as attribute information of the point to be determined so as to obtain the indoor number of people at the current time.
The sample collection time period is a time interval of triggering a second signal twice by a door magnetic sensor arranged at a gate position communicated with the outdoor, and at least one PIR sensor is monitored to trigger a first signal in the time interval.
In order to achieve the above object, an embodiment of the present invention further provides a system for determining the number of indoor people, including the apparatus for determining the number of indoor people as described above.
The technical scheme of the invention has the following beneficial effects:
according to the method for determining the number of indoor people, the plurality of PIR sensors at different positions from the indoor are arranged, and first trigger information of the plurality of PIR sensors in a plurality of sample acquisition time periods before the current time is obtained; then, the first trigger information is used as attribute information of the sample to construct a training sample; then, clustering the training samples based on a clustering algorithm to obtain a target clustering centroid; and finally, determining the number of indoor people at the current time according to the target clustering mass center. Therefore, the training sample is constructed by taking the trigger information of the PIR sensor as the sample attribute, the clustered target clustering mass center is used for determining the number of indoor people at the current time, indoor images do not need to be collected, personal privacy is better protected, the interference of indoor light is avoided, and the method is simple and easy to realize and is convenient to popularize and apply.
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 description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating a method for determining the number of persons in a room according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a position of a PIR sensor and a door magnetic sensor arranged in a room;
FIG. 3 is a schematic diagram illustrating calculation of accumulated values of distances between 5 PIR sensors triggered in sequence;
FIG. 4 is a flowchart illustrating the steps of a method for determining the number of people indoors according to a first embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for determining the number of persons in a room according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
As shown in fig. 1, a method for determining an indoor number of people according to a first embodiment of the present invention includes:
step 101, acquiring first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor positions in a plurality of sample acquisition time periods before the current time;
102, taking the first trigger information as attribute information of a sample to construct a training sample;
103, clustering the training samples based on a clustering algorithm to obtain a target clustering mass center;
and 104, determining the indoor number of people at the current time according to the target clustering mass center.
From the step 101 to the step 104, in the method for determining the number of indoor people according to the embodiment of the present invention, by setting a plurality of PIR sensors at different positions from those in an indoor space, first trigger information of the plurality of PIR sensors in a plurality of sample collection time periods before a current time is obtained; then, the first trigger information is used as attribute information of the sample to construct a training sample; then, clustering the training samples based on a clustering algorithm to obtain a target clustering centroid; and finally, determining the number of indoor people at the current time according to the target clustering mass center. Therefore, a training sample is constructed by taking the trigger information of the PIR sensor as a sample attribute, and the indoor number of people at the current time is determined by using the clustered target clustering center of mass, so that indoor images do not need to be collected, and the protection of personal privacy is better realized.
Moreover, the method of the embodiment has no requirement on indoor light, can avoid the interference of the indoor light compared with a mode of determining the number of people in the room through image acquisition, is simple and easy to realize, and is convenient to popularize and apply.
In this embodiment, the first trigger information includes: the number of times the PIR sensors are triggered and the accumulated value of the distances between the sequentially triggered PIR sensors.
It should be appreciated that the PIR sensor detects a moving radiation source (emitting thermal energy rays) within its detection range, so that when a person within the detection range is active, the PIR sensor signal changes from 0 to 1, i.e., is activated. Therefore, whether the PIR sensor is triggered or not is known by monitoring the first signal of the PIR sensor, and the triggering times are obtained. And the accumulated value of the distances among the PIR sensors which are triggered in turn can be determined by combining a room floor type graph. As shown in fig. 2, 8 PIR sensors (P01-P08) are arranged indoors, a coordinate axis is established according to a room floor plan as shown in fig. 3, so that the specific coordinate position of each PIR sensor can be obtained, when the PIR sensors which are sequentially triggered are P02, P08, P01, P05 and P06, the distance between every two sensors which are continuously triggered is obtained through the coordinate calculation of the 5 PIR sensors, and the sum is the accumulated value of the distances between the 5 PIR sensors which are sequentially triggered, namely a + b + c + d.
Therefore, specifically, step 101 includes:
step 1011, monitoring first signals triggered by a plurality of PIR sensors arranged at different indoor positions;
step 1012, counting the triggering times of the PIR sensors and the accumulated values of the distances between the sequentially triggered PIR sensors in a plurality of sample acquisition time periods before the current time according to the first signal; wherein the content of the first and second substances,
the plurality of sample collection time periods belong to a first preset time period in a day.
Through steps 1011 and 1012, the number of times of triggering the PIR sensors in a plurality of sample acquisition time periods before the current time and the accumulated value of the distances between the sequentially triggered PIR sensors can be obtained through statistics by monitoring the set first signals of the plurality of PIR sensors.
However, the activity status of the person is different at different time periods of the day, such as a high activity level in the day and a low activity level in the night, so that the sample collection time periods in this embodiment belong to the first preset time period of the day in order to ensure the sample collection pertinence. Taking 24 hours of a day as an example, the first preset time period may be any time period of [ 0, 6 ], [ 6, 12 ], [ 12, 18 ], or [ 18, 24 ], or any time period of [ 0, 8 ], [ 8, 16 ], or [ 16, 24 ], and so on, which are not listed herein.
It should also be appreciated that in this embodiment, a door sensor is also provided at the gate location in communication with the exterior of the chamber for the purpose of determining each sample acquisition time period. Therefore, the sample collection time period is a time interval of triggering the second signal twice by the door sensor arranged at the position of the gate communicated with the outdoor space, and the triggering of the first signal by the at least one PIR sensor is monitored in the time interval.
The door magnetic sensor can sense the opening and closing state change of the door, and triggers the second signal when the door is opened and does not trigger after the door is closed. By placing the door sensor D01 at the gate location as shown in fig. 2, the time interval between two actuations of the second signal by the door sensor can be first determined by monitoring the second signal as triggered by the door sensor. Considering that the first monitored second signal may be triggered by the last person in the room exiting the door and the second monitored second signal may be triggered by the first person entering the room opening the door, no person exists in the two time intervals, it is determined that the time interval during which the door magnetic sensor triggers the second signal twice is followed by the time interval during which the at least one PIR sensor triggers the first signal, and thus the time interval can be used as a sample acquisition time period. Of course, by monitoring the second signal triggered by the door sensor and the first signal triggered by the PIR sensor, it is determined that the PIR sensor does not trigger the first signal within the time interval in which the door sensor triggers the second signal twice, and it can be determined that there is no person in the room within the time interval.
Then, in step 102, the number of times the PIR sensor is triggered and the accumulated value of the distances between the sequentially triggered PIR sensors are used as the attribute information of the sample to construct a training sample. In order to obtain a more effective target clustering centroid subsequently, a large number of training samples are needed, and first trigger information of a PIR sensor in a sample acquisition time period of several months, half a year or even longer before the current time is often acquired.
After the training samples are constructed, clustering can be carried out on the training samples through a clustering algorithm to obtain a target clustering mass center so as to determine the indoor number of people at the current time. Preferably, in this embodiment, step 103 further includes: and processing the training sample according to the number of indoor residents and a K-means clustering algorithm to obtain clusters and target clustering centroids corresponding to the number of indoor residents.
Specifically, as shown in fig. 4, step 103 includes:
step 1031, setting k clustering centroids according to the number k of the indoor resident persons;
step 1032, calculating the sample center distance between the training sample and each cluster centroid;
1033, attributing the training samples to a clustering mass center with the minimum sample center distance from the training samples to obtain k clusters;
step 1034, iteratively calculating the clustering center of mass of each cluster, and returning to the step of calculating the sample center distance between the training sample and each clustering center of mass until the distance between the obtained new clustering center of mass and the previous clustering center of mass is less than or equal to the preset distance; wherein the clustering centroid is an average position point of all training samples in the same cluster;
step 1035, determine the current cluster centroid as the target cluster centroid.
In the above, it is known that the first trigger information serving as the training sample attribute information includes the number of times c that the PIR sensor triggers and the accumulated value s of the distances between the sequentially triggered PIR sensors, so that the sample point positions of the training samples on the two-dimensional plane can be obtained by respectively taking the number of times that the PIR sensor triggers and the accumulated value of the distances between the sequentially triggered PIR sensors as coordinate axes, and then a large number of training samples meeting the condition are clustered.
In the embodiment, the clustering is performed by adopting a K-means clustering algorithm, wherein the K-means algorithm is a hard clustering algorithm, is a typical target function clustering method based on prototypes and is a representative of the target function clustering method based on prototypesAnd taking a certain distance from the data point to the prototype as an optimized objective function, and obtaining an adjustment rule of iterative operation by using a function extremum solving method. In step 1031, k clustering centroids Z are set according to the number k of resident people in the roomr(l) And r is 1, 2, 3, … k, where the k cluster centroids are initially set, and l is 1.
The K-means algorithm takes Euclidean distance as similarity measure, and the optimal classification of the central vector corresponding to a certain initial cluster is solved, so that the evaluation index is minimum. Assume that a given dataset X ═ Xm1, 2, 3, … …, total, there are m data points, and the sample in X describes the A of the attribute with d1,A2,…AdTo indicate. Data sample xi=(xi1,xi2,…xid),xj=(xj1,xj2…xjd) Wherein x isi1,xi2,…xidAnd xj1,xj2…xjdAre respectively a sample xiAnd xjCorresponding to d descriptions A1,A2,…AdThe specific value of (a). The similarity between samples is represented by Euclidean distance d (x)i,xj) Expressed, the formula is as follows:
Figure BDA0001165270790000081
the smaller the inter-sample distance, the smaller the degree of difference of the samples, and vice versa. The distance is an important basis for clustering by the K-means algorithm.
So after step 1031, step 1032 calculates the centroid distance of the training samples from each cluster centroid. In this embodiment, the first trigger information for each sample acquisition time period may result in one sample point, and a large number of sample points form the data set X { X }q1, 2, 3, … n, for a total of n data points. Calculating the sample center distance of each data point and the clustering mass center, namely the Euclidean distance d (x)q,Zr(l)),xq={cq,sq}。
Next, as in step 1033, the training samples are attributed toAnd obtaining k clusters by the cluster centroid with the minimum sample center distance to the cluster centroid. I.e. if d (x) is satisfiedq,Zk(l))=min{d(xq,Zr(l) Q ═ 1, 2, 3, … n }, then xq∈Xk
And in order to optimize the clustering, next, in step 1034, iteratively calculating a new clustering center of mass of each cluster, returning to step 1032, calculating the center distance between the training sample and each clustering center of mass, and re-clustering until the distance between the set new clustering center of mass and the previous clustering center of mass is less than or equal to the preset distance. And the calculated cluster centroid is the average position point of all training samples in the same cluster. In the r-th cluster, the new cluster centroid ZrThe determination formula of (l +1) is as follows:
Figure BDA0001165270790000091
wherein n isrDenotes the number of data points in the r-th cluster, xi rRepresenting the location of data point i in the r-th cluster, whose location, e.g., coordinate (c), can be determined from sample attributes c and si,si). After the new cluster center is reset, the process returns to step 1033 until the distance between the set new cluster center of mass and the previous cluster center of mass is less than or equal to the preset distance.
Since the K-means algorithm adopts a criterion function to evaluate the clustering performance, the criterion function is usually a square error and a criterion function SEE (sum of the squared error), and it is assumed that the data set X contains K clusters X1,X2,X3,…Xk(ii) a The number of data points in each cluster is n1,n2,n3,…nk(ii) a The centroid of each cluster is m1,m2,m3,…mkThen the formula for SEE is as follows:
Figure BDA0001165270790000092
wherein p is in the ith clusterData point of (1), mkIs the average of all data points in the ith cluster. In this embodiment, whether the new clustering center of mass coincides with the previous clustering center of mass may also be determined by SEE whether it has converged, and if so, clustering is completed.
After clustering is complete, the current cluster centroid is determined to be the target cluster centroid in step 1035. Of course, the final k clusters and the target cluster centroids thereof can be used for correspondingly calibrating the number of indoor people for determining the number of indoor people at the current time.
Further, step 104 includes:
step 1041, acquiring second trigger information of the PIR sensor in a second preset time period including the current time; the second preset time period and the plurality of sample collecting time periods belong to the same first preset time period in a day;
and 1042, taking the second trigger information as attribute information of the point to be determined, and determining a target clustering centroid with the minimum distance from the point to be determined in the target clustering centroids to obtain the indoor number of people at the current time.
Therefore, after the target clustering centroid is determined, second trigger information (the number of times of triggering the PIR sensor and the accumulated value of the distances between the PIR sensors triggered in sequence) of the PIR sensor in a second preset time period including the current time is obtained and used as attribute information of the point to be determined to limit the position of the point to be determined on the two-dimensional plane, the distance between the point to be determined and each target clustering centroid is calculated respectively, the target clustering centroid with the minimum distance is determined, and then the indoor number of people calibrated by the target clustering centroid can be determined.
Certainly, the second preset time period of the second trigger information and the multiple sample acquisition time periods which previously constitute the training samples belong to the same first preset time period in the day, so that the final result is ensured to have higher accuracy.
In the embodiment of the present invention, to ensure the accuracy of the result, the number of required training samples is large, the value range difference of the attribute information is also large, and in order to solve the problem that the dissimilarity cannot be truly reflected when calculating the euclidean distance, the attribute values are normalized before clustering, and each attribute value is proportionally mapped to the same value interval, and the mapping formula is as follows:
Figure BDA0001165270790000101
therein, max (a)i) And min (a)i) Representing the maximum and minimum values of the ith attribute in all data.
In summary, the method for determining the number of indoor people in the embodiment of the invention monitors signals of the door sensor and the PIR sensor, selects the triggering times of the PIR sensor in a plurality of sample acquisition time periods before the current time and the accumulated value of the distances between the PIR sensors triggered in sequence as the attribute information of the samples of the K-means clustering algorithm, and determines the number of indoor people in the current time according to the target clustering center after the K-means clustering, thereby protecting personal privacy, avoiding interference of indoor light, being simple and easy to implement, and being convenient for popularization and application.
Second embodiment
As shown in fig. 5, a second embodiment of the present invention further provides an apparatus for determining an indoor person count, including:
the acquisition module 501 is configured to acquire first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor locations in a plurality of sample acquisition time periods before current time;
a constructing module 502, configured to construct a training sample by using the first trigger information as attribute information of the sample;
the processing module 503 is configured to cluster the training samples based on a clustering algorithm to obtain a target clustering centroid;
and the determining module 504 is used for determining the indoor number of people at the current time according to the target clustering centroid.
Wherein the first trigger information includes: triggering times of the PIR sensors and accumulated values of distances among the PIR sensors which are triggered in sequence;
the acquisition module includes:
the monitoring sub-module is used for monitoring first signals triggered by a plurality of PIR sensors arranged at different indoor positions;
the counting submodule is used for counting the triggering times of the PIR sensors and the accumulated values of the distances between the sequentially triggered PIR sensors in a plurality of sample acquisition time periods before the current time according to the first signal; wherein the content of the first and second substances,
the plurality of sample collection time periods belong to a first preset time period in a day.
The processing module is further used for processing the training sample according to the number of indoor residents and a K-means clustering algorithm to obtain clusters and a target cluster centroid corresponding to the number of indoor residents.
Wherein the processing module comprises:
the first processing submodule is used for setting k clustering centroids according to the number k of the indoor resident persons;
the second processing submodule is used for calculating the sample center distance between the training sample and each cluster centroid;
the third processing submodule is used for attributing the training samples to the clustering mass center with the minimum sample center distance to the training samples to obtain k clusters;
the fourth processing submodule is used for iteratively calculating the clustering centroid of each cluster and returning to the step of calculating the sample center distance between the training sample and each clustering centroid until the distance between the obtained new clustering centroid and the previous clustering centroid is smaller than or equal to the preset distance; wherein the clustering centroid is an average position point of all training samples in the same cluster;
and the first determining submodule is used for determining the current clustering centroid as the target clustering centroid.
Wherein the determining module comprises:
the acquisition sub-module is used for acquiring second trigger information of the PIR sensor in a second preset time period including the current time; the second preset time period and the plurality of sample collecting time periods belong to the same first preset time period in a day;
and the second determining submodule is used for determining a target clustering centroid with the minimum distance to the point to be determined in the target clustering centroids by taking the second trigger information as attribute information of the point to be determined so as to obtain the indoor number of people at the current time.
The sample collection time period is a time interval of triggering a second signal twice by a door magnetic sensor arranged at a gate position communicated with the outdoor, and a PIR sensor is monitored to trigger a first signal in the time interval.
The device for determining the number of indoor people monitors signals of the door sensor and the PIR sensor, selects the triggering times of the PIR sensor in a plurality of sample acquisition time periods before the current time and the accumulated value of the distances between the sequentially triggered PIR sensors as the attribute information of the samples of the K-means clustering algorithm, determines the number of indoor people at the current time according to the target clustering center after the K-means clustering, protects personal privacy, avoids interference of indoor light, is simple and easy to implement, and is convenient to popularize and apply.
The apparatus is an apparatus to which the above method for determining the number of persons in a room is applied, and the same technical effects can be achieved by applying the implementation of the embodiment of the method for determining the number of persons in a room to the apparatus.
Third embodiment
The third embodiment of the invention also provides a system for determining the number of indoor people, which comprises the device for determining the number of indoor people.
In addition, the system for determining the number of the indoor people further comprises a plurality of PIR sensors arranged at different indoor positions and a door magnetic sensor arranged at a door position communicated with the outdoor.
According to the system for determining the number of indoor people, the device for determining the number of indoor people monitors signals of the door magnetic sensor and the PIR sensor, the triggering times of the PIR sensor in a plurality of sample acquisition time periods before the current time and the accumulated value of the distances between the sequentially triggered PIR sensors are selected as attribute information of the samples of the K-means clustering algorithm, the number of indoor people at the current time is determined according to the target clustering center after the K-means clustering, the personal privacy is protected, the interference of indoor light is avoided, and the system is simple and easy to implement and convenient to popularize and apply.
The system is a system to which the method for determining the number of people in a room is applied, and the implementation of the embodiment of the method for determining the number of people in a room is applied to the system, and the same technical effects can be achieved.
It is further noted that many of the functional units described in this specification have been labeled as modules, in order to more particularly emphasize their implementation independence.
In embodiments of the present invention, modules may be implemented in software for execution by various types of processors. An identified module of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions which may, for instance, be constructed as an object, procedure, or function. Nevertheless, the executables of an identified module need not be physically located together, but may comprise disparate instructions stored in different bits which, when joined logically together, comprise the module and achieve the stated purpose for the module.
Indeed, a module of executable code may be a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, and across several memory devices. Likewise, operational data may be identified within the modules and may be embodied in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including over different storage devices, and may exist, at least partially, merely as electronic signals on a system or network.
When a module can be implemented by software, considering the level of existing hardware technology, a module implemented by software may build a corresponding hardware circuit to implement a corresponding function, without considering cost, and the hardware circuit may include a conventional Very Large Scale Integration (VLSI) circuit or a gate array and an existing semiconductor such as a logic chip, a transistor, or other discrete components. A module may also be implemented in programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices or the like.
The exemplary embodiments described above are described with reference to the drawings, and many different forms and embodiments of the invention may be made without departing from the spirit and teaching of the invention, therefore, the invention is not to be construed as limited to the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. In the drawings, the size and relative sizes of elements may be exaggerated for clarity. The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Unless otherwise indicated, a range of values, when stated, includes the upper and lower limits of the range and any subranges therebetween.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (11)

1. A method for determining the number of indoor people is characterized by comprising the following steps:
the method includes the steps that first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor positions in a plurality of sample collection time periods before the current time is obtained, and the method includes the following steps: monitoring first signals triggered by a plurality of PIR sensors arranged at different positions in a room; counting the triggering times of the PIR sensors and the accumulated values of the distances between the sequentially triggered PIR sensors in a plurality of sample acquisition time periods before the current time according to the first signal; wherein, a plurality of sample collection time quantum belong to in the first preset time quantum in a day together, and first trigger information includes: triggering times of the PIR sensors and accumulated values of distances among the PIR sensors which are triggered in sequence;
constructing a training sample by taking the first trigger information as the attribute information of the sample;
clustering the training samples based on a clustering algorithm to obtain a target clustering centroid;
and determining the indoor number of people at the current time according to the target clustering mass center.
2. The method for determining the number of people indoors as claimed in claim 1, wherein the step of clustering the training samples based on a clustering algorithm to obtain a target clustering centroid comprises:
and processing the training sample according to the number of indoor residents and a K-means clustering algorithm to obtain clusters and target clustering centroids corresponding to the number of indoor residents.
3. The method for determining the number of people indoors as claimed in claim 2, wherein the step of processing the training samples according to the number of people living indoors and a K-means clustering algorithm to obtain clusters corresponding to the number of people living indoors and a target cluster centroid comprises:
setting k clustering centroids according to the number k of the indoor resident persons;
calculating the sample center distance between the training sample and each cluster centroid;
attributing the training samples to a clustering center of mass with the minimum sample center distance to obtain k clusters;
iteratively calculating the clustering center of mass of each cluster, and returning to the step of calculating the sample center distance between the training sample and each clustering center of mass until the distance between the obtained clustering center of mass and the previous clustering center of mass is less than or equal to a preset distance; wherein the clustering centroid is an average position point of all training samples in the same cluster;
and determining the current clustering center of mass as the target clustering center of mass.
4. The method of claim 1, wherein the step of determining the number of indoor people at the current time according to the target cluster centroid comprises:
acquiring second trigger information of the PIR sensor in a second preset time period including the current time; the second preset time period and the plurality of sample collecting time periods belong to the same first preset time period in a day;
and determining a target clustering mass center with the minimum distance to the point to be determined in the target clustering mass centers by taking the second trigger information as the attribute information of the point to be determined, so as to obtain the indoor number of people at the current time.
5. The method of claim 1, wherein the sample collection time period is a time interval between two triggering of the second signal by a door sensor disposed at a gate position communicating with the outdoor, and the triggering of the first signal by the at least one PIR sensor is monitored during the time interval.
6. An apparatus for determining an indoor population, comprising:
the acquisition module is used for acquiring first trigger information of a plurality of passive infrared PIR sensors arranged at different indoor positions in a plurality of sample acquisition time periods before the current time;
the building module is used for building a training sample by taking the first trigger information as the attribute information of the sample;
the processing module is used for clustering the training samples based on a clustering algorithm to obtain a target clustering center of mass;
the determining module is used for determining the indoor number of people at the current time according to the target clustering mass center;
the first trigger information includes: triggering times of the PIR sensors and accumulated values of distances among the PIR sensors which are triggered in sequence; the acquisition module includes:
the monitoring sub-module is used for monitoring first signals triggered by a plurality of PIR sensors arranged at different indoor positions;
the counting submodule is used for counting the triggering times of the PIR sensors and the accumulated values of the distances between the sequentially triggered PIR sensors in a plurality of sample acquisition time periods before the current time according to the first signal; wherein the content of the first and second substances,
the plurality of sample collection time periods belong to a first preset time period in a day.
7. The apparatus for determining the number of people indoors according to claim 6, wherein the processing module is further configured to process the training samples according to the number of people resident indoors and a K-means clustering algorithm, so as to obtain clusters and a target cluster centroid corresponding to the number of people resident indoors.
8. The apparatus for determining the number of people in a room of claim 7, wherein the processing module comprises:
the first processing submodule is used for setting k clustering centroids according to the number k of the indoor resident persons;
the second processing submodule is used for calculating the sample center distance between the training sample and each cluster centroid;
the third processing submodule is used for attributing the training samples to the clustering mass center with the minimum sample center distance to the training samples to obtain k clusters;
the fourth processing submodule is used for iteratively calculating the clustering centroid of each cluster and returning to the step of calculating the sample center distance between the training sample and each clustering centroid until the distance between the obtained new clustering centroid and the previous clustering centroid is smaller than or equal to the preset distance; wherein the clustering centroid is an average position point of all training samples in the same cluster;
and the first determining submodule is used for determining the current clustering centroid as the target clustering centroid.
9. The apparatus of claim 6, wherein the determining module comprises:
the acquisition sub-module is used for acquiring second trigger information of the PIR sensor in a second preset time period including the current time; the second preset time period and the plurality of sample collecting time periods belong to the same first preset time period in a day;
and the second determining submodule is used for determining a target clustering centroid with the minimum distance to the point to be determined in the target clustering centroids by taking the second trigger information as attribute information of the point to be determined so as to obtain the indoor number of people at the current time.
10. The apparatus of claim 6, wherein the sample collection time period is a time interval between two triggering of the second signal by a door sensor disposed at a gate communicating with the outdoor environment, and the triggering of the first signal by the at least one PIR sensor is monitored during the time interval.
11. An indoor person number determination system comprising the indoor person number determination apparatus according to any one of claim 6 to claim 10.
CN201611071595.5A 2016-11-29 2016-11-29 Method, device and system for determining number of indoor people Active CN108121992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611071595.5A CN108121992B (en) 2016-11-29 2016-11-29 Method, device and system for determining number of indoor people

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611071595.5A CN108121992B (en) 2016-11-29 2016-11-29 Method, device and system for determining number of indoor people

Publications (2)

Publication Number Publication Date
CN108121992A CN108121992A (en) 2018-06-05
CN108121992B true CN108121992B (en) 2020-06-16

Family

ID=62223966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611071595.5A Active CN108121992B (en) 2016-11-29 2016-11-29 Method, device and system for determining number of indoor people

Country Status (1)

Country Link
CN (1) CN108121992B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347753B (en) * 2021-08-06 2021-11-09 深圳特朗达照明股份有限公司 LED self-adaptive control method, system and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101160004A (en) * 2007-10-30 2008-04-09 南开大学 Intelligent control system of lighting apparatus
CN101441718A (en) * 2008-12-19 2009-05-27 福建三元达通讯股份有限公司 Sensor information fuse device and method
CN101816560A (en) * 2010-05-31 2010-09-01 天津大学 Identification method based on multi-angle human body pyroelectricity information detection
CN102050366A (en) * 2009-11-05 2011-05-11 上海三菱电梯有限公司 Person number detection device and method
CN103815912A (en) * 2014-01-26 2014-05-28 大连大学 Real-time monitoring method for falling behaviors of old people living alone on basis of thermal infrared sensor array
CN104537673A (en) * 2015-01-09 2015-04-22 西安电子科技大学 Infrared image segmentation method based on multiple threshold values and self-adaptation fuzzy clustering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9232157B2 (en) * 2012-01-12 2016-01-05 Clayton D. Willis Apparatus, system and method for electronic motion detection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101160004A (en) * 2007-10-30 2008-04-09 南开大学 Intelligent control system of lighting apparatus
CN101441718A (en) * 2008-12-19 2009-05-27 福建三元达通讯股份有限公司 Sensor information fuse device and method
CN102050366A (en) * 2009-11-05 2011-05-11 上海三菱电梯有限公司 Person number detection device and method
CN101816560A (en) * 2010-05-31 2010-09-01 天津大学 Identification method based on multi-angle human body pyroelectricity information detection
CN103815912A (en) * 2014-01-26 2014-05-28 大连大学 Real-time monitoring method for falling behaviors of old people living alone on basis of thermal infrared sensor array
CN104537673A (en) * 2015-01-09 2015-04-22 西安电子科技大学 Infrared image segmentation method based on multiple threshold values and self-adaptation fuzzy clustering

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A distributed PIR-based approach for estimating people count in office environments;F. Wahl 等;《2012 IEEE 15th International Conference on Computational Science and Engineering》;20121207;640-647 *
Interpreting Presence Sensor Data and Looking for Similarities Between Homes Using Cluster Analysis;John Loane 等;《2011 5th International Conference on Pervasive Computing Technologies for Healthcare (PervasiveHealth) and Workshops》;20110526;438-445 *

Also Published As

Publication number Publication date
CN108121992A (en) 2018-06-05

Similar Documents

Publication Publication Date Title
Raykov et al. Predicting room occupancy with a single passive infrared (PIR) sensor through behavior extraction
Yang et al. A multi-sensor based occupancy estimation model for supporting demand driven HVAC operations
JP5143212B2 (en) Method and apparatus for modeling behavior using probability distribution functions
Shih A robust occupancy detection and tracking algorithm for the automatic monitoring and commissioning of a building
CN107256377B (en) Method, device and system for detecting object in video
JP5384629B2 (en) Apparatus and method for classifying movement of an object within a monitoring zone
CN107707657B (en) Safety monitoring system based on multiple sensors
Andrews et al. A motion induced passive infrared (PIR) sensor for stationary human occupancy detection
Zhang et al. Ev-loc: integrating electronic and visual signals for accurate localization
WO2014132841A1 (en) Person search method and platform occupant search device
CN103914518B (en) Clustering method and clustering device
CN104394588B (en) Indoor orientation method based on Wi Fi fingerprints and Multidimensional Scaling
JP2005531845A5 (en)
US10769909B1 (en) Using sensor data to detect events
CN112200021B (en) Target crowd tracking and monitoring method based on limited range scene
CN110377961A (en) Crop growth environment control method, device, computer equipment and storage medium
Naser et al. Heat-map based occupancy estimation using adaptive boosting
CN108121992B (en) Method, device and system for determining number of indoor people
CN111240217B (en) State detection method and device, electronic equipment and storage medium
US10914811B1 (en) Locating a source of a sound using microphones and radio frequency communication
Yuan et al. Human indoor location for binary infrared sensor tracking system: On improved credit and dynamic pruning algorithm
CN107844734A (en) Monitoring objective determines method and device, video frequency monitoring method and device
CN110853034A (en) Crack detection method, crack detection device, electronic equipment and computer-readable storage medium
Yang et al. Location ambiguity resolution and tracking method of human targets in wireless infrared sensor network
Zhang et al. Estimating the number of occupants and activity intensity in large spaces with environmental sensors

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
CP01 Change in the name or title of a patent holder

Address after: 32 Xuanwumen West Street, Xicheng District, Beijing 100053

Patentee after: CHINA MOBILE COMMUNICATION LTD., Research Institute

Patentee after: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

Address before: 32 Xuanwumen West Street, Xicheng District, Beijing 100053

Patentee before: CHINA MOBILE COMMUNICATION LTD., Research Institute

Patentee before: CHINA MOBILE COMMUNICATIONS Corp.

CP01 Change in the name or title of a patent holder