CN112051621B - Method and device for judging whether room is occupied or not - Google Patents

Method and device for judging whether room is occupied or not Download PDF

Info

Publication number
CN112051621B
CN112051621B CN201910754512.XA CN201910754512A CN112051621B CN 112051621 B CN112051621 B CN 112051621B CN 201910754512 A CN201910754512 A CN 201910754512A CN 112051621 B CN112051621 B CN 112051621B
Authority
CN
China
Prior art keywords
room
probability
person
existence
people
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910754512.XA
Other languages
Chinese (zh)
Other versions
CN112051621A (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

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 condition of the existence of people in a room, which belong to the field of intelligent home, wherein the method comprises the steps of storing historical environment data of the existence of people and the non-existence of 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 the existence of people and the non-existence of people in the corresponding room by utilizing the historical environment data of the existence of people and the non-existence of people in the room, and calculating according to the positive correlation between the conditional probabilities of the existence of people in the room and the existence probability of people in the room to obtain the existence probability in the room at the moment corresponding to the current environment data; and carrying out operation according to the positive correlation between the conditional probabilities when the room is unmanned and the unmanned probability in the room to obtain the unmanned probability in the room at the moment corresponding to the current environment data. Finally, whether a person exists in the room or not is judged by utilizing the larger probability of the person existence and the probability of the person existence, the judgment reliability is high, and the problem of judgment failure does not exist.

Description

Method and device for judging whether room is occupied or not
Technical Field
The invention belongs to the field of intelligent home, and particularly relates to a method and a device for judging the existence and non-existence states of people in a room.
Background
At present, whether a person exists in a room is accurately judged, and a critical decision function is played for an intelligent control system to automatically change a control mode (such as a comfort or energy-saving mode) of the room and automatically control indoor equipment. For example, after the room is judged to be "unmanned", the system can automatically close energy-consuming equipment such as indoor air conditioner, lamplight and the like, so that unnecessary energy waste is avoided; when the room is judged to be 'occupied', the control logic of the room is converted into a preset mode (such as a comfort mode), and when the indexes such as temperature, humidity, air quality or illuminance do not reach the set optimal values, the indoor equipment can be controlled to be automatically started to operate, or the indoor equipment can be further used for security alarm systems and the like.
In the prior art, research on judgment of presence or absence of a room is mainly focused 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 infrared human body detector, the intelligent door magnetic sensor, the intelligent camera and the like can detect moving objects or door and window opening and closing actions, so that the current state of personnel in a room is judged. The sensor belongs to an intrusion sensor, is deployed in a personal home environment and is used in places such as outdoors, gates and the like, the detection range of the sensor for preventing fixed positions such as gates and the like is limited, the condition in a room cannot be well judged, detection dead angles exist, and when a person in a room is in the detection dead angles, a motion detection judgment method is invalid, so that the judgment reliability is low.
(3) The method has certain limitation, requires a user to hold the mobile phone or put the mobile phone in a pocket, and once the method is used for not carrying the mobile phone with hands, the method judges that the mobile phone is invalid, so the method has smaller applicability and poor reliability.
Disclosure of Invention
The invention aims to provide a method and a device for judging the presence or absence of a person in a room, which are used for solving the problem of low reliability of judging the presence or absence of the person in the room in the prior art.
Based on the above purpose, a first technical scheme of a method for judging whether a person exists in a room or not is to calculate the probability of existence in the room and the probability of non-existence, and the specific scheme 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 decibels;
collecting current environmental data in a room, and calculating the probability of existence and the probability of no existence in the room at the moment corresponding to the current environmental data, wherein the calculation mode of the probability of existence is as follows: taking historical environmental data with people as a sample, respectively calculating the conditional probability under certain environmental characteristics in the current environmental data when the room has people, and calculating the obtained conditional probability of each environmental characteristic to obtain the probability of the people in the room at the moment corresponding to the current environmental data, so that the probability of the people is positively correlated with each conditional probability;
the calculation mode of the unmanned probability is as follows: taking historical environment data of unmanned time as a sample, respectively calculating the conditional probability under certain environmental characteristics in the current environment data of the unmanned time of the room, and calculating the obtained conditional probability of each environmental characteristic to obtain the unmanned probability in the room at the moment corresponding to the current environment data, so that the unmanned probability is positively correlated with each conditional probability;
and judging whether a person exists in the room at the moment corresponding to the current environment data according to the larger probability of the person probability and the unmanned probability.
The beneficial effects of the technical scheme are as follows:
the invention calculates the conditional probability of each environmental characteristic in the historical environmental data when people exist in the room by utilizing the historical environmental data when people exist in the room and the historical environmental data when people exist in the room, and calculates the conditional probability according to the positive correlation between the conditional probabilities and the probability of people in the room, thereby obtaining the probability of people in the room at the moment corresponding to the current environmental data.
Meanwhile, the condition probability of each environmental characteristic in the historical environmental data when no person exists in the room is calculated by utilizing the historical environmental data when no person exists in the room, and operation is carried out according to the positive correlation relation between the condition probabilities and the unmanned probability in the room, so that the unmanned probability in the room at the moment corresponding to the current environmental data is obtained. Finally, whether a person exists in the room or not is judged by utilizing the probability which is larger than the probability of the person existence or the probability of the person existence, and compared with the method in the prior art, the judgment reliability is high, and the problem of judgment failure does not exist.
In order to ensure the reliability of the judging method of the invention, one embodiment for calculating the conditional probability is as follows:
the conditional probability under certain environmental characteristics in the current environmental data when the room is occupied is as follows:
in the method, in the process of the invention,for the presence of a person in a room environmental characteristic +.>Conditional probability of->Wherein->Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibels at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu (mu) 1 Corresponding environmental characteristics in historical environmental data when people exist in a room>Mean value of σ 1 Corresponding environmental characteristics in historical environmental data when people exist in a room>Numerical value of (2)The resulting variance.
The conditional probability under certain environmental characteristics in the current environmental data when the room is unmanned is as follows:
in the method, in the process of the invention,environmental characteristics for the absence of people in a room->Conditional probability, mu 2 Corresponding environmental characteristics in historical environmental data when no person is in the room>Mean value of σ 2 Corresponding environmental characteristics in historical environmental data when no person is in the room>Variance of the values obtained by the above steps.
In order to improve the accuracy of judgment of the existence of people and no people in the room, when the current environment data corresponds to the existence probability in the room, the operation is to multiply each conditional probability, and then multiply the prior probability of the existence of people in the room in the history environment data of the existence of people and no people in the room.
Meanwhile, when the unmanned probability in the room at the moment corresponding to the current environment data is obtained, the operation is to multiply the conditional probabilities, and then multiply the prior probability of unmanned and unmanned in the room in the historical environment data of the unmanned and the unmanned in the room, so as to reduce misjudgment of the unmanned and the unmanned in the room.
Based on the above object, a second technical solution of a method for determining whether a person exists in a room is to calculate the probability of existence in the room to determine whether the person exists in the room, and the specific solution is as follows:
storing historical environmental data when people are in the room, the historical environmental data comprising at least one environmental characteristic data, the environmental characteristic comprising: carbon dioxide concentration, illumination intensity and noise decibels;
collecting current environmental data in a room, and calculating the probability of someone in the room at the moment corresponding to the current environmental data, wherein the calculating mode is as follows: taking historical environmental data with people as a sample, respectively calculating the conditional probability under certain environmental characteristics in the current environmental data when the room has people, and calculating the obtained conditional probability of each environmental characteristic to obtain the probability of the people in the room at the moment corresponding to the current environmental data, so that the probability of the 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 a comparison result.
The beneficial effects of the technical scheme are as follows:
according to the invention, by collecting the historical environment data of the people in the room and utilizing the historical environment data of the people in the room, the conditional probability of each environmental characteristic in the historical environment data of the people in the room is calculated, and the calculation is carried out according to the positive correlation between the conditional probabilities and the people probability in the room, so that the current environment data corresponds to the people probability in the room at the moment. And finally, judging whether a person exists in the room or not by using a comparison result between the probability of the person and the set probability threshold value, wherein compared with a judging method in the prior art, the judging method has no problem of method failure and has high judging reliability.
In order to ensure the reliability of the judging method, the conditional probability of certain environmental characteristics in the current environmental data is as follows:
in the method, in the process of the invention,for the presence of a person in a room environmental characteristic +.>Conditional probability of->Wherein->Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibels at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu (mu) 1 Corresponding environmental characteristics in historical environmental data when people exist in a room>Mean value of σ 1 Corresponding environmental characteristics in historical environmental data when people exist in a room>Variance of the values obtained by the above steps.
In order to improve the accuracy of the judgment of the existence of the person and the unmanned person in the room, the method further comprises the steps of storing historical environment data of the existence of the person in the room in advance, multiplying the conditional probabilities by prior probabilities of the existence of the person in the room in the historical environment data of the existence of the person in the room and the unmanned person after the conditional probabilities are multiplied, so that the existence probability of the person in the room at the moment corresponding to the current environment data is obtained, and misjudgment of the existence of the person in the room and the unmanned person in the room is reduced.
Based on the above purpose, a third technical scheme of a method for judging whether a person exists in a room or not is to calculate the probability of no person in the room to judge whether the person exists in the room, and the specific scheme is as follows:
storing historical environmental data for an unmanned room, the historical environmental data including at least data for an environmental characteristic, the environmental characteristic comprising: carbon dioxide concentration, illumination intensity and noise decibels;
collecting current environmental data in a room, and calculating unmanned probability in the room at the moment corresponding to the current environmental data, wherein the calculating mode is as follows: taking historical environment data of unmanned time as a sample, respectively calculating the conditional probability under certain environmental characteristics in the current environment data of the unmanned time of the room, and calculating the obtained conditional probability of each environmental characteristic to obtain the unmanned probability in the room at the moment corresponding to the current environment data, so that the unmanned probability is positively correlated with each conditional probability;
and comparing the unmanned probability with a set probability threshold, and judging whether a person exists in the room at the moment corresponding to the current environmental data according to a comparison result.
The beneficial effects of the technical scheme are as follows:
according to the invention, by collecting the historical environment data of the unmanned room and utilizing the historical environment data of the unmanned room, the condition probability of each environmental characteristic in the historical environment data of the unmanned room is calculated, and the operation is carried out according to the positive correlation between the condition probabilities and the unmanned probability in the room, so that the unmanned probability in the room at the moment corresponding to the current environment data is obtained. And finally, judging whether a person exists in the room or not by using a comparison result between the unmanned probability and the set probability threshold, wherein compared with a judging method in the prior art, the judging method has no problem of method failure and has high judging reliability.
In order to ensure the accuracy of judgment of someone in a room, the conditional probability under a certain environmental characteristic in the current environmental data is as follows:
in the method, in the process of the invention,environmental characteristics for the absence of people in a room->Conditional probability of->Wherein->Respectively representing the values of carbon dioxide concentration, illumination intensity and noise decibels at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu (mu) 2 Corresponding environmental characteristics in historical environmental data when no person is in the room>Mean value of σ 2 Corresponding environmental characteristics in historical environmental data when no person is in the room>Variance of the values obtained by the above steps.
In order to improve the accuracy of the judgment of the existence of the person and the unmanned person in the room, the method further comprises the steps of storing historical environment data of the existence of the person in the room in advance, multiplying the conditional probabilities by prior probabilities of the existence of the person in the room and the unmanned person in the historical environment data of the existence of the person in the room, and obtaining the unmanned probability of the room at the moment corresponding to the current environment data so as to reduce misjudgment of the existence of the person and the unmanned person in the room.
Based on the above object, a technical scheme of a device for judging whether a person exists in a room or not is as follows:
the method comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor is coupled with the memory, and the method for judging the condition of the existence of a person in any one room from the first technical scheme to the third technical scheme is realized when the processor executes the computer program.
Drawings
Fig. 1 is a flowchart for determining the presence/absence status of a room according to the present invention;
FIG. 2 is a schematic diagram of the present invention trained using a naive Bayesian model;
FIG. 3 is a schematic representation of features in historical environmental data of the present invention.
Detailed Description
The following describes the embodiments of the present invention further with reference to the drawings.
Method embodiment one:
a corresponding number of sensors are provided at suitable locations in the room for collecting environmental data, one embodiment of the sensors being that a sensor C1 for collecting illumination intensity is provided near a window in the room, a sensor C2 for collecting carbon dioxide concentration is provided near a sofa or a bed in the room, and a sensor C3 for collecting noise decibels is provided.
Then, when a user moves in the room according to own behavior habits, acquiring environmental data in a period of time by using the sensors (C1, C2 and C3) to be used as historical environmental data of people in the room, wherein the historical environmental data comprise three environmental characteristics including carbon dioxide concentration, illumination intensity and noise decibels; environmental data when no person is in the room is collected by the sensors and used as historical environmental data of no person in the room, and the historical environmental data when the person is in the room and the historical environmental data when no person is in the room are stored in a 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 built, and the built naive Bayesian model is as follows:
in the above model, P (y=y 1 |X=X T ) Represented in the current environment data X T Probability of someone in the lower room, X T Is the environmental data at the time T,wherein->Respectively representing the carbon dioxide concentration, illumination intensity and noise decibel value at the moment T; p (y=y) 1 ) And P (y=y 2 ) Representing a priori probabilities with and without person, respectively,/->i=(1,2),n 1 And n 2 The number of historical environmental data when people exist in the room and the number of historical environmental data when no people exist in the room are respectively represented, and N=n 1 +n 2 ;/>Environmental characteristics indicating the presence of people in a room +.>Conditional probability of->Environmental characteristics representing the absence of a person in a room +.>J= (1, 2, 3), the expression is as follows:
wherein mu i For corresponding environmental characteristicsThe average value of the environmental characteristics of the corresponding environmental characteristics in the historical environmental data; sigma (sigma) i For corresponding environmental characteristics->The variance of the environmental characteristic values in the historical environmental data is calculated.
Parameter μ in the naive Bayes model described above i 、σ i After the historical environment data are determined, a learned machine learning model is obtained, the sensors are utilized to detect the current environment data in the room, and the environment characteristic values in the current environment data are substituted into the learned naive Bayes model to obtain the current environmentAnd judging whether a person exists in the room at the moment corresponding to the current environmental data according to the probability of the person existing in the room at the moment corresponding to the data. An embodiment for determining whether a person is present in a room is to set a probability threshold (e.g., 0.75) for comparison with the calculated probability of a person, determine that a person is present when the calculated probability of a person is greater than the probability threshold, and determine that a person is not present when the probability is not greater than the probability threshold.
After judging that the room is occupied at the moment corresponding to the current environmental data, updating the current environmental data into the historical environmental data according to the judgment result, and updating the parameter mu in the machine learning model according to the updated historical environmental data i 、σ i Therefore, the naive Bayesian model is dynamically updated, and as the collected historical environment data is increased, the naive Bayesian model predicts the probability of someone in a room more accurately, so that the reliability of the judging method is further improved.
The judging method of the invention does not simply judge the collected environment data directly, but learns the historical environment data to obtain a more reliable manned evaluation model (i.e. a naive Bayesian model), and compared with the judging method of the prior art, the judging method has no problem of method failure and high judging reliability.
It should be noted that, the environmental characteristics selected in this embodiment may be selected according to actual situations, for example, three environmental characteristics including carbon dioxide concentration, illumination intensity and noise decibel are selected during the day, and at night, since the user in the room has fallen asleep, the noise decibel may not be able to represent whether someone is in the room, so that only two environmental characteristics including carbon dioxide concentration and illumination intensity may be selected, in this case,the corresponding naive bayes model also changes to:
therefore, in this embodiment, the method of calculating the probability of existence in the room by multiplying the conditional probability of each environmental feature by the naive bayes model and then multiplying the conditional probability by one prior probability is merely one embodiment. In other embodiments, the logarithm of the conditional probabilities of the environmental features may be taken, and the logarithm may be added to obtain an accumulated value of the probability of the person and an accumulated value of the probability of the person, and then the accumulated value of the probability of the person and the accumulated value of the probability of the person may be compared, and the larger item may be used as the judgment result.
Method embodiment two:
in the same way as in the first embodiment of the method, the present embodiment also uses the set sensors (C1, C2, C3) to collect the environmental data of the presence and absence of a person in the room for a period of time, as the historical environmental data of the presence and absence of a person in the room. The difference is that, according to the historical environmental data of the people and the no people in the room, a machine learning model of the relation between the no people and all environmental characteristic values in the room is established, and the naive Bayesian model is taken as an example, and the established model is as follows:
in the above model, P (y=y 2 |X=X T ) Represented in the current environment data X T The unmanned probability in the lower room, other symbolic representations in the model and the calculation method refer to the first method embodiment, and the implementation is not repeated.
Similar to the first embodiment of the method, the parameter μ in the machine learning model is i 、σ i After the historical environment data are determined, a learned naive Bayesian model is obtained, the sensors are used for detecting the current environment data in the room, the environment characteristic values in the current environment data are substituted into the learned naive Bayesian model, the unmanned probability in the room at the moment corresponding to the current environment data is obtained, and whether people exist in the room at the moment corresponding to the current environment data is judged according to the unmanned probability.
An embodiment for determining whether a person is in a room is to set a probability threshold (e.g., 0.85) of a certain probability of being unmanned, compare the probability with the calculated probability of being unmanned, determine that the person is unmanned when the calculated probability of being unmanned is greater than the naive bayes model, and determine that the person is present when the probability of being unmanned is not greater than the naive bayes model.
The first embodiment of the method is the same as that of the first embodiment of the method, after it is determined that a person is in a room at the moment corresponding to the current environmental data, the current environmental data is updated to the historical environmental data, so that the machine learning model is updated.
Method embodiment three:
the embodiment provides a method for judging the condition of the presence or absence of people in a room, which is a method for judging the combined condition based on a plurality of sensors, and learns the behavior habit of a user by using a machine learning technology, thereby improving the judgment accuracy of an environment sensor. The environmental characteristics mainly adopted include carbon dioxide concentration, illumination intensity and noise decibels, and the environmental data are measured by the sensor arranged in the first embodiment of the method. The judging flow is shown in fig. 1, and comprises the steps of:
step (1), preliminary judgment of motion detection:
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; if the timer expires, step (2) is performed without triggering an interrupt condition. As shown in fig. 1, the interrupt conditions include:
1) The infrared human body detector detects the existence of a person and triggers a person signal;
2) The control panel device of any intelligent device in the room is manually triggered;
3) The intelligent camera in the room detects the movement of the human body;
4) The infrared curtain detector detects the entry of a person.
If the certain interrupt condition is met, the room is judged to be occupied, the timing is restarted according to the timing time, and the interrupt condition is judged again.
And (2) performing secondary judgment by using the environment information (namely the historical environment data and the collected current environment data):
and judging whether the air box is in an unmanned mode currently (namely, the air box is in an unmanned mode when no person exists in the room, and the air box is in a manned mode when the person exists in the room) according to the environmental data (CO 2 concentration, illumination intensity and noise decibel) detected by the air box. And (3) personalized learning of the behavior habits of the users through a machine learning model, and establishing different judgment standards for each user. The method comprises the steps that an available machine learning model is exemplified by a naive Bayesian model, parameters in a historical environment data learning model are adopted, then the probability of being in a person in a current room and the probability of being in an unmanned state in the current room are calculated respectively, and if the probability of being in an unmanned state in the room is larger, the mode is switched to an unmanned mode; if the probability of the existence of the person is judged to be larger, the step (1) is returned. As shown in fig. 2, the training process of the model is as follows:
1) First, collecting historical environmental data of users in and out of rooms as training samples, and then calculating prior probabilities of a manned mode and an unmanned mode, using Y 1 Representing a manned mode, Y 2 Representing unmanned mode, N pieces of historical environmental data are collected in total, wherein N is as follows 1 Stripe person pattern data, n 2 Bar unmanned mode data, n=n 1 +n 2 . Then the prior probabilities of the presence and absence of people in the room are calculated as follows:
2) X for each sample of historical environmental data j ={x 1 ,x 2 ,x 3 Y } represents j= (1, 2 … N). Wherein x is 1 ,x 2 ,x 3 The values of carbon dioxide concentration, illumination intensity and noise decibels are respectively represented, and y represents the category of the sample data and is divided into people and no people. Assuming that the environmental data distribution follows a gaussian distribution, the conditional probability of each environmental feature is calculated separately:
wherein, l= (1, 2, 3), μ i To be in sample class Y i In all x l Is used for the average value of (a),to be in sample class Y i In all x l Is a variance of (c).
3) Using trained parameters mu iA determination is made for the current environmental parameter. With ambient parameter X at time T T For example, a->Wherein->And respectively representing the carbon dioxide concentration, the illumination intensity and the noise decibel value at the moment T. Based on the independent assumption of conditions in naive Bayes theory, class Y can be found according to the following formula i Conditional probability (i.e., probability of presence and probability of absence of a room):
wherein,and obtaining through the conditional probability of the corresponding environment characteristic.
4) And 3) after calculating the probability of each category according to the step 3), judging the current sample as the category with the highest probability.
The judgment logic of the steps (1) to (2) is as follows:
if all the interrupt conditions in the step (1) are not met, judging whether a person exists in the room at the moment corresponding to the current environment data according to the larger probability of the person probability and the no-person probability in the step (2), restarting the timing according to the timing time in the step (1) when the person exists in the room, and re-judging the interrupt conditions.
Step (3), unmanned mode judgment:
the unmanned mode is converted to the manned mode when one of the following conditions is satisfied.
1) The infrared human body detector detects the existence of a person and triggers a person signal;
2) The control panel device of any intelligent device in the room is manually triggered;
3) The intelligent camera in the room detects the movement of the human body;
4) The infrared curtain detector detects that a person enters;
5) And detecting that the home wireless router has new access to the mobile phone.
The reliability and stability of the naive bayes model in step (2) were verified using K-fold-cross validation as follows:
environmental data was collected using an air box at 7 consecutive days and used as historical environmental data for a total of 10080 pieces of training data, wherein 6701 pieces of data were labeled with people and 3379 pieces of data were labeled with no people.
Then, uniformly and randomly dividing training data into 10 parts by adopting 10-fold-cross verification, and selecting one part as a test set each time for determining the probability of existence and the probability of no person in the room by 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 experiments in total, and the experimental results of the probability of existence or no-existence in the room obtained by the method of the step (2) are shown in the 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
From the experimental results, the judgment accuracy is about 95%, and the results are stable in the whole data set.
It should be noted that, in this embodiment, each sample of historical environmental data uses X j ={x 1 ,x 2 ,x 3 Represented by y, where x l The number and value of features of (a) are not limited as other implementationsIn this way, features such as the maximum value, average value and standard deviation of the CO2 concentration, illumination intensity and noise decibels within the time interval 1s may be added as required, so that nine features are provided, as shown in fig. 3, l_max, l_mean and l_std refer to the maximum value, average value and standard deviation of the illumination intensity, c_max, c_mean and c_std refer to the maximum value, average value and standard deviation of the CO2 concentration, and 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 the LABEL of this historical data, such as someone or no person. Thus x l The number and value of features of (a) may be selected according to specific needs.
In addition, the formulas for obtaining the probability of existence and the probability of no existence of the room in the embodiment are two formulas, which are equivalent to two machine learning models, one is a model for calculating the probability of existence, and the parameter obtained by training is μ 1 、σ 1 The method comprises the steps of carrying out a first treatment on the surface of the The other is a model for calculating unmanned probability, and the trained parameter is mu 2 、σ 2
Device example:
the embodiment provides a device for judging the status of whether a person exists in a room or not, which comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor is coupled with the memory, and the processor realizes the judging methods in the three method embodiments when executing the computer program, and the specific judging method is not repeated in the embodiment.
In this embodiment, the processor is configured to acquire environmental data and store the environmental data in the memory by acquiring and connecting each sensor disposed in the room, and acquire corresponding historical environmental data through the memory when the 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 starting timing of the timer; 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 used for judging the interrupt condition.
After the processor judges whether the person exists in the room or not by using one of the three method embodiments, the processor sends the current state in the room to the intelligent equipment (such as the intelligent mobile phone) carried by the user, so that the user can conveniently remotely control 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 implementation manner, a plurality of processors may be adopted to share the workload, for example, a main processor and an auxiliary processor, where the two processors are connected in a communication manner, and the two processors cooperatively implement the determination method in the three method embodiments.

Claims (4)

1. The method for judging the condition of the presence or absence of a person in a room is characterized by comprising the following steps of:
storing historical environmental data of people and no people in a room, wherein the historical environmental data at least comprises carbon dioxide concentration and illumination intensity;
collecting current environmental data in a room, and calculating the probability of existence and the probability of no existence in the room at the moment corresponding to the current environmental data, wherein the calculation mode of the probability of existence is as follows: taking historical environmental data with people as a sample, respectively calculating the conditional probability under certain environmental characteristics in the current environmental data when the room has people, and calculating the obtained conditional probability of each environmental characteristic to obtain the probability of the people in the room at the moment corresponding to the current environmental data, so that the probability of the people is positively correlated with each conditional probability;
the calculation mode of the unmanned probability is as follows: taking historical environment data of unmanned time as a sample, respectively calculating the conditional probability under certain environmental characteristics in the current environment data of the unmanned time of the room, and calculating the obtained conditional probability of each environmental characteristic to obtain the unmanned probability in the room at the moment corresponding to the current environment data, so that the unmanned probability is positively correlated with each conditional probability;
and judging whether a person exists in the room at the moment corresponding to the current environment data according to the larger probability of the person probability and the unmanned probability.
2. The method for determining the presence/absence of a person in a room according to claim 1, wherein the conditional probability under a certain environmental feature in the current environmental data when the person is present in the room is as follows:
in the method, in the process of the invention,for the presence of a person in a room environmental characteristic +.>Conditional probability of->Wherein->Respectively representing the values of the carbon dioxide concentration and the illumination intensity at the moment T, wherein the moment T is the moment corresponding to the current environmental data; mu (mu) 1 Corresponding environmental characteristics in historical environmental data when people exist in a room>Mean value of σ 1 Corresponding environmental characteristics in historical environmental data when people exist in a room>Variance of the numerical value of (2);
the conditional probability under a certain environmental characteristic in the current environmental data when the room is unmanned is as follows:
in the method, in the process of the invention,environmental characteristics for the absence of people in a room->Conditional probability, mu 2 Corresponding environmental characteristics in historical environmental data when no person is in the room>Mean value of σ 2 Corresponding environmental characteristics in historical environmental data when no person is in the room>Variance of the values obtained by the above steps.
3. The method for determining the presence/absence of a person in a room according to claim 1, further comprising: when the current environmental data corresponds to the probability of the existence of the person in the room at the moment, performing operation to multiply the conditional probabilities, and multiplying the prior probability of the existence of the person in the room and the prior probability of the existence of the person in the room in the historical environmental data of the existence and the non-existence of the person in the room;
when the unmanned probability in the room at the moment corresponding to the current environmental data is obtained, the operation is that the prior probability of the unmanned in the room in the historical environmental data of the unmanned and the unmanned in the room is multiplied after the conditional probabilities are multiplied.
4. A device for determining the presence/absence of a room, comprising a memory and a processor, and a computer program stored on the memory and running on the processor, the processor being coupled to the memory, the processor implementing the method for determining the presence/absence of a room according to any one of claims 1-3 when the computer program is executed.
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 CN112051621A (en) 2020-12-08
CN112051621B true 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 (16)

* 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
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
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4286118B2 (en) * 2003-12-12 2009-06-24 三菱電機株式会社 Air conditioner equipped with human body detection sensor and human body detection method of air conditioner equipped with human body detection sensor
JP5308898B2 (en) * 2009-04-21 2013-10-09 大成建設株式会社 Human detection sensor
US10068587B2 (en) * 2014-06-30 2018-09-04 Rajeev Conrad Nongpiur Learning algorithm to detect human presence in indoor environments from acoustic signals

Patent Citations (16)

* 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
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
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
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
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
刘德峰 ; 袁锁中 ; .基于二氧化碳测量的室内人数估计算法.兵工自动化.2018,第37卷(第02期),第43-47页. *
王闯 ; 燕达 ; 孙红三 ; 丰晓航 ; 江亿 ; .室内环境控制相关的人员动作描述方法.建筑科学.2015,第31卷(第10期),第199-211页. *
盛骤等.概率论与数理统计.高等教育出版社,2001,(第三版),第56-61页. *
韦春玲 ; 王步飞 ; .基于WLAN接收信号强度特征的室内活动识别.计算机应用.2017,第37卷(第05期),第1326-1330页. *

Also Published As

Publication number Publication date
CN112051621A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
US11050577B2 (en) Automatically learning and controlling connected devices
US10535349B2 (en) Controlling connected devices using a relationship graph
US10579079B2 (en) Home automation control system
US11243502B2 (en) Interactive environmental controller
Liu et al. Occupancy inference using pyroelectric infrared sensors through hidden Markov models
CN105867284B (en) A kind of Safe Sleep monitoring method and system
CN110131846B (en) Intelligent air conditioner control method and air conditioner
US10982873B1 (en) Integrated air quality control system
Mulia et al. A review on building occupancy estimation methods
Nacer et al. ALOS: Automatic learning of an occupancy schedule based on a new prediction model for a smart heating management system
CN106922058B (en) Control method, the device and system of lamps and lanterns
CN114253190A (en) Intelligent shower control method and device, intelligent equipment and storage medium
Amayri et al. Decision tree and parametrized classifier for estimating occupancy in energy management
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
AU2020205651B2 (en) Carbon monoxide purge system for a property
Zhang et al. Inferring building occupancy based on statistical modeling of multi-sensor data
WO2017149324A1 (en) Occupancy sensing
KR102574624B1 (en) The Method of Detection for Abnormal Status of Elderly People living alone in Apparatus Including CO2 Sensor
CN113284489A (en) Voice equipment control method and device, storage medium and voice equipment
CN116794989A (en) User state determining method and device based on scene equipment linkage
CN106765935B (en) Energy-saving data acquisition method and device
CN117570551A (en) Voice air conditioner recognition control method and device, air conditioner and storage medium
CN117518849A (en) Smart home system, control method and device thereof, storage medium and program product
CN115031314A (en) Energy-saving control system for unattended machine room

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