Disclosure of Invention
The invention provides a smart home control method and device based on big data and a computer readable storage medium, and mainly aims to solve the problem of low efficiency of smart home control.
In order to achieve the above purpose, the invention provides an intelligent home control method based on big data, comprising the following steps:
Collecting all intelligent household devices in a preset household area into an intelligent device group, and acquiring user behavior data through a user behavior component in the intelligent device group to obtain a user behavior data set;
calculating the similarity between the user behavior data in the user behavior data set by using a preset behavior similarity algorithm, and merging the data of the user behavior data set according to the similarity to obtain a weighted user data set;
carrying out weighted mapping on the weighted user data set by using a preset self-mapping model to obtain a weighted behavior feature set;
Performing feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster, performing feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, and extracting a user behavior habit group according to the behavior feature cluster;
Acquiring an online behavior habit group from a preset data cloud, updating the user behavior habit group according to the online behavior habit group to obtain a standard user habit group, and switching the working mode of the intelligent household equipment according to the standard user habit group.
Optionally, the collecting, by the user behavior component in the smart device group, user behavior data to obtain a user behavior data set includes:
Collecting user portrait data by using a camera component in the user behavior component, collecting user fingerprint data by using a fingerprint component in the user behavior component, generating user age data and user gender data of the target user according to the user portrait data, and generating a user list according to the user age data, the user gender data and the user fingerprint data;
Selecting users from the user list one by one as target users, and acquiring light configuration data, temperature configuration data, humidity configuration data and video configuration data of the target users by utilizing the user behavior component;
And converging the light configuration data, the temperature configuration data, the humidity configuration data and the audio-visual configuration data into user behavior data of the target user according to a category sequence, and converging all the user behavior data into the user behavior data set.
Optionally, the generating the user age data and the user gender data of the target user according to the user portrait data includes:
Extracting primary skull characteristics corresponding to the target user from the user portrait data, and iterating the primary skull characteristics by using a preset iteration algorithm to obtain secondary skull characteristics;
Classifying according to the secondary skull characteristics by using a preset gender classifier to obtain user gender data;
extracting skin texture features corresponding to the user portrait data by using the trained texture extraction model;
And classifying according to the skin texture features by using the trained multimode classifier to obtain primary age data, and counting the data with the largest frequency in the primary age data as the user age data.
Optionally, the performing data merging on the user behavior data set according to the similarity to obtain a weighted user data set includes:
deleting data with data values exceeding a preset user data threshold value from the user behavior data set to obtain a standard user data set;
selecting standard user data in the standard user data set one by one as target standard data, and selecting standard user data with the behavior similarity larger than a preset similarity threshold value from the standard user data set to form a primary similar data set;
Adding the target standard data to the primary similar data set to obtain a secondary similar data set, and deleting data in the secondary similar data set from the standard user data set;
and taking the number of data elements in the secondary similar data set as the weight of the target standard data, and adding the weight of the target standard data and the weight of the target standard data into the weighted user data set.
Optionally, the weighted user data set is mapped with weights by using a preset self-mapping model to obtain a weighted behavior feature set, which includes:
Extracting a corresponding data weight set from the weighted user data set, and carrying out normalization operation on the weights in the data weight set by utilizing the self-mapping model to obtain a standard weight set;
grouping the weighted user data sets according to data types to obtain a plurality of weighted type data sets;
Selecting the weighted type data sets one by one as a target type data set, calculating a data average value of the target type data set, and subtracting the data average value from each data element in the target type data set to obtain a target average value data set;
calculating the mean square error of the target mean data set, dividing each data element in the target mean data set by the mean square error to obtain a standard type data set, collecting all the standard type data sets into a standard type data set,
And selecting weights from the standard weight set one by one as target weights, extracting data corresponding to the target weights from the standard type data set to form a target data set, vectorizing the data in the target data set according to the sequence of data types to obtain weighted behavior characteristics, and integrating all the weighted behavior characteristics into a weighted behavior characteristic set.
Optionally, the performing feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster includes:
Collecting the weighted behavior features in the weighted behavior feature set into a weighted vector sequence according to the order of the weights from big to small;
Extracting a preset constant weight data vector from the weight vector sequence according to the sequence order to form an input vector sequence;
Selecting weighted data vectors in the input vector sequence one by one as a first weighted vector, selecting weighted data vectors except the first weighted vector in the weighted vector sequence one by one as a second weighted vector, and calculating a vector distance between the first weighted vector and the second weighted vector by using a preset first distance formula;
Selecting a weighted data vector with the minimum vector distance with the first weighted vector as a target weighted vector, and taking the vector distance between the first weighted vector and the target weighted vector as a target vector distance;
calculating the neighborhood radius of the first weighted vector according to the target vector distance, and converging all weighted data vectors with the vector distance smaller than the neighborhood radius with the first weighted vector into a neighborhood vector group;
Updating the weight of each weighted data vector in the neighborhood vector group by using a preset iterative algorithm to obtain a primary feature cluster corresponding to the first weighted vector, and collecting all the primary feature clusters into a primary feature cluster.
Optionally, the feature clustering is performed on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, including:
Selecting primary feature clusters in the primary feature cluster set one by one as target feature clusters, and selecting a weighted data vector in the target feature clusters as a cluster center weighted vector;
selecting weighted data vectors except the cluster center weighted vector in the primary feature cluster set one by one as a third weighted vector, and calculating a final vector distance between the cluster center weighted vector and the third data vector by using a second distance formula as follows:
Wherein J refers to the final vector distance, ρ refers to the weight of the third weight vector, σ refers to the weight of the cluster center weight vector, o refers to the total number of vector elements in the cluster center weight vector, k refers to the kth vector element, E k refers to the kth vector element in the cluster center weight vector, and F k refers to the kth vector element in the third weight vector;
And carrying out feature clustering on the primary feature clusters according to the final vector distance to obtain behavior feature clusters.
In order to solve the above problems, the present invention further provides an intelligent home control device based on big data, the device comprising:
the data acquisition module is used for gathering all intelligent household devices in a preset household area into an intelligent device group, and acquiring user behavior data through a user behavior component in the intelligent device group to obtain a user behavior data set;
The data merging module is configured to calculate a similarity between user behavior data in the user behavior data set by using a preset behavior similarity algorithm, and merge data in the user behavior data set according to the similarity to obtain a weighted user data set, where the calculating the similarity between user behavior data in the user behavior data set by using the preset behavior similarity algorithm includes: selecting user behavior data in the user behavior data set one by one as target user data, carrying out vectorization operation on the target user data to obtain target data vectors, and converging all the target data vectors into a data vector sequence; selecting data vectors in the data vector sequence one by one as a first data vector, selecting data vectors, which are positioned behind the first data vector, in the standard data vector sequence one by one as a second data vector, and calculating the behavioral similarity between the first data vector and the second data vector by using the following behavioral similarity algorithm:
Wherein S refers to the behavior similarity, n refers to the total number of elements of each data vector in the vector sequence, i refers to the i-th element of each data vector in the vector sequence, a i refers to the i-th element in the first data vector, B i refers to the i-th element in the second data vector, α is a preset reference coefficient, and β is a preset balance coefficient;
The weighted mapping module is used for carrying out weighted mapping on the weighted user data set by utilizing a preset self-mapping model to obtain a weighted behavior feature set;
The habit extraction module is used for carrying out feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster, carrying out feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, and extracting a user behavior habit group according to the behavior feature cluster;
The mode switching module is used for acquiring an online behavior habit group from a preset data cloud, updating the user behavior habit group according to the online behavior habit group to obtain a standard user habit group, and switching the working mode of the intelligent household equipment according to the standard user habit group.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the big data based smart home control method described above.
In order to solve the above-mentioned problems, the present invention also provides a computer readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned big data based smart home control method.
According to the embodiment of the invention, the user behavior data is acquired through the user behavior component in the intelligent equipment group to obtain the user behavior data set, so that the users can be distinguished, and the use behavior record data of each user can be obtained, thereby laying a foundation for the subsequent extraction of the use habit of the users; the weighted user data set is mapped with weights by utilizing a preset self-mapping model to obtain a weighted behavior feature set, the data classification in the weighted user data set can be standardized, the effect of carrying out dimension reduction and feature extraction on the weighted user data set is achieved, the weights in the weighted user data set are normalized, is improved in subsequent clustering efficiency, the behavior feature clustering is obtained through carrying out clustering operation twice, the accuracy of clustering data can be improved, the common characteristics of the data are easier to grasp, user habits are extracted, the user behavior habit group is extracted according to the behavior feature clustering, large data of the user behavior habit group can be compared and matched, a more comfortable intelligent household control scheme is provided for users, the standard user habit group is obtained by combining large data of the cloud end according to the standard user habit group, the cloud end is switched to the intelligent household equipment, and the user habit is provided with the rest common use habits of the users with the same habit, for example, the intelligent household equipment is more than the intelligent household equipment, and the user habit can be used in the same, and the user habit can be controlled by the intelligent household equipment, and the user habit can be switched from the intelligent household equipment, and the rest user habit equipment is better, and the user habit can be controlled by the user has the same user habit, and the user habit can be better and the user habit equipment. Therefore, the intelligent home control method, the device, the electronic equipment and the computer readable storage medium based on the big data can solve the problem of low efficiency in intelligent home control.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides an intelligent home control method based on big data. The execution main body of the intelligent home control method based on big data comprises at least one of electronic equipment, such as a server side, a terminal and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the smart home control method based on big data may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a smart home control method based on big data according to an embodiment of the present invention is shown. In this embodiment, the smart home control method based on big data includes:
s1, collecting all intelligent household devices in a preset household area into an intelligent device group, and acquiring user behavior data through a user behavior component in the intelligent device group to obtain a user behavior data set;
in the embodiment of the invention, the intelligent household equipment can be household appliances which can be connected with a local area network for regulation and control, such as an intelligent door lock, an intelligent lamp, an intelligent air conditioner, an intelligent humidifier, an intelligent sound box, an intelligent television and the like.
Specifically, the user behavior component is a component for recording the use condition of a user, for example, a control host of the smart home device or a cloud control device of the smart home device.
In detail, the user behavior data refers to data such as the number of times of use, a setting mode, gear habits and the like of the user.
In the embodiment of the present invention, referring to fig. 2, the step of acquiring user behavior data through a user behavior component in the intelligent device group to obtain a user behavior data set includes:
s31, acquiring user portrait data by using a camera component in the user behavior component, acquiring user fingerprint data by using a fingerprint component in the user behavior component, generating user age data and user gender data of the target user according to the user portrait data, and generating a user list according to the user age data, the user gender data and the user fingerprint data;
S32, selecting users from the user list one by one as target users, and acquiring light configuration data, temperature configuration data, humidity configuration data and video configuration data of the target users by utilizing the user behavior component;
S33, collecting the light configuration data, the temperature configuration data, the humidity configuration data and the audio-visual configuration data into user behavior data of the target user according to a category sequence, and collecting all the user behavior data into a user behavior data set.
In detail, the camera assembly may be a smart camera or a smart concierge, such as QR-HND-11303R-I or DS-2CD3232 (D) -I5.
Specifically, the fingerprint component can be a fingerprint identification component on household equipment such as an intelligent door lock or an intelligent lamp, for example WHL-3018B or HOTATA-V86S.
In detail, the generating the user list according to the user age data, the user gender data and the user fingerprint data means that the user portrait data is matched with the user fingerprint data, so that the number of users and the user ID in the home area are determined.
Specifically, the light configuration data includes data such as a light on period, a light source brightness, and a light source color temperature.
In detail, the temperature configuration data includes an air conditioner on period, an air conditioner temperature, a floor heating temperature setting, and a corresponding time point outdoor temperature.
Specifically, the humidity configuration data includes a humidifier on period, a humidifier gear, an indoor humidity, and an outdoor humidity.
In detail, the audio-visual configuration data includes television on-time, channel selection data and volume adjustment data.
In detail, the generating the user age data and the user gender data of the target user according to the user portrait data includes:
Extracting primary skull characteristics corresponding to the target user from the user portrait data, and iterating the primary skull characteristics by using a preset iteration algorithm to obtain secondary skull characteristics;
Classifying according to the secondary skull characteristics by using a preset gender classifier to obtain user gender data;
extracting skin texture features corresponding to the user portrait data by using the trained texture extraction model;
And classifying according to the skin texture features by using the trained multimode classifier to obtain primary age data, and counting the data with the largest frequency in the primary age data as the user age data.
Specifically, the primary skull feature corresponding to the target user can be extracted from the user portrait data by using the trained convolutional neural network model.
In detail, the iterative algorithm may be an Adaboost algorithm or a decision tree algorithm (GDBT, gradient Boosting Decision Tree).
In detail, the gender classifier may be a support vector machine (SVM, support Vector Machine) or a Long Short-Term Memory network (LSTM).
Specifically, the texture extraction model is a model obtained by training a convolutional neural network by using texture labels.
In detail, the multimode classifier may be a support vector machine (SVM, support Vector Machine) or a decision tree model.
Specifically, the obtaining, by using the user behavior component, the light configuration data, the temperature configuration data, the humidity configuration data, and the audio-visual configuration data of the target user includes:
Transmitting a lamplight inquiry request to intelligent lamps in the intelligent equipment group by utilizing the user behavior component, and extracting lamplight configuration data of the target user from returned data of the lamplight inquiry request;
the user behavior component is utilized to send a temperature query request to intelligent air conditioners in the intelligent equipment group, and temperature configuration data of the target user are extracted from return data of the temperature query request;
Sending a humidity query request to intelligent humidifiers in the intelligent equipment group by using the user behavior component, and extracting humidity configuration data of the target user from returned data of the humidity query request;
And sending an audio-video query request to the intelligent televisions in the intelligent equipment group by utilizing the user behavior component, and extracting audio-video configuration data of the target user from returned data of the audio-video query request.
In the embodiment of the invention, the user behavior data is acquired through the user behavior component in the intelligent equipment group to obtain the user behavior data set, so that the users can be distinguished, and the use behavior record data of each user is obtained, thereby laying a foundation for the follow-up extraction of the use habit of the user.
S2, calculating the similarity between the user behavior data in the user behavior data set by using a preset behavior similarity algorithm, and carrying out data merging on the user behavior data set according to the similarity to obtain a weighted user data set;
In the embodiment of the present invention, the calculating the similarity between the user behavior data in the user behavior data set by using a preset behavior similarity algorithm includes:
Selecting user behavior data in the user behavior data set one by one as target user data, carrying out vectorization operation on the target user data to obtain target data vectors, and converging all the target data vectors into a data vector sequence;
Selecting data vectors in the data vector sequence one by one as a first data vector, selecting data vectors, which are positioned behind the first data vector, in the standard data vector sequence one by one as a second data vector, and calculating the behavioral similarity between the first data vector and the second data vector by using the following behavioral similarity algorithm:
Wherein S refers to the behavior similarity, n refers to the total number of elements of each data vector in the vector sequence, i refers to the i-th element of each data vector in the vector sequence, a i refers to the i-th element in the first data vector, B i refers to the i-th element in the second data vector, α is a preset reference coefficient, and β is a preset balance coefficient.
In the embodiment of the invention, the behavior similarity between the first data vector and the second data vector is calculated by using the behavior similarity algorithm, so that the correlation of each element in the data vector can be considered, the overall similarity is further determined, and the characterization of the behavior similarity is improved.
Specifically, the vectorizing operation is performed on the target user data to obtain a target data vector, which means that each type of data of the target user data is taken as an element of the vector, so as to form a data vector.
In detail, the reference coefficient may be 1 or 0, and the balance coefficient may be 2 or 1.
In detail, the data merging of the user behavior data set according to the similarity to obtain a weighted user data set includes:
deleting data with data values exceeding a preset user data threshold value from the user behavior data set to obtain a standard user data set;
selecting standard user data in the standard user data set one by one as target standard data, and selecting standard user data with the behavior similarity larger than a preset similarity threshold value from the standard user data set to form a primary similar data set;
Adding the target standard data to the primary similar data set to obtain a secondary similar data set, and deleting data in the secondary similar data set from the standard user data set;
and taking the number of data elements in the secondary similar data set as the weight of the target standard data, and adding the weight of the target standard data and the weight of the target standard data into the weighted user data set.
In particular, the similarity threshold may be 0.75 or 0.8.
In the embodiment of the invention, the weighted user data set is obtained by carrying out data merging on the user behavior data set according to the similarity, the data with poor reliability in the user behavior data set can be deleted, and the rest data is merged, so that the number of data in the data set is reduced, the computing resources for extracting the following user behavior characteristics are saved, and the following clustering is convenient.
S3, carrying out weighted mapping on the weighted user data set by using a preset self-mapping model to obtain a weighted behavior feature set;
in the embodiment of the present invention, referring to fig. 3, the weighted user data set is mapped with weights by using a preset self-mapping model to obtain a weighted behavior feature set, which includes:
S41, extracting a corresponding data weight set from the weighted user data set, and carrying out normalization operation on the weights in the data weight set by utilizing the self-mapping model to obtain a standard weight set;
s42, grouping the weighted user data sets according to the data types to obtain a plurality of weighted type data sets;
S43, selecting the weighted type data sets one by one as a target type data set, calculating a data average value of the target type data set, and subtracting the data average value from each data element in the target type data set to obtain a target average value data set;
S44, calculating the mean square error of the target mean data set, dividing each data element in the target mean data set by the mean square error to obtain a standard type data set, and collecting all the standard type data sets into a standard type data set;
S45, selecting weights from the standard weight set one by one as target weights, extracting data corresponding to the target weights from the standard type data set to form a target data set, vectorizing the data in the target data set according to the sequence of data types to obtain weighted behavior characteristics, and integrating all the weighted behavior characteristics into a weighted behavior characteristic set.
In the embodiment of the invention, the normalization operation is performed on the weights in the data weight set by using the self-mapping model, and the standard weight set is obtained by mapping the equal proportion of the weights in the data weight set to a section from 0 to 1, so that the calculated amount of clustering weight is reduced, and the clustering speed is improved.
In the embodiment of the invention, the weighted user data set is mapped with the weight by using the preset self-mapping model to obtain the weighted behavior feature set, and the data classification in the weighted user data set can be standardized, so that the effect of performing dimension reduction extraction on the weighted user data set is realized, the weight in the weighted user data set is normalized, and the efficiency of subsequent clustering is improved.
S4, carrying out feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster, carrying out feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, and extracting a user behavior habit group according to the behavior feature cluster;
In the embodiment of the present invention, the performing feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster includes:
Collecting the weighted behavior features in the weighted behavior feature set into a weighted vector sequence according to the order of the weights from big to small;
Extracting a preset constant weight data vector from the weight vector sequence according to the sequence order to form an input vector sequence;
Selecting weighted data vectors in the input vector sequence one by one as a first weighted vector, selecting weighted data vectors except the first weighted vector in the weighted vector sequence one by one as a second weighted vector, and calculating a vector distance between the first weighted vector and the second weighted vector by using a preset first distance formula;
Selecting a weighted data vector with the minimum vector distance with the first weighted vector as a target weighted vector, and taking the vector distance between the first weighted vector and the target weighted vector as a target vector distance;
calculating the neighborhood radius of the first weighted vector according to the target vector distance, and converging all weighted data vectors with the vector distance smaller than the neighborhood radius with the first weighted vector into a neighborhood vector group;
Updating the weight of each weighted data vector in the neighborhood vector group by using a preset iterative algorithm to obtain a primary feature cluster corresponding to the first weighted vector, and collecting all the primary feature clusters into a primary feature cluster.
Specifically, the preset constant may be a total number of vector elements of the first weight vector.
In detail, the calculating the neighborhood radius of the first weight vector according to the target vector distance refers to multiplying the target vector distance by a preset neighborhood multiplying power to obtain the neighborhood radius, wherein the neighborhood multiplying power may be 1.5 or 2.
In particular, the iterative algorithm may be a least squares method or a steepest descent method.
In detail, the calculating the vector distance between the first weighted vector and the second weighted vector by using a preset first distance formula includes:
extracting the total number of weighted elements of the vectors from the first weighted vector, taking the weight corresponding to the first weighted vector as a first weight and taking the weight corresponding to the second weighted vector as a second weight;
Calculating a vector distance between the first weight vector and the second weight vector according to the total number of weight elements, the first weight and the second weight by using a first distance formula:
Wherein L refers to the vector distance, arccos refers to an inverse cosine function, m refers to the total number of weighted elements, j refers to the j-th weighted element, C j refers to the value of the j-th weighted element in the first weighted vector, D j refers to the value of the j-th weighted element in the second weighted vector, δ is the second weight, and γ is the first weight.
In the embodiment of the invention, the vector distance between the first weighting vector and the second weighting vector is calculated according to the total number of the weighting elements, the first weight and the second weight by using the first distance formula, so that the difference between the weight increasing vectors can be effectively introduced, and the vector distance is limited in a smaller range, thereby improving the efficiency of clustering calculation.
In detail, the feature clustering of the primary feature clusters by using a nested clustering algorithm to obtain behavior feature clusters includes:
Selecting primary feature clusters in the primary feature cluster set one by one as target feature clusters, and selecting a weighted data vector in the target feature clusters as a cluster center weighted vector;
selecting weighted data vectors except the cluster center weighted vector in the primary feature cluster set one by one as a third weighted vector, and calculating a final vector distance between the cluster center weighted vector and the third data vector by using a second distance formula as follows:
Wherein J refers to the final vector distance, ρ refers to the weight of the third weight vector, σ refers to the weight of the cluster center weight vector, o refers to the total number of vector elements in the cluster center weight vector, k refers to the kth vector element, E k refers to the kth vector element in the cluster center weight vector, and F k refers to the kth vector element in the third weight vector;
And carrying out feature clustering on the primary feature clusters according to the final vector distance to obtain behavior feature clusters.
In detail, by calculating the final vector distance between the cluster center weight vector and the third data vector using the second distance formula, the primary feature clusters can be further differentially divided, thereby improving the accuracy of clustering.
In detail, the method for performing feature clustering on the primary feature clusters according to the final vector distance to obtain the behavior feature clusters is consistent with the step of performing feature clustering on the weighted behavior feature clusters by using a preset weighted clustering algorithm in the step S4 to obtain the primary feature clusters, which is not described herein.
Specifically, the extracting the user behavior habit group according to the behavior feature cluster includes:
Performing a reflection operation on each feature cluster in the behavior feature cluster set on the user behavior data set to obtain a habit data cluster;
And marking the habit data clusters according to the user behavior data sets to obtain behavior habits corresponding to the behavior characteristic clusters, and collecting all the behavior habits into a user behavior habit group.
According to the embodiment of the invention, the behavior characteristic clustering is obtained by performing the clustering operation twice, so that the accuracy of clustered data can be improved, the common characteristics of the data can be grasped more easily, the habit of the user can be extracted, the big data of the cloud of the habit group of the user can be compared and matched by extracting the habit group of the user according to the behavior characteristic clustering, and a more comfortable intelligent home control scheme is provided for the user.
S5, acquiring an online behavior habit group from a preset data cloud, updating the user behavior habit group according to the online behavior habit group to obtain a standard user habit group, and switching the working mode of the intelligent household equipment according to the standard user habit group.
In the embodiment of the invention, the data cloud can store a plurality of storage cloud disks for the user behavior habits of the users.
In the embodiment of the present invention, the updating the user behavior habit group according to the online behavior habit group to obtain a standard user habit group includes:
extracting habit keywords from the user behavior habit group, and searching in the online behavior habit group by utilizing the habit keywords to obtain a matched behavior habit group;
Screening user habits which do not contain the habit keywords from the matched behavior habit group to serve as new habits;
and adding the new habit into the user behavior habit group to obtain a standard user habit group.
In detail, habit keywords can be extracted from the user behavior habit group by using a text word segmentation mode.
Specifically, the habit keywords can be used for searching in the online behavior habit group through a select statement and a regular expression, so as to obtain a matched behavior habit group.
In detail, the step of screening the user habit which does not include the habit key from the matched behavior habit group as the new habit means that the user habit which does not include the habit key is arranged according to the occurrence frequency, and a plurality of user habits with a larger occurrence frequency are selected as the new habit.
According to the embodiment of the invention, the user behavior habit group is updated according to the online behavior habit group to obtain the standard user habit group, and the working mode of the intelligent household equipment is switched according to the standard user habit group, so that the rest of the use habits shared by more people with the same use habits can be provided for the user by combining big data of the cloud, for example, when the user purchases the intelligent household equipment newly, the equipment use habits of the rest of the users with the same preference can be obtained from the cloud, thereby providing better use experience for the user and further improving the efficiency of intelligent household control.
According to the embodiment of the invention, the user behavior data is acquired through the user behavior component in the intelligent equipment group to obtain the user behavior data set, so that the users can be distinguished, and the use behavior record data of each user can be obtained, thereby laying a foundation for the subsequent extraction of the use habit of the users; the weighted user data set is mapped with weights by utilizing a preset self-mapping model to obtain a weighted behavior feature set, the data classification in the weighted user data set can be standardized, the effect of carrying out dimension reduction and feature extraction on the weighted user data set is achieved, the weights in the weighted user data set are normalized, is improved in subsequent clustering efficiency, the behavior feature clustering is obtained through carrying out clustering operation twice, the accuracy of clustering data can be improved, the common characteristics of the data are easier to grasp, user habits are extracted, the user behavior habit group is extracted according to the behavior feature clustering, large data of the user behavior habit group can be compared and matched, a more comfortable intelligent household control scheme is provided for users, the standard user habit group is obtained by combining large data of the cloud end according to the standard user habit group, the cloud end is switched to the intelligent household equipment, and the user habit is provided with the rest common use habits of the users with the same habit, for example, the intelligent household equipment is more than the intelligent household equipment, and the user habit can be used in the same, and the user habit can be controlled by the intelligent household equipment, and the user habit can be switched from the intelligent household equipment, and the rest user habit equipment is better, and the user habit can be controlled by the user has the same user habit, and the user habit can be better and the user habit equipment. Therefore, the intelligent home control method based on big data can solve the problem of low efficiency in intelligent home control.
Fig. 4 is a functional block diagram of a smart home control device based on big data according to an embodiment of the present invention.
The smart home control device 100 based on big data can be installed in electronic equipment. According to the implemented functions, the smart home control device 100 based on big data may include a data acquisition module 101, a data merging module 102, a weighted mapping module 103, a habit extraction module 104 and a mode switching module 105. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
The data acquisition module 101 is configured to collect all intelligent home devices in a preset home area into an intelligent device group, and acquire user behavior data through a user behavior component in the intelligent device group to obtain a user behavior data set;
The data merging module 102 is configured to calculate a similarity between user behavior data in the user behavior data set by using a preset behavior similarity algorithm, and merge data in the user behavior data set according to the similarity to obtain a weighted user data set, where the calculating the similarity between user behavior data in the user behavior data set by using the preset behavior similarity algorithm includes: selecting user behavior data in the user behavior data set one by one as target user data, carrying out vectorization operation on the target user data to obtain target data vectors, and converging all the target data vectors into a data vector sequence; selecting data vectors in the data vector sequence one by one as a first data vector, selecting data vectors, which are positioned behind the first data vector, in the standard data vector sequence one by one as a second data vector, and calculating the behavioral similarity between the first data vector and the second data vector by using the following behavioral similarity algorithm:
Wherein S refers to the behavior similarity, n refers to the total number of elements of each data vector in the vector sequence, i refers to the i-th element of each data vector in the vector sequence, a i refers to the i-th element in the first data vector, B i refers to the i-th element in the second data vector, α is a preset reference coefficient, and β is a preset balance coefficient;
The weighted mapping module 103 is configured to perform weighted mapping on the weighted user data set by using a preset self-mapping model to obtain a weighted behavior feature set;
The habit extraction module 104 is configured to perform feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster, perform feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, and extract a user behavior habit group according to the behavior feature cluster;
The mode switching module 105 is configured to obtain an online behavior habit group from a preset data cloud, update the user behavior habit group according to the online behavior habit group, obtain a standard user habit group, and switch a working mode of the smart home device according to the standard user habit group.
In detail, each module in the big data based smart home control device 100 in the embodiment of the present invention adopts the same technical means as the big data based smart home control method described in fig. 1 to 3, and can generate the same technical effects, which is not described herein.
Fig. 5 is a schematic structural diagram of an electronic device for implementing a smart home control method based on big data according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as a smart home control program based on big data.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes or executes programs or modules stored in the memory 11 (for example, executes a smart home Control program based on big data, etc.), and invokes data stored in the memory 11 to perform various functions of the electronic device and process data.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in an electronic device and various data, such as codes of smart home control programs based on big data, but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Only an electronic device having components is shown, and it will be understood by those skilled in the art that the structures shown in the figures do not limit the electronic device, and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The smart home control program based on big data stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, which when executed in the processor 10, can implement:
Collecting all intelligent household devices in a preset household area into an intelligent device group, and acquiring user behavior data through a user behavior component in the intelligent device group to obtain a user behavior data set;
calculating the similarity between the user behavior data in the user behavior data set by using a preset behavior similarity algorithm, and merging the data of the user behavior data set according to the similarity to obtain a weighted user data set;
carrying out weighted mapping on the weighted user data set by using a preset self-mapping model to obtain a weighted behavior feature set;
Performing feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster, performing feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, and extracting a user behavior habit group according to the behavior feature cluster;
Acquiring an online behavior habit group from a preset data cloud, updating the user behavior habit group according to the online behavior habit group to obtain a standard user habit group, and switching the working mode of the intelligent household equipment according to the standard user habit group.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
Collecting all intelligent household devices in a preset household area into an intelligent device group, and acquiring user behavior data through a user behavior component in the intelligent device group to obtain a user behavior data set;
calculating the similarity between the user behavior data in the user behavior data set by using a preset behavior similarity algorithm, and merging the data of the user behavior data set according to the similarity to obtain a weighted user data set;
carrying out weighted mapping on the weighted user data set by using a preset self-mapping model to obtain a weighted behavior feature set;
Performing feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster, performing feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, and extracting a user behavior habit group according to the behavior feature cluster;
Acquiring an online behavior habit group from a preset data cloud, updating the user behavior habit group according to the online behavior habit group to obtain a standard user habit group, and switching the working mode of the intelligent household equipment according to the standard user habit group.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Wherein artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.