CN108121992A - The definite method, apparatus and system of a kind of occupancy - Google Patents
The definite method, apparatus and system of a kind of occupancy Download PDFInfo
- Publication number
- CN108121992A CN108121992A CN201611071595.5A CN201611071595A CN108121992A CN 108121992 A CN108121992 A CN 108121992A CN 201611071595 A CN201611071595 A CN 201611071595A CN 108121992 A CN108121992 A CN 108121992A
- Authority
- CN
- China
- Prior art keywords
- barycenter
- cluster
- occupancy
- sample
- pir sensor
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating 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 present invention provides a kind of definite method, apparatus and system of occupancy, is related to internet of things field.This determines that method includes:In multiple sample collection periods before acquisition current time, the first triggering information of the infrared pir sensor of multiple passive types of indoor different position is arranged at;Using the described first triggering information as the attribute information of sample, training sample is built;The training sample is clustered based on clustering algorithm, obtains target cluster barycenter;Barycenter is clustered according to the target, determines the occupancy of current time.The solution of the present invention solves existing method and destroys individual privacy, and resolving is complicated, easily poor by indoor light interference accuracy, the problem of being difficult to be widely popularized in practical application.
Description
Technical field
The present invention relates to internet of things field, the definite method, apparatus and system of more particularly to a kind of occupancy.
Background technology
With the development of science and technology, more and more indoor application systems become more intelligent, such as room ventilation system
System and lighting system, can according to occupancy number, realized when regulating and controlling fan and headlamp or even indoors nobody automatic
It closes, avoids people and walk the phenomenon that not turning off the light and being not related to electric fan, reach the saving of more preferably indoor environment and the energy.
Therefore, accurate and effective regulation and control to be realized, it is necessary to first accurately understand indoor number information.Certainly, accurately
Understood indoor number information, additionally it is possible to provide technical support for later stage user behavior recognition and abnormal behavior early warning.It is existing
Mode be by installing camera collection image or video data indoors, reuse the machine learning such as neutral net calculation
Method carries out parsing definite occupancy to the data collected.
But this mode can destroy individual privacy, and the security of personal information is made to be on the hazard.
The content of the invention
The object of the present invention is to provide the definite method, apparatus and system of a kind of occupancy, are broken with solving existing method
The problem of bad individual privacy.
In order to achieve the above objectives, the embodiment of the present invention provides a kind of definite method of occupancy, including:
In multiple sample collection periods before acquisition current time, multiple passive types of indoor different position are arranged at
First triggering information of infrared pir sensor;
Using the described first triggering information as the attribute information of sample, training sample is built;
The training sample is clustered based on clustering algorithm, obtains target cluster barycenter;
Barycenter is clustered according to the target, determines the occupancy of current time.
Wherein, the first triggering information includes:The number of pir sensor triggering and the pir sensor that triggers successively it
Between spacing accumulated value;
In multiple sample collection periods before the acquisition current time, multiple quilts of indoor different position are arranged at
The step of first triggering information of dynamic formula infrared pir sensor, including:
Monitoring is arranged at the first signal of multiple pir sensor triggerings of indoor different position;
According to first signal, in multiple sample collection periods before counting the current time, pir sensor
Spacing accumulated value between the number of triggering and the pir sensor triggered successively;Wherein,
The multiple sample collection period is belonged in the first preset time period in one day together.
Wherein, it is described that the training sample is clustered based on clustering algorithm, obtain the step of target clusters barycenter, bag
It includes:
The training sample is handled according to the resident number in interior and K-means clustering algorithms, obtains corresponding institute
State the cluster of indoor resident number and target cluster barycenter.
Wherein, it is described that the training sample is handled according to the resident number in interior and K-means clustering algorithms, it obtains
The step of to the correspondence indoor cluster for residing number and target cluster barycenter, including:
According to the indoor resident number k, k cluster barycenter is set;
Calculate the sample heart distance of the training sample and each cluster barycenter;
The training sample is belonged to the cluster barycenter minimum with the sample heart of itself distance, obtains k cluster;
The cluster barycenter each clustered is iterated to calculate, and returns to the calculating training sample and each cluster barycenter
The sample heart apart from the step of, until gained cluster barycenter with before cluster barycenter distance be less than or equal to pre-determined distance;Its
In, the cluster barycenter is the mean place point of all training samples in same cluster;Wherein, the cluster barycenter is same poly-
The mean place point of all training samples in class;
Determine that current cluster barycenter clusters barycenter for target.
Wherein, described the step of barycenter is clustered according to the target, determines the occupancy of current time, including:
Obtain the second triggering information of pir sensor in the second preset time period for including the current time;Wherein, institute
The second preset time period is stated to belong in the first preset time period in one day with the multiple sample collection period;
Using the described second triggering information as the attribute information of point to be determined, the definite and institute in the target clusters barycenter
The minimum target cluster barycenter of point distance to be determined is stated, obtains the occupancy of current time.
Wherein, the sample collection period is to be arranged to touch twice with the door status sensor of the outdoor gate position connected
The time interval of secondary signal is sent out, and monitors that an at least pir sensor triggers the first signal in the time interval.
In order to achieve the above objectives, the embodiment of the present invention additionally provides a kind of determining device of occupancy, including:
Acquisition module for obtaining in multiple sample collection periods before current time, is arranged at indoor different positions
First triggering information of the infrared pir sensor of multiple passive types put;
Module is built, for the attribute information using the described first triggering information as sample, builds training sample;
Processing module clusters the training sample for being based on clustering algorithm, obtains target cluster barycenter;
Determining module for clustering barycenter according to the target, determines the occupancy of current time.
Wherein, the first triggering information includes:The number of pir sensor triggering and the pir sensor that triggers successively it
Between spacing accumulated value;
The acquisition module includes:
Submodule is monitored, for monitoring the first letter of the multiple pir sensor triggerings for being arranged at indoor different position
Number;
Statistic submodule, during for according to first signal, counting multiple sample collections before the current time
Between in section, the spacing accumulated value between the number of pir sensor triggering and the pir sensor triggered successively;Wherein,
The multiple sample collection period is belonged in the first preset time period in one day together.
Wherein, the processing module is further used for according to the resident number in interior and K-means clustering algorithms to described
Training sample is handled, and obtains the cluster and target cluster barycenter of the corresponding indoor resident number.
Wherein, the processing module includes:
First processing submodule, for according to the indoor resident number k, setting k cluster barycenter;
Second processing submodule, for calculating the sample heart distance of the training sample and each cluster barycenter;
3rd processing submodule, for the training sample to be belonged to the cluster matter minimum with the sample heart of itself distance
The heart obtains k cluster;
Fourth process submodule for iterating to calculate the cluster barycenter each clustered, and returns to the calculating training
The sample heart of sample and each cluster barycenter apart from the step of, until the new cluster barycenter of gained and cluster barycenter before away from
From less than or equal to pre-determined distance;Wherein, the cluster barycenter is the mean place point of all training samples in same cluster;
First determination sub-module, for determining that current cluster barycenter clusters barycenter for target.
Wherein, the determining module includes:
Acquisition submodule, for obtaining second of pir sensor in the second preset time period for including the current time
Trigger information;Wherein, what second preset time period and the multiple sample collection period were belonged in one day is first pre-
If in the period;
Second determination sub-module, for the attribute information using the described second triggering information as point to be determined, in the mesh
The target cluster barycenter minimum with the point distance to be determined is determined in mark cluster barycenter, obtains the occupancy of current time.
Wherein, the sample collection period is to be arranged to touch twice with the door status sensor of the outdoor gate position connected
The time interval of secondary signal is sent out, and monitors that an at least pir sensor triggers the first signal in the time interval.
In order to achieve the above objectives, the embodiment of the present invention additionally provides a kind of definite system of occupancy, including as above institute
The determining device for the occupancy stated.
The above-mentioned technical proposal of the present invention has the beneficial effect that:
The occupancy of the embodiment of the present invention determines method, by setting multiple pir sensors with indoor different position,
First obtain the first triggering information of multiple pir sensors within multiple sample collection periods before current time;Then,
Using the first triggering information as the attribute information of sample, training sample is built;Afterwards, based on clustering algorithm to the training sample
It is clustered, obtains target cluster barycenter;Finally, the occupancy of current time is determined according to target cluster barycenter.This
Sample is used as sample attribute by the triggering information of pir sensor and builds training sample, and uses the target cluster barycenter after cluster
The occupancy of current time is determined, without gathering off-the-air picture, individual privacy is not only preferably protected, avoids
The interference of indoor light, and simple easily realization, it is easy to utilize.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed in being described below to the embodiment of the present invention
Attached drawing to be used is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention,
For those of ordinary skill in the art, without having to pay creative labor, can also be obtained according to these attached drawings
Obtain other attached drawings.
Fig. 1 is the step flow chart of the definite method of the occupancy of first embodiment of the invention;
Fig. 2 is the position view of indoor setting pir sensor and door status sensor;
Fig. 3 is that the spacing accumulated value between 5 pir sensors triggered successively calculates schematic diagram;
Fig. 4 is the specific steps flow chart of the definite method of the occupancy of first embodiment of the invention;
Fig. 5 is the structure diagram of the determining device of the occupancy of second embodiment of the invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts
Example, belongs to the scope of protection of the invention.
First embodiment
As shown in Figure 1, a kind of definite method of occupancy of first embodiment of the invention, including:
Step 101, in multiple sample collection periods before acquisition current time, the more of indoor different position are arranged at
First triggering information of a infrared pir sensor of passive type;
Step 102, using the described first triggering information as the attribute information of sample, training sample is built;
Step 103, the training sample is clustered based on clustering algorithm, obtains target cluster barycenter;
Step 104, barycenter is clustered according to the target, determines the occupancy of current time.
By above-mentioned steps 101- steps 104, the occupancy of the embodiment of the present invention determines method, by setting with interior not
With multiple pir sensors of position, multiple PIR sensings within multiple sample collection periods before current time are first obtained
First triggering information of device;Then, using the first triggering information as the attribute information of sample, training sample is built;Afterwards, base
The training sample is clustered in clustering algorithm, obtains target cluster barycenter;Finally, barycenter is clustered according to the target to determine
The occupancy of current time.In this way, being used as sample attribute by the triggering information of pir sensor builds training sample, and make
The occupancy of current time is determined with the target cluster barycenter after cluster, without gathering off-the-air picture, preferably in fact
Now to the protection of individual privacy.
Moreover, the method for the embodiment determines occupancy without the requirement to indoor light compared to by Image Acquisition
Mode, can also avoid the interference of indoor light, it is simple easily to realize, it is easy to utilize.
In the embodiment, the first triggering information includes:The number of pir sensor triggering and the PIR triggered successively are passed
Spacing accumulated value between sensor.
It should be appreciated that pir sensor detects the movable radiation source (transmitting thermal energy ray) in its detection range, so
When people's activity in detection range, pir sensor signal becomes 1 from 0, that is, is activated.In this way, by monitoring pir sensor
The first signal recognize whether pir sensor triggers, obtain triggering times.And between the pir sensor triggered successively between
Away from accumulated value, can be determined with reference to room floor plan.As shown in Fig. 2, interior is provided with 8 pir sensors (P01-P08), root
It is as shown in Figure 3 that reference axis is established according to room floor plan, you can the specific coordinate position of each pir sensor is obtained, when touching successively
When the pir sensor of hair is P02, P08, P01, P05 and P06, continuous touch is calculated by the coordinate of this 5 pir sensors
The distance between each two sensor of hair, summation as trigger the spacing accumulated value between this 5 pir sensors, a+b successively
+c+d。
Therefore, specifically, step 101 includes:
Step 1011, monitoring is arranged at the first signal of multiple pir sensor triggerings of indoor different position;
Step 1012, according to first signal, in multiple sample collection periods before counting the current time,
Spacing accumulated value between the number of pir sensor triggering and the pir sensor triggered successively;Wherein,
The multiple sample collection period is belonged in the first preset time period in one day together.
Through step 1011 and step 1012, by the first signal for monitoring the multiple pir sensors set, it becomes possible to count
The number of pir sensor triggering in multiple sample collection periods before obtaining current time and the PIR triggered successively are passed
Spacing accumulated value between sensor.
However, the different time sections in one day, the active state of people has differences, such as diurnal liveness
It is higher, and the liveness of activity is then relatively low at night, it is therefore, multiple in the embodiment in order to ensure the specific aim of sample collection
The sample collection period is belonged in the first preset time period in one day together.Exemplified by when the 24 of one day is small, first it is default when
Between section can be【0,6】、【6,12】、【12,18】Or【18,24】Any time period or【0,8】、【8,16】Or
【16,24】Any time period etc., will not enumerate herein.
It should also be appreciated that in the embodiment, in order to determine each sample collection period, with it is outdoor connect it is big
Door position is also provided with door status sensor.So the sample collection period is to be arranged at the gate position connected with outdoor
Door status sensor trigger the time interval of secondary signal twice, and monitor in the time interval an at least PIR sense
Device triggers the first signal.
Door status sensor is capable of the folding condition variation of induction door, and secondary signal is triggered when door is opened, and in door quilt
It is not triggered then after closing.Door status sensor D01 is being arranged to gate position as shown in Figure 2, it becomes possible to by monitoring door sensor
The secondary signal of sensor-triggered, it is first determined door status sensor triggers the time interval of secondary signal twice.In view of first
The secondary secondary signal monitored may be to open door when last indoor people goes out to trigger, and second monitored for the second time
Signal may be that the people of indoor first entrance opens door and triggers, this not presence of people in time interval twice, so, really
After determining the time interval that door status sensor triggers secondary signal twice, it is also predefined in the time interval and monitors at least one
Pir sensor triggers the first signal, in this way, the time interval could be used as a sample acquisition time section.Certainly, monitoring door is passed through
The secondary signal of Magnetic Sensor triggering and the first signal of pir sensor triggering, determine that door status sensor triggers the second letter twice
Number time interval in without pir sensor trigger the first signal, then can determine in this time interval indoor no one.
Afterwards, such as step 102, the spacing between the number of pir sensor triggering and the pir sensor triggered successively is tired out
The value added attribute information as sample builds training sample.Wherein, in order to gather can subsequently obtain more efficiently target
Class barycenter will be often obtained, it is necessary to a large amount of training samples numbers in the earlier month of current time, in even longer time half a year
Sample collection period, the first triggering information of pir sensor.
After building training sample, then training sample can be clustered by clustering algorithm, obtain target cluster matter
The heart, to determine the occupancy of current time.Preferably, in the embodiment, step 103 further comprises:According to indoor normal
The training sample is handled in number and K-means clustering algorithms, obtains the poly- of the corresponding indoor resident number
Class and target cluster barycenter.
Specifically, as shown in figure 4, step 103, including:
Step 1031, according to the indoor resident number k, k cluster barycenter is set;
Step 1032, the sample heart distance of the training sample and each cluster barycenter is calculated;
Step 1033, the training sample is belonged to the cluster barycenter minimum with the sample heart of itself distance, k is obtained and gathers
Class;
Step 1034, iterate to calculate the cluster barycenter that each clusters, and return it is described calculate the training sample with it is each
Cluster the sample heart of barycenter apart from the step of, until the new cluster barycenter of gained and the distance of cluster barycenter before are less than or wait
In pre-determined distance;Wherein, the cluster barycenter is the mean place point of all training samples in same cluster;
Step 1035, determine that current cluster barycenter clusters barycenter for target.
Being known as the first triggering information of training sample attribute information in the above content includes pir sensor triggering
Spacing accumulated value s between number c and the pir sensor triggered successively, therefore respectively with the number of pir sensor triggering and successively
Spacing accumulated value between the pir sensor of triggering is reference axis, you can obtains sample point of the training sample on two dimensional surface
Position, and then the training sample to largely meeting condition clusters.
It in the embodiment, is clustered using K-means clustering algorithms, K-means algorithms are hard clustering algorithms, are typical cases
The object function clustering method based on prototype representative, it is data point to certain the target letter of distance as an optimization of prototype
Number asks the method for extreme value to obtain the adjustment rule of interative computation using function.Such as step 1031, number is resided first, in accordance with interior
K sets k cluster barycenter Zr(l), r=1,2,3 ... k, at this point, this k clusters barycenter initial setting, l=1.
Wherein, K-means algorithms are using Euclidean distance as similarity measure, it be ask corresponding a certain initial cluster center to
Measure optimal classification so that evaluation index is minimum.Assuming that given data set X={ xm| m=1,2,3 ... ..., total }, share m
A data point, the A of the d description attribute of sample in X1, A2... AdTo represent.Data sample xi=(xi1,xi2,…xid), xj
=(xj1,xj2…xjd), wherein xi1,xi2,…xidAnd xj1,xj2…xjdIt is sample x respectivelyiAnd xjCorresponding d description A1, A2... Ad
Specific value.Similarity Euclidean distance d (x between samplei,xj) represent, formula is as follows:
Distance is smaller between sample, and the diversity factor of sample is smaller, otherwise bigger.This distance is that K-means algorithms are clustered
The important evidence of sub-clustering.
So after step 1031, step 1032, the sample heart distance of training sample and each cluster barycenter is calculated.The reality
A sample point can be obtained by applying the first triggering information of each sample collection period in example, and substantial amounts of sample point forms data
Collect X { xq| q=1,2,3 ... n }, share n data point.Each data point is calculated with clustering sample heart distance i.e. the Europe of barycenter
Formula distance d (xq, Zr(l)), xq={ cq, sq}。
In next step, such as step 1033, the training sample is belonged to the cluster barycenter minimum with the sample heart of itself distance,
Obtain k cluster.I.e. if meeting d (xq, Zk(l))=min { d (xq, Zr(l)), q=1,2,3 ... n }, then xq∈Xk。
And in order to which cluster is made to reach optimal, in next step, such as step 1034, to iterate to calculate and each cluster new cluster matter
The heart, and return to step 1032, calculate the sample heart of training sample and each cluster barycenter apart from the step of, cluster again, until setting
The distance of fixed new cluster barycenter and cluster barycenter before is less than or equal to pre-determined distance.Wherein, the cluster of calculating is passed through
Barycenter is the mean place point of all training samples in same cluster.In r-th of cluster, new cluster barycenter Zr(l+1)
Determine that formula is as follows:
Wherein, nrRepresent the data point number in r-th of cluster, xi rRepresent the position of data point i in r-th of cluster, it can
To determine its position such as coordinate (c by sample attribute c and si, si).After the heart for resetting new cluster, return to step 1033, directly
Distance to the new cluster barycenter and cluster barycenter before of setting is less than or equal to pre-determined distance.
Since K-means algorithms are using criterion function evaluation clustering performance, usual criterion function is square error and criterion
Function SEE (sum of the squared error), it is assumed that data set X includes k cluster X1, X2, X3... Xk;Each cluster
In data point number be n respectively1, n2, n3... nk;The barycenter of each cluster is respectively m1, m2, m3... mk, then the formula of SEE
It is as follows:
Wherein, p be ith cluster in data point, mkFor the average value of all data points in ith cluster.The implementation
In example, whether new cluster barycenter overlaps with cluster barycenter before, then can also judge whether it has restrained by SEE, if
Convergence i.e. cluster is completed.
After the completion of cluster, such as step 1035, determine that current cluster barycenter clusters barycenter for target.Certainly, final k
Cluster and its target cluster barycenter also can just correspond to and calibrate occupancy, be determined for the occupancy to current time.
Further, step 104 includes:
Step 1041, the second triggering letter of pir sensor in the second preset time period for including the current time is obtained
Breath;Wherein, second preset time period belongs to the first preset time in one day with the multiple sample collection period
In section;
Step 1042, using the described second triggering information as the attribute information of point to be determined, barycenter is clustered in the target
In determine the target cluster barycenter minimum with the point distance to be determined, obtain the occupancy of current time.
In this way, after target cluster barycenter is determined, obtain PIR in the second preset time period for including current time and sense
The second triggering information (the spacing accumulated value between the number of pir sensor triggering and the pir sensor triggered successively) of device, makees
Position of the point to be determined on two dimensional surface is limited for the attribute information of point to be determined, is calculated this respectively and is determined point and each mesh
The distance of mark cluster barycenter determines the minimum target cluster barycenter of distance, and then, the interior demarcated by target cluster barycenter
Number is just capable of determining that the occupancy of current time.
Certainly, the second preset time period of the second triggering information and multiple sample collection times of composing training sample before
Section is belonged in the first preset time period in one day, ensure that final result has higher accuracy.
In embodiments of the present invention, it is ensured that the accuracy of result, required training samples number is larger, attribute letter
The value range difference of breath also just it is bigger, and in order to when calculating Euclidean distance in the presence of the feelings that cannot really reflect distinctiveness ratio
Condition will standardize to property value before cluster, and each property value is mapped to identical interval in proportion, and mapping is public
Formula is as follows:
Wherein, max (ai) and min (ai) represent the maximum of ith attribute in all data
Value and minimum value.
In conclusion the definite method of the occupancy of the embodiment of the present invention, monitoring door status sensor and pir sensor
Signal selects the number that pir sensor triggers in multiple sample collection periods before current time and the PIR biographies triggered successively
Attribute information of the spacing accumulated value as K-means clustering algorithm samples between sensor, according to mesh after being clustered by K-means
Cluster centre is marked, the occupancy of current time is determined, protects individual privacy, the interference for avoiding indoor light, and
It is simple easily to realize, it is easy to utilize.
Second embodiment
As shown in figure 5, second embodiment of the invention additionally provides a kind of determining device of occupancy, including:
Acquisition module 501 for obtaining in multiple sample collection periods before current time, is arranged at indoor difference
First triggering information of the infrared pir sensor of multiple passive types of position;
Module 502 is built, for the attribute information using the described first triggering information as sample, builds training sample;
Processing module 503 clusters the training sample for being based on clustering algorithm, obtains target cluster barycenter;
Determining module 504 for clustering barycenter according to the target, determines the occupancy of current time.
Wherein, the first triggering information includes:The number of pir sensor triggering and the pir sensor that triggers successively it
Between spacing accumulated value;
The acquisition module includes:
Submodule is monitored, for monitoring the first letter of the multiple pir sensor triggerings for being arranged at indoor different position
Number;
Statistic submodule, during for according to first signal, counting multiple sample collections before the current time
Between in section, the spacing accumulated value between the number of pir sensor triggering and the pir sensor triggered successively;Wherein,
The multiple sample collection period is belonged in the first preset time period in one day together.
Wherein, the processing module is further used for according to the resident number in interior and K-means clustering algorithms to described
Training sample is handled, and obtains the cluster and target cluster barycenter of the corresponding indoor resident number.
Wherein, the processing module includes:
First processing submodule, for according to the indoor resident number k, setting k cluster barycenter;
Second processing submodule, for calculating the sample heart distance of the training sample and each cluster barycenter;
3rd processing submodule, for the training sample to be belonged to the cluster matter minimum with the sample heart of itself distance
The heart obtains k cluster;
Fourth process submodule for iterating to calculate the cluster barycenter each clustered, and returns to the calculating training
The sample heart of sample and each cluster barycenter apart from the step of, until the new cluster barycenter of gained and cluster barycenter before away from
From less than or equal to pre-determined distance;Wherein, the cluster barycenter is the mean place point of all training samples in same cluster;
First determination sub-module, for determining that current cluster barycenter clusters barycenter for target.
Wherein, the determining module includes:
Acquisition submodule, for obtaining second of pir sensor in the second preset time period for including the current time
Trigger information;Wherein, what second preset time period and the multiple sample collection period were belonged in one day is first pre-
If in the period;
Second determination sub-module, for the attribute information using the described second triggering information as point to be determined, in the mesh
The target cluster barycenter minimum with the point distance to be determined is determined in mark cluster barycenter, obtains the occupancy of current time.
Wherein, the sample collection period is to be arranged to touch twice with the door status sensor of the outdoor gate position connected
The time interval of secondary signal is sent out, and monitors that pir sensor triggers the first signal in the time interval.
The determining device of the occupancy of the embodiment of the present invention monitors the signal of door status sensor and pir sensor, selection
Before current time in multiple sample collection periods between the number of pir sensor triggering and the pir sensor triggered successively
Attribute information of the spacing accumulated value as K-means clustering algorithm samples, according in target cluster after being clustered by K-means
The heart determines the occupancy of current time, protects individual privacy, the interference for avoiding indoor light, and simple easily real
It is existing, it is easy to utilize.
It should be noted that the device is the device for the definite method for applying above-mentioned occupancy, above-mentioned occupancy
Definite method embodiment realization method be suitable for the device, can also reach identical technique effect.
3rd embodiment
Third embodiment of the invention additionally provides a kind of definite system of occupancy, including occupancy as described above
Determining device.
In addition, the definite system of the occupancy further includes the multiple pir sensors for being arranged at indoor different position and sets
It is placed in the door status sensor of the gate position connected with outdoor.
The definite system of the occupancy of the embodiment of the present invention, the definite device monitoring door status sensor of occupancy and
The signal of pir sensor selects before current time in multiple sample collection periods the number of pir sensor triggering and successively
Attribute information of the spacing accumulated value as K-means clustering algorithm samples between the pir sensor of triggering, passes through K-means
According to target cluster centre after cluster, determine the occupancy of current time, protect individual privacy, avoid indoor light
Interference, and it is simple easily realize, it is easy to utilize.
It should be noted that the system is the system for the definite method for applying above-mentioned occupancy, above-mentioned occupancy
Definite method embodiment realization method be suitable for the system, can also reach identical technique effect.
Explanation is needed further exist for, this many functional component described in this description is all referred to as module, so as to more
Add the independence for particularly emphasizing its realization method.
In the embodiment of the present invention, module can be realized with software, to be performed by various types of processors.Citing comes
It says, the executable code module of a mark can include the one or more physics or logical block of computer instruction, citing
For, object, process or function can be built as.Nevertheless, the executable code of institute's mark module is without physically
It is located together, but the different instructions being stored in different positions can be included, be combined together when in these command logics
When, it forms module and realizes the regulation purpose of the module.
In fact, executable code module can be the either many item instructions of individual instructions, and can even be distributed
On multiple and different code segments, it is distributed among distinct program and is distributed across multiple memory devices.Similarly, grasp
Making data can be identified in module, and can be realized according to any appropriate form and be organized in any appropriate class
In the data structure of type.The operation data can be collected or can be distributed on different position as individual data collection
(being included in different storage device), and can only be present at least partly as electronic signal in system or network.
When module can utilize software to realize, it is contemplated that the level of existing hardware technique, it is possible to implemented in software
Module, in the case of without considering cost, those skilled in the art can build corresponding hardware circuit to realize correspondence
Function, the hardware circuit includes conventional ultra-large integrated (VLSI) circuit or gate array and such as logic core
The existing semiconductor of piece, transistor etc either other discrete elements.Module can also use programmable hardware device, such as
The realizations such as field programmable gate array, programmable logic array, programmable logic device.
Above-mentioned exemplary embodiment is described with reference to those attached drawings, many different forms and embodiment be it is feasible and
Without departing from spirit of the invention and teaching, therefore, the present invention should not be construed to propose the limitation of exemplary embodiment at this.
More precisely, these exemplary embodiments are provided so that the present invention can be perfect and complete, and can be by the scope of the invention
It is communicated to those those of skill in the art.In those schemas, size of components and relative size are perhaps based on for the sake of clear
And it is exaggerated.Term used herein is based only on description particular example embodiment purpose, and being not intended to, which becomes limitation, uses.Such as
Use ground at this, unless the interior text clearly refers else, otherwise the singulative " one ", "one" and "the" be intended to by
Those multiple forms are also included.Those term "comprising"s and/or " comprising " will become further apparent when being used in this specification,
It represents the presence of the feature, integer, step, operation, component and/or component, but is not excluded for one or more other features, whole
Number, step, operation, component, component and/or the presence of its group or increase.Unless otherwise indicated, narrative tense, a value scope bag
Bound containing the scope and any subrange therebetween.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, without departing from the principles of the present invention, several improvements and modifications can also be made, these improvements and modifications
It should be regarded as protection scope of the present invention.
Claims (13)
1. a kind of definite method of occupancy, which is characterized in that including:
In multiple sample collection periods before acquisition current time, the multiple passive types for being arranged at indoor different position are infrared
First triggering information of pir sensor;
Using the described first triggering information as the attribute information of sample, training sample is built;
The training sample is clustered based on clustering algorithm, obtains target cluster barycenter;
Barycenter is clustered according to the target, determines the occupancy of current time.
2. the definite method of occupancy according to claim 1, which is characterized in that the first triggering information includes:
Spacing accumulated value between the number of pir sensor triggering and the pir sensor triggered successively;
In multiple sample collection periods before the acquisition current time, multiple passive types of indoor different position are arranged at
The step of first triggering information of infrared pir sensor, including:
Monitoring is arranged at the first signal of multiple pir sensor triggerings of indoor different position;
According to first signal, in multiple sample collection periods before counting the current time, pir sensor triggering
Number and the pir sensor that triggers successively between spacing accumulated value;Wherein,
The multiple sample collection period is belonged in the first preset time period in one day together.
3. the definite method of occupancy according to claim 1, which is characterized in that the clustering algorithm that is based on is to described
Training sample is clustered, and obtains the step of target clusters barycenter, including:
The training sample is handled according to the resident number in interior and K-means clustering algorithms, obtains corresponding to the room
Cluster and target the cluster barycenter of interior resident number.
4. the definite method of occupancy according to claim 3, which is characterized in that it is described according to the resident number in interior with
And K-means clustering algorithms handle the training sample, obtain the cluster and target of the corresponding indoor resident number
The step of clustering barycenter, including:
According to the indoor resident number k, k cluster barycenter is set;
Calculate the sample heart distance of the training sample and each cluster barycenter;
The training sample is belonged to the cluster barycenter minimum with the sample heart of itself distance, obtains k cluster;
The cluster barycenter each clustered is iterated to calculate, and returns to the sample heart for calculating the training sample and each cluster barycenter
Apart from the step of, until gained cluster barycenter with before cluster barycenter distance be less than or equal to pre-determined distance;Wherein, institute
State mean place point of the cluster barycenter for all training samples in same cluster;
Determine that current cluster barycenter clusters barycenter for target.
5. the definite method of occupancy according to claim 1, which is characterized in that described that matter is clustered according to the target
The heart, the step of determining the occupancy of current time, including:
Obtain the second triggering information of pir sensor in the second preset time period for including the current time;Wherein, described
Two preset time periods are belonged to the multiple sample collection period in the first preset time period in one day;
Using the described second triggering information as the attribute information of point to be determined, determine to treat with described in the target clusters barycenter
It determines the minimum target cluster barycenter of point distance, obtains the occupancy of current time.
6. the definite method of occupancy according to claim 1, which is characterized in that the sample collection period is to set
The door status sensor for being placed in the gate position connected with outdoor triggers the time interval of secondary signal twice, and between the time
Monitor that an at least pir sensor triggers the first signal every interior.
7. a kind of determining device of occupancy, which is characterized in that including:
Acquisition module for obtaining in multiple sample collection periods before current time, is arranged at indoor different position
First triggering information of multiple infrared pir sensors of passive type;
Module is built, for the attribute information using the described first triggering information as sample, builds training sample;
Processing module clusters the training sample for being based on clustering algorithm, obtains target cluster barycenter;
Determining module for clustering barycenter according to the target, determines the occupancy of current time.
8. the determining device of occupancy according to claim 7, which is characterized in that the first triggering information includes:
Spacing accumulated value between the number of pir sensor triggering and the pir sensor triggered successively;
The acquisition module includes:
Submodule is monitored, for monitoring the first signal of the multiple pir sensor triggerings for being arranged at indoor different position;
Statistic submodule, for according to first signal, multiple sample collection periods before counting the current time
It is interior, the spacing accumulated value between the number of pir sensor triggering and the pir sensor triggered successively;Wherein,
The multiple sample collection period is belonged in the first preset time period in one day together.
9. the determining device of occupancy according to claim 7, which is characterized in that the processing module is further used for
The training sample is handled according to the resident number in interior and K-means clustering algorithms, is obtained corresponding described indoor normal
Cluster and target in number cluster barycenter.
10. the determining device of occupancy according to claim 9, which is characterized in that the processing module includes:
First processing submodule, for according to the indoor resident number k, setting k cluster barycenter;
Second processing submodule, for calculating the sample heart distance of the training sample and each cluster barycenter;
3rd processing submodule, for the training sample to be belonged to the cluster barycenter minimum with the sample heart of itself distance, obtains
To k cluster;
Fourth process submodule for iterating to calculate the cluster barycenter each clustered, and returns to the calculating training sample
With the sample heart of each cluster barycenter apart from the step of, until the new cluster barycenter of gained and the distance for clustering barycenter before are small
In or equal to pre-determined distance;Wherein, the cluster barycenter is the mean place point of all training samples in same cluster;
First determination sub-module, for determining that current cluster barycenter clusters barycenter for target.
11. the determining device of occupancy according to claim 7, which is characterized in that the determining module includes:
Acquisition submodule, for obtaining second of pir sensor in the second preset time period for including the current time the triggering
Information;Wherein, second preset time period and the multiple sample collection period belong in one day first it is default when
Between in section;
Second determination sub-module, for using the described second triggering information as the attribute information of point to be determined, gathering in the target
The target cluster barycenter minimum with the point distance to be determined is determined in class barycenter, obtains the occupancy of current time.
12. the determining device of occupancy according to claim 7, which is characterized in that the sample collection period is
The door status sensor for being arranged at the gate position connected with outdoor triggers the time interval of secondary signal twice, and in the time
Monitor that an at least pir sensor triggers the first signal in interval.
13. the definite system of a kind of occupancy, which is characterized in that including in such as claim 7 to 12 any one of them room
The determining device of number.
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 true CN108121992A (en) | 2018-06-05 |
CN108121992B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113347753A (en) * | 2021-08-06 | 2021-09-03 | 深圳特朗达照明股份有限公司 | LED self-adaptive control method, system and readable storage medium |
Citations (7)
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 |
US20130182115A1 (en) * | 2012-01-12 | 2013-07-18 | Clayton D. Willis | Apparatus, System and Method for Electronic Motion 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 |
-
2016
- 2016-11-29 CN CN201611071595.5A patent/CN108121992B/en active Active
Patent Citations (7)
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 |
US20130182115A1 (en) * | 2012-01-12 | 2013-07-18 | Clayton D. Willis | Apparatus, System and Method for Electronic Motion 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)
Title |
---|
F. WAHL 等: "A distributed PIR-based approach for estimating people count in office environments", 《2012 IEEE 15TH INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE AND ENGINEERING》 * |
JOHN LOANE 等: "Interpreting Presence Sensor Data and Looking for Similarities Between Homes Using Cluster Analysis", 《2011 5TH INTERNATIONAL CONFERENCE ON PERVASIVE COMPUTING TECHNOLOGIES FOR HEALTHCARE (PERVASIVEHEALTH) AND WORKSHOPS》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113347753A (en) * | 2021-08-06 | 2021-09-03 | 深圳特朗达照明股份有限公司 | LED self-adaptive control method, system and readable storage medium |
CN113347753B (en) * | 2021-08-06 | 2021-11-09 | 深圳特朗达照明股份有限公司 | LED self-adaptive control method, system and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108121992B (en) | 2020-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11093671B2 (en) | Structural design systems and methods to define areas of interest for modeling and simulation-based space planning | |
US9501915B1 (en) | Systems and methods for analyzing a video stream | |
Yang et al. | A multi-sensor based occupancy estimation model for supporting demand driven HVAC operations | |
EP2950285B1 (en) | Automatic configuration of a replacement camera | |
US20180137858A1 (en) | Controlling connected devices using a relationship graph | |
CN106796511A (en) | For the distributed rule engine of healthy and strong sensor network | |
CN104883278A (en) | Method for classifying network equipment by utilizing machine learning | |
CN106647677A (en) | Intelligent management system | |
WO2014150895A1 (en) | Energy saving heating, ventilation, air conditioning control system | |
WO2022227775A1 (en) | Method and device for controlling air conditioner, and air conditioner | |
US10748024B2 (en) | Method and system for detecting a person in an image based on location in the image | |
US20210074099A1 (en) | Method and system for providing access control | |
Morgner et al. | Privacy implications of room climate data | |
CN109101931A (en) | A kind of scene recognition method, scene Recognition device and terminal device | |
CN110264495A (en) | A kind of method for tracking target and device | |
EP3602491A1 (en) | Thermal image occupant detection | |
CN106357805A (en) | Application-place monitoring method, device and system | |
CN110908340A (en) | Smart home control method and device | |
CN110007832A (en) | Information terminal device, information processing system and be stored with display control program computer-readable non-transitory storage medium | |
CN108121992A (en) | The definite method, apparatus and system of a kind of occupancy | |
CN114005235A (en) | Security monitoring method, system, medium and electronic terminal | |
CA3039375A1 (en) | Neural network combining visible and thermal images for inferring environmental data of an area of a building | |
CN109615750A (en) | The recognition of face control method and device of door access machine, access control equipment, storage medium | |
WO2020231782A1 (en) | Deployment method and system for wireless sensing apparatus | |
CN106774010B (en) | A kind of movable-type intelligent steward system |
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 |