CN109947029B - Control method, device and equipment of intelligent household equipment - Google Patents

Control method, device and equipment of intelligent household equipment Download PDF

Info

Publication number
CN109947029B
CN109947029B CN201910285463.XA CN201910285463A CN109947029B CN 109947029 B CN109947029 B CN 109947029B CN 201910285463 A CN201910285463 A CN 201910285463A CN 109947029 B CN109947029 B CN 109947029B
Authority
CN
China
Prior art keywords
layer
attention mechanism
bigru
behavior
operation data
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
CN201910285463.XA
Other languages
Chinese (zh)
Other versions
CN109947029A (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201910285463.XA priority Critical patent/CN109947029B/en
Publication of CN109947029A publication Critical patent/CN109947029A/en
Application granted granted Critical
Publication of CN109947029B publication Critical patent/CN109947029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a control method of intelligent home equipment, which comprises the steps of obtaining historical operation data of a user on the intelligent home equipment, inputting the historical operation data into a pre-trained feature extraction model based on a BiGRU and double-layer attention mechanism to obtain a target feature vector, determining a behavior prediction result of the user on the intelligent home equipment according to the target feature vector, and finally adjusting the working state of the intelligent home equipment according to the behavior prediction result. Therefore, the BiGRU can mine deep user habits, and the double-layer attention mechanism can give proper weight to different operation behaviors, so that the model fully learns historical operation data, the prediction accuracy is obviously improved, the working state of the equipment is adjusted according to the prediction result, and the user experience is greatly improved. In addition, the application also provides a control device, equipment and a computer readable storage medium of the intelligent household equipment, and the functions of the control device, the equipment and the computer readable storage medium correspond to the functions of the method.

Description

Control method, device and equipment of intelligent household equipment
Technical Field
The present disclosure relates to the field of controlling smart home devices, and in particular, to a method, an apparatus, a device and a computer-readable storage medium for controlling smart home devices.
Background
Along with the development of science and technology, intelligent household equipment is more and more popular, and people's requirement to intelligent household equipment is also more and more high. For example, a user wants to automatically adjust the working state of the smart home device according to the living habits of the user, and therefore, how to obtain the habits of the user and accurately predict the operation behavior of the user on the device at the next moment according to the habits of the user becomes a research hotspot.
At present, two methods for predicting the operation behavior of a user on home equipment are mainly used, one method is realized based on machine learning, and the other method is realized based on deep learning. These two methods are briefly described below:
a prediction method based on machine learning is a frequent association rule method and has the main principle that frequently-occurring operation behaviors are extracted from historical operation data of a user, behavior habits of the user in daily life are mined based on an Apriori algorithm, however, the method is used for mining frequent operation data which do not contain time characteristics, due to the fact that the repetition rate of the operation behaviors of the user in one day is high, if the operation behaviors do not contain time information, the operation behaviors of the user in different time periods can be disordered, and the operation behaviors of the user can change along with the change of the operation behaviors all the year round, and the error of the prediction result of the method is large. Another prediction method based on machine learning adds time intervals on the basis of the above frequent association rule method, however, the prediction accuracy of the method is low because the operation behavior of the user belongs to discrete data and the continuous weather data and stock data are not identical.
A prediction method based on deep learning is based on the principle that a self-coding network is adopted to construct an equipment model, the characteristics of equipment are mined through layer-by-layer unsupervised pre-training, a five-layer BP neural network is adopted as a core control model, the equipment state is predicted according to environmental data, but the model aims at a highly customized family environment, and the universality is poor. The other method adopts DBN-ANN and DBN-R to mine user behavior habits, and predicts the user behavior according to the mined behavior habits, however, the learning degree of the method on the user behavior habits is not sufficient, so that the accuracy rate of predicting the user behavior habits is only about 50%, and the actual requirements are difficult to meet.
Therefore, the accuracy of the traditional method for predicting the behavior of the user on the intelligent home equipment is low, and the prediction result is inconsistent with the habit of the user, so that the intelligent home equipment cannot adjust the working state of the intelligent home equipment according to the habit of the user, and the user experience is low.
Disclosure of Invention
The application aims to provide a control method, a control device, control equipment and a computer readable storage medium of intelligent household equipment, and aims to solve the problems that the traditional method for predicting the behavior of a user on the intelligent household equipment is low in accuracy, so that the intelligent household equipment cannot achieve the purpose of adjusting the working state of the intelligent household equipment according to the habit of the user, and the user experience is reduced.
In order to solve the technical problem, the application provides a control method of smart home devices, including:
acquiring historical operation data of a user on the intelligent home equipment;
inputting the historical operation data into a pre-trained feature extraction model based on a BiGRU and a double-layer attention mechanism to obtain a target feature vector;
determining a behavior prediction result of the user on the intelligent household equipment according to the target characteristic vector;
and adjusting the working state of the intelligent household equipment according to the behavior prediction result.
Optionally, before the inputting the historical operation data into a pre-trained feature extraction model based on BiGRU and a double-layer attention mechanism to obtain a target feature vector, the method further includes:
and modifying the operation time in the historical operation data from the occurrence time point of the target operation behavior to the time interval from the target operation behavior to the next operation behavior.
Optionally, before the inputting the historical operation data into a pre-trained feature extraction model based on BiGRU and a double-layer attention mechanism to obtain a target feature vector, the method further includes:
and arranging the operation records of the historical operation data according to the sequence of the operation time from front to back and dividing the operation records according to days to obtain a plurality of daily operation sequences.
Optionally, the inputting the historical operation data into a pre-trained feature extraction model based on BiGRU and a double-layer attention mechanism to obtain a target feature vector specifically includes:
inputting a daily operation sequence of the predicted current day into a BiGRU layer to obtain a context feature vector;
assigning a weight value to each operation behavior in the context feature vector by using a first attention mechanism layer, wherein the first attention mechanism layer takes a single operation record as an operation unit;
and inputting the weight value of each operation behavior in the context feature vector and the day operation sequence before the predicted day into a second attention mechanism layer to obtain a target feature vector, wherein the second attention mechanism layer takes the day operation sequence as an operation unit.
Optionally, before the inputting the historical operation data into a pre-trained feature extraction model based on BiGRU and a double-layer attention mechanism to obtain a target feature vector, the method further includes:
and inputting the historical operation data into a BiGRU layer in a sliding window mode, and using the first historical operation data after the sliding window as a label to realize the training of the BiGRU layer.
Optionally, before the inputting the history operation data into the BiGRU layer in a sliding window manner, the method further includes:
a dynamically adjustable parameter is created as a window size of the sliding window.
The application also provides a controlling means of intelligent household equipment, includes:
a data acquisition module: the method comprises the steps of obtaining historical operation data of a user on the intelligent household equipment;
a feature extraction module: the characteristic extraction model is used for inputting the historical operation data into a pre-trained characteristic extraction model based on a BiGRU and a double-layer attention mechanism to obtain a target characteristic vector;
a prediction result output module: the intelligent household equipment behavior prediction method comprises the steps of determining a behavior prediction result of a user on the intelligent household equipment according to the target characteristic vector;
the working state adjusting module: and the intelligent household equipment is used for adjusting the working state of the intelligent household equipment according to the behavior prediction result.
Optionally, the feature extraction module specifically includes:
a context feature vector determination unit: the BiGRU layer is used for inputting a daily operation sequence of the predicted current day into the BiGRU layer to obtain a context feature vector;
a weight assignment unit: the first attention mechanism layer is used for assigning a weight value to each operation behavior in the context feature vector, wherein the first attention mechanism layer takes a single operation record as an operation unit;
a target feature vector output unit: and the second attention mechanism layer is used for inputting the weight value of each operation behavior in the context feature vector and a day operation sequence before the predicted current day into a second attention mechanism layer to obtain a target feature vector, wherein the second attention mechanism layer takes the day operation sequence as an operation unit.
In addition, this application still provides a smart home devices's controlgear, includes:
a memory: for storing a computer program;
a processor: the method for controlling the smart home device includes the steps of executing the computer program to implement the method for controlling the smart home device.
Finally, the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the method for controlling smart home devices are implemented as described in any one of the above.
According to the control method of the intelligent home equipment, the historical operation data of the user on the intelligent home equipment is obtained, the historical operation data is input into a pre-trained feature extraction model based on the BiGRU and the double-layer attention mechanism, a target feature vector is obtained, a behavior prediction result of the user on the intelligent home equipment is determined according to the target feature vector, and finally the working state of the intelligent home equipment is adjusted according to the behavior prediction result. Therefore, the behavior habits of the user are extracted from the historical operation data by using a feature extraction model based on the BiGRU and the double-layer attention mechanism, the BiGRU can mine the deep user habits, and the double-layer attention mechanism can give proper weights to different operation behaviors, so that the historical operation data can be fully learned by the model, the prediction accuracy is obviously improved, the purpose of adjusting the working state of the equipment according to the prediction result is realized, and the user experience is greatly improved.
In addition, the application also provides a control device, equipment and a computer readable storage medium of the intelligent household equipment, and the functions of the control device, the equipment and the computer readable storage medium correspond to the functions of the method, and are not described again.
Drawings
For a clearer explanation of the embodiments or technical solutions of the prior art of the present application, the drawings needed for the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a first implementation of a control method for smart home devices according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a GRU model in a first embodiment of a control method for smart home devices provided by the present application;
fig. 3 is a schematic structural diagram of a BiGRU model in a first embodiment of a control method for smart home devices provided by the present application;
fig. 4 is a schematic diagram illustrating a principle of an attention machine in a first embodiment of a control method of smart home equipment provided by the present application;
fig. 5 is a flowchart illustrating an implementation of a second method for controlling smart home devices according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a preprocessing process in a second embodiment of a control method for smart home devices provided by the present application;
fig. 7 is a schematic structural diagram of a feature extraction model in a second embodiment of a control apparatus of smart home devices provided in the present application;
fig. 8 is a functional block diagram of an embodiment of a control device of an intelligent home device provided in the present application;
fig. 9 is a schematic structural diagram of an embodiment of a control device of an intelligent home device provided by the present application.
Detailed Description
The core of the application is to provide a control method, a control device, control equipment and a computer readable storage medium for intelligent household equipment, so that the accuracy of predicting the operation behavior of a user on the performance of the intelligent household equipment is effectively improved, the purpose of adjusting the working state of the intelligent household equipment according to the habit of the user is achieved, and the use experience of the user is improved.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The first embodiment of the control method for the smart home device provided by the present application is described below, and with reference to fig. 1, the first embodiment includes:
step S101: and acquiring historical operation data of the user on the intelligent household equipment.
In this embodiment, the historical operation data mainly refers to data that can reflect an operation habit of a user on the smart home device, and specifically may be an operation record of the user on the smart home device in the past, where the operation record may include information such as operation time, operation behavior, and device state. For the acquisition mode of the historical operation data, the data can be read online through a network interface to download the real-time user data, and the local user data can also be read, namely, the local CSV file is accessed. It should be noted that, when the operation habits of the user on the plurality of smart home devices need to be extracted, the identification information may be respectively allocated to each smart home device, so that each device is distinguished through the identification information of the device when the operation records of the user are recorded.
It should be noted that in an actual application scenario, in order to ensure that the feature extraction model mentioned below can directly identify and process the above-mentioned historical operation data, it is necessary to perform preprocessing on the historical operation data, that is, perform dimension reduction, normalization, and the like on the historical operation data, and conventional preprocessing operations are well known to those skilled in the art and will not be described here. The historical operation data acquired in the above steps of this embodiment may be data that has been preprocessed, or may be raw data that has not been preprocessed.
Step S102: and inputting historical operation data into a pre-trained feature extraction model based on the BiGRU and the double-layer attention mechanism to obtain a target feature vector.
As described above, in the present embodiment, a neural network based on BiGRU and a two-tier attention mechanism is used as a feature extraction model for historical operation data, and the BiGRU and the two-tier attention mechanism are respectively described below:
the gru (gated Recurrent unit) is one of Recurrent Neural Networks (RNN), which is good at processing sequence data, such as voice, text sequence, etc., but RNN only has the capability of processing information at certain intervals, and if the information interval is too far, the problem of difficult association and even serious gradient dispersion and gradient explosion occur. Long Short Term Memory neural networks (LSTM) solve these problems well with gating cells, which introduce three gate functions: the input gate, the forgetting gate and the output gate are controlled to control the input value, the memory value and the output value, and the filtering of the past state is added on the basis of RNN, so that the selection of which state has more influence on the current state can be selected, and the selection of the latest state is not simple. However, the LSTM network has a complex structure, a large number of network parameters, and a large limitation on performance. And the GRU adopts a simpler internal structure on the basis of the LSTM, retains the resistance of the LSTM to the gradient disappearance problem, and reduces the calculated amount when updating the hidden state by combining the basic structures of the unit state and the hidden layer state of the LSTM, thereby achieving faster training. As shown in fig. 2, the model structure of the GRU is different from the LSTM, and is composed of two gates, i.e., an update gate z and a reset gate r, where the influence degree of the hidden layer output at the previous time on the current hidden layer is controlled by the update gate, and the larger the value of the update gate is, the larger the influence of the hidden layer output at the previous time on the current hidden layer is; the degree to which the hidden layer information at the previous time is ignored is controlled by a reset gate, and the smaller the value of the reset gate, the more the ignored.
The data of the intelligent home equipment presents classical Zipf or power law distribution, and is similar to voice and text data, and information before and after the data is associated, namely the control behavior at a certain moment is linked with the control behaviors at the previous moment and the next moment. Therefore, in order to make full use of the forward and backward behavior information and better dig out the behavior habits of the users, the BiGRU is adopted in the embodiment, the model structure of the BiGRU is as shown in fig. 3, and compared with the traditional unidirectional GRU neural network, the BiGRU neural network consists of two unidirectional GRU neural networks with opposite directions, which not only includes the output of the forward GRU neural network at the time t, but also includes the output of the backward GRU neural network at the time t, and the final output at the time t is the concatenation of the forward and backward outputs.
In addition, although the operation behavior of the smart home device by the user is random, there is some sort in the random and unordered behavior. For example, a user turns on a certain device at a certain moment and turns off the device at a certain future moment, so that the data of the smart home device has symmetry, and in order to be able to focus on a behavior having symmetry with the predicted behavior, the present embodiment adopts a focus mechanism. The attention mechanism is inspired by the selective visual attention mechanism of human, for example, when human observes an image, the human does not see each position of the whole image once, but selectively observes a specific part of the image, focuses attention on a region containing image features, and human learns where the attention of the image to be observed in the future should be focused according to the image information observed before, and selects information more critical to the current task target from a plurality of information. Therefore, based on the attention mechanism, the relation among the operation time, the operation behavior and the operation equipment can be learned from the historical operation data containing the information of the operation time, the operation behavior, the operation equipment and the like, the relation between the operation equipment and the operation equipment can also be learned, the characteristic that the states of certain intelligent household equipment are linked in an actual application scene is effectively utilized, and therefore the sufficiency of the learning of the historical operation data is improved.
Note that the model structure of the mechanism is shown in FIG. 4, which is based on the principle that the probability of generation of each term in the output sequence depends on which terms are selected in the input sequence. The attention mechanism effectively solves the problem of the traditional GRU model based on the encoder-decoder structure, namely the GRU model is coded into a vector representation with a fixed length no matter the length of an input sequence, and the learning effect of a longer input sequence is effectively improved.
In summary, in the embodiment, the user habit features are extracted by using a feature extraction model based on BiGRU and a double-layer attention mechanism, where the BiGRU layer mainly performs deep mining on the behavior habits of the user on the input historical operation data, and the double-layer attention mechanism layer is responsible for allocating corresponding weights to different behaviors in the behavior habits, and the finally obtained target feature vector is the user habit features.
Step S103: and determining a behavior prediction result of the user on the intelligent household equipment according to the target characteristic vector.
Specifically, the target feature vector may be correspondingly calculated by using a full connection layer, so as to obtain a behavior prediction result, where the behavior prediction result may include information such as time, operation behavior, and operation device.
Step S104: and adjusting the working state of the intelligent household equipment according to the behavior prediction result.
As described above, the behavior prediction result includes information such as time, operation behavior, and operation device, so that the purpose of adjusting the working state of the smart home device according to the behavior habit of the user can be achieved according to the behavior prediction result, that is, the specific smart home device is adjusted to the working state corresponding to the operation behavior obtained through prediction at the expected time, so that the smart home device is more intelligent and humanized, and the use experience of the user is improved.
The method for controlling the smart home device according to the embodiment obtains the historical operation data of the user on the smart home device, inputs the historical operation data into a pre-trained feature extraction model based on the BiGRU and the double-layer attention mechanism to obtain a target feature vector, determines a behavior prediction result of the user on the smart home device according to the target feature vector, and finally adjusts the working state of the smart home device according to the behavior prediction result. Therefore, the behavior habits of the user are extracted from the historical operation data by using a feature extraction model based on the BiGRU and the double-layer attention mechanism, the BiGRU can mine the deep user habits, and the double-layer attention mechanism can give proper weights to different operation behaviors, so that the historical operation data can be fully learned by the model, the prediction accuracy is obviously improved, the purpose of adjusting the working state of the equipment according to the prediction result is realized, and the user experience is greatly improved.
An embodiment of a control method for smart home devices provided by the present application is described in detail below, and the embodiment two is implemented based on the embodiment one and is expanded to a certain extent based on the embodiment one. Specifically, the embodiment describes the preprocessing process of the historical operation data in detail, and introduces the learning process of the feature extraction model.
Referring to fig. 5, the second embodiment specifically includes:
step S201: and acquiring historical operation data of the user on the intelligent home equipment, and preprocessing the historical operation data.
The historical operation data may be specifically operation records of the user on the smart home device in the past. As a specific implementation manner, in this embodiment, as shown in fig. 6, the preprocessing includes processing of data dimension reduction, processing of digitization, data partitioning and normalization, and data tagging, and these processes are described below:
in the data dimension reduction process, the goal of the feature extraction model is to mine the behavior habit of the user, i.e. the operation behavior sequence of the user, from the historical operation data, so that if the original data is all input into the feature extraction model for calculation, a large amount of calculation resources are wasted, the efficiency is low, which is obviously unscientific, and therefore, the original historical operation data needs to be subjected to dimension reduction. As a preferred implementation manner, only three parameters of the operation device, the operation behavior, and the operation time are reserved in this embodiment, in other words, for each user operation record, this embodiment describes it by using three parameters of the operation device, the operation behavior, and the operation time.
In the numerical processing, generally, the operation behavior of the user is often a trigger-type action, so the corresponding operation time is often a time point, however, in an actual application scenario, the time period often has a reference value compared with the time point. Therefore, as a preferred implementation, the present embodiment performs a digitization process on the time point data, that is, a specific time is converted into a time period for representing a time interval between two adjacent operations of the user, specifically, the operation time in the historical operation data is modified from the occurrence time point of the target operation behavior to a time interval between the target operation behavior and the next operation behavior. In addition, for convenience of representation, different states of different devices can be encoded, and the preprocessed three-dimensional data can be stored in the CSV file.
In the embodiment, in order to extract the behavior habits of the user, the historical operation data is divided in units of days in consideration that the behavior habits of the user are often presented in units of days, for example, the historical operation data of a certain user u is assumed to include an operation record of n days, that is, the historical operation data of the certain user u is assumed to include an operation record of n days
Figure BDA0002023120820000101
Wherein the operation record of the i-th day is represented as
Figure BDA0002023120820000102
i is belonged to (1, n), and the j control record at the ith day is represented as Xu,i,j={Du,i,j,Cu,i,j,Tu,i,jJ ∈ (1, m), where D is the operating device, C is the operating behavior, and T is the operating time. It should be noted that m represents only the number of operation records of the user u on the ith day, and the number of operation records of the user u per day may be different in real life. Because the operation equipment, the operation behavior and the operation time are different in dimension and are in different orders of magnitude, the operation record needs to be subjected to linear function normalization operation, and the normalization formula is as follows:
Figure BDA0002023120820000103
wherein, XnormExpressed as normalized data, X represents raw data, XminRepresenting the minimum, X, of the original data setmaxRepresenting the maximum value of the original data set.
Based on the preferred implementation scheme provided in this embodiment, specifically, in this embodiment, the idea of generating a text by using an RNN is adopted, a sliding window is set, and the next operation record of the sliding window is used as a label, so as to implement training on the model. The window size of the sliding window can be represented by a dynamically adjustable parameter in the training process, and the size of the sliding window can be adjusted according to the model verification result in the training process.
Step S202: and inputting the daily operation sequence of the predicted current day into the BiGRU layer to obtain the context feature vector.
As shown in fig. 7, the model structure of the feature extraction model according to the second embodiment mainly includes a BiGRU layer, a first fully-connected layer, a first attention mechanism layer, an embedding layer, a second attention mechanism layer, and a second fully-connected layer. In an actual application scenario, a daily operation sequence of the current prediction day is input into the BiGRU layer, and a daily operation sequence of the current prediction day is input into the embedded layer, so that a final target feature vector can be obtained in the second fully-connected layer, and a prediction result of a user operation behavior in the current prediction day is obtained according to the target feature vector. As an alternative embodiment, the day before the prediction day may be the day before the prediction, and hereinafter, the day before the prediction day is referred to as the ith day, and the day before the prediction day is referred to as the (i-1) th day.
Specifically, in the GRU model diagram shown in fig. 2, at time t, the update formula of each unit component of the GRU model is:
z=σ(Wzht-1+Uzxt) (2)
r=σ(Wrht-1+Urxt) (3)
Figure BDA0002023120820000111
Figure BDA0002023120820000112
wherein z represents an update gate, i.e., whether previous information needs to be updated; r represents a reset gate, i.e. represents whether the previous information needs to be reset; c represents memory cells, receiptInformation x input at previous timetAnd the information h output by the previous hidden layert-1;htRepresenting the output of a GRU hidden layer at the time t; w and U correspond to weight information of different doors, respectively.
According to the BiGRU neural network model diagram shown in FIG. 3, the current hidden layer state of the BiGRU is input by xtHidden layer state output with forward (t-1) time
Figure BDA0002023120820000122
And reverse output
Figure BDA0002023120820000123
Are determined jointly. After the features of the BiGRU layer are extracted, the relation among the behavior sequences can be learned more fully. Inputting the control behavior of the control sequence on the ith day in a sliding window mode, wherein the window size of the sliding window is L, and the specific calculation formula is as follows:
hi:i+L=BiGRU(Xi,Xi+1,...,Xi+L) (6)
step S203: and assigning a weight value to each operation behavior in the context feature vector by using a first attention mechanism layer.
The input data of the first attention mechanism layer is the output of the upper BiGRU layer, and the first attention mechanism layer is mainly used for distributing corresponding probability weights for different operation behaviors, highlighting key information of a behavior sequence in a sliding window and further extracting user behavior habits. And dynamically allocating weights through an attention mechanism, and learning the correlation between different behaviors in a sliding window and the predicted behavior, wherein the calculation formula of the correlation is as follows:
ui:i+L=tanh(Wwhi:i+L+bw) (7)
wherein, WwRepresents a weight coefficient, bwRepresenting the bias coefficient.
Then u is puti:i+LInputting the full-connection layer, namely performing normalization processing according to a softmax function to obtain a normalization weight, wherein a normalization weight calculation formula is as follows:
Figure BDA0002023120820000121
wherein u iswRepresenting a randomly initialized attention matrix. The attention mechanism vector E is equal to the cumulative sum of the products of the different probability weights assigned by the attention mechanism and the various hidden states, i.e.:
E=∑αi:i+Lhi:i+L (9)
the final output of the first layer attention mechanism is a different attention to each operation behavior within the sliding window L, which is formulated as:
Ci:i+L=H(E,hi:i+L) (10)
step S204: and inputting the weight value of each operation behavior in the context feature vector and the day operation sequence of the previous day into a second attention mechanism layer to obtain a target feature vector.
The input data of the second attention mechanism layer is the output of the first attention mechanism layer and the day operation sequence of the (i-1) th day of the user. Specifically, the daily operation sequence of the user on the (i-1) th day is converted into a distributed vector representation through an embedding layer, and then the distributed vector representation is combined with the output of the first attention mechanism layer to be used as the input of the second attention mechanism layer. Finally, through the learning of the second attention mechanism layer, key information of the behavior sequence outside the window can be captured, the feature learning is not limited to a specific area, and the behavior habits of the user can be better mined from the behavior sequence of the user in one day.
It should be noted that the present embodiment includes two attention layers, including the above-mentioned first attention layer and the second attention layer, and the difference therebetween is that the first attention layer uses a single operation record as the operation unit, and the second attention layer uses the entire daily operation sequence as the operation unit.
Step S205: and performing corresponding calculation on the target characteristic vector by using the full-connection layer to obtain a behavior prediction result.
The input of the model output layer is the output of the second attention mechanism layer, and specifically, the input of the output layer is correspondingly calculated by using the full-connection layer, so that a user behavior prediction result containing time information is obtained.
Step S206: and adjusting the working state of the intelligent household equipment according to the behavior prediction result.
In summary, the control method for the smart home device provided in this embodiment improves the shortcomings and disadvantages of the algorithm for mining the behavior habits of the users by the traditional neural network model, performs data preprocessing on a large amount of historical operation data of the behavior habits of the users, extracts the behavior habits of the users by the network model designed in this embodiment, combines the advantages of the bidirectional gate control unit and the double-layer attention mechanism, and mines the behavior habits of the users by using the special structure of the improved GRU network and the double-layer attention mechanism, so that the model is sufficiently trained, thereby more accurately predicting the control device, the control state and the control time of the user at the next moment, realizing the time-efficient user behavior prediction method, adjusting the working state of the device according to the prediction result, and making the smart home device more intelligent.
In the following, embodiments of a control device for smart home devices provided in the embodiments of the present application are introduced, and a control device for smart home devices described below and a control method for smart home devices described above may be referred to in a corresponding manner. As shown in fig. 8, the apparatus includes:
data acquisition module 801: the method comprises the steps of obtaining historical operation data of a user on the intelligent household equipment;
the feature extraction module 802: the system comprises a feature extraction model, a target feature vector, a feature extraction model and a feature extraction model, wherein the feature extraction model is used for inputting historical operation data into a pre-trained feature extraction model based on a BiGRU (BiGRU) and a double-layer attention mechanism to obtain the target feature vector;
prediction result output module 803: the intelligent household equipment behavior prediction method comprises the steps of determining a behavior prediction result of a user on the intelligent household equipment according to a target feature vector;
the working state adjustment module 804: and the intelligent household equipment is used for adjusting the working state of the intelligent household equipment according to the behavior prediction result.
As a specific implementation manner, the feature extraction module 802 specifically includes:
a context feature vector determination unit: the BiGRU layer is used for inputting a daily operation sequence of the predicted current day into the BiGRU layer to obtain a context feature vector;
a weight assignment unit: the first attention mechanism layer is used for assigning a weight value to each operation behavior in the context feature vector, wherein the first attention mechanism layer takes a single operation record as an operation unit;
a target feature vector output unit: and the second attention mechanism layer is used for inputting the weight value of each operation behavior in the context feature vector and a day operation sequence before the predicted current day into a second attention mechanism layer to obtain a target feature vector, wherein the second attention mechanism layer takes the day operation sequence as an operation unit.
Therefore, specific implementation manners of the apparatus can be seen in the foregoing parts of the control method of the smart home device, for example, the data obtaining module 801, the feature extracting module 802, the prediction result output module 803, and the working state adjusting module 804 are respectively used for implementing steps S101, S102, S103, and S104 in the control method of the smart home device. Therefore, specific embodiments thereof may be referred to in the description of the corresponding respective partial embodiments, and will not be described herein.
In addition, since the control device of the smart home device of this embodiment is used to implement the foregoing control method of the smart home device, the function of the control device corresponds to the function of the method, and details are not described here.
In addition, this application still provides a smart home devices's controlgear, as shown in fig. 9, this equipment includes:
a memory 901: for storing a computer program;
the processor 902: the steps of the control method for the smart home device are implemented by executing the computer program.
Finally, the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the method for controlling smart home devices are implemented as described in any one of the above.
The control device and the computer-readable storage medium of the smart home device in this embodiment are used to implement the foregoing control method of the smart home device, so that specific implementations of the device and the computer-readable storage medium may be found in the foregoing embodiment of the control method of the smart home device, and functions of the device and the computer-readable storage medium correspond to those of the above method embodiment, and are not described again here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, the device, the equipment and the computer-readable storage medium for controlling the smart home equipment provided by the application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, the present application can also make several improvements and modifications, and those improvements and modifications also fall into the protection scope of the claims of the present application.

Claims (10)

1. A control method of intelligent household equipment is characterized by comprising the following steps:
acquiring historical operation data of a user on the intelligent home equipment; the historical operation data comprises operation time, operation behaviors and equipment states;
inputting the historical operation data into a pre-trained feature extraction model based on a BiGRU and a double-layer attention mechanism to obtain a target feature vector; the BiGRU layer is used for deeply mining behavior habits of users for input historical operation data, and the double-layer attention mechanism layer is used for distributing corresponding weights for different behaviors in the behavior habits; the characteristic extraction model based on the BiGRU and the double-layer attention mechanism is a characteristic extraction model taking a neural network based on the BiGRU and the double-layer attention mechanism as historical operation data;
determining a behavior prediction result of the user on the intelligent household equipment according to the target characteristic vector;
and adjusting the working state of the intelligent household equipment according to the behavior prediction result.
2. The method for controlling smart home devices according to claim 1, wherein before the inputting the historical operation data into a pre-trained BiGRU and two-tier attention mechanism-based feature extraction model to obtain a target feature vector, the method further comprises:
and modifying the operation time in the historical operation data from the occurrence time point of the target operation behavior to the time interval from the target operation behavior to the next operation behavior.
3. The method for controlling smart home devices according to claim 2, wherein before the inputting the historical operation data into a pre-trained BiGRU and two-layer attention mechanism-based feature extraction model to obtain a target feature vector, the method further comprises:
and arranging the operation records of the historical operation data according to the sequence of the operation time from front to back and dividing the operation records according to days to obtain a plurality of daily operation sequences.
4. The method for controlling smart home devices according to claim 3, wherein the step of inputting the historical operation data into a pre-trained feature extraction model based on a BiGRU and a double-layer attention mechanism to obtain a target feature vector specifically comprises:
inputting a daily operation sequence of the predicted day into a BiGRU layer to obtain a context feature vector;
assigning a weight value to each operation behavior in the context feature vector by using a first attention mechanism layer, wherein the first attention mechanism layer takes a single operation record as an operation unit;
and inputting the weight value of each operation behavior in the context feature vector and the day operation sequence before the predicted day into a second attention mechanism layer to obtain a target feature vector, wherein the second attention mechanism layer takes the day operation sequence as an operation unit.
5. The method for controlling smart home devices according to any one of claims 1 to 4, wherein before the inputting the historical operation data into a pre-trained BiGRU and two-tier attention mechanism-based feature extraction model to obtain a target feature vector, the method further comprises:
and inputting the historical operation data into a BiGRU layer in a sliding window mode, and using the first historical operation data after the sliding window as a label to realize the training of the BiGRU layer.
6. The method for controlling smart home devices according to claim 5, wherein before the inputting the history operation data into the BiGRU layer in a sliding window manner, the method further comprises:
a dynamically adjustable parameter is created as a window size of the sliding window.
7. The utility model provides a controlling means of intelligent household equipment which characterized in that includes:
a data acquisition module: the method comprises the steps of obtaining historical operation data of a user on the intelligent household equipment; the historical operation data comprises operation time, operation behaviors and equipment states;
a feature extraction module: the characteristic extraction model is used for inputting the historical operation data into a pre-trained characteristic extraction model based on a BiGRU and a double-layer attention mechanism to obtain a target characteristic vector; the BiGRU layer is used for deeply mining behavior habits of users for input historical operation data, and the double-layer attention mechanism layer is used for distributing corresponding weights for different behaviors in the behavior habits; the characteristic extraction model based on the BiGRU and the double-layer attention mechanism is a characteristic extraction model taking a neural network based on the BiGRU and the double-layer attention mechanism as historical operation data;
a prediction result output module: the intelligent household equipment behavior prediction method comprises the steps of determining a behavior prediction result of a user on the intelligent household equipment according to the target characteristic vector;
the working state adjusting module: and the intelligent household equipment is used for adjusting the working state of the intelligent household equipment according to the behavior prediction result.
8. The control device of intelligent household equipment according to claim 7, wherein the feature extraction module specifically comprises:
a context feature vector determination unit: the BiGRU layer is used for inputting a daily operation sequence of the predicted current day into the BiGRU layer to obtain a context feature vector;
a weight assignment unit: the first attention mechanism layer is used for assigning a weight value to each operation behavior in the context feature vector, wherein the first attention mechanism layer takes a single operation record as an operation unit;
a target feature vector output unit: and the second attention mechanism layer is used for inputting the weight value of each operation behavior in the context feature vector and a day operation sequence before the predicted current day into a second attention mechanism layer to obtain a target feature vector, wherein the second attention mechanism layer takes the day operation sequence as an operation unit.
9. The utility model provides a smart home devices's controlgear which characterized in that includes:
a memory: for storing a computer program;
a processor: steps for executing the computer program to implement a method of controlling a smart home device as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of a method for controlling smart home devices according to any one of claims 1 to 6.
CN201910285463.XA 2019-04-10 2019-04-10 Control method, device and equipment of intelligent household equipment Active CN109947029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910285463.XA CN109947029B (en) 2019-04-10 2019-04-10 Control method, device and equipment of intelligent household equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910285463.XA CN109947029B (en) 2019-04-10 2019-04-10 Control method, device and equipment of intelligent household equipment

Publications (2)

Publication Number Publication Date
CN109947029A CN109947029A (en) 2019-06-28
CN109947029B true CN109947029B (en) 2022-05-10

Family

ID=67014075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910285463.XA Active CN109947029B (en) 2019-04-10 2019-04-10 Control method, device and equipment of intelligent household equipment

Country Status (1)

Country Link
CN (1) CN109947029B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110456647B (en) * 2019-07-02 2020-11-27 珠海格力电器股份有限公司 Intelligent household control method and intelligent household control device
CN110430105A (en) * 2019-07-15 2019-11-08 恒大智慧科技有限公司 Smart machine control method, system, computer equipment and readable storage medium storing program for executing
CN112394647B (en) * 2019-08-19 2024-04-19 中国移动通信有限公司研究院 Control method, device, equipment and storage medium of household equipment
CN112213976B8 (en) * 2020-10-07 2022-01-28 陈仲凯 Smart home humidification control method and system based on big data
CN112600897B (en) * 2020-12-07 2022-04-29 广州技象科技有限公司 Multi-user access control method and device for intelligent equipment
CN113139590B (en) * 2021-04-13 2022-03-22 索信达(北京)数据技术有限公司 Dimension reduction method and device for time series data, computer equipment and storage medium
CN113657454B (en) * 2021-07-23 2024-02-23 杭州安脉盛智能技术有限公司 Nuclear power rotating machinery state monitoring method based on autoregressive BiGRU
CN114690731B (en) * 2022-03-09 2024-05-24 青岛海尔科技有限公司 Associated scene recommendation method and device, storage medium and electronic device
CN114740745B (en) * 2022-04-25 2023-01-24 深圳市联合同创科技股份有限公司 Intelligent household control method and terminal
CN115456162B (en) * 2022-08-12 2023-07-14 星络家居云物联科技有限公司 Training method and device for user behavior habit learning model based on virtual interaction
CN115063874B (en) * 2022-08-16 2023-01-06 深圳市海清视讯科技有限公司 Control method, device and equipment of intelligent household equipment and storage medium
CN116165911B (en) * 2023-04-19 2023-07-11 深圳市吉方工控有限公司 Smart home control method and device, embedded industrial control equipment and medium
CN117008494B (en) * 2023-10-07 2024-03-22 深圳市北鼎科技有限公司 Internet of things-based intelligent control method and system for kitchen appliances
CN117216505B (en) * 2023-11-09 2024-03-19 广州视声智能股份有限公司 User habit prediction method and system based on smart home use record

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109478204B (en) * 2016-05-17 2023-09-15 微软技术许可有限责任公司 Machine understanding of unstructured text
CN107944915B (en) * 2017-11-21 2022-01-18 北京字节跳动网络技术有限公司 Game user behavior analysis method and computer-readable storage medium
CN108446374B (en) * 2018-03-16 2019-09-20 北京三快在线科技有限公司 User's Intention Anticipation method, apparatus, electronic equipment, storage medium
CN109344992B (en) * 2018-08-21 2021-10-19 广东工业大学 Modeling method for user control behavior habits of smart home integrating time-space factors
US10832003B2 (en) * 2018-08-26 2020-11-10 CloudMinds Technology, Inc. Method and system for intent classification
CN109542944B (en) * 2018-09-29 2023-07-25 广东工业大学 Intelligent home user control behavior recommendation method based on time sequence causality analysis

Also Published As

Publication number Publication date
CN109947029A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN109947029B (en) Control method, device and equipment of intelligent household equipment
CN108182389B (en) User data processing method based on big data and deep learning and robot system
CN109857860A (en) File classification method, device, computer equipment and storage medium
WO2020048389A1 (en) Method for compressing neural network model, device, and computer apparatus
CN110188192B (en) Multi-task network construction and multi-scale criminal name law enforcement combined prediction method
CN113852432B (en) Spectrum Prediction Sensing Method Based on RCS-GRU Model
CN113905391A (en) Ensemble learning network traffic prediction method, system, device, terminal, and medium
CN109919078A (en) A kind of method, the method and device of model training of video sequence selection
CN109583565A (en) Forecasting Flood method based on the long memory network in short-term of attention model
CN111105016B (en) Data processing method and device, electronic equipment and readable storage medium
CN109344992B (en) Modeling method for user control behavior habits of smart home integrating time-space factors
CN111125519B (en) User behavior prediction method, device, electronic equipment and storage medium
CN110135441A (en) A kind of text of image describes method and device
CN102622515A (en) Weather prediction method
JP2022520000A (en) Data processing methods, data processing equipment, computer programs and electronic equipment
CN109978491A (en) Remind prediction technique, device, computer equipment and storage medium
CN115063874B (en) Control method, device and equipment of intelligent household equipment and storage medium
CN112395504B (en) Short video click rate prediction method based on sequence capsule network
CN115034430A (en) Carbon emission prediction method, device, terminal and storage medium
CN109800517A (en) Improved reverse modeling method for magnetorheological damper
CN115310782A (en) Power consumer demand response potential evaluation method and device based on neural turing machine
CN111461455A (en) Behavior prediction method based on correlation period attention mechanism
CN111125551A (en) User position prediction method based on Markov model with selective memory
CN112817563A (en) Target attribute configuration information determination method, computer device, and storage medium
CN108470212B (en) Efficient LSTM design method capable of utilizing event duration

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