CN112051621A - Method and device for judging whether people are in room or not - Google Patents

Method and device for judging whether people are in room or not Download PDF

Info

Publication number
CN112051621A
CN112051621A CN201910754512.XA CN201910754512A CN112051621A CN 112051621 A CN112051621 A CN 112051621A CN 201910754512 A CN201910754512 A CN 201910754512A CN 112051621 A CN112051621 A CN 112051621A
Authority
CN
China
Prior art keywords
room
probability
person
data
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.)
Granted
Application number
CN201910754512.XA
Other languages
Chinese (zh)
Other versions
CN112051621B (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.)
Henan Zilian Internet Of Things Technology Co ltd
Original Assignee
Henan Zilian Internet Of Things Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Henan Zilian Internet Of Things Technology Co ltd filed Critical Henan Zilian Internet Of Things Technology Co ltd
Priority to CN201910754512.XA priority Critical patent/CN112051621B/en
Publication of CN112051621A publication Critical patent/CN112051621A/en
Application granted granted Critical
Publication of CN112051621B publication Critical patent/CN112051621B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V9/00Prospecting or detecting by methods not provided for in groups G01V1/00 - G01V8/00

Abstract

The invention relates to a method and a device for judging the state of people in a room without people, belonging to the field of intelligent home furnishing, wherein the method comprises the steps of storing historical environment data of people and people in the room, wherein the historical environment data at least comprises data of one environment characteristic, calculating the conditional probability of each environment characteristic in the historical environment data of people and people in the corresponding room by respectively utilizing the historical environment data of people and people in the room, and calculating according to the positive correlation between the conditional probabilities of people in the room and the probability of people in the room to obtain the probability of people in the room at the moment corresponding to the current environment data; and calculating according to the positive correlation between the conditional probabilities when no person exists in the room and the probability of no person in the room to obtain the probability of no person in the room at the moment corresponding to the current environment data. And finally, whether a person exists in the room is judged by utilizing the larger probability of the person and the probability of no person, the judgment reliability is high, and the problem of failure judgment is solved.

Description

