Disclosure of Invention
The invention provides an intelligent 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 intelligent home control.
In order to achieve the above object, the present invention provides a smart home control method based on big data, which includes:
all intelligent household equipment in a preset home area is collected into an intelligent equipment group, and user behavior data are collected through a user behavior component in the intelligent equipment 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 set, performing feature clustering on the primary feature cluster set by using a nested clustering algorithm to obtain a behavior feature cluster set, and extracting a user behavior habit group according to the behavior feature cluster set;
the method comprises the steps of obtaining 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 home equipment according to the standard user habit group.
Optionally, the acquiring, by the user behavior component in the smart device cluster, user behavior data to obtain a user behavior data set includes:
acquiring user portrait data by using a camera assembly in the user behavior assembly, acquiring user fingerprint data by using a fingerprint assembly in the user behavior assembly, 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 lighting configuration data, temperature configuration data, humidity configuration data and audio-visual configuration data of the target users by using the user behavior component;
and according to the category sequence, the light configuration data, the temperature configuration data, the humidity configuration data and the audio-video configuration data are collected into the user behavior data of the target user, and all the user behavior data are collected into the user behavior data set.
Optionally, the generating user age data and user gender data of the target user according to the user portrait data includes:
extracting primary skull features corresponding to the target user from the user portrait data, and iterating the primary skull features by using a preset iteration algorithm to obtain secondary skull features;
classifying according to the secondary skull characteristics by using a preset gender classifier to obtain gender data of the user;
extracting skin texture features corresponding to the portrait data of the user by using the trained texture extraction model;
classifying according to the skin texture features by using the trained multi-mode classifier to obtain primary age data, and counting data with the maximum 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 a data value exceeding a preset user data threshold 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 the standard user data with the behavior similarity greater than a preset similarity threshold value with the target standard data from the standard user data set to form a primary similar data group;
adding the target standard data to the primary similar data group to obtain a secondary similar data group, and deleting data in the secondary similar data group from the standard user data set;
and taking the number of the data elements in the secondary similar data group as the weight of the target standard data, and adding the target standard data and the weight of the target standard data into the weighted user data set.
Optionally, the performing weighted mapping on the weighted user data set by using a preset self-mapping model to obtain a weighted behavior feature set, including:
extracting a corresponding data weight set from the weighted user data set, and performing normalization operation on the weights in the data weight set by using 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 groups one by one as target type data groups, calculating a data mean value of the target type data groups, and subtracting the data mean value from each data element in the target type data groups to obtain target mean value data groups;
calculating the mean square error of the target mean data group, dividing each data element in the target mean data group by the mean square error to obtain a standard type data group, collecting all the standard type data groups into a standard type data set,
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, carrying out vectorization operation on the data in the target data set according to the sequence of data types to obtain weighted behavior characteristics, and collecting 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 set includes:
converging the weighted behavior characteristics in the weighted behavior characteristic set into a weighted vector sequence according to the sequence of the weights from large to small;
extracting a preset constant number of weighted data vectors from the weighted 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 first weighted vectors, selecting weighted data vectors except the first weighted vectors in the weighted vector sequence one by one as second weighted vectors, and calculating the vector distance between the first weighted vectors and the second weighted vectors 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 neighborhood radius of the first weighted vector according to the target vector distance, and gathering all weighted data vectors with the vector distance from the first weighted vector smaller than the neighborhood radius into a neighborhood vector group;
and 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 set.
Optionally, the performing feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster, includes:
selecting primary feature clusters in the primary feature cluster set one by one as a target feature cluster, and selecting a weighted data vector in the target feature cluster 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 third weighted vectors, and calculating the final vector distance between the cluster center weighted vector and the third data vectors by using a second distance formula as follows:
wherein J is the final vector distance, ρ is the weight of the third weighting vector, σ is the weight of the cluster center weighting vector, o is the total number of vector elements in the cluster center weighting vector, k is the kth vector element, E is the k-th vector element k Refers to the k-th vector element, F, in the cluster center weighting vector k Refers to the kth vector element in the third weighting vector;
and performing feature clustering on the primary feature cluster according to the final vector distance to obtain a behavior feature cluster.
In order to solve the above problem, the present invention further provides a smart home control device based on big data, where the device includes:
the data acquisition module is used for collecting all intelligent household equipment in a preset household area into an intelligent equipment group, and acquiring user behavior data through a user behavior component in the intelligent equipment 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 perform data merging on the user behavior data set according to the similarity to obtain a weighted user data set, where the calculating of the similarity between user behavior data in the user behavior data set by using the preset behavior similarity algorithm includes: selecting the user behavior data in the user behavior data set one by one as target user data, performing vectorization operation on the target user data to obtain target data vectors, and gathering all the target data vectors into a data vector sequence; selecting data vectors in the data vector sequence one by one as first data vectors, selecting data vectors behind the first data vectors in the standard data vector sequence one by one as second data vectors, and calculating the behavior similarity between the first data vectors and the second data vectors by using a following behavior 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 ith element of each data vector in the vector sequence, A refers to the number of elements of each data vector in the vector sequence, and i refers to the i-th element, B, in said first data vector i The ith element in the second data vector is referred to, alpha is a preset reference coefficient, and beta is a preset balance coefficient;
the weighted mapping module is used for carrying out 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 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 set, carrying out feature clustering on the primary feature cluster set by using a nested clustering algorithm to obtain a behavior feature cluster set, and extracting a user behavior habit group according to the behavior feature cluster set;
the mode switching module is used for acquiring an online behavior habit group from a preset data cloud end, 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 home equipment according to the standard user habit group.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the smart home control method based on big data.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, where at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above smart home control method based on big data.
According to the embodiment of the invention, the user behavior data is acquired through the user behavior component in the intelligent equipment cluster to obtain the user behavior data set, the users can be distinguished, and the use behavior record data of each user is obtained, so that a foundation is laid for subsequent extraction of the use habits of the users; the weighted user data set is subjected to weighted mapping by using a preset self-mapping model to obtain a weighted behavior characteristic set, data in the weighted user data set can be standardized according to types, so that the effect of reducing the dimension and extracting the characteristics of the weighted user data set is realized, the weights in the weighted user data set are normalized, the efficiency of subsequent clustering is improved, a behavior characteristic cluster is obtained by performing clustering twice, the accuracy of clustered data can be improved, the common characteristics of data can be more easily mastered, the user habits can be extracted, a user behavior habit group is extracted according to the behavior characteristic cluster, big data of the user behavior habit group can be compared and matched, a more comfortable intelligent home control scheme is provided for a user, the user behavior habit group is updated according to the online behavior habit group to obtain a standard user habit group, the working mode of the intelligent home equipment is switched according to the standard user behavior habit group, the working mode of the intelligent home equipment can be switched according to the big data of the user, the common people who have the same usage, for example, when the user buys a new intelligent home equipment, the working mode of the user who has the same usage is switched, and the rest of the cloud side user behavior habit can be set, and the working efficiency of the user can be improved. Therefore, the intelligent home control method and device based on big data, the electronic equipment and the computer readable storage medium provided by the invention can solve the problem of low efficiency in intelligent home control.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides an intelligent home control method based on big data. The execution subject of the smart home control method based on big data includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the smart home control method based on big data may be executed by software or hardware installed in a terminal device or a server device, and the software may be a block chain platform. The server 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 basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
Fig. 1 is a schematic flow chart of a smart home control method based on big data according to an embodiment of the present invention. In this embodiment, the smart home control method based on big data includes:
s1, collecting all intelligent household equipment in a preset home area into an intelligent equipment group, and acquiring user behavior data through a user behavior component in the intelligent equipment group to obtain a user behavior data set;
in the embodiment of the invention, the intelligent household equipment can be household electrical 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 refers to a component for recording the use condition of the 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 habit and the like of the user.
In the embodiment of the present invention, as shown in fig. 2, the acquiring user behavior data through a user behavior component in the intelligent device cluster to obtain a user behavior data set includes:
s31, collecting user portrait data by using a camera assembly in the user behavior assembly, collecting user fingerprint data by using a fingerprint assembly in the user behavior assembly, 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 lighting configuration data, temperature configuration data, humidity configuration data and audio-visual configuration data of the target users by utilizing the user behavior component;
s33, the light configuration data, the temperature configuration data, the humidity configuration data and the video configuration data are collected into user behavior data of the target user according to a category sequence, and all the user behavior data are collected into the user behavior data set.
In detail, the camera assembly may be an intelligent camera or an intelligent 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, such as WHL-3018B or HOTATA-V86S.
In detail, the generating of the user list according to the user age data, the user gender data and the user fingerprint data refers to matching the user portrait data with the user fingerprint data, so as to determine the number of users and the user ID in the home area.
Specifically, the light configuration data includes data such as a light turn-on time period, light source brightness, and light source color temperature.
In detail, the temperature configuration data comprises an air conditioner starting time period, air conditioner temperature, floor heating temperature setting and outdoor temperature at a corresponding time point.
Specifically, the humidity configuration data includes a humidifier turn-on time period, a humidifier gear, indoor humidity, and outdoor humidity.
In detail, the video configuration data includes television turn-on time, channel selection data, and volume adjustment data.
In detail, the generating of the user age data and the user gender data of the target user according to the user portrait data includes:
extracting primary skull features corresponding to the target user from the user portrait data, and iterating the primary skull features by using a preset iteration algorithm to obtain secondary skull features;
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 portrait data of the user by using the trained texture extraction model;
classifying according to the skin texture features by using the trained multi-mode classifier to obtain primary age data, and counting data with the maximum frequency in the primary age data as the user age data.
Specifically, the trained convolutional neural network model may be used to extract the primary skull feature corresponding to the target user from the user portrait data.
In detail, the iterative algorithm may be an Adaboost algorithm or a Decision Tree algorithm (GDBT).
In detail, the gender classifier may be a Support Vector Machine (SVM) 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 a texture label.
In detail, the multi-mode classifier may be a Support Vector Machine (SVM) or a decision tree model.
Specifically, the obtaining of the lighting configuration data, the temperature configuration data, the humidity configuration data, and the audio-visual configuration data of the target user by using the user behavior component includes:
sending a light query request to intelligent lamps in the intelligent equipment group by using the user behavior component, and extracting light configuration data of the target user from return data of the light query request;
sending a temperature query request to the intelligent air conditioners in the intelligent equipment group by using the user behavior component, and extracting temperature configuration data of the target user from return data of the temperature query request;
sending a humidity query request to the intelligent humidifiers in the intelligent equipment group by using the user behavior component, and extracting humidity configuration data of the target user from return data of the humidity query request;
and sending an audio-video query request to the intelligent televisions in the intelligent equipment group by using the user behavior component, and extracting the audio-video configuration data of the target user from the return 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 cluster 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 subsequently extracting the use habits of the users.
S2, 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;
in this 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 the user behavior data in the user behavior data set one by one as target user data, performing vectorization operation on the target user data to obtain target data vectors, and gathering all the target data vectors into a data vector sequence;
selecting data vectors in the data vector sequence one by one as first data vectors, selecting data vectors behind the first data vectors in the standard data vector sequence one by one as second data vectors, and calculating the behavior similarity between the first data vectors and the second data vectors by using a following behavior 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 ith element of each data vector in the vector sequence, A refers to the number of elements of each data vector in the vector sequence, and i refers to the i-th element, B, in said first data vector i The ith element in the second data vector is referred to, alpha is a preset reference coefficient, and beta 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 utilizing the behavior similarity algorithm, so that the correlation of each element in the data vectors can be considered, the overall similarity is further determined, and the representation of the behavior similarity is improved.
Specifically, the vectorizing operation of the target user data to obtain the target data vector refers to forming a data vector by using each type of data of the target user data as an element of a vector.
In detail, the reference coefficient may be 1 or 0, and the balance coefficient may be 2 or 1.
In detail, 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 a data value exceeding a preset user data threshold 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 the standard user data with behavior similarity greater than a preset similarity threshold value with the target standard data from the standard user data set to form a primary similar data group;
adding the target standard data to the primary similar data group to obtain a secondary similar data group, and deleting data in the secondary similar data group from the standard user data set;
and taking the number of the data elements in the secondary similar data group as the weight of the target standard data, and adding 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 merging the data of 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 can be merged, so that the number of the data in the data set is reduced, the calculation resource for extracting the subsequent user behavior characteristics is saved, and the subsequent clustering is facilitated.
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, as shown in fig. 3, the performing weighted mapping on the weighted user data set by using a preset self-mapping model to obtain a weighted behavior feature set includes:
s41, extracting a corresponding data weight set from the weighted user data set, and performing normalization operation on the weights in the data weight set by using the self-mapping model to obtain a standard weight set;
s42, grouping the weighted user data sets according to data types to obtain a plurality of weighted type data sets;
s43, selecting the weighted type data groups one by one as target type data groups, calculating a data mean value of the target type data groups, and subtracting the data mean value from each data element in the target type data groups to obtain target mean value data groups;
s44, calculating the mean square error of the target mean data group, dividing each data element in the target mean data group by the mean square error to obtain a standard type data group, and gathering all the standard type data groups 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, carrying out vectorization operation on the data in the target data set according to the sequence of data types to obtain weighted behavior characteristics, and collecting all the weighted behavior characteristics into a weighted behavior characteristic set.
In the embodiment of the present invention, the normalization operation of the weights in the data weight set by using the self-mapping model to obtain the standard weight set means that the weights in the data weight set are mapped to an interval from 0 to 1 in an equal proportion, so that the calculation amount of the clustering weight is reduced, and the clustering speed is increased.
In the embodiment of the invention, the weighted user data set is subjected to weighted mapping by using a 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 reducing the dimension and extracting the features in 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, performing feature clustering on the weighted behavior feature set by using a preset weighted clustering algorithm to obtain a primary feature cluster set, performing feature clustering on the primary feature cluster set by using a nested clustering algorithm to obtain a behavior feature cluster set, and extracting a user behavior habit group according to the behavior feature cluster set;
in this 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 set includes:
gathering the weighted behavior characteristics in the weighted behavior characteristic set into a weighted vector sequence according to the sequence of the weights from large to small;
extracting a preset constant number of weighted data vectors from the weighted 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 first weighted vectors, selecting weighted data vectors except the first weighted vectors in the weighted vector sequence one by one as second weighted vectors, and calculating the vector distance between the first weighted vectors and the second weighted vectors 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 neighborhood radius of the first weighted vector according to the target vector distance, and gathering all weighted data vectors with the vector distance from the first weighted vector smaller than the neighborhood radius into a neighborhood vector group;
and 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 gathering all the primary feature clusters into a primary feature cluster set.
Specifically, the preset constant may be a total number of vector elements of the first weighting vector.
In detail, the calculating of the neighborhood radius of the first weighting vector according to the target vector distance refers to multiplying the target vector distance by a preset neighborhood multiplying factor to obtain the neighborhood radius, where the neighborhood multiplying factor 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 a vector distance between the first weighting vector and the second weighting vector by using a preset first distance formula includes:
extracting the total number of weighting elements of the vector from the first weighting vector, taking the weight corresponding to the first weighting vector as a first weight, and taking the weight corresponding to the second weighting vector as a second weight;
calculating a vector distance between the first weighting vector and the second weighting vector according to the total number of weighting elements, the first weight, and the second weight using a first distance formula as follows:
wherein L is the vector distance, arccos is an inverse cosine function, m is the total number of the weighting elements, j is the jth weighting element, C j Refers to the value of the jth weighting element in said first weighting vector, D j Refers to the value of the jth weighting element in the second weighting vector, δ is the second weight, and γ is the first weight.
In the embodiment of the present invention, the first distance formula is used to calculate the vector distance between the first weighting vector and the second weighting vector according to the total number of the weighting elements, the first weight, and the second weight, so that the difference between the weighting increasing vectors can be effectively introduced, and the vector distance is limited within a small range, thereby improving the efficiency of clustering calculation.
In detail, the performing feature clustering on the primary feature cluster by using a nested clustering algorithm to obtain a behavior feature cluster includes:
selecting primary feature clusters in the primary feature cluster set one by one as a target feature cluster, and selecting a weighted data vector in the target feature cluster 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 third weighted vectors, and calculating the final vector distance between the cluster center weighted vector and the third data vectors by using a second distance formula as follows:
wherein J is the final vector distance, ρ is the weight of the third weighting vector, σ is the weight of the cluster center weighting vector, o is the total number of vector elements in the cluster center weighting vector, k is the kth vector element, E is the k-th vector element k Refers to the kth vector element, F, in the cluster center weighting vector k Refers to the kth vector element in the third weighting vector;
and performing feature clustering on the primary feature cluster according to the final vector distance to obtain a behavior feature cluster.
In detail, the final vector distance between the cluster center weighting vector and the third data vector is calculated by using the second distance formula, so that the primary feature cluster set can be further distinguished and divided, and the clustering accuracy is improved.
In detail, the method for performing feature clustering on the primary feature cluster according to the final vector distance to obtain the behavior feature cluster is consistent with the step of performing feature clustering on the weighted behavior feature set by using the preset weighted clustering algorithm in the step S4 to obtain the primary feature cluster, and details are not repeated here.
Specifically, the extracting a user behavior habit group according to the behavior feature cluster includes:
performing inverse mapping operation on each feature cluster in the behavior feature cluster set on the user behavior data set to obtain a habit data cluster;
and performing characteristic marking on the habit data cluster according to the user behavior data set to obtain behavior habits corresponding to the behavior characteristic cluster set, and gathering all the behavior habits into a user behavior habit group.
In the embodiment of the invention, the behavior feature cluster is obtained by performing clustering operation twice, the accuracy of clustering data can be improved, common characteristics of the data can be more easily grasped, so that the user habits are extracted, the user behavior habit group is extracted according to the behavior feature cluster, and the cloud big data of the user behavior habit group can be compared and matched, so that 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 home equipment according to the standard user habit group.
In the embodiment of the invention, the data cloud end can store a large number of storage cloud disks used by the user behavior of the user.
In this 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:
habit keywords are extracted from the user behavior habit group, and the habit keywords are used for searching in the online behavior habit group to obtain a matched behavior habit group;
selecting the user habits which do not contain the habit keywords from the matching behavior habit group as new habits;
and adding the newly added habits 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 means of text word segmentation.
Specifically, the habit keywords may be used to search through a select statement and a regular expression in the online behavior habit group to obtain a matching behavior habit group.
In detail, the step of screening the user habits not containing the habit keywords from the matching behavior habit group as the new addition habits means that the user habits not containing the habit keywords are arranged according to the occurrence frequency, and a plurality of user habits with high frequency are selected as the new addition habits.
In 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 home equipment is switched according to the standard user habit group, so that the other use habits shared by people with the same use habits can be provided for the user by combining the cloud big data, for example, when the user newly purchases the intelligent home equipment, the equipment use habits of the other users with the same preference can be obtained from the cloud, better use experience is provided for the user, and the intelligent home control efficiency is further improved.
According to the embodiment of the invention, the user behavior data is acquired through the user behavior component in the intelligent equipment cluster to obtain the user behavior data set, the users can be distinguished, and the use behavior record data of each user is obtained, so that a foundation is laid for subsequent extraction of the use habits of the users; the weighted user data set is subjected to weighted mapping by using a preset self-mapping model to obtain a weighted behavior characteristic set, data in the weighted user data set can be classified into types for standardization, so that the effect of reducing dimensions and extracting characteristics in the weighted user data set is realized, the weights in the weighted user data set are normalized, the subsequent clustering efficiency is improved, a behavior characteristic cluster set is obtained by performing clustering twice, the accuracy of clustered data can be improved, common characteristics of data can be more easily grasped, user habits can be extracted, a user behavior habit group is extracted according to the behavior characteristic cluster set, large data of the user behavior habit group can be compared and matched, so that a more comfortable intelligent home control scheme is provided for users, the user behavior habit group is updated according to the online behavior habit group to obtain a standard user habit group, the working mode of the intelligent home equipment is switched according to the standard user behavior habit group, the user behavior habit group can be combined with the large data to provide other users with the same use for the users, for example, when a new user buys an intelligent home equipment, the working mode of the intelligent home equipment is switched from the same use of the same user habit group, and the cloud control efficiency is improved. 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 according to the present invention can be installed in an electronic device. According to the realized functions, the smart home control device 100 based on big data may include a data collection module 101, a data merging module 102, a right mapping module 103, a habit extraction module 104, and a mode switching module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform a fixed function, and are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data acquisition module 101 is configured to collect all the smart home devices in a preset home area into a smart device cluster, and acquire user behavior data through a user behavior component in the smart device cluster 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 perform data merging on 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 the user behavior data in the user behavior data set one by one as target user data, performing vectorization operation on the target user data to obtain target data vectors, and gathering all the target data vectors into a data vector sequence; selecting data vectors in the data vector sequence one by one as first data vectors, selecting data vectors behind the first data vectors in the standard data vector sequence one by one as second data vectors, and calculating the behavior similarity between the first data vectors and the second data vectors by using a following behavior 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 ith element of each data vector in the vector sequence, A refers to the number of elements of each data vector in the vector sequence, and i refers to the i-th element, B, in said first data vector i The number is the ith element in the second data vector, alpha is a preset reference coefficient, and beta 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 set, perform feature clustering on the primary feature cluster set by using a nested clustering algorithm to obtain a behavior feature cluster set, and extract a user behavior habit group according to the behavior feature cluster set;
the mode switching module 105 is configured to acquire an online behavior habit group from a preset data cloud, update the user behavior habit group according to the online behavior habit group to 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, when the modules in the smart home control apparatus 100 based on big data according to the embodiment of the present invention are used, the same technical means as the smart home control method based on big data described in fig. 1 to fig. 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device implementing a smart home control method based on big data according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program, such as a smart home control program based on big data, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), 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 electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a smart home Control program based on big data, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable 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 Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and 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 to store not only application software installed in the electronic device and various types of data, such as codes of smart home control programs based on big data, but also temporarily store data that has been output or will be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes 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.), which are 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), and optionally 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 device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Only electronic devices having components are shown, it will be understood by those skilled in the art that the structures shown in the figures do not constitute limitations on the electronic devices, and may include fewer or more components than shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply 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 realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the embodiments described are illustrative only and are not to be construed as limiting the scope of the claims.
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, and when running in the processor 10, the following steps can be implemented:
gathering all intelligent household equipment in a preset home area into an intelligent equipment group, and acquiring user behavior data through a user behavior component in the intelligent equipment 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 set, performing feature clustering on the primary feature cluster set by using a nested clustering algorithm to obtain a behavior feature cluster set, and extracting a user behavior habit group according to the behavior feature cluster set;
the method comprises the steps of obtaining 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 home equipment according to the standard user habit group.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, 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, may implement:
gathering all intelligent household equipment in a preset home area into an intelligent equipment group, and acquiring user behavior data through a user behavior component in the intelligent equipment 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 set, performing feature clustering on the primary feature cluster set by using a nested clustering algorithm to obtain a behavior feature cluster set, and extracting a user behavior habit group according to the behavior feature cluster set;
the method comprises the steps of obtaining 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 home equipment according to the standard user habit group.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
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 attributes 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 related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.