Method and device for judging whether people are in room or not
Technical Field
The invention belongs to the field of intelligent home furnishing, and particularly relates to a method and a device for judging the state of people in a room.
Background
At present, the method can accurately judge whether people are in a room, and plays a crucial role in determining that an intelligent control system automatically changes the control mode (such as a comfortable or energy-saving mode) of the room and automatically controls indoor equipment. For example, when the room is judged to be 'unmanned', the system can automatically turn off energy consumption equipment such as indoor air conditioners and lamplight, and unnecessary energy waste is avoided; when the 'people' in the room is judged, the control logic of the room is converted into a preset mode (such as a comfortable mode), and when indexes such as temperature, humidity, air quality or illumination and the like do not reach a set optimal value, indoor equipment can be controlled to be automatically started to operate, or the indoor equipment can be used for systems such as security alarm and the like.
In the prior art, the research on the judgment of the presence or absence of people in a room mainly focuses on the following aspects:
(1) the presence or absence of a person in a current room is determined by motion detection, and a sensor generally used includes: the intelligent door and window detection system comprises an infrared human body detector, an intelligent door magnetic sensor, an intelligent camera and the like, and can detect moving objects or door and window opening and closing actions so as to judge the state of people in a current room. The sensors belong to invasive sensors, are mostly deployed in places such as outdoors and doorways in personal home environments, and prevent the situation that the indoor conditions cannot be well judged due to the limited detection range of the sensors at fixed positions such as doorways and the like, detection dead angles exist, when people in a room are in the detection dead angles, the motion detection judgment method is invalid, and the judgment reliability is low.
(3) Whether people exist in a current room is judged through WIFI signals or GPS positioning detection, the method has certain limitation, a user is required to hold a mobile phone by hands or put the mobile phone in a pocket, and once the mobile phone is used for not carrying the mobile phone with the user, the method is invalid in judgment, so that the method is low in applicability and poor in reliability.
Disclosure of Invention
The invention aims to provide a method and a device for judging the presence or absence state of a person in a room, which are used for solving the problem of low reliability in the prior art for judging the presence or absence of the person in the room.
Based on the above purpose, a first technical scheme of a method for judging whether a person is in a room or not by calculating the probability of the person in the room and the probability of the absence of the person in the room is as follows:
storing historical environmental data of people and no people in a room, wherein the historical environmental data at least comprises data of one environmental characteristic, and the environmental characteristic comprises: carbon dioxide concentration, illumination intensity and noise decibel;
the method comprises the following steps of collecting current environment data in a room, and calculating the probability of people and the probability of no people in the room at the moment corresponding to the current environment data, wherein the calculation mode of the probability of people is as follows: taking the historical environment data of people as samples, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when people exist in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the probability of people in the room at the moment corresponding to the current environment data, so that the probability of people is positively correlated with each conditional probability;
the calculation mode of the unmanned probability is as follows: taking the historical environment data of nobody as a sample, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when no person exists in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the nobody probability in the room at the moment corresponding to the current environment data, so that the nobody probability is positively correlated with each conditional probability;
and judging whether the room is occupied at the moment corresponding to the current environment data according to the greater probability of the probability of being occupied and the probability of being unoccupied.
The beneficial effects of the above technical scheme are:
the invention utilizes the historical environment data of the presence and absence of people in the room and the historical environment data of the presence and absence of people in the room to calculate the conditional probability of each environment characteristic in the historical environment data of the presence and absence of people in the room, and the operation is carried out according to the positive correlation between the conditional probabilities and the probability of the presence of people in the room, thereby obtaining the probability of the presence of people in the room at the moment corresponding to the current environment data.
Meanwhile, the conditional probabilities of all the environmental features in the historical environment data when no person exists in the room are calculated by utilizing the historical environment data when no person exists in the room, and the operation is carried out according to the positive correlation between the conditional probabilities and the probability of no person in the room, so that the probability of no person in the room at the moment corresponding to the current environment data is obtained. And finally, whether a person exists in the room is judged by utilizing the higher probability of the person and the probability of the absence of the person, compared with the method in the prior art, the method has high reliability, and the problem of failure judgment does not exist.
In order to ensure the reliability of the determination method of the present invention, one embodiment of calculating the conditional probability is:
the conditional probability under a certain environmental characteristic in the current environmental data when the room is occupied is as follows:
Figure BDA0002168305970000031
in the formula (I), the compound is shown in the specification,
Figure BDA0002168305970000032
for environmental characteristics when a person is present in a room
Figure BDA0002168305970000033
The conditional probability of (a) of (b),
Figure BDA0002168305970000034
wherein
Figure BDA0002168305970000035
Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibel at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu.s1Corresponding environmental characteristics in historical environmental data for people in a room
Figure BDA0002168305970000036
Average value of (a)1Corresponding environmental characteristics in historical environmental data for people in a room
Figure BDA0002168305970000037
The variance of the value of (a).
The conditional probability under a certain environmental characteristic in the current environmental data when the room is unmanned is as follows:
Figure BDA0002168305970000038
in the formula (I), the compound is shown in the specification,
Figure BDA0002168305970000041
for environmental characteristics when no person is in the room
Figure BDA0002168305970000042
Conditional probability of (d), mu2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure BDA0002168305970000043
Average value of (a)2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure BDA0002168305970000044
The variance of the value of (a).
In order to improve the accuracy of judging whether a person is in the room or not, when the current environment data corresponds to the probability of the person in the room at the moment, the operation is carried out by multiplying the conditional probabilities by the prior probabilities of the person in the room and the person in the room in the historical environment data of the person in the room and the person not in the room.
Meanwhile, when the probability of no person in the room at the moment corresponding to the current environment data is obtained, the operation is performed in such a way that the conditional probabilities are multiplied and then multiplied by the prior probability of the presence of a person in the room and the absence of a person in the room in the historical environment data of the absence of a person, so that the misjudgment of the presence of a person in the room and the absence of a person in the room is reduced.
Based on the above purpose, a second technical scheme of the method for judging the presence or absence of a person in a room is to judge whether the person is in the room by calculating the probability of the person in the room, and the specific scheme is as follows:
storing historical environmental data of a person in a room, the historical environmental data at least comprising data of one environmental characteristic, the environmental characteristic comprises: carbon dioxide concentration, illumination intensity and noise decibel;
the method comprises the following steps of collecting current environment data in a room, and calculating the probability of people in the room at the moment corresponding to the current environment data, wherein the calculation mode is as follows: taking the historical environment data of people as samples, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when people exist in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the probability of people in the room at the moment corresponding to the current environment data, so that the probability of people is positively correlated with each conditional probability;
and comparing the probability of the person with a set probability threshold, and judging whether the person exists in the room at the moment corresponding to the current environment data according to the comparison result.
The beneficial effects of the above technical scheme are:
according to the invention, the condition probability of each environmental characteristic in the historical environment data when people exist in the room is calculated by collecting the historical environment data when people exist in the room and utilizing the historical environment data when people exist in the room, and the operation is carried out according to the positive correlation between the condition probabilities and the probability of people in the room, so that the current environment data corresponds to the probability of people in the room at the moment. And finally, judging whether a person exists in the room or not by utilizing a comparison result between the probability of the person and a set probability threshold, wherein compared with the judging method in the prior art, the judging method has the advantages that the problem of method failure does not exist, and the judging reliability is high.
In order to ensure the reliability of the judging method of the invention, the conditional probability under a certain environmental characteristic in the current environmental data is as follows:
Figure BDA0002168305970000051
in the formula (I), the compound is shown in the specification,
Figure BDA0002168305970000052
for environmental characteristics when a person is present in a room
Figure BDA0002168305970000053
The conditional probability of (a) of (b),
Figure BDA0002168305970000054
wherein
Figure BDA0002168305970000055
Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibel at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu.s1Corresponding environmental characteristics in historical environmental data for people in a room
Figure BDA0002168305970000056
Average value of (a)1Corresponding environmental characteristics in historical environmental data for people in a room
Figure BDA0002168305970000057
The variance of the value of (a).
In order to improve the accuracy of judging whether a person is in the room or not, the method further comprises the step of pre-storing historical environment data of the absence of the person in the room, and the operation is to multiply all the conditional probabilities after being multiplied and then multiply the prior probabilities of the presence of the person in the room and the absence of the person in the room in the historical environment data, so that the probability of the presence of the person in the room at the moment corresponding to the current environment data is obtained, and the misjudgment of the presence of the person in the room and the absence of the person in the room is reduced.
Based on the above purpose, a third technical scheme of the method for judging the presence or absence of a person in a room is to judge whether the person is present in the room by calculating the probability of absence in the room, and the specific scheme is as follows:
storing historical environmental data of the room when no person is present, wherein the historical environmental data at least comprises data of environmental characteristics, and the environmental characteristics comprise: carbon dioxide concentration, illumination intensity and noise decibel;
the method comprises the following steps of collecting current environment data in a room, and calculating the probability of no person in the room at the moment corresponding to the current environment data, wherein the calculation mode is as follows: taking the historical environment data of nobody as a sample, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when no person exists in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the nobody probability in the room at the moment corresponding to the current environment data, so that the nobody probability is positively correlated with each conditional probability;
and comparing the unmanned probability with a set probability threshold, and judging whether people exist in the room at the moment corresponding to the current environment data according to the comparison result.
The beneficial effects of the above technical scheme are:
according to the invention, the conditional probability of each environmental characteristic in the historical environment data when no person exists in the room is calculated by collecting the historical environment data when no person exists in the room and utilizing the historical environment data when no person exists in the room, and the operation is carried out according to the positive correlation between the conditional probabilities and the probability of no person in the room, so that the current environment data corresponds to the probability of no person in the room at the moment. And finally, judging whether a person exists in the room or not by utilizing a comparison result between the unmanned probability and a set probability threshold, wherein compared with the judging method in the prior art, the method has the advantages that the problem of method failure does not exist, and the judging reliability is high.
In order to ensure the accuracy of judgment of a person in a room, the conditional probability of a certain environmental characteristic in the current environmental data is as follows:
Figure BDA0002168305970000061
in the formula (I), the compound is shown in the specification,
Figure BDA0002168305970000062
for environmental characteristics when no person is in the room
Figure BDA0002168305970000063
The conditional probability of (a) of (b),
Figure BDA0002168305970000064
wherein
Figure BDA0002168305970000065
Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibel at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu.s2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure BDA0002168305970000066
Average value of (a)2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure BDA0002168305970000067
The variance of the value of (a).
In order to improve the accuracy of judging whether a person is in the room or not, the method further comprises the step of pre-storing historical environment data of the person in the room, wherein the operation is to multiply all the conditional probabilities after being multiplied, and then multiply the prior probabilities of the person in the room and the person in the unmanned historical environment data when the person is not in the room, so that the probability of the absence of the person in the room at the moment corresponding to the current environment data is obtained, and the misjudgment of the person in the room and the absence of the person in the room is reduced.
Based on the above purpose, a technical scheme of the device for judging the state that people are not in a room is as follows:
the system comprises a memory, a processor and a computer program which is stored on the memory and runs on the processor, wherein the processor is coupled with the memory, and when the processor executes the computer program, the method for judging the existence state of any one of the first technical scheme to the third technical scheme is realized.
Drawings
FIG. 1 is a flow chart of the present invention for determining whether a person is present in a room;
FIG. 2 is a schematic diagram of the present invention trained using a naive Bayes model;
FIG. 3 is a schematic representation of features in historical environmental data of the present invention.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings.
The first embodiment of the method comprises the following steps:
a corresponding number of sensors are provided at appropriate locations in the room for collecting environmental data, and one embodiment of the sensors is to provide a sensor C1 for collecting light intensity near a window in the room, a sensor C2 for collecting carbon dioxide concentration near a sofa or bed in the room, and a sensor C3 for collecting noise decibels.
Then, when the user acts in the room according to the behavior habit of the user, the sensors (C1, C2 and C3) are utilized to collect environmental data within a period of time to be used as historical environmental data of people in the room, wherein the historical environmental data comprises three environmental characteristics of carbon dioxide concentration, illumination intensity and noise decibel; when the environment data of no person in the room is collected by the sensors and used as historical environment data of no person in the room, the historical environment data of the person in the room and the historical environment data of the person in the room are stored in the memory.
According to historical environment data of people and no people in a room, a machine learning model of the relation between the people and all environment characteristic values in the room is established, and if the established naive Bayes model is as follows:
Figure BDA0002168305970000081
in the above model, P (Y ═ Y)1|X=XT) Represented in the current environment data XTProbability of someone in the lower room, XTIs the environmental data at the time T,
Figure BDA0002168305970000082
wherein
Figure BDA0002168305970000083
Respectively representing carbon dioxide concentration and illumination at T momentIntensity, decibel of noise values; p (Y ═ Y)1) And P (Y ═ Y)2) Respectively representing the prior probability of a person and of an nobody,
Figure BDA0002168305970000084
i=(1,2),n1and n2Respectively representing the number of the historical environment data when a person exists in the room and the number of the historical environment data when no person exists in the room, wherein N is N1+n2
Figure BDA0002168305970000085
Representing features of the environment when a person is present in the room
Figure BDA0002168305970000086
The conditional probability of (a) of (b),
Figure BDA0002168305970000087
representing features of the environment when nobody is in the room
Figure BDA0002168305970000088
J ═ 1,2,3), the expression is as follows:
Figure BDA0002168305970000089
wherein muiFor corresponding environmental characteristics
Figure BDA00021683059700000810
The average value of the environmental features of (1), namely the average value of the corresponding environmental features in the historical environmental data; sigmaiFor corresponding environmental characteristics
Figure BDA00021683059700000811
I.e. variance is calculated for the corresponding environmental eigenvalue in the historical environmental data.
Parameter mu in the naive Bayes modeli、σiAfter the historical environmental data are determined, a well-learned machine learning model is obtained, and each sensor is used for detectingAnd measuring current environment data in the room, substituting the environment characteristic value in the current environment data into the learned naive Bayes model to obtain the probability of the person in the room at the moment corresponding to the current environment data, and judging whether the room at the moment corresponding to the current environment data is the person according to the probability of the person. In one embodiment, a probability threshold (e.g., 0.75) of the probability of the presence of a person is set for comparison with the calculated probability of the presence of a person, and if the calculated probability of the presence of a person is greater than the probability threshold, it is determined that a person is present, and if the calculated probability of the presence of a person is not greater than the probability threshold, it is determined that no person is present.
After judging that people exist in the room at the moment corresponding to the current environment data, updating the current environment data into historical environment data according to the judgment result, and updating the parameter mu in the machine learning model according to the updated historical environment datai、σiTherefore, the naive Bayes model can predict the probability of someone in the room more accurately along with the increase of the collected historical environmental data, thereby further improving the reliability of the judging method.
Compared with the judging method in the prior art, the judging method has the advantages that the problem of method failure does not exist, and the judging reliability is high.
It should be noted that the environmental characteristics selected in this embodiment may be selected according to actual situations, for example, in the daytime, three environmental characteristics of carbon dioxide concentration, illumination intensity and noise decibel are selected, and in the nighttime, since the user in the room falls asleep, the environmental characteristic of noise decibel may not represent whether the room is occupied, so only two environmental characteristics of carbon dioxide concentration and illumination intensity may be selected, in this case,
Figure BDA0002168305970000091
the corresponding naive bayes model is also changed correspondingly to:
Figure BDA0002168305970000092
therefore, in this embodiment, the conditional probability of each environmental feature is obtained by using a naive bayes model, and then multiplied by a prior probability after a multiplication operation is performed, so as to calculate the probability of existence in a room, which is only an implementation manner. In another embodiment, the conditional probabilities of the environmental features may be logarithmized and then accumulated to obtain an accumulated value of the probability of presence and an accumulated value of the probability of absence, and then the accumulated values of the probability of presence and the probability of absence are compared to each other, and the larger one is used as the determination result.
The second method embodiment:
like the first embodiment of the method, the present embodiment also collects environmental data of people and nobody in the room over a period of time by using the sensors (C1, C2, C3) as historical environmental data of people and nobody in the room. The difference is that a machine learning model of the relationship between nobody in a room and all environment characteristic values is established according to historical environment data of the nobody and the nobody in the room, and the established model is as follows by taking a naive Bayes model as an example:
Figure BDA0002168305970000101
in the above model, P (Y ═ Y)2|X=XT) Represented in the current environment data XTThe first method embodiment is referred to for the unmanned probability in the lower room, and other symbolic representations and calculation methods in the model, which are not described in detail in this embodiment.
Similar to the first embodiment of the method, the parameter μ in the machine learning model is described abovei、σiAfter the historical environmental data are determined, a learned naive Bayes model is obtained, current environmental data in a room are detected by using each sensor, environmental characteristic values in the current environmental data are substituted into the learned naive Bayes model, and a current ring is obtainedAnd judging whether people exist in the room at the moment corresponding to the current environment data according to the probability of people.
One way to determine whether a person is present in the room is to set a probability threshold (e.g., 0.85) of a certain probability of absence for comparison with the calculated probability of absence, determine that no person is present if the calculated probability of absence is greater than the naive bayes model, and determine that a person is present if the calculated probability of absence is not greater than the naive bayes model.
The method comprises the steps that when a person is judged to be in a room at the moment corresponding to the current environment data, the current environment data are updated to historical environment data, and therefore the machine learning model is updated.
The third method embodiment:
the embodiment provides a method for judging the state of people in a room, which is a combined state judging method based on various sensors, and the method for judging the state of people in the room improves the accuracy of judgment of an environment sensor by using a machine learning technology to learn the behavior habits of users. The environment characteristics mainly adopted comprise carbon dioxide concentration, illumination intensity and noise decibel, and the environment data are measured by the sensor arranged in the first method embodiment. The judgment process is shown in fig. 1, and includes judgment of a manned mode and an unmanned mode, and as shown in fig. 1, the specific steps are as follows:
step (1), motion detection preliminary judgment:
in the manned mode, a 30-minute timer is started, and if an interrupt condition is triggered within 30 minutes, the timer is reset for 30 minutes; and (4) if the timer is up and the interrupt condition is not triggered, executing the step (2). As shown in fig. 1, the interrupt conditions include:
1) triggering a person signal when the infrared human body detector detects a person;
2) the control panel device of any intelligent device in the room is triggered manually;
3) detecting the movement of a human body by an intelligent camera in a room;
4) an infrared curtain detector detects the entry of a person.
And if the certain interruption condition is met, judging that people exist in the room, restarting timing according to the timing time, and re-judging the interruption condition.
And (2) performing secondary judgment by using the environment information (namely historical environment data and collected current environment data):
and judging whether the air box is in the unmanned mode at present (namely, no person in the room is in the unmanned mode, and someone in the room is in the manned mode) according to the environmental data (CO2 concentration, illumination intensity and noise decibel) detected by the air box. The behavior habits of the users are learned in an individualized mode through the machine learning model, and different judgment standards are established for each user. The machine learning model which can be adopted is a naive Bayes model for example, parameters in the historical environment data learning model are adopted, then the probability that a person is in a current room and the probability that the person is not in the current room are respectively calculated, and if the probability that the person is in the current room is judged to be in an unmanned state is higher, the mode is switched to an unmanned mode; and (4) if the probability of the person is judged to be larger, returning to the step (1). As shown in fig. 2, the training process of the model is as follows:
1) firstly, historical environment data of a user in a room and not in the room is collected to be used as training samples, then the prior probability of a manned mode and an unmanned mode is calculated, and Y is used1Representing manned mode, Y2Representing an unmanned mode, a total of N pieces of historical environment data are collected, wherein N1Bar of manned pattern data, n2Bar of unmanned pattern data, N ═ N1+n2. Then the prior probability calculation for presence and absence in the room is as follows:
Figure BDA0002168305970000121
2) x for each sample of historical environmental dataj={x1,x2,x3Y represents j ═ 1,2 … N. Wherein x1,x2,x3The data respectively represent the numerical values of carbon dioxide concentration, illumination intensity and noise decibel, and y represents the category of the sample data and is classified into human and unmanned. Assuming that the environmental data distribution follows GaussianDistribution, calculating the conditional probability of each environment characteristic respectively:
Figure BDA0002168305970000122
wherein, l ═ 1,2,3, muiIn the sample class YiIn (1), all xlIs determined by the average value of (a) of (b),
Figure BDA0002168305970000123
in the sample class YiIn (1), all xlThe variance of (c).
3) Using the trained parameter mui
Figure BDA0002168305970000124
A determination is made for the current environmental parameter. Environmental parameter X at time TTFor the purpose of example only,
Figure BDA0002168305970000125
wherein
Figure BDA0002168305970000126
Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibel at the T moment. Based on the conditional independence assumption in naive Bayes theory, the category Y can be obtained according to the following formulaiConditional probabilities (i.e., probability of presence and probability of absence of presence in a room):
Figure BDA0002168305970000127
wherein the content of the first and second substances,
Figure BDA0002168305970000128
the conditional probability of the corresponding environmental characteristics is obtained.
4) And 3) calculating the probability of each category according to the step 3), and judging the current sample as the category with the maximum probability.
The logic of the above steps (1) to (2) is:
and (3) if all the interruption conditions in the step (1) are not met, judging whether people exist in the room at the moment corresponding to the current environment data according to the greater probability in the probability of people existence and the probability of no people in the step (2), restarting timing according to the timing time in the step (1) when people exist in the room, and judging the interruption conditions again.
Step (3), unmanned mode judgment:
when one of the following conditions is satisfied, the unmanned mode is switched to the manned mode.
1) Triggering a person signal when the infrared human body detector detects a person;
2) the control panel device of any intelligent device in the room is triggered manually;
3) detecting the movement of a human body by an intelligent camera in a room;
4) an infrared curtain detector detects that a person enters;
5) and detecting that the home wireless router has new access of the mobile phone.
The reliability and stability of the naive Bayes model in the step (2) are verified by adopting K-fold-cross verification as follows:
the environmental data are collected by utilizing an air box in the continuous time of 7 days and are used as historical environmental data, and 10080 training data are counted, wherein 6701 pieces of data are labeled by people, and 3379 pieces of data are not labeled by people.
Then, 10-fold cross validation is adopted, the training data are uniformly and randomly divided into 10 parts, and one part is selected as a test set every time and used for determining the probability of people and the probability of no people in the room through the step (2); the remaining 9 were used as training sets for historical environmental data. The performance of the model on the whole data set can be tested by carrying out 10 times of experiments, and the experimental results of the probability of human being or the probability of no human being in the room obtained by the method in the step (2) are shown as the following table:
experiment 1 Experiment 2 Experiment 3 Experiment 4 Experiment 5 Experiment 6 Experiment 7 Experiment 8 Experiment 9 Experiment 10
0.9454 0.9534 0.9583 0.9444 0.9524 0.9534 0.9544 0.9514 0.9504 0.9494
As can be seen from the experimental results, the judgment accuracy is about 95%, and the results are stable on the whole data set.
It should be noted that, in the present embodiment, X is used for each sample of the historical environmental dataj={x1,x2,x3Y represents wherein xlThe number and values of the features of (a) are not limited, and as another embodiment, features such as CO2 concentration, light intensity, maximum value, average value and standard deviation of noise decibels within the time interval of 1s may be added as needed, so that there are nine features, as shown in fig. 3, L _ MAX, L _ MEAN and L _ STD refer to the maximum value, average value and standard deviation of light intensity, C _ MAX, C _ MEAN and C _ STD refer to the maximum value, average value and standard deviation of CO2 concentration, N _ MAX, N _ MEAN and N _ STD refer to the maximum value, average value and standard deviation of noise decibels, respectively, and LABEL refers to a LABEL of the piece of history data, such as human or non-human. Thus xlThe number and value of the features can be selected according to specific needs.
In addition, in the present embodiment, the formula for determining the probability of presence and the probability of absence in the room is actually two formulas, which are equivalent to two machine learning models, one is a model for calculating the probability of presence, and the parameter obtained by training is μ1、σ1(ii) a The other is a model for calculating the probability of no person, and the parameter obtained by training is mu2、σ2
The embodiment of the device is as follows:
the embodiment provides a device for determining a presence or absence state in a room, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor is coupled to the memory, and when the processor executes the computer program, the determination methods in the three method embodiments are implemented, and details of the specific determination method are not repeated in this embodiment.
In the embodiment, the processor is connected with each sensor arranged in a room through collection and is used for acquiring environment data and storing the environment data in the memory, and corresponding historical environment data is acquired through the memory when parameters in the machine learning model need to be trained; the processor is also in control connection with a timer and is used for controlling the timer to start timing; the processor is also in communication connection with an infrared detector, a camera, a router and intelligent equipment which are arranged in the room, and is used for judging the interrupt condition.
After the processor judges whether a person is in the room by using one of the three method embodiments, the current state in the room is sent to the intelligent device (such as an intelligent mobile phone) carried by the user, so that the user can conveniently carry out remote control on the intelligent household appliances in the room.
In addition, the processor in this embodiment may be a computer, a microprocessor such as an ARM, or a programmable chip such as an FPGA, a DSP, or the like. In order to reduce the workload of one processor, as another alternative, a plurality of processors may be used to share the work content, such as a main processor and an auxiliary processor, two processors are communicatively connected to each other, and the two processors cooperate to implement the determination method in the above three method embodiments.

Claims (10)

1. A method for judging the state of people in a room is unmanned, which is characterized by comprising the following steps:
storing historical environmental data of people and no people in a room, wherein the historical environmental data at least comprises data of one environmental characteristic, and the environmental characteristic comprises: carbon dioxide concentration, illumination intensity and noise decibel;
the method comprises the following steps of collecting current environment data in a room, and calculating the probability of people and the probability of no people in the room at the moment corresponding to the current environment data, wherein the calculation mode of the probability of people is as follows: taking the historical environment data of people as samples, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when people exist in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the probability of people in the room at the moment corresponding to the current environment data, so that the probability of people is positively correlated with each conditional probability;
the calculation mode of the unmanned probability is as follows: taking the historical environment data of nobody as a sample, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when no person exists in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the nobody probability in the room at the moment corresponding to the current environment data, so that the nobody probability is positively correlated with each conditional probability;
and judging whether the room is occupied at the moment corresponding to the current environment data according to the greater probability of the probability of being occupied and the probability of being unoccupied.
2. The method according to claim 1, wherein the conditional probability of the current environmental data for a certain environmental characteristic is as follows:
Figure FDA0002168305960000011
in the formula (I), the compound is shown in the specification,
Figure FDA0002168305960000012
for environmental characteristics when a person is present in a room
Figure FDA0002168305960000013
The conditional probability of (a) of (b),
Figure FDA0002168305960000014
wherein
Figure FDA0002168305960000015
Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibel at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu.s1Corresponding environmental characteristics in historical environmental data for people in a room
Figure FDA0002168305960000021
Average value of (a)1Corresponding environmental characteristics in historical environmental data for people in a room
Figure FDA0002168305960000022
The variance obtained from the numerical values of (a);
the conditional probability under a certain environmental characteristic in the current environmental data when the room is unmanned is as follows:
Figure FDA0002168305960000023
in the formula (I), the compound is shown in the specification,
Figure FDA0002168305960000024
for environmental characteristics when no person is in the room
Figure FDA0002168305960000025
Conditional probability of (d), mu2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure FDA0002168305960000026
Average value of (a)2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure FDA0002168305960000027
The variance of the value of (a).
3. The method for determining a presence or absence in a room according to claim 1, further comprising: when the current environment data corresponds to the probability of the person in the room at the moment, the operation is performed, namely, after the conditional probabilities are multiplied, the conditional probabilities are multiplied by the prior probability when the person is in the room in the historical environment data of the person and the nobody in the room;
and when the probability of no person in the room at the moment corresponding to the current environment data is obtained, calculating to multiply the conditional probabilities after being multiplied, and then multiplying the conditional probabilities by the prior probability of the absence of the person in the room in the historical environment data of the presence of the person in the room and the absence of the person in the room.
4. A method for judging the state of people in a room is unmanned, which is characterized by comprising the following steps:
storing historical environmental data of a person in a room, the historical environmental data at least comprising data of one environmental characteristic, the environmental characteristic comprises: carbon dioxide concentration, illumination intensity and noise decibel;
the method comprises the following steps of collecting current environment data in a room, and calculating the probability of people in the room at the moment corresponding to the current environment data, wherein the calculation mode is as follows: taking the historical environment data of people as samples, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when people exist in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the probability of people in the room at the moment corresponding to the current environment data, so that the probability of people is positively correlated with each conditional probability;
and comparing the probability of the person with a set probability threshold, and judging whether the person exists in the room at the moment corresponding to the current environment data according to the comparison result.
5. The method according to claim 4, wherein the conditional probability of the current environmental data for an environmental feature is as follows:
Figure FDA0002168305960000031
in the formula (I), the compound is shown in the specification,
Figure FDA0002168305960000032
for environmental characteristics when a person is present in a room
Figure FDA0002168305960000033
The conditional probability of (a) of (b),
Figure FDA0002168305960000034
wherein
Figure FDA0002168305960000035
Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibel at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu.s1History ring for people in roomCorresponding environmental features in environmental data
Figure FDA0002168305960000036
Average value of (a)1Corresponding environmental characteristics in historical environmental data for people in a room
Figure FDA0002168305960000037
The variance of the value of (a).
6. The method for determining the presence or absence of a person in a room according to claim 4, further comprising: and storing the historical environment data of no person in the room, wherein the operation is to multiply the conditional probabilities after being multiplied, and then multiply the prior probabilities of persons in the room and persons in the room in the historical environment data of no person, so as to obtain the probability of persons in the room at the moment corresponding to the current environment data.
7. A method for judging the state of people in a room is unmanned, which is characterized by comprising the following steps:
storing historical environmental data of the room when no person is present, wherein the historical environmental data at least comprises data of environmental characteristics, and the environmental characteristics comprise: carbon dioxide concentration, illumination intensity and noise decibel;
the method comprises the following steps of collecting current environment data in a room, and calculating the probability of no person in the room at the moment corresponding to the current environment data, wherein the calculation mode is as follows: taking the historical environment data of nobody as a sample, respectively calculating the conditional probability of a certain environment characteristic in the current environment data when no person exists in a room, and calculating the obtained conditional probability of each environment characteristic to obtain the nobody probability in the room at the moment corresponding to the current environment data, so that the nobody probability is positively correlated with each conditional probability;
and comparing the unmanned probability with a set probability threshold, and judging whether people exist in the room at the moment corresponding to the current environment data according to the comparison result.
8. The method according to claim 7, wherein the conditional probability of the current environmental data for an environmental feature is as follows:
Figure FDA0002168305960000041
in the formula (I), the compound is shown in the specification,
Figure FDA0002168305960000042
for environmental characteristics when no person is in the room
Figure FDA0002168305960000043
The conditional probability of (a) of (b),
Figure FDA0002168305960000044
wherein
Figure FDA0002168305960000045
Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibel at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu.s2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure FDA0002168305960000046
Average value of (a)2Corresponding environmental characteristics in historical environmental data for no person in a room
Figure FDA0002168305960000047
The variance of the value of (a).
9. The method for determining a presence or absence in a room according to claim 7, further comprising: and storing the historical environment data of the presence of the person in the room, and multiplying the conditional probabilities by the prior probability of the absence of the person in the room in the historical environment data of the presence of the person and the absence of the person in the room to obtain the absence probability of the person in the room at the moment corresponding to the current environment data.
10. A device for determining an occupancy state in a room, comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor is coupled to the memory, and wherein the processor executes the computer program to implement the method for determining an occupancy state in a room according to any one of claims 1 to 9.
CN201910754512.XA 2019-08-15 2019-08-15 Method and device for judging whether room is occupied or not Active CN112051621B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910754512.XA CN112051621B (en) 2019-08-15 2019-08-15 Method and device for judging whether room is occupied or not

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910754512.XA CN112051621B (en) 2019-08-15 2019-08-15 Method and device for judging whether room is occupied or not

Publications (2)

Publication Number Publication Date
CN112051621A true CN112051621A (en) 2020-12-08
CN112051621B CN112051621B (en) 2024-03-15

Family

ID=73609583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910754512.XA Active CN112051621B (en) 2019-08-15 2019-08-15 Method and device for judging whether room is occupied or not

Country Status (1)

Country Link
CN (1) CN112051621B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4514729A (en) * 1982-08-16 1985-04-30 Szarka Jay R Environmental control system and method
JP2005172377A (en) * 2003-12-12 2005-06-30 Mitsubishi Electric Corp Air conditioner having human body detecting sensor, and human body detecting method for air conditioner having human body detecting sensor
JP2009266502A (en) * 2008-04-24 2009-11-12 Panasonic Electric Works Co Ltd Lighting system
CN101661268A (en) * 2008-08-25 2010-03-03 李海青 Method for integrally controlling living room and human body count detection energy-saving control system
JP2010256045A (en) * 2009-04-21 2010-11-11 Taisei Corp Wide range/high accuracy human body detection sensor
JP2012233890A (en) * 2011-04-21 2012-11-29 Takenaka Komuten Co Ltd Presence/absence management system
FR2985070A1 (en) * 2011-12-21 2013-06-28 Orme System for detecting fall of e.g. person in retirement home, has programmed analysis unit to acquire images taken by sensors in synchronous manner, and to detect fall of person in scene from time sequence of pair of images of scene
US8630741B1 (en) * 2012-09-30 2014-01-14 Nest Labs, Inc. Automated presence detection and presence-related control within an intelligent controller
WO2014051632A1 (en) * 2012-09-30 2014-04-03 Nest Labs, Inc. Automated presence detection and presence-related control within an intelligent controller
CN103837906A (en) * 2014-03-13 2014-06-04 三和智控(北京)系统集成有限公司 Method for detecting whether people exist in room or not
JP2014190724A (en) * 2013-03-26 2014-10-06 Kddi Corp Space state determination device
FR3005367A1 (en) * 2013-05-06 2014-11-07 Vence Innovation COMPACT DETECTOR OF HUMAN PRESENCE
US20150380013A1 (en) * 2014-06-30 2015-12-31 Rajeev Conrad Nongpiur Learning algorithm to detect human presence in indoor environments from acoustic signals
CN106772656A (en) * 2015-11-19 2017-05-31 上海理工大学 A kind of indoor human body detection method based on infrared sensor array
CN106842356A (en) * 2017-01-17 2017-06-13 云丁网络技术(北京)有限公司 There is nobody detection method and its detecting system a kind of interior
WO2018121330A1 (en) * 2016-12-29 2018-07-05 阿里巴巴集团控股有限公司 Detection method, and related apparatus and system
CN108256283A (en) * 2016-12-28 2018-07-06 中国移动通信有限公司研究院 A kind of occupancy recognition methods and device
CN109030715A (en) * 2017-06-09 2018-12-18 精英电脑股份有限公司 The method of indoor human body detecting
US10169975B1 (en) * 2017-11-14 2019-01-01 Vi-Enterprises, Llc Detecting life by means of CO2 in an enclosed volume

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4514729A (en) * 1982-08-16 1985-04-30 Szarka Jay R Environmental control system and method
JP2005172377A (en) * 2003-12-12 2005-06-30 Mitsubishi Electric Corp Air conditioner having human body detecting sensor, and human body detecting method for air conditioner having human body detecting sensor
JP2009266502A (en) * 2008-04-24 2009-11-12 Panasonic Electric Works Co Ltd Lighting system
CN101661268A (en) * 2008-08-25 2010-03-03 李海青 Method for integrally controlling living room and human body count detection energy-saving control system
JP2010256045A (en) * 2009-04-21 2010-11-11 Taisei Corp Wide range/high accuracy human body detection sensor
JP2012233890A (en) * 2011-04-21 2012-11-29 Takenaka Komuten Co Ltd Presence/absence management system
FR2985070A1 (en) * 2011-12-21 2013-06-28 Orme System for detecting fall of e.g. person in retirement home, has programmed analysis unit to acquire images taken by sensors in synchronous manner, and to detect fall of person in scene from time sequence of pair of images of scene
WO2014051632A1 (en) * 2012-09-30 2014-04-03 Nest Labs, Inc. Automated presence detection and presence-related control within an intelligent controller
US8630741B1 (en) * 2012-09-30 2014-01-14 Nest Labs, Inc. Automated presence detection and presence-related control within an intelligent controller
JP2014190724A (en) * 2013-03-26 2014-10-06 Kddi Corp Space state determination device
FR3005367A1 (en) * 2013-05-06 2014-11-07 Vence Innovation COMPACT DETECTOR OF HUMAN PRESENCE
CN103837906A (en) * 2014-03-13 2014-06-04 三和智控(北京)系统集成有限公司 Method for detecting whether people exist in room or not
US20150380013A1 (en) * 2014-06-30 2015-12-31 Rajeev Conrad Nongpiur Learning algorithm to detect human presence in indoor environments from acoustic signals
CN106772656A (en) * 2015-11-19 2017-05-31 上海理工大学 A kind of indoor human body detection method based on infrared sensor array
CN108256283A (en) * 2016-12-28 2018-07-06 中国移动通信有限公司研究院 A kind of occupancy recognition methods and device
WO2018121330A1 (en) * 2016-12-29 2018-07-05 阿里巴巴集团控股有限公司 Detection method, and related apparatus and system
CN106842356A (en) * 2017-01-17 2017-06-13 云丁网络技术(北京)有限公司 There is nobody detection method and its detecting system a kind of interior
CN109030715A (en) * 2017-06-09 2018-12-18 精英电脑股份有限公司 The method of indoor human body detecting
US10169975B1 (en) * 2017-11-14 2019-01-01 Vi-Enterprises, Llc Detecting life by means of CO2 in an enclosed volume

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
党小超;邓琦研;郝占军;: "基于30°角同心圆环形取样的室内人员检测方法", no. 04, pages 56 - 61 *
刘德峰;袁锁中;: "基于二氧化碳测量的室内人数估计算法", no. 02, pages 43 - 47 *
王闯;燕达;孙红三;丰晓航;江亿;: "室内环境控制相关的人员动作描述方法", no. 10, pages 199 - 211 *
韦春玲;王步飞;: "基于WLAN接收信号强度特征的室内活动识别", no. 05, pages 1326 - 1330 *

Also Published As

Publication number Publication date
CN112051621B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
US10535349B2 (en) Controlling connected devices using a relationship graph
EP3779306B1 (en) Aroma releasing system
JP2017528788A (en) Air quality alarm system and method
CN110131846B (en) Intelligent air conditioner control method and air conditioner
EP2985540B1 (en) Air environment regulating system, and controlling device
CN108427314A (en) Intelligent home furnishing control method, device and computer readable storage medium
CN106556111A (en) Household electric appliance control method, device, server and air-conditioner
US20230314037A1 (en) Integrated air quality control system
Kim et al. Improved occupancy detection accuracy using PIR and door sensors for a smart thermostat
Amayri et al. Decision tree and parametrized classifier for estimating occupancy in energy management
US11734932B2 (en) State and event monitoring
Taştan An IoT based air quality measurement and warning system for ambient assisted living
CN111433801A (en) Data generation device, data generation method, data generation program, and sensor device
US11544924B1 (en) Investigation system for finding lost objects
CN114063572A (en) Non-sensing intelligent device control method, electronic device and control system
CN112051621B (en) Method and device for judging whether room is occupied or not
CN110941189A (en) Intelligent household system and control method thereof and readable storage medium
CN208475570U (en) Air purifier booting-self controller switch and its system
CN110209059A (en) There are unmanned detection method, device, electronic equipment and system
US11624519B2 (en) Carbon monoxide purge system for a property
US11719677B1 (en) Air quality sensors
Zhang et al. Inferring building occupancy based on statistical modeling of multi-sensor data
WO2017149324A1 (en) Occupancy sensing
CN110195926A (en) Air purifier booting-self controller switch and its system
CN106765935B (en) Energy-saving data acquisition method and device

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